public interface IMultipleAccountPublicClientApplication extends IPublicClientApplication
This is MSAL's default mode.
Modifier and Type | Interface and Description |
---|---|
static interface |
IMultipleAccountPublicClientApplication.GetAccountCallback |
static interface |
IMultipleAccountPublicClientApplication.RemoveAccountCallback |
IPublicClientApplication.ApplicationCreatedListener, IPublicClientApplication.DeviceCodeFlowCallback, IPublicClientApplication.IMultipleAccountApplicationCreatedListener, IPublicClientApplication.ISingleAccountApplicationCreatedListener, IPublicClientApplication.LoadAccountsCallback, IPublicClientApplication.SignedHttpRequestRequestCallback
Modifier and Type | Method and Description |
---|---|
void |
acquireToken(android.app.Activity activity,
java.lang.String[] scopes,
java.lang.String loginHint,
AuthenticationCallback callback)
Acquire token interactively, will pop-up webUI.
|
IAuthenticationResult |
acquireTokenSilent(java.lang.String[] scopes,
IAccount account,
java.lang.String authority)
Perform acquire token silent call.
|
void |
acquireTokenSilentAsync(java.lang.String[] scopes,
IAccount account,
java.lang.String authority,
SilentAuthenticationCallback callback)
Perform acquire token silent call.
|
IAccount |
getAccount(java.lang.String identifier)
Retrieve the IAccount object matching the identifier.
|
void |
getAccount(java.lang.String identifier,
IMultipleAccountPublicClientApplication.GetAccountCallback callback)
Retrieve the IAccount object matching the identifier.
|
java.util.List<IAccount> |
getAccounts()
Returns a List of
IAccount objects for which this application has RefreshTokens. |
void |
getAccounts(IPublicClientApplication.LoadAccountsCallback callback)
Asynchronously returns a List of
IAccount objects for which this application has RefreshTokens. |
boolean |
removeAccount(IAccount account)
Removes the Account and Credentials (tokens) for the supplied IAccount.
|
void |
removeAccount(IAccount account,
IMultipleAccountPublicClientApplication.RemoveAccountCallback callback)
Removes the Account and Credentials (tokens) for the supplied IAccount.
|
acquireToken, acquireToken, acquireTokenSilent, acquireTokenSilentAsync, acquireTokenWithDeviceCode, generateSignedHttpRequest, generateSignedHttpRequest, getConfiguration, isSharedDevice
void getAccounts(IPublicClientApplication.LoadAccountsCallback callback)
IAccount
objects for which this application has RefreshTokens.callback
- The callback to notify once this action has finished.java.util.List<IAccount> getAccounts() throws java.lang.InterruptedException, MsalException
IAccount
objects for which this application has RefreshTokens.java.lang.InterruptedException
MsalException
void getAccount(java.lang.String identifier, IMultipleAccountPublicClientApplication.GetAccountCallback callback)
identifier
- String of the identifiercallback
- The callback to notify once this action has finished.IAccount getAccount(java.lang.String identifier) throws java.lang.InterruptedException, MsalException
identifier
- String of the identifierjava.lang.InterruptedException
MsalException
void removeAccount(IAccount account, IMultipleAccountPublicClientApplication.RemoveAccountCallback callback)
account
- The IAccount whose entry and associated tokens should be removed.boolean removeAccount(IAccount account) throws MsalException, java.lang.InterruptedException
account
- The IAccount whose entry and associated tokens should be removed.MsalException
java.lang.InterruptedException
void acquireToken(android.app.Activity activity, java.lang.String[] scopes, java.lang.String loginHint, AuthenticationCallback callback)
activity
- Non-null Activity
that will be used as the parent activity for launching the com.microsoft.identity.common.internal.providers.oauth2.AuthorizationActivity
.scopes
- The non-null array of scopes to be requested for the access token.
MSAL always sends the scopes 'openid profile offline_access'. Do not include any of these scopes in the scope parameter.loginHint
- Optional. If provided, will be used as the query parameter sent for authenticating the user,
which will have the UPN pre-populated.callback
- The Non-null AuthenticationCallback
to receive the result back.
1) If user cancels the flow by pressing the device back button, the result will be sent
back via AuthenticationCallback.onCancel()
.
2) If the sdk successfully receives the token back, result will be sent back via
SilentAuthenticationCallback.onSuccess(IAuthenticationResult)
3) All the other errors will be sent back via
SilentAuthenticationCallback.onError(MsalException)
.IAuthenticationResult acquireTokenSilent(java.lang.String[] scopes, IAccount account, java.lang.String authority) throws MsalException, java.lang.InterruptedException
scopes
- The non-null array of scopes to be requested for the access token.
MSAL always sends the scopes 'openid profile offline_access'. Do not include any of these scopes in the scope parameter.account
- IAccount
represents the account to silently request tokens for.authority
- Authority to issue the token.MsalException
java.lang.InterruptedException
void acquireTokenSilentAsync(java.lang.String[] scopes, IAccount account, java.lang.String authority, SilentAuthenticationCallback callback)
scopes
- The non-null array of scopes to be requested for the access token.
MSAL always sends the scopes 'openid profile offline_access'. Do not include any of these scopes in the scope parameter.account
- IAccount
represents the account to silently request tokens for.authority
- Authority to issue the token.callback
- SilentAuthenticationCallback
that is used to send the result back. The success result will be
sent back via SilentAuthenticationCallback.onSuccess(IAuthenticationResult)
.
Failure case will be sent back via {