1 Risposta
- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
0
Hi,
the secret has been unveiled. To connect as an anonymous user to a cognito identity pool you need these few lines of code:
AmazonCognitoIdentity client=AmazonCognitoIdentityClientBuilder
.standard()
.withRegion(Regions.EU_CENTRAL_1)
.withCredentials(new AWSStaticCredentialsProvider(new AnonymousAWSCredentials()))
.build();
Map<String,String> logins = new HashMap<String,String>();
logins.put("arn:aws:iam::1234567890:saml-provider/my-saml-provider", "A base64 SAML response");
GetIdRequest request = new GetIdRequest()
.withIdentityPoolId("eu-central-1:7xxxxx-cxxx-xxxx-xxx-xxxxx")
.withLogins(logins);
GetIdResult result= client.getId(request);
In the logins map you have to put the arn of the SAML provider you created in IAM using the SAML Metadata.
Edited by: drdimitri on Dec 9, 2019 1:50 AM
Edited by: drdimitri on Dec 10, 2019 5:01 AM
con risposta 4 anni fa
Contenuto pertinente
- AWS UFFICIALEAggiornata 8 mesi fa
- Come faccio a configurare Auth0 come provider di identità SAML con un pool di utenti Amazon Cognito?AWS UFFICIALEAggiornata 2 anni fa
- Come faccio a configurare AD FS come provider di identità SAML con un pool di utenti Amazon Cognito?AWS UFFICIALEAggiornata 3 anni fa
- AWS UFFICIALEAggiornata 6 mesi fa