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 | Class and Description |
|---|---|
static class |
AwsProxySecurityContext.CognitoUserPoolPrincipal
Custom object for request authorized with a Cognito User Pool authorizer.
|
| Constructor and Description |
|---|
AwsProxySecurityContext(com.amazonaws.services.lambda.runtime.Context lambdaContext,
AwsProxyRequest event) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAuthenticationScheme() |
AwsProxyRequest |
getEvent() |
com.amazonaws.services.lambda.runtime.Context |
getLambdaContext() |
java.security.Principal |
getUserPrincipal() |
boolean |
isSecure() |
boolean |
isUserInRole(java.lang.String role) |
public AwsProxySecurityContext(com.amazonaws.services.lambda.runtime.Context lambdaContext,
AwsProxyRequest event)
public com.amazonaws.services.lambda.runtime.Context getLambdaContext()
public AwsProxyRequest getEvent()
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 © 2018. All Rights Reserved.