編集

次の方法で共有


HybridSpaAuthorizationCodeClient class

Extends

AuthorizationCodeClient

Constructors

HybridSpaAuthorizationCodeClient(ClientConfiguration)

Inherited Properties

authority
logger

Inherited Methods

acquireToken(CommonAuthorizationCodeRequest, AuthorizationCodePayload)

API to acquire a token in exchange of 'authorization_code` acquired by the user in the first leg of the authorization_code_grant

getAuthCodeUrl(CommonAuthorizationUrlRequest)

Creates the URL of the authorization request letting the user input credentials and consent to the application. The URL target the /authorize endpoint of the authority configured in the application object. Once the user inputs their credentials and consents, the authority will send a response to the redirect URI sent in the request and should contain an authorization code, which can then be used to acquire tokens via acquireToken(AuthorizationCodeRequest)

getLogoutUri(CommonEndSessionRequest)

Used to log out the current user, and redirect the user to the postLogoutRedirectUri. Default behaviour is to redirect the user to window.location.href.

handleFragmentResponse(string, string)

Handles the hash fragment response from public client code request. Returns a code response used by the client to exchange for a token in acquireToken.

updateAuthority(Authority)

Updates the authority object of the client. Endpoint discovery must be completed.

Constructor Details

HybridSpaAuthorizationCodeClient(ClientConfiguration)

new HybridSpaAuthorizationCodeClient(config: ClientConfiguration)

Parameters

config

ClientConfiguration

Inherited Property Details

authority

authority: Authority

Property Value

Authority

Inherited From BaseClient.authority

logger

logger: Logger

Property Value

Logger

Inherited From BaseClient.logger

Inherited Method Details

acquireToken(CommonAuthorizationCodeRequest, AuthorizationCodePayload)

API to acquire a token in exchange of 'authorization_code` acquired by the user in the first leg of the authorization_code_grant

function acquireToken(request: CommonAuthorizationCodeRequest, authCodePayload?: AuthorizationCodePayload): Promise<AuthenticationResult>

Parameters

request

CommonAuthorizationCodeRequest

authCodePayload

AuthorizationCodePayload

Returns

Promise<AuthenticationResult>

Inherited From AuthorizationCodeClient.acquireToken

getAuthCodeUrl(CommonAuthorizationUrlRequest)

Creates the URL of the authorization request letting the user input credentials and consent to the application. The URL target the /authorize endpoint of the authority configured in the application object. Once the user inputs their credentials and consents, the authority will send a response to the redirect URI sent in the request and should contain an authorization code, which can then be used to acquire tokens via acquireToken(AuthorizationCodeRequest)

function getAuthCodeUrl(request: CommonAuthorizationUrlRequest): Promise<string>

Parameters

request

CommonAuthorizationUrlRequest

Returns

Promise<string>

Inherited From AuthorizationCodeClient.getAuthCodeUrl

getLogoutUri(CommonEndSessionRequest)

Used to log out the current user, and redirect the user to the postLogoutRedirectUri. Default behaviour is to redirect the user to window.location.href.

function getLogoutUri(logoutRequest: CommonEndSessionRequest): string

Parameters

logoutRequest

CommonEndSessionRequest

Returns

string

Inherited From AuthorizationCodeClient.getLogoutUri

handleFragmentResponse(string, string)

Handles the hash fragment response from public client code request. Returns a code response used by the client to exchange for a token in acquireToken.

function handleFragmentResponse(hashFragment: string, cachedState: string): AuthorizationCodePayload

Parameters

hashFragment

string

cachedState

string

Returns

AuthorizationCodePayload

Inherited From AuthorizationCodeClient.handleFragmentResponse

updateAuthority(Authority)

Updates the authority object of the client. Endpoint discovery must be completed.

function updateAuthority(updatedAuthority: Authority)

Parameters

updatedAuthority

Authority

Inherited From BaseClient.updateAuthority