Package com.microsoft.quickauth.signin
Interface ISignInClient
-
- All Known Implementing Classes:
MSQASignInClient
public interface ISignInClient
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidacquireToken(android.app.Activity activity, java.lang.String[] scopes, OnCompleteListener<TokenResult> completeListener)Acquire token interactively, will pop-up webUI.voidacquireTokenSilent(java.lang.String[] scopes, OnCompleteListener<TokenResult> completeListener)Perform acquire token silent call.voidgetCurrentAccount(android.app.Activity activity, OnCompleteListener<AccountInfo> completeListener)Gets the current account.voidsignIn(android.app.Activity activity, OnCompleteListener<AccountInfo> completeListener)Allows a user to sign in to your application with one of their accounts.voidsignOut(OnCompleteListener<java.lang.Boolean> callback)Signs out the current the Account and Credentials (tokens).
-
-
-
Method Detail
-
signIn
void signIn(@NonNull android.app.Activity activity, @NonNull OnCompleteListener<AccountInfo> completeListener)Allows a user to sign in to your application with one of their accounts. This method may only be called once: once a user is signed in, they must first be signed out before another user may sign in. If you wish to prompt the existing user for credentials use signInAgain(Activity, String[], Prompt, AuthenticationCallback) or acquireToken (AcquireTokenParameters). Note: The authority used to make the sign in request will be either the MSAL default: https://login .microsoftonline.com/common or the default authority specified by you in your configuration- Parameters:
activity- Activity that is used as the parent activity for launching sign in page.completeListener- A callback to be invoked when sign in success and will return sign in account infoAccountInfo.
-
signOut
void signOut(@NonNull OnCompleteListener<java.lang.Boolean> callback)Signs out the current the Account and Credentials (tokens).- Parameters:
callback- A callback to be invoked when sign out finishes and will return sign out result.
-
getCurrentAccount
void getCurrentAccount(@NonNull android.app.Activity activity, @NonNull OnCompleteListener<AccountInfo> completeListener)Gets the current account. This method must be called whenever the application is resumed or prior to running a scheduled background operation.- Parameters:
activity- Activity that is used as the parent activity for get sign accountcompleteListener- A callback to be invoked when complete and will return sign in account infoAccountInfoif success
-
acquireTokenSilent
void acquireTokenSilent(@NonNull java.lang.String[] scopes, @NonNull OnCompleteListener<TokenResult> completeListener)Perform acquire token silent call. If there is a valid access token in the cache, the sdk will return the access token; If no valid access token exists, the sdk will try to find a refresh token and use the refresh token to get a new access token. If refresh token does not exist or it fails the refresh, exception will be sent back via callback.- Parameters:
scopes- The non-null array of scopes to be requested for the access token, the supported scopes can be found inMSQASignInScopeInternal.completeListener- A callback to be invoked when token get finished.
-
acquireToken
void acquireToken(@NonNull android.app.Activity activity, @NonNull java.lang.String[] scopes, @NonNull OnCompleteListener<TokenResult> completeListener)Acquire token interactively, will pop-up webUI. Interactive flow will skip the cache lookup.- Parameters:
activity- Activity that is used as the parent activity for get token.scopes- The non-null array of scopes to be requested for the access token, the supported scopes can be found inMSQASignInScopeInternal.completeListener- A callback to be invoked when token get finished.
-
-