public class AwsProxySecurityContext extends 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 |
|---|---|
String |
getAuthenticationScheme() |
Principal |
getUserPrincipal() |
boolean |
isSecure() |
boolean |
isUserInRole(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 Principal getUserPrincipal()
getUserPrincipal in interface javax.ws.rs.core.SecurityContextpublic boolean isUserInRole(String role)
isUserInRole in interface javax.ws.rs.core.SecurityContextpublic boolean isSecure()
isSecure in interface javax.ws.rs.core.SecurityContextpublic String getAuthenticationScheme()
getAuthenticationScheme in interface javax.ws.rs.core.SecurityContextCopyright © 2017. All Rights Reserved.