クラス 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.Filterorg.springframework.beans.factory.Awareorg.springframework.beans.factory.BeanNameAwareorg.springframework.beans.factory.DisposableBeanorg.springframework.beans.factory.InitializingBeanorg.springframework.context.ApplicationEventPublisherAwareorg.springframework.context.EnvironmentAwareorg.springframework.context.MessageSourceAwareorg.springframework.core.env.EnvironmentCapableorg.springframework.web.context.ServletContextAware

public class Saml2WebSsoAuthenticationFilter extends AbstractAuthenticationProcessingFilter
導入:
5.2
  • フィールドの詳細

  • コンストラクターの詳細

    • 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

      public Saml2WebSsoAuthenticationFilter(AuthenticationConverter authenticationConverter)
      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 統合などの特別な要件のためにオーバーライドできます。

      オーバーライド:
      クラス AbstractAuthenticationProcessingFilterrequiresAuthentication 
      戻り値:
      フィルターが認証を試行する必要がある場合は true、そうでない場合は false
    • attemptAuthentication

      public Authentication attemptAuthentication(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws AuthenticationException
      クラスからコピーされた説明: AbstractAuthenticationProcessingFilter
      実際の認証を実行します。

      実装では、次のいずれかを実行する必要があります。

      1. 認証されたユーザーの移入された認証トークンを返し、認証の成功を示します
      2. 認証プロセスがまだ進行中であることを示す null を返します。戻る前に、実装はプロセスを完了するために必要な追加作業を実行する必要があります。
      3. 認証プロセスが失敗した場合、 AuthenticationException をスローします
      次で指定:
      クラス AbstractAuthenticationProcessingFilterattemptAuthentication 
      パラメーター:
      request - パラメーターの抽出元および認証の実行元
      response - レスポンス。これは、実装が多段階認証プロセス (OIDC など) の一部としてリダイレクトを行う必要がある場合に必要になる場合があります。
      戻り値:
      認証されたユーザートークン。認証が不完全な場合は null
      例外:
      AuthenticationException - 認証が失敗した場合。
    • setAuthenticationRequestRepository

      public void setAuthenticationRequestRepository(Saml2AuthenticationRequestRepository<AbstractSaml2AuthenticationRequest> authenticationRequestRepository)
      指定された Saml2AuthenticationRequestRepository を使用して、保存された認証リクエストを削除します。authenticationConverter の型が Saml2AuthenticationTokenConverter の場合、Saml2AuthenticationRequestRepository も authenticationConverter に設定されます。
      パラメーター:
      authenticationRequestRepository - 使用する Saml2AuthenticationRequestRepository
      導入:
      5.6