Example usage for com.amazonaws.services.cognitoidentity AmazonCognitoIdentityClient AmazonCognitoIdentityClient

List of usage examples for com.amazonaws.services.cognitoidentity AmazonCognitoIdentityClient AmazonCognitoIdentityClient

Introduction

In this page you can find the example usage for com.amazonaws.services.cognitoidentity AmazonCognitoIdentityClient AmazonCognitoIdentityClient.

Prototype

AmazonCognitoIdentityClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) 

Source Link

Document

Constructs a new client to invoke service methods on Amazon Cognito Identity using the specified parameters.

Usage

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

License:Open Source License

/**
 * Sets up an AWSAbstractCognitoIdentityProvider, which will serve as the
 * baseline for both Cognito and developer trusted identity providers.
 * Custom providers should not extend this class, but should extend
 * AWSAbstractCognitoDeveloperIdentityProvider
 *
 * @deprecated please use AWSAbstractCognitoIdentityProvider(String
 *             accountId, String identityPoolId, ClientConfiguration
 *             clientConfiguration, Regions region) instead.
 * @param accountId the accountId of the developer
 * @param identityPoolId the identityPoolId to be used
 * @param clientConfiguration the client configuration to be used by the
 *            client//www. j a v a 2 s  .  co m
 */
@Deprecated
public AWSAbstractCognitoIdentityProvider(String accountId, String identityPoolId,
        ClientConfiguration clientConfiguration) {
    this(accountId, identityPoolId,
            new AmazonCognitoIdentityClient(new AnonymousAWSCredentials(), clientConfiguration));
}

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

License:Open Source License

/**
 * Sets up an AWSAbstractCognitoIdentityProvider, which will serve as the
 * baseline for both Cognito and developer trusted identity providers.
 * Custom providers should not extend this class, but should extend
 * AWSAbstractCognitoDeveloperIdentityProvider
 *
 * @param accountId the accountId of the developer
 * @param identityPoolId the identityPoolId to be used
 * @param clientConfiguration the client configuration to be used by the
 *            client/*from ww  w.  j  a  v a2s  . co m*/
 * @param region the region cognito will use
 */
public AWSAbstractCognitoIdentityProvider(String accountId, String identityPoolId,
        ClientConfiguration clientConfiguration, Regions region) {
    this(accountId, identityPoolId,
            new AmazonCognitoIdentityClient(new AnonymousAWSCredentials(), clientConfiguration));
    this.cib.setRegion(Region.getRegion(region));
}

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

License:Open Source License

/**
 * An extension of the AbstractCognitoProvider that is used to communicate
 * with Cognito.//from   w ww.j av a2  s .c  o  m
 *
 * @param accountId the account id of the developer
 * @param identityPoolId the identity pool id of the app/user in question
 * @param clientConfiguration the configuration to apply to service clients
 *            created
 */
public AWSBasicCognitoIdentityProvider(String accountId, String identityPoolId,
        ClientConfiguration clientConfiguration) {
    this(accountId, identityPoolId,
            new AmazonCognitoIdentityClient(new AnonymousAWSCredentials(), clientConfiguration));
}

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

License:Open Source License

/**
 * An extension of the AbstractCognitoProvider that is used to communicate
 * with Cognito./*from  www. ja  va2 s.  c  om*/
 *
 * @param accountId the account id of the developer
 * @param identityPoolId the identity pool id of the app/user in question
 * @param clientConfiguration the configuration to apply to service clients
 *            created
 */
public AWSEnhancedCognitoIdentityProvider(String accountId, String identityPoolId,
        ClientConfiguration clientConfiguration) {
    this(accountId, identityPoolId,
            new AmazonCognitoIdentityClient(new AnonymousAWSCredentials(), clientConfiguration));
}

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

License:Open Source License

/**
 * Constructs a new {@link CognitoCredentialsProvider}, which will use the
 * specified Amazon Cognito identity pool to make a request, using the basic
 * authentication flow, to the AWS Security Token Service (STS) to request
 * short-lived session credentials, which will then be returned by this
 * class's {@link #getCredentials()} method.
 * <p>//  www .j a v  a2s.  com
 * This version of the constructor allows you to specify a client
 * configuration for the Amazon Cognito and STS clients.
 * </p>
 *
 * @param accountId The AWS accountId for the account with Amazon Cognito
 * @param identityPoolId The Amazon Cognito identity pool to use
 * @param unauthRoleArn The ARN of the IAM Role that will be assumed when
 *            unauthenticated
 * @param authRoleArn The ARN of the IAM Role that will be assumed when
 *            authenticated
 * @param region The region to use when contacting Cognito Identity
 * @param clientConfiguration Configuration to apply to service clients
 *            created
 */
public CognitoCredentialsProvider(String accountId, String identityPoolId, String unauthRoleArn,
        String authRoleArn, Regions region, ClientConfiguration clientConfiguration) {
    this(accountId, identityPoolId, unauthRoleArn, authRoleArn,
            new AmazonCognitoIdentityClient(new AnonymousAWSCredentials(), clientConfiguration),
            (unauthRoleArn == null && authRoleArn == null) ? null
                    : new AWSSecurityTokenServiceClient(new AnonymousAWSCredentials(), clientConfiguration));
    this.cib.setRegion(Region.getRegion(region));
}

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

License:Open Source License

/**
 * Constructs a new CognitoCredentialsProvider, which will set up a link to
 * the provider passed in using the enhanced authentication flow to get
 * short-lived credentials from Amazon Cognito, which can be retrieved from
 * {@link #getCredentials()}/*w w w.ja v a  2  s  .c  o  m*/
 * <p>
 * This version of the constructor allows you to specify your own Identity
 * Provider class and the configuration for the Amazon Cognito client.
 * </p>
 *
 * @param provider a reference to the provider in question, including what's
 *            needed to interact with it to later connect with Amazon
 *            Cognito
 * @param clientConfiguration Configuration to apply to service clients
 *            created
 * @param region The region to use when contacting Cognito Identity
 */
public CognitoCredentialsProvider(AWSCognitoIdentityProvider provider, Regions region,
        ClientConfiguration clientConfiguration) {
    this(provider, new AmazonCognitoIdentityClient(new AnonymousAWSCredentials(), clientConfiguration));
    this.cib.setRegion(Region.getRegion(region));
}