com.amazonaws.auth
Class AWSBasicCognitoIdentityProvider

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

public class AWSBasicCognitoIdentityProvider
extends AWSAbstractCognitoIdentityProvider

An extension of the AbstractCognitoProvider that utilizes Cognito as a means to validate an identity and dispense an identityId and token. All other functionality is the same as that of AbstractCognitoIdentityProvider


Constructor Summary
AWSBasicCognitoIdentityProvider(java.lang.String accountId, java.lang.String identityPoolId)
          Wraps around the AbstractIdentityProvider to cover some back end code that is consistent across all providers, utilizing the CIB client to handle the identity management.
AWSBasicCognitoIdentityProvider(java.lang.String accountId, java.lang.String identityPoolId, AmazonCognitoIdentity cibClient)
          Wraps around the AbstractIdentityProvider to cover some back end code that is consistent across all providers, utilizing the CIB client to handle the identity management.
AWSBasicCognitoIdentityProvider(java.lang.String accountId, java.lang.String identityPoolId, ClientConfiguration clientConfiguration)
          Wraps around the AbstractIdentityProvider to cover some back end code that is consistent across all providers, utilizing the CIB client to handle the identity management.
 
Method Summary
 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 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
 java.lang.String refresh()
          To be used to call the provider back end to get a token and identityId.
 
Methods inherited from class com.amazonaws.auth.AWSAbstractCognitoIdentityProvider
clearListeners, getAccountId, getIdentityPoolId, getLogins, identityChanged, registerIdentityChangedListener, setLogins, unregisterIdentityChangedListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AWSBasicCognitoIdentityProvider

public AWSBasicCognitoIdentityProvider(java.lang.String accountId,
                                       java.lang.String identityPoolId)
Wraps around the AbstractIdentityProvider to cover some back end code that is consistent across all providers, utilizing the CIB client to handle the identity management.

Parameters:
accountId - the account id of the developer
identityPoolId - the identity pool id of the app/user in question

AWSBasicCognitoIdentityProvider

public AWSBasicCognitoIdentityProvider(java.lang.String accountId,
                                       java.lang.String identityPoolId,
                                       ClientConfiguration clientConfiguration)
Wraps around the AbstractIdentityProvider to cover some back end code that is consistent across all providers, utilizing the CIB client to handle the identity management.

Parameters:
accountId - the account id of the developer
identityPoolId - the identity pool id of the app/user in question
clientConfiguration - the configuration to apply to service clients created

AWSBasicCognitoIdentityProvider

public AWSBasicCognitoIdentityProvider(java.lang.String accountId,
                                       java.lang.String identityPoolId,
                                       AmazonCognitoIdentity cibClient)
Wraps around the AbstractIdentityProvider to cover some back end code that is consistent across all providers, utilizing the CIB client to handle the identity management.

Parameters:
accountId - the account id of the developer
identityPoolId - the identity pool id of the app/user in question
cibClient - the cib client which will be used to contact the cib back end
Method Detail

getToken

public 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

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

getIdentityId

public 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.

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

getProviderName

public java.lang.String getProviderName()
Description copied from class: AWSAbstractCognitoIdentityProvider
Gets a string with the name of the provider being used. For example, Cognito would return "Cognito";

Specified by:
getProviderName in class AWSAbstractCognitoIdentityProvider
Returns:
the name of the provider in a string

refresh

public java.lang.String refresh()
Description copied from interface: AWSCognitoIdentityProvider
To be used to call the provider back end to get a token and identityId. Once that has returned, a call to the superclass' update(String, Token) method should be called

Returns:
token returns the token that was updated in the refresh


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