public class CognitoUserPoolsSignInProvider extends java.lang.Object implements SignInProvider
| Modifier and Type | Class and Description |
|---|---|
static class |
CognitoUserPoolsSignInProvider.AttributeKeys
Cognito User Pools attributes.
|
| Constructor and Description |
|---|
CognitoUserPoolsSignInProvider() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCognitoLoginKey() |
CognitoUserPool |
getCognitoUserPool() |
java.lang.String |
getDisplayName() |
java.lang.String |
getToken()
Call getToken to retrieve the access token from successful sign-in with this provider.
|
void |
handleActivityResult(int requestCode,
int resultCode,
android.content.Intent data)
Call handleActivityResult to handle the activity result.
|
void |
initialize(android.content.Context context,
AWSConfiguration awsConfiguration)
Method called upon constructing an identity provider for it to handle its initialization.
|
android.view.View.OnClickListener |
initializeSignInButton(android.app.Activity signInActivity,
android.view.View buttonView,
SignInProviderResultHandler providerResultsHandler)
Initialize the sign-in button for the sign-in activity.
|
boolean |
isRequestCodeOurs(int requestCode)
Call isRequestCodeOurs to determine if this provider should handle an activity result.
|
java.lang.String |
refreshToken()
Refreshes the token if it has expired.
|
boolean |
refreshUserSignInState()
Refreshes the state of whether the user is signed-in and returns the updated state.
|
void |
signOut()
Call signOut to sign out of this provider.
|
public void initialize(android.content.Context context,
AWSConfiguration awsConfiguration)
initialize in interface IdentityProvidercontext - the context.awsConfiguration - the configuration.public boolean isRequestCodeOurs(int requestCode)
SignInProviderisRequestCodeOurs in interface SignInProviderrequestCode - the requestCode from a previous call to onActivityResult.public void handleActivityResult(int requestCode,
int resultCode,
android.content.Intent data)
handleActivityResult in interface SignInProviderrequestCode - the request code.resultCode - the result code.data - the result intent.public android.view.View.OnClickListener initializeSignInButton(android.app.Activity signInActivity,
android.view.View buttonView,
SignInProviderResultHandler providerResultsHandler)
initializeSignInButton in interface SignInProvidersignInActivity - the activity for sign-in.buttonView - the view for the sign-in button to initialize.providerResultsHandler - the resultsHandler for provider sign-in.public java.lang.String getDisplayName()
getDisplayName in interface IdentityProviderpublic java.lang.String getCognitoLoginKey()
getCognitoLoginKey in interface IdentityProviderpublic boolean refreshUserSignInState()
refreshUserSignInState in interface IdentityProviderpublic java.lang.String getToken()
getToken in interface IdentityProviderpublic java.lang.String refreshToken()
refreshToken in interface IdentityProviderpublic void signOut()
signOut in interface IdentityProviderpublic CognitoUserPool getCognitoUserPool()
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.