public class SignInManager
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
dispose()
Dispose the SignInManager
|
static SignInManager |
getInstance()
Gets the singleton instance of this class.
|
static SignInManager |
getInstance(android.content.Context context)
Gets the singleton instance of this class.
|
SignInProvider |
getPreviouslySignedInProvider()
Call getPreviouslySignedInProvider to determine if the user was left signed-in when the app
was last running.
|
SignInResultHandler |
getResultHandler()
Retrieve the reference to SignInResultHandler
|
boolean |
handleActivityResult(int requestCode,
int resultCode,
android.content.Intent data)
Handle the Activity result for login providers.
|
void |
handleRequestPermissionsResult(int requestCode,
java.lang.String[] permissions,
int[] grantResults)
Handle the Activity request permissions result for sign-in providers.
|
android.view.View.OnClickListener |
initializeSignInButton(java.lang.Class<? extends SignInProvider> providerClass,
android.view.View buttonView)
Call initializeSignInButton to initialize the logic for sign-in for a specific provider.
|
void |
refreshCredentialsWithProvider(android.app.Activity activity,
IdentityProvider signInProvider,
SignInProviderResultHandler resultsHandler)
Federate the token in the Sign-in Provider with Amazon Cognito
Federated Identities to get an identity that can be used to
access AWS resources.
|
void |
setProviderResultsHandler(android.app.Activity activity,
SignInProviderResultHandler resultsHandler)
Sets the results handler results from sign-in with a provider.
|
void |
setResultHandler(SignInResultHandler signInResultHandler)
Set the passed in SignInResultHandler
|
public static SignInManager getInstance()
public static SignInManager getInstance(android.content.Context context)
public void setResultHandler(SignInResultHandler signInResultHandler)
signInResultHandler
- public SignInResultHandler getResultHandler()
public static void dispose()
public SignInProvider getPreviouslySignedInProvider()
public void refreshCredentialsWithProvider(android.app.Activity activity, IdentityProvider signInProvider, SignInProviderResultHandler resultsHandler)
activity
- the calling activity.signInProvider
- the sign-in provider that was previously signed-in.resultsHandler
- the handler to receive results for credential refresh.public void setProviderResultsHandler(android.app.Activity activity, SignInProviderResultHandler resultsHandler)
activity
- the calling activity.resultsHandler
- the handler for results from sign-in with a provider.public android.view.View.OnClickListener initializeSignInButton(java.lang.Class<? extends SignInProvider> providerClass, android.view.View buttonView)
providerType
- the SignInProvider class.buttonView
- the view for the button associated with this provider.public boolean handleActivityResult(int requestCode, int resultCode, android.content.Intent data)
requestCode
- the request code.resultCode
- the result code.data
- result intent.public void handleRequestPermissionsResult(int requestCode, java.lang.String[] permissions, int[] grantResults)
requestCode
- the request code.permissions
- the permissions requested.grantResults
- the grant results.Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.