arlas-wui-toolkit > "src/app/services/authentification/authentification.service" > AuthentificationService

Class: AuthentificationService

Hierarchy

AuthentificationService

Index

Constructors

Properties

Accessors

Methods


Constructors

constructor

new AuthentificationService(oauthService: OAuthService, http: HttpClient): AuthentificationService

Defined in src/app/services/authentification/authentification.service.ts:34

Parameters:

Name Type
oauthService OAuthService
http HttpClient

Returns: AuthentificationService


Properties

authConfig

● authConfig: AuthConfig

Defined in src/app/services/authentification/authentification.service.ts:15


authConfigValue

● authConfigValue: any

Defined in src/app/services/authentification/authentification.service.ts:16


canActivateProtectedRoutes

● canActivateProtectedRoutes: Observable<boolean> = combineLatest( this.isAuthenticated, this.isDoneLoading ).pipe(map(values => values.every(b => b)))

Defined in src/app/services/authentification/authentification.service.ts:31

Publishes true if and only if (a) all the asynchronous initial login calls have completed or errorred, and (b) the user ended up being authenticated.

In essence, it combines:

  • the latest known state of whether the user is authorized
  • whether the ajax calls for initial log in have all been done

isAuthenticated

● isAuthenticated: Observable<boolean> = this.isAuthenticatedSubject.asObservable()

Defined in src/app/services/authentification/authentification.service.ts:18


isDoneLoading

● isDoneLoading: Observable<boolean> = this.isDoneLoadingSubject.asObservable()

Defined in src/app/services/authentification/authentification.service.ts:20


Accessors

accessToken

getaccessToken(): string

Defined in src/app/services/authentification/authentification.service.ts:104

Returns: string


idToken

getidToken(): string

Defined in src/app/services/authentification/authentification.service.ts:106

Returns: string


identityClaims

getidentityClaims(): object

Defined in src/app/services/authentification/authentification.service.ts:105

Returns: object


logoutUrl

getlogoutUrl(): string

Defined in src/app/services/authentification/authentification.service.ts:107

Returns: string


Methods

hasValidAccessToken

hasValidAccessToken(): boolean

Defined in src/app/services/authentification/authentification.service.ts:102

Returns: boolean


hasValidIdToken

hasValidIdToken(): boolean

Defined in src/app/services/authentification/authentification.service.ts:103

Returns: boolean


initAuthService

initAuthService(configService: any, useDiscovery?: boolean, forceConnect?: boolean): Promise<void>

Defined in src/app/services/authentification/authentification.service.ts:40

Parameters:

Name Type
configService any
Optional useDiscovery boolean
Optional forceConnect boolean

Returns: Promise<void>


login

login(): void

Defined in src/app/services/authentification/authentification.service.ts:97

Returns: void


logout

logout(): void

Defined in src/app/services/authentification/authentification.service.ts:100

Returns: void


refresh

refresh(): void

Defined in src/app/services/authentification/authentification.service.ts:101

Returns: void


runInitialLoginSequence

runInitialLoginSequence(useDiscovery?: boolean, forceConnect?: boolean): Promise<void>

Defined in src/app/services/authentification/authentification.service.ts:65

Parameters:

Name Type
Optional useDiscovery boolean
Optional forceConnect boolean

Returns: Promise<void>