return !!this.getAccessToken()
}
- login (username: string, password: string) {
+ login (username: string, password: string, token?: string) {
// Form url encoded
const body = {
client_id: this.clientId,
password
}
+ if (token) Object.assign(body, { externalAuthToken: token })
+
const headers = new HttpHeaders().set('Content-Type', 'application/x-www-form-urlencoded')
return this.http.post<UserLogin>(AuthService.BASE_TOKEN_URL, objectToUrlEncoded(body), { headers })
.pipe(