|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectcom.amazonaws.auth.AWSAbstractCognitoIdentityProvider
public abstract class AWSAbstractCognitoIdentityProvider
This class utilizes Cognito as a means to get an identity and dispense an identityId and token. It also handles the refreshing of the token and identityId.
| Constructor Summary | |
|---|---|
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,
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,
Regions region)
Sets up an AWSAbstractCognitoIdentityProvider, which will serve as the baseline for both Cognito and developer trusted identity providers. |
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AWSAbstractCognitoIdentityProvider(java.lang.String accountId,
java.lang.String identityPoolId,
AmazonCognitoIdentity cibClient)
accountId - the accountId of the developeridentityPoolId - the identityPoolId to be usedcibClient - the cib client which will communicate with cognito
public 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 used| Method Detail |
|---|
public 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()
AWSCognitoIdentityProvider
getIdentityPoolId in interface AWSCognitoIdentityProviderpublic java.lang.String getAccountId()
public java.util.Map<java.lang.String,java.lang.String> getLogins()
AWSCognitoIdentityProvider
getLogins in interface AWSCognitoIdentityProviderpublic void setLogins(java.util.Map<java.lang.String,java.lang.String> logins)
AWSCognitoIdentityProvider
setLogins in interface AWSCognitoIdentityProviderlogins - the logins mappublic boolean isAuthenticated()
AWSCognitoIdentityProvider
isAuthenticated in interface AWSCognitoIdentityProviderpublic void unregisterIdentityChangedListener(IdentityChangedListener listener)
AWSCognitoIdentityProvider
unregisterIdentityChangedListener in interface AWSCognitoIdentityProviderlistener - the listener to be removedpublic void registerIdentityChangedListener(IdentityChangedListener listener)
AWSCognitoIdentityProvider
registerIdentityChangedListener 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()
AWSCognitoIdentityProvider
clearListeners in interface AWSCognitoIdentityProviderpublic java.lang.String refresh()
AWSIdentityProvider
refresh in interface AWSIdentityProvider
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||