4.2.2 Using user pools with Bayun AWSS3 wrapper 'SecureAuthentication'
Set up your service config
// Create a user pool with default ClientConfiguration
CognitoUserPool userPool = new CognitoUserPool(context, userPoolId, clientId, clientSecret, cognitoRegion);// Create a user pool with default ClientConfiguration
var userPool: CognitoUserPool =
CognitoUserPool(context, userPoolId, clientId, clientSecret, cognitoRegion)// This will also work
ClientConfiguration clientConfiguration = new ClientConfiguration();
AmazonCognitoIdentityProvider cipClient = new AmazonCognitoIdentityProviderClient(new AnonymousAWSCredentials(), clientConfiguration);
cipClient.setRegion(Region.getRegion(cognitoRegion));
CognitoUserPool userPool = new CognitoUserPool(context, userPoolId, clientId, clientSecret, cipClient);// This will also work
val clientConfiguration :ClientConfiguration = ClientConfiguration()
val cipClient :AmazonCognitoIdentityProvider = AmazonCognitoIdentityProviderClient( AnonymousAWSCredentials(), clientConfiguration)
cipClient.setRegion(Region.getRegion(cognitoRegion))
val userPool:CognitoUserPool = CognitoUserPool(context, userPoolId, clientId, clientSecret, cipClient)
Set Up the SecureAuthentication object
SecureAuthentication secureAuthentication = SecureAuthentication.getInstance();
secureAuthentication.setContext(appContext);
secureAuthentication.setAppId(APP_ID);
secureAuthentication.setAppSecret(APP_SECRET);
secureAuthentication.setApplicationKeySalt(APP_SALT);
secureAuthentication.setCompanyName(companyName);val secureAuthentication = SecureAuthentication.getInstance()
secureAuthentication.setContext(appContext)
secureAuthentication.setAppId(APP_ID)
secureAuthentication.setAppSecret(APP_SECRET);
secureAuthentication.setApplicationKeySalt(APP_SALT);
secureAuthentication.setCompanyName(companyName)Register a User
Confirm Signup
Sign in a user
Sign out a user
Previous4.2.1 Using user pools with AWS Mobile SDKNext5. Store And Retrieve Files securely from Amazon S3
Last updated