com.amazonaws.auth
Class AWSAbstractCognitoIdentityProvider

java.lang.Object
  extended by com.amazonaws.auth.AWSAbstractCognitoIdentityProvider
All Implemented Interfaces:
AWSCognitoIdentityProvider, AWSIdentityProvider
Direct Known Subclasses:
AWSBasicCognitoIdentityProvider

public abstract class AWSAbstractCognitoIdentityProvider
extends java.lang.Object
implements AWSCognitoIdentityProvider

This class serves as a means for some back end code that should be consistent across all identity providers. It handles everything short of getting the identity id and the token, and is what should be extended to create a custom identity provider.


Constructor Summary
AWSAbstractCognitoIdentityProvider(java.lang.String accountId, java.lang.String identityPoolId)
           
 
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 the identityId of the user
 java.lang.String getIdentityPoolId()
           
 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()
          Get the token from the relevant provider
 void identityChanged(java.lang.String newIdentityId)
          Updates the listeners and establishes the new identityId as the stored 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
 
Methods inherited from interface com.amazonaws.auth.AWSCognitoIdentityProvider
refresh
 

Constructor Detail

AWSAbstractCognitoIdentityProvider

public AWSAbstractCognitoIdentityProvider(java.lang.String accountId,
                                          java.lang.String identityPoolId)
Method Detail

getProviderName

public abstract java.lang.String getProviderName()
Gets a string with the name of the provider being used. For example, Cognito would return "Cognito";

Returns:
the name of the provider in a string

getIdentityId

public java.lang.String getIdentityId()
Description copied from interface: AWSIdentityProvider
Gets the identityId of the user

Specified by:
getIdentityId in interface AWSIdentityProvider
Returns:
the identityId of the user

getToken

public java.lang.String getToken()
Description copied from interface: AWSIdentityProvider
Get the token from the relevant provider

Specified by:
getToken in interface AWSIdentityProvider
Returns:
the token which was retrieved from the provider

getIdentityPoolId

public java.lang.String getIdentityPoolId()

getAccountId

public java.lang.String getAccountId()

getLogins

public java.util.Map<java.lang.String,java.lang.String> getLogins()
Description copied from interface: AWSCognitoIdentityProvider
Get the logins from the provider

Specified by:
getLogins in interface AWSCognitoIdentityProvider
Returns:
the logins map

setLogins

public void setLogins(java.util.Map<java.lang.String,java.lang.String> logins)
Description copied from interface: AWSCognitoIdentityProvider
Pass the logins to the provider

Specified by:
setLogins in interface AWSCognitoIdentityProvider
Parameters:
logins - the logins map

unregisterIdentityChangedListener

public void unregisterIdentityChangedListener(IdentityChangedListener listener)
Description copied from interface: AWSCognitoIdentityProvider
Handles the removing of a version of an identity changed listener from the list with the provider

Specified by:
unregisterIdentityChangedListener in interface AWSCognitoIdentityProvider
Parameters:
listener - the listener to be removed

registerIdentityChangedListener

public void registerIdentityChangedListener(IdentityChangedListener listener)
Description copied from interface: AWSCognitoIdentityProvider
Handles the new version of an identity changed listener to be handled by the provider

Specified by:
registerIdentityChangedListener in interface AWSCognitoIdentityProvider
Parameters:
listener - the new listener to be registered

identityChanged

public void identityChanged(java.lang.String newIdentityId)
Updates the listeners and establishes the new identityId as the stored identityId

Specified by:
identityChanged in interface AWSCognitoIdentityProvider
Parameters:
newIdentityId - the identityId to be saved

clearListeners

public void clearListeners()
Description copied from interface: AWSCognitoIdentityProvider
To be used to empty all registered listeners from the identity provider

Specified by:
clearListeners in interface AWSCognitoIdentityProvider


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