クラス Saml2WebSsoAuthenticationFilter

  • 実装されたすべてのインターフェース:
    javax.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
    • フィールドの詳細

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

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

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

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

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