クラス Saml2WebSsoAuthenticationFilter
java.lang.ObjectSE
org.springframework.web.filter.GenericFilterBean
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
org.springframework.security.saml2.provider.service.web.authentication.Saml2WebSsoAuthenticationFilter
- 実装されたすべてのインターフェース:
jakarta.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
- 導入:
- 5.2
フィールドサマリー
フィールドクラス org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter から継承されたフィールド
authenticationDetailsSource, eventPublisher, messages
クラス org.springframework.web.filter.GenericFilterBean から継承されたフィールド
logger
コンストラクターのサマリー
コンストラクターコンストラクター説明Saml2WebSsoAuthenticationFilter
(RelyingPartyRegistrationRepository relyingPartyRegistrationRepository) DEFAULT_FILTER_PROCESSES_URI
処理 URL を使用するように構成されたSaml2WebSsoAuthenticationFilter
認証フィルターを作成しますSaml2WebSsoAuthenticationFilter
(RelyingPartyRegistrationRepository relyingPartyRegistrationRepository, StringSE filterProcessesUrl) Saml2WebSsoAuthenticationFilter
認証フィルターを作成しますSaml2WebSsoAuthenticationFilter
(AuthenticationConverter authenticationConverter) DEFAULT_FILTER_PROCESSES_URI
処理 URL を使用するように構成されたSaml2WebSsoAuthenticationFilter
を作成しますSaml2WebSsoAuthenticationFilter
(AuthenticationConverter authenticationConverter, StringSE filterProcessesUrl) 指定されたパラメーターを指定してSaml2WebSsoAuthenticationFilter
を作成しますメソッドのサマリー
修飾子と型メソッド説明attemptAuthentication
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) 実際の認証を実行します。protected boolean
requiresAuthentication
(jakarta.servlet.http.HttpServletRequest request, jakarta.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, setSecurityContextHolderStrategy, setSecurityContextRepository, setSessionAuthenticationStrategy, successfulAuthentication, unsuccessfulAuthentication
クラス org.springframework.web.filter.GenericFilterBean から継承されたメソッド
addRequiredProperty, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
フィールドの詳細
DEFAULT_FILTER_PROCESSES_URI
- 関連事項:
コンストラクターの詳細
Saml2WebSsoAuthenticationFilter
public Saml2WebSsoAuthenticationFilter(RelyingPartyRegistrationRepository relyingPartyRegistrationRepository) DEFAULT_FILTER_PROCESSES_URI
処理 URL を使用するように構成されたSaml2WebSsoAuthenticationFilter
認証フィルターを作成します- パラメーター:
relyingPartyRegistrationRepository
- - 設定された SAML 2 エンティティのリポジトリ。必須。
Saml2WebSsoAuthenticationFilter
public Saml2WebSsoAuthenticationFilter(RelyingPartyRegistrationRepository relyingPartyRegistrationRepository, StringSE filterProcessesUrl) Saml2WebSsoAuthenticationFilter
認証フィルターを作成します- パラメーター:
relyingPartyRegistrationRepository
- - 設定された SAML 2 エンティティのリポジトリ。必須。filterProcessesUrl
- 処理 URL。{registrationId} 変数を含める必要があります。必須。
Saml2WebSsoAuthenticationFilter
DEFAULT_FILTER_PROCESSES_URI
処理 URL を使用するように構成されたSaml2WebSsoAuthenticationFilter
を作成します- パラメーター:
authenticationConverter
-HttpServletRequest
をAuthentication
に変換するための戦略- 導入:
- 6.2
Saml2WebSsoAuthenticationFilter
public Saml2WebSsoAuthenticationFilter(AuthenticationConverter authenticationConverter, StringSE filterProcessesUrl) 指定されたパラメーターを指定してSaml2WebSsoAuthenticationFilter
を作成します- パラメーター:
authenticationConverter
-HttpServletRequest
をAuthentication
に変換するための戦略filterProcessesUrl
- 処理 URL- 導入:
- 5.4
メソッドの詳細
requiresAuthentication
protected boolean requiresAuthentication(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) クラスからコピーされた説明:AbstractAuthenticationProcessingFilter
このフィルターが現在の呼び出しのログインリクエストを処理しようとするかどうかを示します。filterProcessesUrl
プロパティと照合する前に、リクエスト URL の「パス」セクションからパラメーター(https://host/myapp/index.html;jsessionid=blah の jsessionid パラメーターなど)を取り除きます。サブクラスは、Tapestry 統合などの特別な要件のためにオーバーライドできます。
- オーバーライド:
- クラス
AbstractAuthenticationProcessingFilter
のrequiresAuthentication
- 戻り値:
- フィルターが認証を試行する必要がある場合は
true
、そうでない場合はfalse
。
attemptAuthentication
public Authentication attemptAuthentication(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws AuthenticationException クラスからコピーされた説明:AbstractAuthenticationProcessingFilter
実際の認証を実行します。実装では、次のいずれかを実行する必要があります。
- 認証されたユーザーの移入された認証トークンを返し、認証の成功を示します
- 認証プロセスがまだ進行中であることを示す null を返します。戻る前に、実装はプロセスを完了するために必要な追加作業を実行する必要があります。
- 認証プロセスが失敗した場合、 AuthenticationException をスローします
- 次で指定:
- クラス
AbstractAuthenticationProcessingFilter
のattemptAuthentication
- パラメーター:
request
- パラメーターの抽出元および認証の実行元response
- レスポンス。これは、実装が多段階認証プロセス (OIDC など) の一部としてリダイレクトを行う必要がある場合に必要になる場合があります。- 戻り値:
- 認証されたユーザートークン。認証が不完全な場合は null
- 例外:
AuthenticationException
- 認証が失敗した場合。
setAuthenticationRequestRepository
public void setAuthenticationRequestRepository(Saml2AuthenticationRequestRepository<AbstractSaml2AuthenticationRequest> authenticationRequestRepository) 指定されたSaml2AuthenticationRequestRepository
を使用して、保存された認証リクエストを削除します。authenticationConverter
の型がSaml2AuthenticationTokenConverter
の場合、Saml2AuthenticationRequestRepository
もauthenticationConverter
に設定されます。- パラメーター:
authenticationRequestRepository
- 使用するSaml2AuthenticationRequestRepository
- 導入:
- 5.6