public interface IPublicClientApplication
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_AUTHORITY |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<IAuthenticationResult> |
acquireToken(AuthorizationCodeParameters parameters)
Acquires security token from the authority using an authorization code previously received.
|
CompletableFuture<IAuthenticationResult> |
acquireToken(DeviceCodeFlowParameters parameters)
Acquires security token from the authority using an device code flow.
|
CompletableFuture<IAuthenticationResult> |
acquireToken(IntegratedWindowsAuthenticationParameters parameters)
Acquires tokens from the authority configured in the application via Integrated Windows Authentication.
|
CompletableFuture<IAuthenticationResult> |
acquireToken(InteractiveRequestParameters parameters)
Acquires tokens from the authority using authorization code grant.
|
CompletableFuture<IAuthenticationResult> |
acquireToken(RefreshTokenParameters parameters)
Acquires a security token from the authority using a refresh token previously received.
|
CompletableFuture<IAuthenticationResult> |
acquireToken(UserNamePasswordParameters parameters)
Acquires tokens from the authority configured in the application via Username/Password authentication.
|
CompletableFuture<IAuthenticationResult> |
acquireTokenSilently(SilentParameters parameters)
Returns tokens from cache if present and not expired or acquires new tokens from the authority
by using the refresh token present in cache.
|
String |
authority() |
String |
clientId() |
String |
correlationId() |
CompletableFuture<Set<IAccount>> |
getAccounts()
Returns accounts in the cache
|
URL |
getAuthorizationRequestUrl(AuthorizationRequestUrlParameters parameters)
Computes the URL of the authorization request letting the user sign-in and consent to the
application.
|
boolean |
logPii() |
Proxy |
proxy() |
CompletableFuture |
removeAccount(IAccount account)
Removes IAccount from the cache
|
SSLSocketFactory |
sslSocketFactory() |
ITokenCache |
tokenCache() |
boolean |
validateAuthority() |
static final String DEFAULT_AUTHORITY
CompletableFuture<IAuthenticationResult> acquireToken(UserNamePasswordParameters parameters)
parameters - instance of UserNamePasswordParametersCompletableFuture containing an IAuthenticationResultCompletableFuture<IAuthenticationResult> acquireToken(IntegratedWindowsAuthenticationParameters parameters)
parameters - instance of IntegratedWindowsAuthenticationParametersCompletableFuture containing an IAuthenticationResultCompletableFuture<IAuthenticationResult> acquireToken(DeviceCodeFlowParameters parameters)
parameters - instance of DeviceCodeFlowParametersCompletableFuture containing an IAuthenticationResultMsalException - thrown if authorization is pending or another error occurred.
If the errorCode of the exception is AuthenticationErrorCode.AUTHORIZATION_PENDING,
the call needs to be retried until the AccessToken is returned.
DeviceCode.interval - The minimum amount of time in seconds that the client
SHOULD wait between polling requests to the token endpointCompletableFuture<IAuthenticationResult> acquireToken(InteractiveRequestParameters parameters)
InteractiveRequestParameters.systemBrowserOptions.
For more information, see https://aka.ms/msal4j-interactive-requestparameters - instance of InteractiveRequestParametersCompletableFuture containing an IAuthenticationResultString clientId()
String authority()
IClientApplicationBase.DEFAULT_AUTHORITYboolean validateAuthority()
String correlationId()
boolean logPii()
Proxy proxy()
SSLSocketFactory sslSocketFactory()
ITokenCache tokenCache()
IClientApplicationBase.acquireTokenSilently(SilentParameters)URL getAuthorizationRequestUrl(AuthorizationRequestUrlParameters parameters)
Once the user successfully authenticates, the response should contain an authorization code,
which can then be passed in toAbstractClientApplicationBase.acquireToken(AuthorizationCodeParameters)
to be exchanged for a token
parameters - AuthorizationRequestUrlParametersCompletableFuture<IAuthenticationResult> acquireToken(AuthorizationCodeParameters parameters)
parameters - AuthorizationCodeParametersCompletableFuture object representing the IAuthenticationResult of the call.CompletableFuture<IAuthenticationResult> acquireToken(RefreshTokenParameters parameters)
parameters - RefreshTokenParametersCompletableFuture object representing the IAuthenticationResult of the call.CompletableFuture<IAuthenticationResult> acquireTokenSilently(SilentParameters parameters) throws MalformedURLException
parameters - instance of SilentParametersCompletableFuture object representing the IAuthenticationResult of the call.MalformedURLException - if authorityUrl from parameters is malformed URLCompletableFuture<Set<IAccount>> getAccounts()
CompletableFuture removeAccount(IAccount account)
account - instance of Account to be removed from cacheCompletableFuture object representing account removal task.Copyright © 2013–2023. All rights reserved.