Class AwsProxySecurityContext
java.lang.Object
com.amazonaws.serverless.proxy.internal.jaxrs.AwsProxySecurityContext
- All Implemented Interfaces:
jakarta.ws.rs.core.SecurityContext
default implementation of the
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-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCustom object for request authorized with a Cognito User Pool authorizer. -
Field Summary
Fields inherited from interface jakarta.ws.rs.core.SecurityContext
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH -
Constructor Summary
ConstructorsConstructorDescriptionAwsProxySecurityContext(com.amazonaws.services.lambda.runtime.Context lambdaContext, AwsProxyRequest event) -
Method Summary
Modifier and TypeMethodDescriptiongetEvent()com.amazonaws.services.lambda.runtime.ContextbooleanisSecure()booleanisUserInRole(String role)
-
Constructor Details
-
AwsProxySecurityContext
public AwsProxySecurityContext(com.amazonaws.services.lambda.runtime.Context lambdaContext, AwsProxyRequest event)
-
-
Method Details
-
getLambdaContext
public com.amazonaws.services.lambda.runtime.Context getLambdaContext() -
getEvent
-
getUserPrincipal
- Specified by:
getUserPrincipalin interfacejakarta.ws.rs.core.SecurityContext
-
isUserInRole
- Specified by:
isUserInRolein interfacejakarta.ws.rs.core.SecurityContext
-
isSecure
public boolean isSecure()- Specified by:
isSecurein interfacejakarta.ws.rs.core.SecurityContext
-
getAuthenticationScheme
- Specified by:
getAuthenticationSchemein interfacejakarta.ws.rs.core.SecurityContext
-