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 IdentityProvider
context
- the context.awsConfiguration
- the configuration.public boolean isRequestCodeOurs(int requestCode)
SignInProvider
isRequestCodeOurs
in interface SignInProvider
requestCode
- the requestCode from a previous call to onActivityResult.public void handleActivityResult(int requestCode, int resultCode, android.content.Intent data)
handleActivityResult
in interface SignInProvider
requestCode
- 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 SignInProvider
signInActivity
- 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 IdentityProvider
public java.lang.String getCognitoLoginKey()
getCognitoLoginKey
in interface IdentityProvider
public boolean refreshUserSignInState()
refreshUserSignInState
in interface IdentityProvider
public java.lang.String getToken()
getToken
in interface IdentityProvider
public java.lang.String refreshToken()
refreshToken
in interface IdentityProvider
public void signOut()
signOut
in interface IdentityProvider
public CognitoUserPool getCognitoUserPool()
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.