クラス Saml2WebSsoAuthenticationFilter
- java.lang.Object
-
- org.springframework.web.filter.GenericFilterBean
-
- org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
-
- org.springframework.security.saml2.provider.service.servlet.filter.Saml2WebSsoAuthenticationFilter
- 実装されたすべてのインターフェース:
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.ApplicationEventPublisherAware
、org.springframework.context.EnvironmentAware
、org.springframework.context.MessageSourceAware
、org.springframework.core.env.EnvironmentCapable
、org.springframework.web.context.ServletContextAware
public class Saml2WebSsoAuthenticationFilter extends AbstractAuthenticationProcessingFilter
- 導入:
- 5.2
フィールドサマリー
フィールド 修飾子と型 フィールド 説明 static java.lang.String
DEFAULT_FILTER_PROCESSES_URI
クラス org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter から継承されたフィールド
authenticationDetailsSource, eventPublisher, messages
コンストラクターのサマリー
コンストラクター コンストラクター 説明 Saml2WebSsoAuthenticationFilter(RelyingPartyRegistrationRepository relyingPartyRegistrationRepository)
DEFAULT_FILTER_PROCESSES_URI
処理 URL を使用するように構成されたSaml2WebSsoAuthenticationFilter
認証フィルターを作成しますSaml2WebSsoAuthenticationFilter(RelyingPartyRegistrationRepository relyingPartyRegistrationRepository, java.lang.String filterProcessesUrl)
Saml2WebSsoAuthenticationFilter
認証フィルターを作成しますSaml2WebSsoAuthenticationFilter(AuthenticationConverter authenticationConverter, java.lang.String filterProcessesUrl)
指定されたパラメーターを指定してSaml2WebSsoAuthenticationFilter
を作成します
メソッドのサマリー
すべてのメソッド インスタンスメソッド 具象メソッド 修飾子と型 メソッド 説明 Authentication
attemptAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
実際の認証を実行します。protected boolean
requiresAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
このフィルターが現在の呼び出しのログインリクエストを処理しようとするかどうかを示します。void
setAuthenticationRequestRepository(Saml2AuthenticationRequestRepository<AbstractSaml2AuthenticationRequest> authenticationRequestRepository)
指定されたSaml2AuthenticationRequestRepository
を使用して、保存された認証リクエストを削除します。クラス org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter から継承されたメソッド
afterPropertiesSet, doFilter, getAllowSessionCreation, getAuthenticationManager, getFailureHandler, getRememberMeServices, getSuccessHandler, setAllowSessionCreation, setApplicationEventPublisher, setAuthenticationDetailsSource, setAuthenticationFailureHandler, setAuthenticationManager, setAuthenticationSuccessHandler, setContinueChainBeforeSuccessfulAuthentication, setFilterProcessesUrl, setMessageSource, setRememberMeServices, setRequiresAuthenticationRequestMatcher, setSessionAuthenticationStrategy, successfulAuthentication, unsuccessfulAuthentication
フィールドの詳細
DEFAULT_FILTER_PROCESSES_URI
public static final java.lang.String DEFAULT_FILTER_PROCESSES_URI
- 関連事項:
- 定数フィールド値
コンストラクターの詳細
Saml2WebSsoAuthenticationFilter
public Saml2WebSsoAuthenticationFilter(RelyingPartyRegistrationRepository relyingPartyRegistrationRepository)
DEFAULT_FILTER_PROCESSES_URI
処理 URL を使用するように構成されたSaml2WebSsoAuthenticationFilter
認証フィルターを作成します- パラメーター:
relyingPartyRegistrationRepository
- - 設定された SAML 2 エンティティのリポジトリ。必須。
Saml2WebSsoAuthenticationFilter
public Saml2WebSsoAuthenticationFilter(RelyingPartyRegistrationRepository relyingPartyRegistrationRepository, java.lang.String filterProcessesUrl)
Saml2WebSsoAuthenticationFilter
認証フィルターを作成します- パラメーター:
relyingPartyRegistrationRepository
- - 設定された SAML 2 エンティティのリポジトリ。必須。filterProcessesUrl
- 処理 URL。{registrationId} 変数を含める必要があります。必須。
Saml2WebSsoAuthenticationFilter
public Saml2WebSsoAuthenticationFilter(AuthenticationConverter authenticationConverter, java.lang.String filterProcessesUrl)
指定されたパラメーターを指定してSaml2WebSsoAuthenticationFilter
を作成します- パラメーター:
authenticationConverter
-HttpServletRequest
をAuthentication
に変換するための戦略filterProcessesUrl
- 処理 URL- 導入:
- 5.4
メソッドの詳細
requiresAuthentication
protected boolean requiresAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
クラスからコピーされた説明:AbstractAuthenticationProcessingFilter
このフィルターが現在の呼び出しのログインリクエストを処理しようとするかどうかを示します。filterProcessesUrl
プロパティと照合する前に、リクエスト URL の「パス」セクションからパラメーター(https://host/myapp/index.html;jsessionid=blah の jsessionid パラメーターなど)を取り除きます。サブクラスは、Tapestry 統合などの特別な要件のためにオーバーライドできます。
- オーバーライド:
- クラス
AbstractAuthenticationProcessingFilter
のrequiresAuthentication
- 戻り値:
- フィルターが認証を試行する必要がある場合は
true
、そうでない場合はfalse
。
attemptAuthentication
public Authentication attemptAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws AuthenticationException
クラスからコピーされた説明:AbstractAuthenticationProcessingFilter
実際の認証を実行します。実装では、次のいずれかを実行する必要があります。
- 認証されたユーザーの移入された認証トークンを返し、認証の成功を示します
- 認証プロセスがまだ進行中であることを示す null を返します。戻る前に、実装はプロセスを完了するために必要な追加作業を実行する必要があります。
- 認証プロセスが失敗した場合、 AuthenticationException をスローします
- 次で指定:
- クラス
AbstractAuthenticationProcessingFilter
のattemptAuthentication
- パラメーター:
request
- パラメーターの抽出元および認証の実行元response
- レスポンス。実装がマルチステージ認証プロセス(OpenID など)の一部としてリダイレクトを行う必要がある場合に必要になる場合があります。- 戻り値:
- 認証されたユーザートークン。認証が不完全な場合は null
- 例外:
AuthenticationException
- 認証が失敗した場合。
setAuthenticationRequestRepository
public void setAuthenticationRequestRepository(Saml2AuthenticationRequestRepository<AbstractSaml2AuthenticationRequest> authenticationRequestRepository)
指定されたSaml2AuthenticationRequestRepository
を使用して、保存された認証リクエストを削除します。authenticationConverter
の型がSaml2AuthenticationTokenConverter
の場合、Saml2AuthenticationRequestRepository
もauthenticationConverter
に設定されます。- パラメーター:
authenticationRequestRepository
- 使用するSaml2AuthenticationRequestRepository
- 導入:
- 5.6