File

src/core/auth/smart-authentication.service.ts

Description

Central service responsible for configuring and delegating to authentication strategies.

Index

Methods
Accessors

Methods

Public getAuthenticationStrategy
getAuthenticationStrategy()

Exposes the initialized authentication strategy.

Public getToken
getToken(silentOnly: unknown)

Retrieves a bearer token when the strategy exposes one.

Parameters :
Name Type Optional Default value
silentOnly unknown No true
Returns : Promise<string | null>
Public initialize
initialize(authConfig: SmartAuthenticationStrategyConfig, authContext: SmartAuthenticationContext)

Initializes the authentication strategy with the supplied configuration.

Parameters :
Name Type Optional
authConfig SmartAuthenticationStrategyConfig No
authContext SmartAuthenticationContext No
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 :
Name Type Optional
credentials ISmartServiceCredentials Yes
Returns : Promise<any>
Public logout
logout(afterLogoutPage?: string)

Delegates logout to the configured strategy.

Parameters :
Name Type Optional
afterLogoutPage string Yes
Returns : Promise<void>
Public redirectToLoginForDifferentAccount
redirectToLoginForDifferentAccount()

Starts an account-switching login redirect when the active strategy supports tokens.

Returns : Promise<void>

Accessors

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

results matching ""

    No results matching ""