diff options
Diffstat (limited to 'client/src/app/core/auth')
-rw-r--r-- | client/src/app/core/auth/auth.service.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/client/src/app/core/auth/auth.service.ts b/client/src/app/core/auth/auth.service.ts index 9ae008e39..61d755ba0 100644 --- a/client/src/app/core/auth/auth.service.ts +++ b/client/src/app/core/auth/auth.service.ts | |||
@@ -145,7 +145,7 @@ export class AuthService { | |||
145 | return !!this.getAccessToken() | 145 | return !!this.getAccessToken() |
146 | } | 146 | } |
147 | 147 | ||
148 | login (username: string, password: string) { | 148 | login (username: string, password: string, token?: string) { |
149 | // Form url encoded | 149 | // Form url encoded |
150 | const body = { | 150 | const body = { |
151 | client_id: this.clientId, | 151 | client_id: this.clientId, |
@@ -157,6 +157,8 @@ export class AuthService { | |||
157 | password | 157 | password |
158 | } | 158 | } |
159 | 159 | ||
160 | if (token) Object.assign(body, { externalAuthToken: token }) | ||
161 | |||
160 | const headers = new HttpHeaders().set('Content-Type', 'application/x-www-form-urlencoded') | 162 | const headers = new HttpHeaders().set('Content-Type', 'application/x-www-form-urlencoded') |
161 | return this.http.post<UserLogin>(AuthService.BASE_TOKEN_URL, objectToUrlEncoded(body), { headers }) | 163 | return this.http.post<UserLogin>(AuthService.BASE_TOKEN_URL, objectToUrlEncoded(body), { headers }) |
162 | .pipe( | 164 | .pipe( |