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 IdentityProvider
context
- the context.awsConfig
- the AWS Configuration.public boolean isRequestCodeOurs(int requestCode)
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 resultsHandler)
initializeSignInButton
in interface SignInProvider
signInActivity
- 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 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
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.