diff --git a/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/APIGatewayProxyRequestEvent.java b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/APIGatewayProxyRequestEvent.java index 71ea238d..68ca91da 100644 --- a/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/APIGatewayProxyRequestEvent.java +++ b/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/APIGatewayProxyRequestEvent.java @@ -60,6 +60,8 @@ public static class ProxyRequestContext implements Serializable, Cloneable { private String path; + private Map authorizer; + /** * default constructor */ @@ -88,6 +90,14 @@ public ProxyRequestContext withAccountId(String accountId) { return this; } + public Map getAuthorizer() { + return authorizer; + } + + public void setAuthorizer(final Map authorizer) { + this.authorizer = authorizer; + } + /** * @return API Gateway stage name */ @@ -300,7 +310,9 @@ public String toString() { if (getApiId() != null) sb.append("apiId: ").append(getApiId()).append(","); if (getPath() != null) - sb.append("path: ").append(getPath()); + sb.append("path: ").append(getPath()).append(","); + if (getAuthorizer() != null) + sb.append("authorizer: ").append(getAuthorizer().toString()); sb.append("}"); return sb.toString(); } @@ -351,6 +363,10 @@ public boolean equals(Object obj) { return false; if (other.getPath() != null && other.getPath().equals(this.getPath()) == false) return false; + if (other.getAuthorizer() == null ^ this.getAuthorizer() == null) + return false; + if (other.getAuthorizer() != null && !other.getAuthorizer().equals(this.getAuthorizer())) + return false; return true; } @@ -368,6 +384,7 @@ public int hashCode() { hashCode = prime * hashCode + ((getHttpMethod() == null) ? 0 : getHttpMethod().hashCode()); hashCode = prime * hashCode + ((getApiId() == null) ? 0 : getApiId().hashCode()); hashCode = prime * hashCode + ((getPath() == null) ? 0 : getPath().hashCode()); + hashCode = prime * hashCode + ((getAuthorizer() == null) ? 0 : getAuthorizer().hashCode()); return hashCode; } @@ -941,7 +958,7 @@ public APIGatewayProxyRequestEvent withMultiValueHeaders(Map