File tree Expand file tree Collapse file tree 1 file changed +1
-18
lines changed
swift/example_code/identity-resolvers/cognito-resolver/Sources Expand file tree Collapse file tree 1 file changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -125,28 +125,11 @@ class Example {
125125
126126 // snippet-start:[swift.identity.cognito.resolve]
127127 // Create a Cognito credential resolver that uses the Cognito Identity
128- // Pool created above .
128+ // Pool.
129129 let cognitoCredentialResolver = try CognitoAWSCredentialIdentityResolver (
130130 identityPoolId: identityPoolID,
131131 identityPoolRegion: region
132132 )
133-
134- // Create an AWS STS client that uses the new Cognito credential
135- // resolver to do credential identity resolution.
136- let cognitoSTSConfig = try await STSClient . STSClientConfiguration (
137- awsCredentialIdentityResolver: cognitoCredentialResolver,
138- region: " us-east-1 "
139- )
140- let cognitoSTSClient = STSClient ( config: cognitoSTSConfig)
141-
142- let output = try await cognitoSTSClient. getCallerIdentity (
143- input: GetCallerIdentityInput ( )
144- )
145-
146- print ( " Authenticated with AWS using Cognito! " )
147- print ( " ARN: \( output. arn ?? " <unknown> " ) " )
148- print ( " Account ID: \( output. account ?? " <unknown> " ) " )
149- print ( " User ID: \( output. userId ?? " <unknown> " ) " )
150133 // snippet-end:[swift.identity.cognito.resolve]
151134
152135 //======================================================================
You can’t perform that action at this time.
0 commit comments