Class JwtAuthenticationFilter
- java.lang.Object
-
- io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter
-
- All Implemented Interfaces:
javax.servlet.Filter
@Extension public class JwtAuthenticationFilter extends Object implements javax.servlet.Filter
Filter
that processes JWT token- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description JwtAuthenticationFilter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
static boolean
didRequestHaveValidatedJwtToken()
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.
-
-
-
Method Detail
-
init
@Initializer(fatal=false) public static void init() throws javax.servlet.ServletException
- 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.
-
-