Skip to content

Commit 0e68618

Browse files
fix: readme
1 parent 6bd08cf commit 0e68618

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

packages/aws-cdk-lib/aws-cognito/README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -604,19 +604,21 @@ Using SAML identity provider is possible to use SAML metadata file content or SA
604604
const userpool = new cognito.UserPool(this, 'Pool');
605605

606606
// specify the metadata as a file content
607-
new cognito.UserPoolIdentityProviderSaml(stack, 'userpoolIdpFile', {
608-
userPool: pool,
609-
metadata: UserPoolIdentityProviderSamlMetadata.file('my-file-contents'),
607+
new cognito.UserPoolIdentityProviderSaml(this, 'userpoolIdpFile', {
608+
userPool: userpool,
609+
metadata: cognito.UserPoolIdentityProviderSamlMetadata.file('my-file-contents'),
610610
// Whether to require encrypted SAML assertions from IdP
611611
encryptedResponses: true,
612612
// The signing algorithm for the SAML requests
613613
requestSigningAlgorithm: cognito.SigningAlgorithm.RSA_SHA256,
614+
// Enable IdP initiated SAML auth flow
615+
idpInitiated: true,
614616
});
615617

616618
// specify the metadata as a URL
617-
new cognito.UserPoolIdentityProviderSaml(stack, 'userpoolidpUrl', {
618-
userPool: pool,
619-
metadata: UserPoolIdentityProviderSamlMetadata.url('https://my-metadata-url.com'),
619+
new cognito.UserPoolIdentityProviderSaml(this, 'userpoolidpUrl', {
620+
userPool: userpool,
621+
metadata: cognito.UserPoolIdentityProviderSamlMetadata.url('https://my-metadata-url.com'),
620622
});
621623
```
622624

0 commit comments

Comments
 (0)