public class DisambiguationAuthenticator extends java.lang.Object implements IAuthenticator
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ACCOUNT_TYPE_KEY
The key for the account type
|
static java.lang.String |
VERSION_CODE_KEY
The key for the version code
|
| Constructor and Description |
|---|
DisambiguationAuthenticator(MSAAuthenticator msaAuthenticator,
ADALAuthenticator adalAuthenticator)
Creates a disambiguation authenticator.
|
| Modifier and Type | Method and Description |
|---|---|
IAccountInfo |
getAccountInfo()
Gets the current account info for this authenticator.
|
void |
init(IExecutors executors,
IHttpProvider httpProvider,
android.app.Activity activity,
ILogger logger)
Initializes the authenticator.
|
IAccountInfo |
login(java.lang.String emailAddressHint)
Starts an interactive login.
|
void |
login(java.lang.String emailAddressHint,
ICallback<IAccountInfo> loginCallback)
Starts an interactive login asynchronously.
|
IAccountInfo |
loginSilent()
Starts a silent login.
|
void |
loginSilent(ICallback<IAccountInfo> loginCallback)
Starts a silent login asynchronously.
|
void |
logout()
Log the current user out.
|
void |
logout(ICallback<java.lang.Void> logoutCallback)
Log the current user out.
|
public static final java.lang.String VERSION_CODE_KEY
public static final java.lang.String ACCOUNT_TYPE_KEY
public DisambiguationAuthenticator(MSAAuthenticator msaAuthenticator, ADALAuthenticator adalAuthenticator)
msaAuthenticator - The MSA Authenticator.adalAuthenticator - The ADAL Authenticator.public void init(IExecutors executors, IHttpProvider httpProvider, android.app.Activity activity, ILogger logger)
init in interface IAuthenticatorexecutors - The executors to schedule foreground and background tasks.httpProvider - The http provider for sending requests.activity - The activity to create interactive UI on.logger - The logger for diagnostic information.public void login(java.lang.String emailAddressHint,
ICallback<IAccountInfo> loginCallback)
login in interface IAuthenticatoremailAddressHint - The hint for the email address during the interactive login.loginCallback - The callback to be called when the login is complete.public IAccountInfo login(java.lang.String emailAddressHint) throws ClientException
login in interface IAuthenticatoremailAddressHint - The hint for the email address during the interactive login.ClientException - If the login was unable to complete for any reason.public void loginSilent(ICallback<IAccountInfo> loginCallback)
loginSilent in interface IAuthenticatorloginCallback - The callback to be called when the login is complete.public IAccountInfo loginSilent() throws ClientException
loginSilent in interface IAuthenticatorClientException - Exception occurs if the login was unable to complete for any reason.public void logout(ICallback<java.lang.Void> logoutCallback)
logout in interface IAuthenticatorlogoutCallback - The callback to be called when the logout is complete.public void logout()
throws ClientException
logout in interface IAuthenticatorClientException - If the logout was unable to complete for any reason.public IAccountInfo getAccountInfo()
getAccountInfo in interface IAuthenticator