OidcBrowserClient Class

Beta

Utility to generate OIDC/OAuth tokens for frontend applications

Extends

Implements

Methods

Name Description
constructor(_configuration: OidcFrontendClientConfiguration): OidcBrowserClient Constructor  
dispose(): void Disposes the resources held by this client  
getAccessToken(requestContext?: ClientRequestContext): Promise<AccessToken> Returns a promise that resolves to the AccessToken of the currently authorized user.  
initialize(requestContext: FrontendRequestContext): Promise<void> Used to initialize the client - must be awaited before any other methods are called  
Start the sign-in process
- calls the onUserStateChanged() call back after the authorization completes
or if there is an error.
 
signOut(requestContext: ClientRequestContext): Promise<void> Start the sign-out process
- calls the onUserStateChanged() call back after the authorization completes
or if there is an error.
 

Inherited methods

Name Inherited from Description
delete(requestContext: AuthorizedClientRequestContext, relativeUrlPath: string): Promise<void> Protected Client used by clients to send delete requests
getUrl(requestContext: ClientRequestContext): Promise<string> Client Gets the URL of the service.
getUrlSearchKey(): string Protected OidcClient Gets name/key to query the service URLs from the URL Discovery Service ("Buddi")
setupOptionDefaults(options: RequestOptions): Promise<void> Protected Client Augments request options with defaults returned by the DefaultRequestOptionsProvider.

Properties

Name Type Description
hasExpired Accessor ReadOnly boolean Set to true if the user has signed in, but the token has expired and requires a refresh  
hasSignedIn Accessor ReadOnly boolean Set to true if signed in - the accessToken may be active or may have expired and require a refresh  
isAuthorized Accessor ReadOnly boolean Set to true if there's a current authorized user or client (in the case of agent applications).  
onUserStateChanged BeEvent<(token: AccessToken | undefined) => void> Event called when the user's sign-in state changes - this may be due to calls to signIn(), signOut() or simply because the token expired  

Inherited properties

Name Type Inherited from Description
_url Protected undefined | string Client  
searchKey Static string OidcClient  

Defined in

Last Updated: 03 June, 2019