OidcBrowserClient Class


Utility to generate OIDC/OAuth tokens for Single Page Applications (running in the Browser)




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  
signInSilent(requestContext: ClientRequestContext): Promise<User> Protected Attempts a silent sign in with the authorization provider  
signOut(requestContext: ClientRequestContext): Promise<void> Start the sign-out process  

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 ImsAuthorizationClient 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.


Name Type Description
_accessToken Protected undefined | AccessToken    
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.  
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(), if the token  

Inherited properties

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

Defined in

Last Updated: 29 April, 2020