java.lang.Object | ||
↳ | org.springframework.web.filter.GenericFilterBean | |
↳ | org.springframework.security.web.authentication.AnonymousAuthenticationFilter |
Detects if there is no Authentication
object in the SecurityContextHolder
, and
populates it with one if needed.
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.web.filter.GenericFilterBean
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This constructor is deprecated.
Use constructor injection version
| |||||||||||
Creates a filter with a principal named "anonymousUser" and the single authority "ROLE_ANONYMOUS".
| |||||||||||
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
use constructor injection instead
| |||||||||||
This method is deprecated.
use constructor injection instead
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
no obvious use case and can easily be achieved by other means
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.web.filter.GenericFilterBean
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
javax.servlet.Filter
| |||||||||||
From interface
org.springframework.beans.factory.BeanNameAware
| |||||||||||
From interface
org.springframework.beans.factory.DisposableBean
| |||||||||||
From interface
org.springframework.beans.factory.InitializingBean
| |||||||||||
From interface
org.springframework.web.context.ServletContextAware
|
This constructor is deprecated.
Use constructor injection version
Creates a filter with a principal named "anonymousUser" and the single authority "ROLE_ANONYMOUS".
key | the key to identify tokens created by this filter |
---|
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 |
IOException | |
---|---|
ServletException |
This method is deprecated.
use constructor injection instead
This method is deprecated.
no obvious use case and can easily be achieved by other means
Enables subclasses to determine whether or not an anonymous authentication token should be setup for this request. This is useful if anonymous authentication should be allowed only for specific IP subnet ranges etc.
request | to assist the method determine request details |
---|
true
if the anonymous token should be setup for this request (provided that the request
doesn't already have some other Authentication
inside it), or false
if no
anonymous token should be setup for this request