public class AwsProxySecurityContext
extends java.lang.Object
implements javax.ws.rs.core.SecurityContext
SecurityContext object. This class supports 3 API Gateway's authorization methods:
AWS_IAM, CUSTOM_AUTHORIZER, and COGNITO_USER_POOL (oidc). The Principal returned by the object depends on the authorization
model:
* AWS_IAM: User ARN
* CUSTOM_AUTHORIZER: Custom user principal
* COGNITO_USER_POOL: Cognito identity id| Modifier and Type | Field and Description |
|---|---|
protected AwsProxyRequest |
event |
protected com.amazonaws.services.lambda.runtime.Context |
lambdaContext |
| Constructor and Description |
|---|
AwsProxySecurityContext(com.amazonaws.services.lambda.runtime.Context lambdaContext,
AwsProxyRequest event) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAuthenticationScheme() |
java.security.Principal |
getUserPrincipal() |
boolean |
isSecure() |
boolean |
isUserInRole(java.lang.String role) |
protected com.amazonaws.services.lambda.runtime.Context lambdaContext
protected AwsProxyRequest event
public AwsProxySecurityContext(com.amazonaws.services.lambda.runtime.Context lambdaContext,
AwsProxyRequest event)
public java.security.Principal getUserPrincipal()
getUserPrincipal in interface javax.ws.rs.core.SecurityContextpublic boolean isUserInRole(java.lang.String role)
isUserInRole in interface javax.ws.rs.core.SecurityContextpublic boolean isSecure()
isSecure in interface javax.ws.rs.core.SecurityContextpublic java.lang.String getAuthenticationScheme()
getAuthenticationScheme in interface javax.ws.rs.core.SecurityContextCopyright © 2017. All Rights Reserved.