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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
static boolean
Returns true if the current request had a valid JWT token.void
doFilter
(javax.servlet.ServletRequest req, javax.servlet.ServletResponse rsp, javax.servlet.FilterChain chain) static void
init()
void
init
(javax.servlet.FilterConfig filterConfig) protected boolean
shouldApply
(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:
init
in 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:
doFilter
in interfacejavax.servlet.Filter
- Throws:
IOException
javax.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:
destroy
in interfacejavax.servlet.Filter
-
didRequestHaveValidatedJwtToken
public static boolean didRequestHaveValidatedJwtToken()Returns true if the current request had a valid JWT token.
-