diff options
Diffstat (limited to 'client/src/app/core/auth')
-rw-r--r-- | client/src/app/core/auth/auth.service.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/client/src/app/core/auth/auth.service.ts b/client/src/app/core/auth/auth.service.ts index 32f7a5503..fcc6b9bb6 100644 --- a/client/src/app/core/auth/auth.service.ts +++ b/client/src/app/core/auth/auth.service.ts | |||
@@ -11,6 +11,7 @@ import { NotificationsService } from 'angular2-notifications' | |||
11 | 11 | ||
12 | import { AuthStatus } from './auth-status.model' | 12 | import { AuthStatus } from './auth-status.model' |
13 | import { AuthUser } from './auth-user.model' | 13 | import { AuthUser } from './auth-user.model' |
14 | import { ClientLocal } from '../../../../../shared' | ||
14 | // Do not use the barrel (dependency loop) | 15 | // Do not use the barrel (dependency loop) |
15 | import { RestExtractor } from '../../shared/rest' | 16 | import { RestExtractor } from '../../shared/rest' |
16 | 17 | ||
@@ -40,9 +41,9 @@ export class AuthService { | |||
40 | // FIXME: save in local storage? | 41 | // FIXME: save in local storage? |
41 | this.http.get(AuthService.BASE_CLIENT_URL) | 42 | this.http.get(AuthService.BASE_CLIENT_URL) |
42 | .map(this.restExtractor.extractDataGet) | 43 | .map(this.restExtractor.extractDataGet) |
43 | .catch((res) => this.restExtractor.handleError(res)) | 44 | .catch(res => this.restExtractor.handleError(res)) |
44 | .subscribe( | 45 | .subscribe( |
45 | result => { | 46 | (result: ClientLocal) => { |
46 | this.clientId = result.client_id | 47 | this.clientId = result.client_id |
47 | this.clientSecret = result.client_secret | 48 | this.clientSecret = result.client_secret |
48 | console.log('Client credentials loaded.') | 49 | console.log('Client credentials loaded.') |