Skip to content

Commit

Permalink
oops that wasnt supposed to be there
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonardo Gama committed Oct 22, 2024
1 parent 13dc7ab commit 8d2d53c
Showing 1 changed file with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Effect, PolicyStatement } from 'aws-cdk-lib/aws-iam';
import { App, SecretValue, Stack } from 'aws-cdk-lib';
import { IdentityPool, IdentityPoolProviderUrl } from '../lib/identitypool';
import { UserPoolAuthenticationProvider } from '../lib/identitypool-user-pool-authentication-provider';
import { IdentityPoolRoleAttachment } from '../lib/identitypool-role-attachment';

const app = new App();
const stack = new Stack(app, 'integ-identitypool');
Expand Down Expand Up @@ -64,19 +63,6 @@ const idPool = new IdentityPool(stack, 'identitypool', {
allowClassicFlow: true,
identityPoolName: 'my-id-pool',
});
idPool.addRoleMappings(
{
mappingKey: 'myKey',
providerUrl: IdentityPoolProviderUrl.userPool(userPool, client),
rules: [
{
claim: 'myClaim',
claimValue: 'myValue',
mappedRole: idPool.authenticatedRole,
},
],
}
);
idPool.authenticatedRole.addToPrincipalPolicy(new PolicyStatement({
effect: Effect.ALLOW,
actions: ['dynamodb:*'],
Expand All @@ -88,7 +74,4 @@ idPool.unauthenticatedRole.addToPrincipalPolicy(new PolicyStatement({
resources: ['*'],
}));
idPool.addUserPoolAuthentication(new UserPoolAuthenticationProvider({ userPool: otherPool }));
new IdentityPoolRoleAttachment(stack, 'RoleAttachment', {
identityPool: idPool,
});
app.synth();

0 comments on commit 8d2d53c

Please sign in to comment.