Skip to content

Commit 109a240

Browse files
authored
Add Lambda and IAM authorizers to APIGatewayV2HTTPEvent request context (aws#167)
1 parent e192a8f commit 109a240

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/APIGatewayV2HTTPEvent.java

+26
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ public static class RequestContext {
6161
@NoArgsConstructor
6262
public static class Authorizer {
6363
private JWT jwt;
64+
private Map<String, Object> lambda;
65+
private IAM iam;
6466

6567
@AllArgsConstructor
6668
@Builder(setterPrefix = "with")
@@ -83,5 +85,29 @@ public static class Http {
8385
private String sourceIp;
8486
private String userAgent;
8587
}
88+
89+
@AllArgsConstructor
90+
@Builder(setterPrefix = "with")
91+
@Data
92+
@NoArgsConstructor
93+
public static class IAM {
94+
private String accessKey;
95+
private String accountId;
96+
private String callerId;
97+
private CognitoIdentity cognitoIdentity;
98+
private String principalOrgId;
99+
private String userArn;
100+
private String userId;
101+
}
102+
103+
@AllArgsConstructor
104+
@Builder(setterPrefix = "with")
105+
@Data
106+
@NoArgsConstructor
107+
public static class CognitoIdentity {
108+
private List<String> amr;
109+
private String identityId;
110+
private String identityPoolId;
111+
}
86112
}
87113
}

0 commit comments

Comments
 (0)