public abstract class AWSAbstractCognitoIdentityProvider extends java.lang.Object implements AWSCognitoIdentityProvider
| Constructor and Description |
|---|
AWSAbstractCognitoIdentityProvider(java.lang.String accountId,
java.lang.String identityPoolId)
Deprecated.
please use AWSAbstractCognitoIdentityProvider(String
accountId, String identityPoolId, Regions region) instead.
|
AWSAbstractCognitoIdentityProvider(java.lang.String accountId,
java.lang.String identityPoolId,
com.amazonaws.services.cognitoidentity.AmazonCognitoIdentity cibClient)
Sets up an AWSAbstractCognitoIdentityProvider, which will serve as the
baseline for both Cognito and developer trusted identity providers.
|
AWSAbstractCognitoIdentityProvider(java.lang.String accountId,
java.lang.String identityPoolId,
ClientConfiguration clientConfiguration)
Deprecated.
please use AWSAbstractCognitoIdentityProvider(String
accountId, String identityPoolId, ClientConfiguration
clientConfiguration, Regions region) instead.
|
AWSAbstractCognitoIdentityProvider(java.lang.String accountId,
java.lang.String identityPoolId,
ClientConfiguration clientConfiguration,
Regions region)
Sets up an AWSAbstractCognitoIdentityProvider, which will serve as the
baseline for both Cognito and developer trusted identity providers.
|
AWSAbstractCognitoIdentityProvider(java.lang.String accountId,
java.lang.String identityPoolId,
Regions region)
Sets up an AWSAbstractCognitoIdentityProvider, which will serve as the
baseline for both Cognito and developer trusted identity providers.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearListeners()
To be used to empty all registered listeners from the identity provider
|
java.lang.String |
getAccountId() |
java.lang.String |
getIdentityId()
Gets a reference to the identityId of the user (sending a new request if
it isn't yet set), using the dev accountId, identityPoolId, and the
user's loginsMap to identify.
|
java.lang.String |
getIdentityPoolId()
Get the identityPoolId from the provider
|
java.util.Map<java.lang.String,java.lang.String> |
getLogins()
Get the logins from the provider
|
abstract java.lang.String |
getProviderName()
Gets a string with the name of the provider being used.
|
java.lang.String |
getToken()
With the logins and identityId to mark the user, it builds a request to
the cognito back end, and returns the token cib hands back
|
void |
identityChanged(java.lang.String newIdentityId)
Updates the listeners and establishes the new identityId as the stored
identityId
|
boolean |
isAuthenticated()
Checks if the current identityId belongs to an authenticated user
|
java.lang.String |
refresh()
To be used to call the provider back end to get a token and identityId.
|
void |
registerIdentityChangedListener(IdentityChangedListener listener)
Handles the new version of an identity changed listener to be handled by
the provider
|
void |
setLogins(java.util.Map<java.lang.String,java.lang.String> logins)
Pass the logins to the provider
|
void |
unregisterIdentityChangedListener(IdentityChangedListener listener)
Handles the removing of a version of an identity changed listener from
the list with the provider
|
public AWSAbstractCognitoIdentityProvider(java.lang.String accountId,
java.lang.String identityPoolId,
com.amazonaws.services.cognitoidentity.AmazonCognitoIdentity cibClient)
accountId - the accountId of the developeridentityPoolId - the identityPoolId to be usedcibClient - the cib client which will communicate with cognito@Deprecated
public AWSAbstractCognitoIdentityProvider(java.lang.String accountId,
java.lang.String identityPoolId,
ClientConfiguration clientConfiguration)
accountId - the accountId of the developeridentityPoolId - the identityPoolId to be usedclientConfiguration - the client configuration to be used by the
clientpublic AWSAbstractCognitoIdentityProvider(java.lang.String accountId,
java.lang.String identityPoolId,
ClientConfiguration clientConfiguration,
Regions region)
accountId - the accountId of the developeridentityPoolId - the identityPoolId to be usedclientConfiguration - the client configuration to be used by the
clientregion - the region cognito will use@Deprecated
public AWSAbstractCognitoIdentityProvider(java.lang.String accountId,
java.lang.String identityPoolId)
accountId - the accountId of the developeridentityPoolId - the identityPoolId to be usedpublic AWSAbstractCognitoIdentityProvider(java.lang.String accountId,
java.lang.String identityPoolId,
Regions region)
accountId - the accountId of the developeridentityPoolId - the identityPoolId to be usedregion - the region cib will usepublic abstract java.lang.String getProviderName()
public java.lang.String getIdentityId()
getIdentityId in interface AWSCognitoIdentityProviderpublic java.lang.String getToken()
getToken in interface AWSIdentityProviderpublic java.lang.String getIdentityPoolId()
AWSCognitoIdentityProvidergetIdentityPoolId in interface AWSCognitoIdentityProviderpublic java.lang.String getAccountId()
public java.util.Map<java.lang.String,java.lang.String> getLogins()
AWSCognitoIdentityProvidergetLogins in interface AWSCognitoIdentityProviderpublic void setLogins(java.util.Map<java.lang.String,java.lang.String> logins)
AWSCognitoIdentityProvidersetLogins in interface AWSCognitoIdentityProviderlogins - the logins mappublic boolean isAuthenticated()
AWSCognitoIdentityProviderisAuthenticated in interface AWSCognitoIdentityProviderpublic void unregisterIdentityChangedListener(IdentityChangedListener listener)
AWSCognitoIdentityProviderunregisterIdentityChangedListener in interface AWSCognitoIdentityProviderlistener - the listener to be removedpublic void registerIdentityChangedListener(IdentityChangedListener listener)
AWSCognitoIdentityProviderregisterIdentityChangedListener in interface AWSCognitoIdentityProviderlistener - the new listener to be registeredpublic void identityChanged(java.lang.String newIdentityId)
identityChanged in interface AWSCognitoIdentityProvidernewIdentityId - the identityId to be savedpublic void clearListeners()
AWSCognitoIdentityProviderclearListeners in interface AWSCognitoIdentityProviderpublic java.lang.String refresh()
AWSIdentityProviderrefresh in interface AWSIdentityProviderCopyright © 2018 Amazon Web Services, Inc. All Rights Reserved.