Class UnauthenticatedAnonymousAuthenticationFilter

  • 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 UnauthenticatedAnonymousAuthenticationFilter
    extends org.springframework.security.web.authentication.AnonymousAuthenticationFilter
    Anonymous authentication filter that sets anonymous tokens as being unauthenticated
    • Field Summary

      • Fields inherited from class org.springframework.web.filter.GenericFilterBean

        logger
    • Constructor Summary

      Constructors 
      Constructor Description
      UnauthenticatedAnonymousAuthenticationFilter​(java.lang.String key)
      Creates a filter with a principal named "anonymousUser" and the single authority "ROLE_ANONYMOUS".
      UnauthenticatedAnonymousAuthenticationFilter​(java.lang.String key, java.lang.Object principal, java.util.List<org.springframework.security.core.GrantedAuthority> authorities)
      Create a new UnauthenticatedAnonymousAuthenticationFilter with the given key, principal, and authorities.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.springframework.security.core.Authentication createAuthentication​(javax.servlet.http.HttpServletRequest request)
      Create the anonymous auth token with Authenticated set to false
      • Methods inherited from class org.springframework.security.web.authentication.AnonymousAuthenticationFilter

        afterPropertiesSet, doFilter, getAuthorities, getPrincipal, setAuthenticationDetailsSource
      • Methods inherited from class org.springframework.web.filter.GenericFilterBean

        addRequiredProperty, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UnauthenticatedAnonymousAuthenticationFilter

        public UnauthenticatedAnonymousAuthenticationFilter​(java.lang.String key)
        Creates a filter with a principal named "anonymousUser" and the single authority "ROLE_ANONYMOUS".
        Parameters:
        key - the key to identify tokens created by this filter
      • UnauthenticatedAnonymousAuthenticationFilter

        public UnauthenticatedAnonymousAuthenticationFilter​(java.lang.String key,
                                                            java.lang.Object principal,
                                                            java.util.List<org.springframework.security.core.GrantedAuthority> authorities)
        Create a new UnauthenticatedAnonymousAuthenticationFilter with the given key, principal, and authorities.
        Parameters:
        key - key the key to identify tokens created by this filter
        principal - the principal which will be used to represent anonymous users
        authorities - the authority list for anonymous users
    • Method Detail

      • createAuthentication

        protected org.springframework.security.core.Authentication createAuthentication​(javax.servlet.http.HttpServletRequest request)
        Create the anonymous auth token with Authenticated set to false
        Overrides:
        createAuthentication in class org.springframework.security.web.authentication.AnonymousAuthenticationFilter
        Parameters:
        request - the incoming request