|
13 | 13 | package com.amazonaws.serverless.proxy.internal.model; |
14 | 14 |
|
15 | 15 |
|
16 | | -import com.amazonaws.serverless.proxy.internal.serialization.CognitoAuthorizerClaimsDeserializer; |
| 16 | +import com.fasterxml.jackson.annotation.JsonProperty; |
17 | 17 |
|
18 | | -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; |
| 18 | +import java.time.format.DateTimeFormatter; |
19 | 19 |
|
20 | 20 |
|
21 | 21 | /** |
|
36 | 36 | * } |
37 | 37 | * </pre> |
38 | 38 | */ |
39 | | -@JsonDeserialize(using = CognitoAuthorizerClaimsDeserializer.class) |
40 | 39 | public class CognitoAuthorizerClaims { |
41 | 40 |
|
42 | 41 | //------------------------------------------------------------- |
43 | 42 | // Variables - Private |
44 | 43 | //------------------------------------------------------------- |
45 | 44 |
|
| 45 | + @JsonProperty(value = "sub") |
46 | 46 | private String subject; |
| 47 | + @JsonProperty(value = "aud") |
47 | 48 | private String audience; |
| 49 | + @JsonProperty(value = "iss") |
48 | 50 | private String issuer; |
| 51 | + @JsonProperty(value = "token_use") |
49 | 52 | private String tokenUse; |
| 53 | + @JsonProperty(value = "cognito:username") |
50 | 54 | private String username; |
51 | 55 | private String email; |
| 56 | + @JsonProperty(value = "email_verified") |
52 | 57 | private boolean emailVerified; |
| 58 | + @JsonProperty(value = "auth_time") |
53 | 59 | private Long authTime; |
| 60 | + @JsonProperty(value = "exp") |
54 | 61 | private String expiration; |
| 62 | + @JsonProperty(value = "iat") |
55 | 63 | private String issuedAt; |
56 | | - private String phoneNumber; |
57 | | - private boolean phoneNumberVerified; |
58 | 64 |
|
59 | 65 |
|
60 | 66 | //------------------------------------------------------------- |
@@ -157,24 +163,4 @@ public String getIssuedAt() { |
157 | 163 | public void setIssuedAt(String issuedAt) { |
158 | 164 | this.issuedAt = issuedAt; |
159 | 165 | } |
160 | | - |
161 | | - |
162 | | - public String getPhoneNumber() { |
163 | | - return phoneNumber; |
164 | | - } |
165 | | - |
166 | | - |
167 | | - public void setPhoneNumber(String phoneNumber) { |
168 | | - this.phoneNumber = phoneNumber; |
169 | | - } |
170 | | - |
171 | | - |
172 | | - public boolean isPhoneNumberVerified() { |
173 | | - return phoneNumberVerified; |
174 | | - } |
175 | | - |
176 | | - |
177 | | - public void setPhoneNumberVerified(boolean phoneNumberVerified) { |
178 | | - this.phoneNumberVerified = phoneNumberVerified; |
179 | | - } |
180 | 166 | } |
0 commit comments