Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
jogold committed Mar 4, 2021
1 parent 3903858 commit fb5156f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-iam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,15 +376,15 @@ IAM trust policy.

```ts
new iam.SamlProvider(this, 'Provider', {
metadataDocument: fs.readFileSync('/path/to/saml-metadata-document.xml', 'utf-8'),
metadataDocument: iam.SamlMetadataDocument.fromFile('/path/to/saml-metadata-document.xml'),
});
```

The `SamlPrincipal` class can be used as a principal with a `SamlProvider`:

```ts
const provider = new iam.SamlProvider(this, 'Provider', {
metadataDocument: fs.readFileSync('/path/to/saml-metadata-document.xml', 'utf-8'),
metadataDocument: iam.SamlMetadataDocument.fromFile('/path/to/saml-metadata-document.xml'),
});
const principal = new iam.SamlPrincipal(provider, {
StringEquals: {
Expand All @@ -398,7 +398,7 @@ class:

```ts
const provider = new iam.SamlProvider(this, 'Provider', {
metadataDocument: fs.readFileSync('/path/to/saml-metadata-document.xml', 'utf-8'),
metadataDocument: iam.SamlMetadataDocument.fromFile('/path/to/saml-metadata-document.xml'),
});
new iam.Role(this, 'Role', {
assumedBy: new iam.SamlConsolePrincipal(provider),
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-iam/lib/saml-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export abstract class SamlMetadataDocument {
}

/**
* Create a SAML metadata document from an XML file
* Create a SAML metadata document from a XML file
*/
public static fromFile(path: string): SamlMetadataDocument {
return { xml: fs.readFileSync(path, 'utf-8') };
Expand Down

0 comments on commit fb5156f

Please sign in to comment.