arlas-wui-toolkit / Exports / AuthentificationService
Class: AuthentificationService
Hierarchy
↳ AuthentificationService
Table of contents
Constructors
Properties
- authConfig
- authConfigValue
- canActivateProtectedRoutes
- isAuthenticated
- isDoneLoading
- silentRefreshErrorSubject
Accessors
Methods
- areSettingsValid
- hasValidAccessToken
- hasValidIdToken
- initAuthService
- loadUserInfo
- login
- logout
- refresh
- runInitialLoginSequence
Constructors
constructor
• new AuthentificationService(oauthService
, http
)
Parameters
Name | Type |
---|---|
oauthService |
OAuthService |
http |
HttpClient |
Overrides
ArlasAuthentificationService.constructor
Defined in
projects/arlas-toolkit/src/lib/services/authentification/authentification.service.ts:40
Properties
authConfig
• authConfig: AuthConfig
Defined in
projects/arlas-toolkit/src/lib/services/authentification/authentification.service.ts:18
authConfigValue
• authConfigValue: AuthentSetting
Inherited from
ArlasAuthentificationService.authConfigValue
Defined in
projects/arlas-toolkit/src/lib/services/arlas-authentification/arlas-authentification.service.ts:9
canActivateProtectedRoutes
• canActivateProtectedRoutes: Observable
<boolean
>
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
Defined in
projects/arlas-toolkit/src/lib/services/authentification/authentification.service.ts:35
isAuthenticated
• isAuthenticated: Observable
<boolean
>
Defined in
projects/arlas-toolkit/src/lib/services/authentification/authentification.service.ts:20
isDoneLoading
• isDoneLoading: Observable
<boolean
>
Defined in
projects/arlas-toolkit/src/lib/services/authentification/authentification.service.ts:22
silentRefreshErrorSubject
• silentRefreshErrorSubject: Observable
<OAuthEvent
>
Defined in
projects/arlas-toolkit/src/lib/services/authentification/authentification.service.ts:24
Accessors
accessToken
• get
accessToken(): string
Returns
string
Defined in
projects/arlas-toolkit/src/lib/services/authentification/authentification.service.ts:122
idToken
• get
idToken(): string
Returns
string
Defined in
projects/arlas-toolkit/src/lib/services/authentification/authentification.service.ts:128
identityClaims
• get
identityClaims(): Record
<string
, any
>
Returns
Record
<string
, any
>
Defined in
projects/arlas-toolkit/src/lib/services/authentification/authentification.service.ts:125
logoutUrl
• get
logoutUrl(): string
Returns
string
Defined in
projects/arlas-toolkit/src/lib/services/authentification/authentification.service.ts:131
Methods
areSettingsValid
▸ areSettingsValid(authentSetting
): [boolean
, string
]
Parameters
Name | Type |
---|---|
authentSetting |
AuthentSetting |
Returns
[boolean
, string
]
Defined in
projects/arlas-toolkit/src/lib/services/authentification/authentification.service.ts:135
hasValidAccessToken
▸ hasValidAccessToken(): boolean
Returns
boolean
Defined in
projects/arlas-toolkit/src/lib/services/authentification/authentification.service.ts:116
hasValidIdToken
▸ hasValidIdToken(): boolean
Returns
boolean
Defined in
projects/arlas-toolkit/src/lib/services/authentification/authentification.service.ts:119
initAuthService
▸ initAuthService(): Promise
<void
>
Returns
Promise
<void
>
Defined in
projects/arlas-toolkit/src/lib/services/authentification/authentification.service.ts:49
loadUserInfo
▸ loadUserInfo(): Observable
<UserInfo
>
Return an observable of the user Auth0 profile
Returns
Observable
<UserInfo
>
Defined in
projects/arlas-toolkit/src/lib/services/authentification/authentification.service.ts:182
login
▸ login(): void
Returns
void
Defined in
projects/arlas-toolkit/src/lib/services/authentification/authentification.service.ts:107
logout
▸ logout(): void
Returns
void
Defined in
projects/arlas-toolkit/src/lib/services/authentification/authentification.service.ts:110
refresh
▸ refresh(): void
Returns
void
Defined in
projects/arlas-toolkit/src/lib/services/authentification/authentification.service.ts:113
runInitialLoginSequence
▸ runInitialLoginSequence(useDiscovery?
, forceConnect?
): Promise
<void
>
Parameters
Name | Type |
---|---|
useDiscovery? |
boolean |
forceConnect? |
boolean |
Returns
Promise
<void
>
Defined in
projects/arlas-toolkit/src/lib/services/authentification/authentification.service.ts:76