Class JwtTokenVerifier
- java.lang.Object
-
- org.springframework.web.filter.GenericFilterBean
-
- org.springframework.web.filter.OncePerRequestFilter
-
- idatt2106.group3.backend.Configuration.Jwt.JwtTokenVerifier
-
- All Implemented Interfaces:
javax.servlet.Filter
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanNameAware
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.EnvironmentAware
,org.springframework.core.env.EnvironmentCapable
,org.springframework.web.context.ServletContextAware
public class JwtTokenVerifier extends org.springframework.web.filter.OncePerRequestFilter
Filter for verifying a token given in request header
-
-
Constructor Summary
Constructors Constructor Description JwtTokenVerifier()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doFilterInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain)
Verifies the JWT token from request, and returns a 403 if it has expired-
Methods inherited from class org.springframework.web.filter.OncePerRequestFilter
doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatch
-
-
-
-
Method Detail
-
doFilterInternal
protected void doFilterInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain) throws javax.servlet.ServletException, java.io.IOException
Verifies the JWT token from request, and returns a 403 if it has expired- Specified by:
doFilterInternal
in classorg.springframework.web.filter.OncePerRequestFilter
- Parameters:
request
-response
-filterChain
-- Throws:
javax.servlet.ServletException
java.io.IOException
-
-