Class JwtAuthInterceptor
java.lang.Object
com.predic8.membrane.core.interceptor.AbstractInterceptor
com.predic8.membrane.core.interceptor.jwt.JwtAuthInterceptor
- All Implemented Interfaces:
Interceptor
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.predic8.membrane.core.interceptor.Interceptor
Interceptor.Flow -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class com.predic8.membrane.core.interceptor.AbstractInterceptor
name, router -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetJwks()handleRequest(Exchange exc) voidsetExpectedAud(String expectedAud) voidvoidsetJwtRetriever(JwtRetriever jwtRetriever) Methods inherited from class com.predic8.membrane.core.interceptor.AbstractInterceptor
getDisplayName, getFlow, getHelpId, getMessage, getRouter, getRule, handleAbort, handleResponse, init, setDisplayName, setFlow
-
Field Details
-
ERROR_JWT_NOT_FOUND
- See Also:
-
ERROR_DECODED_HEADER_NOT_JSON
- See Also:
-
ERROR_UNKNOWN_KEY
- See Also:
-
ERROR_VALIDATION_FAILED
- See Also:
-
-
Constructor Details
-
JwtAuthInterceptor
public JwtAuthInterceptor()
-
-
Method Details
-
init
- Specified by:
initin interfaceInterceptor- Overrides:
initin classAbstractInterceptor- Throws:
Exception
-
handleRequest
- Specified by:
handleRequestin interfaceInterceptor- Overrides:
handleRequestin classAbstractInterceptor
-
handleJwt
public Outcome handleJwt(Exchange exc, String jwt) throws JWTException, com.fasterxml.jackson.core.JsonProcessingException, org.jose4j.jwt.consumer.InvalidJwtException - Throws:
JWTExceptioncom.fasterxml.jackson.core.JsonProcessingExceptionorg.jose4j.jwt.consumer.InvalidJwtException
-
getJwtRetriever
-
setJwtRetriever
-
getJwks
-
setJwks
-
getExpectedAud
-
setExpectedAud
- Description
Expected audience ('aud') value of the token.
Use "any!!" to allow any audience value. This is strongly discouraged.
-
getShortDescription
- Specified by:
getShortDescriptionin interfaceInterceptor- Overrides:
getShortDescriptionin classAbstractInterceptor
-
getLongDescription
- Specified by:
getLongDescriptionin interfaceInterceptor- Overrides:
getLongDescriptionin classAbstractInterceptor
-