Package io.quarkus.amazon.lambda.http
Class CognitoPrincipal
- java.lang.Object
-
- io.quarkus.amazon.lambda.http.CognitoPrincipal
-
- All Implemented Interfaces:
Principal,org.eclipse.microprofile.jwt.JsonWebToken
public class CognitoPrincipal extends Object implements org.eclipse.microprofile.jwt.JsonWebToken
Represents a Cognito JWT used to authenticate request Will only be allocated if requestContext.authorizer.jwt.claims.cognito:username is set in the http event sent by API Gateway
-
-
Constructor Summary
Constructors Constructor Description CognitoPrincipal(com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPEvent.RequestContext.Authorizer.JWT jwt)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>getAudience()<T> TgetClaim(String claimName)Set<String>getClaimNames()com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPEvent.RequestContext.Authorizer.JWTgetClaims()longgetExpirationTime()Set<String>getGroups()longgetIssuedAtTime()StringgetName()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
getName
public String getName()
-
getClaimNames
public Set<String> getClaimNames()
- Specified by:
getClaimNamesin interfaceorg.eclipse.microprofile.jwt.JsonWebToken
-
getClaim
public <T> T getClaim(String claimName)
- Specified by:
getClaimin interfaceorg.eclipse.microprofile.jwt.JsonWebToken
-
getAudience
public Set<String> getAudience()
- Specified by:
getAudiencein interfaceorg.eclipse.microprofile.jwt.JsonWebToken
-
getExpirationTime
public long getExpirationTime()
- Specified by:
getExpirationTimein interfaceorg.eclipse.microprofile.jwt.JsonWebToken
-
getIssuedAtTime
public long getIssuedAtTime()
- Specified by:
getIssuedAtTimein interfaceorg.eclipse.microprofile.jwt.JsonWebToken
-
getGroups
public Set<String> getGroups()
- Specified by:
getGroupsin interfaceorg.eclipse.microprofile.jwt.JsonWebToken
-
getClaims
public com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPEvent.RequestContext.Authorizer.JWT getClaims()
-
-