public abstract class MSAAuthenticator extends java.lang.Object implements IAuthenticator
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
VERSION_CODE_KEY
The key for the version code
|
| Constructor and Description |
|---|
MSAAuthenticator() |
| Modifier and Type | Method and Description |
|---|---|
IAccountInfo |
getAccountInfo()
Gets the current account info for this authenticator.
|
abstract java.lang.String |
getClientId()
The client id for this authenticator.
|
abstract java.lang.String[] |
getScopes()
The scopes for this application.
|
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 abstract java.lang.String getClientId()
public abstract java.lang.String[] getScopes()
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 - An exception occurs 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 - An 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 - An exception occurs if the logout was unable to complete for any reason.public IAccountInfo getAccountInfo()
getAccountInfo in interface IAuthenticator