Class JwtAuthenticationFilter
java.lang.Object
io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter
- All Implemented Interfaces:
jakarta.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(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse rsp, jakarta.servlet.FilterChain chain) static voidinit()voidinit(jakarta.servlet.FilterConfig filterConfig) protected booleanshouldApply(jakarta.servlet.http.HttpServletRequest req) Returns true for requests that JWT token processing should apply.
-
Constructor Details
-
JwtAuthenticationFilter
public JwtAuthenticationFilter()
-
-
Method Details
-
init
- Throws:
jakarta.servlet.ServletException
-
init
public void init(jakarta.servlet.FilterConfig filterConfig) throws jakarta.servlet.ServletException - Specified by:
initin interfacejakarta.servlet.Filter- Throws:
jakarta.servlet.ServletException
-
doFilter
public void doFilter(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse rsp, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException - Specified by:
doFilterin interfacejakarta.servlet.Filter- Throws:
IOExceptionjakarta.servlet.ServletException
-
shouldApply
protected boolean shouldApply(jakarta.servlet.http.HttpServletRequest req) Returns true for requests that JWT token processing should apply. -
destroy
public void destroy()- Specified by:
destroyin interfacejakarta.servlet.Filter
-
didRequestHaveValidatedJwtToken
public static boolean didRequestHaveValidatedJwtToken()Returns true if the current request had a valid JWT token.
-