IConfidentialClientApplication interface
Interface for the ConfidentialClientApplication class defining the public API signatures
Methods
acquire |
Acquires tokens from the authority for the application (not for an end user) |
acquire |
Acquires a token by exchanging the authorization code received from the first step of OAuth 2.0 Authorization Code Flow |
acquire |
Acquires a token by exchanging the refresh token provided for a new set of tokens |
acquire |
Acquires tokens with password grant by exchanging client applications username and password for credentials |
acquire |
Acquires tokens from the authority for the application |
acquire |
Acquires a token silently when a user specifies the account the token is requested for |
clear |
Clear the cache |
get |
Creates the URL of the authorization request |
get |
Returns the logger instance |
get |
Gets the token cache for the application |
Set |
This extensibility point is meant for Azure SDK to enhance Managed Identity support |
set |
Replaces the default logger set in configurations with new Logger with new configurations |
Method Details
acquireTokenByClientCredential(ClientCredentialRequest)
Acquires tokens from the authority for the application (not for an end user)
function acquireTokenByClientCredential(request: ClientCredentialRequest): Promise<AuthenticationResult | null>
Parameters
- request
- ClientCredentialRequest
Returns
Promise<AuthenticationResult | null>
acquireTokenByCode(AuthorizationCodeRequest)
Acquires a token by exchanging the authorization code received from the first step of OAuth 2.0 Authorization Code Flow
function acquireTokenByCode(request: AuthorizationCodeRequest): Promise<AuthenticationResult>
Parameters
- request
- AuthorizationCodeRequest
Returns
Promise<AuthenticationResult>
acquireTokenByRefreshToken(RefreshTokenRequest)
Acquires a token by exchanging the refresh token provided for a new set of tokens
function acquireTokenByRefreshToken(request: RefreshTokenRequest): Promise<AuthenticationResult | null>
Parameters
- request
- RefreshTokenRequest
Returns
Promise<AuthenticationResult | null>
acquireTokenByUsernamePassword(UsernamePasswordRequest)
Acquires tokens with password grant by exchanging client applications username and password for credentials
function acquireTokenByUsernamePassword(request: UsernamePasswordRequest): Promise<AuthenticationResult | null>
Parameters
- request
- UsernamePasswordRequest
Returns
Promise<AuthenticationResult | null>
acquireTokenOnBehalfOf(OnBehalfOfRequest)
Acquires tokens from the authority for the application
function acquireTokenOnBehalfOf(request: OnBehalfOfRequest): Promise<AuthenticationResult | null>
Parameters
- request
- OnBehalfOfRequest
Returns
Promise<AuthenticationResult | null>
acquireTokenSilent(SilentFlowRequest)
Acquires a token silently when a user specifies the account the token is requested for
function acquireTokenSilent(request: SilentFlowRequest): Promise<AuthenticationResult | null>
Parameters
- request
- SilentFlowRequest
Returns
Promise<AuthenticationResult | null>
clearCache()
Clear the cache
function clearCache()
getAuthCodeUrl(AuthorizationUrlRequest)
Creates the URL of the authorization request
function getAuthCodeUrl(request: AuthorizationUrlRequest): Promise<string>
Parameters
- request
- AuthorizationUrlRequest
Returns
Promise<string>
getLogger()
Returns the logger instance
function getLogger(): Logger
Returns
Logger
getTokenCache()
SetAppTokenProvider(IAppTokenProvider)
This extensibility point is meant for Azure SDK to enhance Managed Identity support
function SetAppTokenProvider(provider: IAppTokenProvider)
Parameters
- provider
-
IAppTokenProvider
setLogger(Logger)
Replaces the default logger set in configurations with new Logger with new configurations
function setLogger(logger: Logger)
Parameters
- logger
-
Logger