Package com.nelioalves.cursomc.security
Class JWTAuthorizationFilter
- java.lang.Object
-
- org.springframework.web.filter.GenericFilterBean
-
- org.springframework.web.filter.OncePerRequestFilter
-
- org.springframework.security.web.authentication.www.BasicAuthenticationFilter
-
- com.nelioalves.cursomc.security.JWTAuthorizationFilter
-
- 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 JWTAuthorizationFilter extends org.springframework.security.web.authentication.www.BasicAuthenticationFilterClasse que implementa filtro de autorização- Author:
- José Henrique
-
-
Constructor Summary
Constructors Constructor Description JWTAuthorizationFilter(org.springframework.security.authentication.AuthenticationManager authenticationManager, JWTUtil jwtUtil, org.springframework.security.core.userdetails.UserDetailsService userDetailsService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoFilterInternal(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, javax.servlet.FilterChain filterChain)Faz a autorização de acesso do usuário-
Methods inherited from class org.springframework.security.web.authentication.www.BasicAuthenticationFilter
afterPropertiesSet, getAuthenticationEntryPoint, getAuthenticationManager, getCredentialsCharset, isIgnoreFailure, onSuccessfulAuthentication, onUnsuccessfulAuthentication, setAuthenticationDetailsSource, setCredentialsCharset, setRememberMeServices
-
Methods inherited from class org.springframework.web.filter.OncePerRequestFilter
doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatch
-
-
-
-
Constructor Detail
-
JWTAuthorizationFilter
public JWTAuthorizationFilter(org.springframework.security.authentication.AuthenticationManager authenticationManager, JWTUtil jwtUtil, org.springframework.security.core.userdetails.UserDetailsService userDetailsService)
-
-
Method Detail
-
doFilterInternal
protected void doFilterInternal(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, javax.servlet.FilterChain filterChain) throws IOException, javax.servlet.ServletExceptionFaz a autorização de acesso do usuário- Overrides:
doFilterInternalin classorg.springframework.security.web.authentication.www.BasicAuthenticationFilter- Parameters:
httpServletRequest- Requisição do usuáriohttpServletResponse- Resposta a ser enviada ao usuáriofilterChain- Objeto para chamar uma próxima função ca cadeia de filtros- Throws:
IOExceptionjavax.servlet.ServletException
-
-