Example usage for com.amazonaws.services.cognitoidentity.model GetIdResult getIdentityId

List of usage examples for com.amazonaws.services.cognitoidentity.model GetIdResult getIdentityId

Introduction

In this page you can find the example usage for com.amazonaws.services.cognitoidentity.model GetIdResult getIdentityId.

Prototype


public String getIdentityId() 

Source Link

Document

A unique identifier in the format REGION:GUID.

Usage

From source file:io.fineo.client.auth.AWSAbstractCognitoIdentityProvider.java

License:Open Source License

/**
 * 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.//from   www. j  a  v  a2  s . c om
 */
@Override
public String getIdentityId() {
    if (identityId == null) {
        GetIdRequest getIdRequest = new GetIdRequest().withAccountId(getAccountId())
                .withIdentityPoolId(getIdentityPoolId()).withLogins(loginsMap);

        appendUserAgent(getIdRequest, getUserAgent());

        GetIdResult getIdResult = cib.getId(getIdRequest);

        if (getIdResult.getIdentityId() != null) {
            identityChanged(getIdResult.getIdentityId());
        }
    }
    return identityId;
}