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
Allocated when cognito is used to authenticate user Will only be allocated if requestContext.authorizer.claims.cognito:username is set in the http event sent by API Gateway
-
-
Constructor Summary
Constructors Constructor Description CognitoPrincipal(CognitoAuthorizerClaims claims)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>
getAudience()
<T> T
getClaim(String claimName)
Set<String>
getClaimNames()
CognitoAuthorizerClaims
getClaims()
long
getExpirationTime()
Set<String>
getGroups()
long
getIssuedAtTime()
String
getIssuer()
String
getName()
String
getSubject()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Constructor Detail
-
CognitoPrincipal
public CognitoPrincipal(CognitoAuthorizerClaims claims)
-
-
Method Detail
-
getClaimNames
public Set<String> getClaimNames()
- Specified by:
getClaimNames
in interfaceorg.eclipse.microprofile.jwt.JsonWebToken
-
getClaim
public <T> T getClaim(String claimName)
- Specified by:
getClaim
in interfaceorg.eclipse.microprofile.jwt.JsonWebToken
-
getIssuer
public String getIssuer()
- Specified by:
getIssuer
in interfaceorg.eclipse.microprofile.jwt.JsonWebToken
-
getAudience
public Set<String> getAudience()
- Specified by:
getAudience
in interfaceorg.eclipse.microprofile.jwt.JsonWebToken
-
getSubject
public String getSubject()
- Specified by:
getSubject
in interfaceorg.eclipse.microprofile.jwt.JsonWebToken
-
getExpirationTime
public long getExpirationTime()
- Specified by:
getExpirationTime
in interfaceorg.eclipse.microprofile.jwt.JsonWebToken
-
getIssuedAtTime
public long getIssuedAtTime()
- Specified by:
getIssuedAtTime
in interfaceorg.eclipse.microprofile.jwt.JsonWebToken
-
getGroups
public Set<String> getGroups()
- Specified by:
getGroups
in interfaceorg.eclipse.microprofile.jwt.JsonWebToken
-
getName
public String getName()
-
getClaims
public CognitoAuthorizerClaims getClaims()
-
-