Upravit

AuthorizeProtocol module

Functions

getAuthorizationCodePayload(AuthorizeResponse, 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.

getAuthorizeUrl(Authority, Map<string, string>, boolean, StringDict)

Returns authorize endpoint with given request parameters in the query string

getStandardAuthorizeRequestParameters(AuthOptions, CommonAuthorizationUrlRequest, Logger, IPerformanceClient)

Returns map of parameters that are applicable to all calls to /authorize whether using PKCE or EAR

validateAuthorizationResponse(AuthorizeResponse, string)

Function which validates server authorization code response.

Function Details

getAuthorizationCodePayload(AuthorizeResponse, 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 getAuthorizationCodePayload(serverParams: AuthorizeResponse, cachedState: string): AuthorizationCodePayload

Parameters

serverParams
AuthorizeResponse
cachedState

string

Returns

getAuthorizeUrl(Authority, Map<string, string>, boolean, StringDict)

Returns authorize endpoint with given request parameters in the query string

function getAuthorizeUrl(authority: Authority, requestParameters: Map<string, string>, encodeParams?: boolean, extraQueryParameters?: StringDict): string

Parameters

authority

Authority

requestParameters

Map<string, string>

encodeParams

boolean

extraQueryParameters
StringDict

Returns

string

getStandardAuthorizeRequestParameters(AuthOptions, CommonAuthorizationUrlRequest, Logger, IPerformanceClient)

Returns map of parameters that are applicable to all calls to /authorize whether using PKCE or EAR

function getStandardAuthorizeRequestParameters(authOptions: AuthOptions, request: CommonAuthorizationUrlRequest, logger: Logger, performanceClient?: IPerformanceClient): Map<string, string>

Parameters

authOptions

AuthOptions

logger
Logger
performanceClient
IPerformanceClient

Returns

Map<string, string>

validateAuthorizationResponse(AuthorizeResponse, string)

Function which validates server authorization code response.

function validateAuthorizationResponse(serverResponse: AuthorizeResponse, requestState: string)

Parameters

serverResponse
AuthorizeResponse
requestState

string