public class MolgenisAnonymousAuthenticationFilter
extends org.springframework.web.filter.GenericFilterBean
implements org.springframework.beans.factory.InitializingBean
Authentication object in the SecurityContextHolder, and populates it with one
if needed.| Constructor and Description |
|---|
MolgenisAnonymousAuthenticationFilter(String key,
Object principal,
org.springframework.security.core.userdetails.UserDetailsService userDetailsService)
Creates a filter with a principal named "anonymousUser" and the single authority "ROLE_ANONYMOUS".
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected org.springframework.security.core.Authentication |
createAuthentication(javax.servlet.http.HttpServletRequest request) |
void |
doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res,
javax.servlet.FilterChain chain) |
Collection<? extends org.springframework.security.core.GrantedAuthority> |
getAuthorities() |
Object |
getPrincipal() |
void |
setAuthenticationDetailsSource(org.springframework.security.authentication.AuthenticationDetailsSource<javax.servlet.http.HttpServletRequest,?> authenticationDetailsSource) |
public MolgenisAnonymousAuthenticationFilter(String key, Object principal, org.springframework.security.core.userdetails.UserDetailsService userDetailsService)
key - the key to identify tokens created by this filterpublic void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanafterPropertiesSet in class org.springframework.web.filter.GenericFilterBeanpublic void doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res,
javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.FilterIOExceptionjavax.servlet.ServletExceptionprotected org.springframework.security.core.Authentication createAuthentication(javax.servlet.http.HttpServletRequest request)
public void setAuthenticationDetailsSource(org.springframework.security.authentication.AuthenticationDetailsSource<javax.servlet.http.HttpServletRequest,?> authenticationDetailsSource)
public Object getPrincipal()
public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
Copyright © 2016. All Rights Reserved.