Class JwtAuthenticationFilter
java.lang.Object
io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter
- All Implemented Interfaces:
javax.servlet.Filter
Filter that processes JWT token- Author:
- Kohsuke Kawaguchi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()static booleanReturns true if the current request had a valid JWT token.voiddoFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse rsp, javax.servlet.FilterChain chain) static voidinit()voidinit(javax.servlet.FilterConfig filterConfig) protected booleanshouldApply(javax.servlet.http.HttpServletRequest req) Returns true for requests that JWT token processing should apply.
-
Constructor Details
-
JwtAuthenticationFilter
public JwtAuthenticationFilter()
-
-
Method Details
-
init
- Throws:
javax.servlet.ServletException
-
init
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException - Specified by:
initin interfacejavax.servlet.Filter- Throws:
javax.servlet.ServletException
-
doFilter
public void doFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse rsp, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException - Specified by:
doFilterin interfacejavax.servlet.Filter- Throws:
IOExceptionjavax.servlet.ServletException
-
shouldApply
protected boolean shouldApply(javax.servlet.http.HttpServletRequest req) Returns true for requests that JWT token processing should apply. -
destroy
public void destroy()- Specified by:
destroyin interfacejavax.servlet.Filter
-
didRequestHaveValidatedJwtToken
public static boolean didRequestHaveValidatedJwtToken()Returns true if the current request had a valid JWT token.
-