src/core/auth/smart-authentication.service.ts
Central service responsible for configuring and delegating to authentication strategies.
Methods |
|
Accessors |
| Public getAuthenticationStrategy |
getAuthenticationStrategy()
|
|
Exposes the initialized authentication strategy.
Returns :
ISmartAuthenticationStrategy | null
|
| Public initialize | |||||||||
initialize(authConfig: SmartAuthenticationStrategyConfig, authContext: SmartAuthenticationContext)
|
|||||||||
|
Initializes the authentication strategy with the supplied configuration.
Parameters :
Returns :
void
|
| Public isAuthorized |
isAuthorized()
|
|
Delegates authorization checks to the configured strategy.
Returns :
Promise<boolean>
|
| Public login | ||||||
login(credentials?: ISmartServiceCredentials)
|
||||||
|
Delegates login to the configured strategy.
Parameters :
Returns :
Promise<any>
|
| Public logout | ||||||
logout(afterLogoutPage?: string)
|
||||||
|
Delegates logout to the configured strategy.
Parameters :
Returns :
Promise<void>
|
| Public redirectToLoginForDifferentAccount |
redirectToLoginForDifferentAccount()
|
|
Starts an account-switching login redirect when the active strategy supports tokens.
Returns :
Promise<void>
|
| isInitialized |
getisInitialized()
|
|
Determines whether the authentication service has been initialized.
Returns :
boolean
|
| strategy |
getstrategy()
|
|
Returns the active authentication strategy identifier.
Returns :
string | null
|
| usesBearerAuth |
getusesBearerAuth()
|
|
Indicates whether the current strategy relies on bearer tokens.
Returns :
boolean
|
| bearerExcludedUrls |
getbearerExcludedUrls()
|
|
Returns the configured bearer exclusion list.
Returns :
unknown[]
|
| isEntraidEnabled |
getisEntraidEnabled()
|
|
Indicates whether the Entra ID strategy is active.
Returns :
boolean
|