com.amazonaws.auth
Interface AWSCognitoIdentityProvider

All Superinterfaces:
AWSIdentityProvider
All Known Implementing Classes:
AWSAbstractCognitoDeveloperIdentityProvider, AWSAbstractCognitoIdentityProvider, AWSBasicCognitoIdentityProvider, AWSEnhancedCognitoIdentityProvider

public interface AWSCognitoIdentityProvider
extends AWSIdentityProvider

A container of data pertinent to a single provider, and will handle most of the interactions with said provider and the client. This includes some more logic for custom identity providers, but shouldn't be implemented to do so. It is utilized by the AWSAbstractCognitoIdentityProvider, which is what should be extended to do so.


Method Summary
 void clearListeners()
          To be used to empty all registered listeners from the identity provider
 java.lang.String getIdentityId()
          Gets the identityId of the user
 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
 void identityChanged(java.lang.String newIdentity)
          Handles the updating of the identityId locally once it has been changed for one reason or another
 boolean isAuthenticated()
          Checks if the current identityId belongs to an authenticated user
 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> loginsMap)
          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 interface com.amazonaws.auth.AWSIdentityProvider
getToken, refresh
 

Method Detail

getIdentityId

java.lang.String getIdentityId()
Gets the identityId of the user

Returns:
the identityId of the user

getIdentityPoolId

java.lang.String getIdentityPoolId()
Get the identityPoolId from the provider

Returns:
the identityPoolId

setLogins

void setLogins(java.util.Map<java.lang.String,java.lang.String> loginsMap)
Pass the logins to the provider

Parameters:
loginsMap - the logins map

getLogins

java.util.Map<java.lang.String,java.lang.String> getLogins()
Get the logins from the provider

Returns:
the logins map

isAuthenticated

boolean isAuthenticated()
Checks if the current identityId belongs to an authenticated user

Returns:
true if the identity is authenticated

registerIdentityChangedListener

void registerIdentityChangedListener(IdentityChangedListener listener)
Handles the new version of an identity changed listener to be handled by the provider

Parameters:
listener - the new listener to be registered

unregisterIdentityChangedListener

void unregisterIdentityChangedListener(IdentityChangedListener listener)
Handles the removing of a version of an identity changed listener from the list with the provider

Parameters:
listener - the listener to be removed

identityChanged

void identityChanged(java.lang.String newIdentity)
Handles the updating of the identityId locally once it has been changed for one reason or another

Parameters:
newIdentity - the new identityId for the user

clearListeners

void clearListeners()
To be used to empty all registered listeners from the identity provider



Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.