public class FacebookSignInProvider extends java.lang.Object implements SignInProvider
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COGNITO_LOGIN_KEY_FACEBOOK
The Cognito login key for Facebook to be used in the Cognito login Map.
|
| Constructor and Description |
|---|
FacebookSignInProvider() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCognitoLoginKey() |
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 awsConfig)
Intitializes the SDK and debug logs the app KeyHash that must be set up with
the facebook backend to allow login from the app.
|
android.view.View.OnClickListener |
initializeSignInButton(android.app.Activity signInActivity,
android.view.View buttonView,
SignInProviderResultHandler resultsHandler)
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.
|
static void |
setPermissions(java.lang.String... userPermissions)
Add the login permisisons needed by the application.
|
void |
signOut()
Call signOut to sign out of this provider.
|
public static final java.lang.String COGNITO_LOGIN_KEY_FACEBOOK
public void initialize(android.content.Context context,
AWSConfiguration awsConfig)
initialize in interface IdentityProvidercontext - the context.awsConfig - the AWS Configuration.public boolean isRequestCodeOurs(int requestCode)
isRequestCodeOurs 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 resultsHandler)
initializeSignInButton in interface SignInProvidersignInActivity - the activity for sign-in.buttonView - the view for the sign-in button to initialize.resultsHandler - the resultsHandler for provider sign-in.public static void setPermissions(java.lang.String... userPermissions)
userPermissions - The list of permissions requiredpublic 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 IdentityProviderCopyright © 2018 Amazon Web Services, Inc. All Rights Reserved.