amazon web services - How Can I Authenticate my user credentials with AWSCongnito to Retrieve userIdentityId, Using aws-java-sdk? -


i create desktop rest api tool using javafx, user registerd(when user first time registerd websites, aws authenticate , register users awscongnito using:- aws sdk javascript ) user awscongnito enter credentials.. wants authenticate user awscongnito check user registerd or not awscongnito , if registerd user return useridentityid.........

for try these java codes......

        amazoncognitoidentity identityclient = new amazoncognitoidentityclient(new anonymousawscredentials());                     identityclient.setregion(region.getregion(regions.eu_west_1));                     getidrequest idrequest = new getidrequest();                     idrequest.setaccountid("xxxxxxxxx");                     idrequest.setidentitypoolid("xxxxxxxxxxxxxxxxxx");      getidresult idresp = identityclient.getid(idrequest);     // congnitoidentityid different every request     string congnitoidentityid = idresp.getidentityid();      getcredentialsforidentityresult result= identityclient.getcredentialsforidentity(new                      getcredentialsforidentityrequest().withidentityid(congnitoidentityid));     // here credentials contain "secretkey" , "access key" return on behalf of congnitoidentityid        credentials credentials  = result.getcredentials(); 

now after methods use retrieve user identityid. , methods use pass user credentials useridentityid. please :(


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -