Comparing version 0.0.3 to 0.0.4
@@ -9,2 +9,7 @@ export declare type IParams = { | ||
queryStringParameters: IParams; | ||
requestContext?: { | ||
authorizer?: { | ||
principalId?: any; | ||
}; | ||
}; | ||
body?: string; | ||
@@ -11,0 +16,0 @@ } |
@@ -5,2 +5,3 @@ import { IIncomingEvent } from "./event"; | ||
body: string | null; | ||
authorizerPrincipalId: string | null; | ||
header(key: string, defaultValue?: string): string; | ||
@@ -14,2 +15,3 @@ param(key: string, defaultValue?: any): any; | ||
readonly method: string; | ||
readonly authorizerPrincipalId: string | null; | ||
readonly body: string; | ||
@@ -16,0 +18,0 @@ header(key: string, defaultValue?: string): string; |
@@ -11,2 +11,12 @@ "use strict"; | ||
} | ||
get authorizerPrincipalId() { | ||
let result; | ||
try { | ||
result = this.event.requestContext.authorizer.principalId || null; | ||
} | ||
catch (err) { | ||
result = null; | ||
} | ||
return result; | ||
} | ||
get body() { | ||
@@ -13,0 +23,0 @@ return this.event.body || null; |
{ | ||
"name": "apex-utils", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Collection of helpers useful in a work with AWS Lambda", | ||
@@ -5,0 +5,0 @@ "author": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18884
430