|
|||||||
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. Any custom provider which needs interaction with Cognito should extend this class.
Constructor Summary | |
---|---|
AWSAbstractCognitoIdentityProvider(java.lang.String accountId,
java.lang.String identityPoolId)
|
|
AWSAbstractCognitoIdentityProvider(java.lang.String accountId,
java.lang.String identityPoolId,
AmazonCognitoIdentity cibClient)
|
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 |
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)
public AWSAbstractCognitoIdentityProvider(java.lang.String accountId, java.lang.String identityPoolId)
Method Detail |
---|
public abstract java.lang.String getProviderName()
public java.lang.String getIdentityId()
getIdentityId
in interface AWSCognitoIdentityProvider
public java.lang.String getToken()
getToken
in interface AWSIdentityProvider
public java.lang.String getIdentityPoolId()
AWSCognitoIdentityProvider
getIdentityPoolId
in interface AWSCognitoIdentityProvider
public java.lang.String getAccountId()
public java.util.Map<java.lang.String,java.lang.String> getLogins()
AWSCognitoIdentityProvider
getLogins
in interface AWSCognitoIdentityProvider
public void setLogins(java.util.Map<java.lang.String,java.lang.String> logins)
AWSCognitoIdentityProvider
setLogins
in interface AWSCognitoIdentityProvider
logins
- the logins mappublic void unregisterIdentityChangedListener(IdentityChangedListener listener)
AWSCognitoIdentityProvider
unregisterIdentityChangedListener
in interface AWSCognitoIdentityProvider
listener
- the listener to be removedpublic void registerIdentityChangedListener(IdentityChangedListener listener)
AWSCognitoIdentityProvider
registerIdentityChangedListener
in interface AWSCognitoIdentityProvider
listener
- the new listener to be registeredpublic void identityChanged(java.lang.String newIdentityId)
identityChanged
in interface AWSCognitoIdentityProvider
newIdentityId
- the identityId to be savedpublic void clearListeners()
AWSCognitoIdentityProvider
clearListeners
in interface AWSCognitoIdentityProvider
public 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 |