クラス AnonymousAuthenticationFilter
- java.lang.Object
-
- org.springframework.web.filter.GenericFilterBean
-
- org.springframework.security.web.authentication.AnonymousAuthenticationFilter
- 実装されたすべてのインターフェース:
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 AnonymousAuthenticationFilter extends org.springframework.web.filter.GenericFilterBean implements org.springframework.beans.factory.InitializingBean
SecurityContextHolder
にAuthentication
オブジェクトがないかどうかを検出し、必要に応じてオブジェクトを設定します。
コンストラクターのサマリー
コンストラクター コンストラクター 説明 AnonymousAuthenticationFilter(java.lang.String key)
"anonymousUser" という名前のプリンシパルと単一の権限 "ROLE_ANONYMOUS" を持つフィルターを作成します。AnonymousAuthenticationFilter(java.lang.String key, java.lang.Object principal, java.util.List<GrantedAuthority> authorities)
メソッドのサマリー
すべてのメソッド インスタンスメソッド 具象メソッド 修飾子と型 メソッド 説明 void
afterPropertiesSet()
protected Authentication
createAuthentication(javax.servlet.http.HttpServletRequest request)
void
doFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain chain)
java.util.List<GrantedAuthority>
getAuthorities()
java.lang.Object
getPrincipal()
void
setAuthenticationDetailsSource(AuthenticationDetailsSource<javax.servlet.http.HttpServletRequest,?> authenticationDetailsSource)
コンストラクターの詳細
AnonymousAuthenticationFilter
public AnonymousAuthenticationFilter(java.lang.String key)
"anonymousUser" という名前のプリンシパルと単一の権限 "ROLE_ANONYMOUS" を持つフィルターを作成します。- パラメーター:
key
- このフィルターによって作成されたトークンを識別するためのキー
AnonymousAuthenticationFilter
public AnonymousAuthenticationFilter(java.lang.String key, java.lang.Object principal, java.util.List<GrantedAuthority> authorities)
- パラメーター:
key
- このフィルターによって作成されたトークンを識別するためのキーprincipal
- 匿名ユーザーを表すために使用されるプリンシパルauthorities
- 匿名ユーザーの権限リスト
メソッドの詳細
afterPropertiesSet
public void afterPropertiesSet()
- 次で指定:
- インターフェース
org.springframework.beans.factory.InitializingBean
のafterPropertiesSet
- オーバーライド:
- クラス
org.springframework.web.filter.GenericFilterBean
のafterPropertiesSet
doFilter
public void doFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain chain) throws java.io.IOException, javax.servlet.ServletException
- 次で指定:
- インターフェース
javax.servlet.Filter
のdoFilter
- 例外:
java.io.IOException
javax.servlet.ServletException
createAuthentication
protected Authentication createAuthentication(javax.servlet.http.HttpServletRequest request)
setAuthenticationDetailsSource
public void setAuthenticationDetailsSource(AuthenticationDetailsSource<javax.servlet.http.HttpServletRequest,?> authenticationDetailsSource)
getPrincipal
public java.lang.Object getPrincipal()
getAuthorities
public java.util.List<GrantedAuthority> getAuthorities()