use of org.wildfly.swarm.microprofile.jwtauth.deployment.principal.JWTCallerPrincipal in project wildfly-swarm by wildfly-swarm.
the class JWTLoginModule method validate.
/**
* Validate the bearer token passed in with the authorization header
*
* @param jwtCredential - the input bearer token
* @return return the validated JWTCallerPrincipal
* @throws ParseException - thrown on token parse or validation failure
*/
protected JWTCallerPrincipal validate(JWTCredential jwtCredential) throws ParseException {
JWTCallerPrincipalFactory factory = JWTCallerPrincipalFactory.instance();
JWTCallerPrincipal callerPrincipal = factory.parse(jwtCredential.getBearerToken(), jwtCredential.getAuthContextInfo());
return callerPrincipal;
}
Aggregations