List of usage examples for com.amazonaws.services.cognitoidentity.model GetOpenIdTokenResult getToken
public String getToken()
An OpenID token, valid for 10 minutes.
From source file:io.fineo.client.auth.AWSAbstractCognitoIdentityProvider.java
License:Open Source License
/** * 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 *//*ww w . j a va 2s . c om*/ @Override public String getToken() { if (this.token == null) { GetOpenIdTokenRequest getTokenRequest = new GetOpenIdTokenRequest().withIdentityId(getIdentityId()) .withLogins(loginsMap); appendUserAgent(getTokenRequest, getUserAgent()); GetOpenIdTokenResult getTokenResult = cib.getOpenIdToken(getTokenRequest); if (!getTokenResult.getIdentityId().equals(getIdentityId())) { identityChanged(getTokenResult.getIdentityId()); } this.token = getTokenResult.getToken(); } return token; }