@Configuration
public class CustomAuthenticationFilter
extends org.springframework.web.filter.GenericFilterBean
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_TOKEN_HEADER |
static String |
SPRING_SECURITY_FORM_PASSWORD_KEY |
static String |
SPRING_SECURITY_FORM_USERNAME_KEY |
| Constructor and Description |
|---|
CustomAuthenticationFilter() |
| Modifier and Type | Method and Description |
|---|---|
protected org.springframework.security.core.Authentication |
attemptAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected org.springframework.security.core.Authentication |
attemptTokenAuthentication(String token) |
void |
doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res,
javax.servlet.FilterChain chain) |
void |
initIt() |
protected List<org.springframework.security.core.GrantedAuthority> |
obtainAuthoritiesFromClaims(List<String> roles) |
protected String |
obtainPassword(javax.servlet.http.HttpServletRequest request) |
protected String |
obtainUsername(javax.servlet.http.HttpServletRequest request) |
protected String |
obtainUsernameFromClaims(Map<String,Object> claims) |
protected me.parakh.core.security.jwt.JwtClaimEdge |
provideClaims(javax.servlet.http.HttpServletRequest request,
org.springframework.security.core.Authentication authResult) |
protected void |
successfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain,
org.springframework.security.core.Authentication authResult) |
protected void |
successfulLogin(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.Authentication authResult) |
protected void |
unsuccessfulLogin(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.AuthenticationException failed) |
public static final String DEFAULT_TOKEN_HEADER
public static final String SPRING_SECURITY_FORM_USERNAME_KEY
public static final String SPRING_SECURITY_FORM_PASSWORD_KEY
@PostConstruct public void initIt() throws Exception
Exceptionpublic void doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res,
javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
IOExceptionjavax.servlet.ServletExceptionprotected org.springframework.security.core.Authentication attemptAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
protected String obtainUsername(javax.servlet.http.HttpServletRequest request)
protected String obtainPassword(javax.servlet.http.HttpServletRequest request)
protected void successfulLogin(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.Authentication authResult)
throws IOException,
javax.servlet.ServletException
IOExceptionjavax.servlet.ServletExceptionprotected void successfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain,
org.springframework.security.core.Authentication authResult)
throws IOException,
javax.servlet.ServletException
IOExceptionjavax.servlet.ServletExceptionprotected void unsuccessfulLogin(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.AuthenticationException failed)
throws IOException,
javax.servlet.ServletException
IOExceptionjavax.servlet.ServletExceptionprotected me.parakh.core.security.jwt.JwtClaimEdge provideClaims(javax.servlet.http.HttpServletRequest request,
org.springframework.security.core.Authentication authResult)
protected org.springframework.security.core.Authentication attemptTokenAuthentication(String token) throws org.springframework.security.core.AuthenticationException, IOException, javax.servlet.ServletException
org.springframework.security.core.AuthenticationExceptionIOExceptionjavax.servlet.ServletExceptionCopyright © 2016. All rights reserved.