クラス RemoteAuthenticationProvider

  • 実装されたすべてのインターフェース:
    org.springframework.beans.factory.InitializingBeanAuthenticationProvider

    @Deprecated
    public class RemoteAuthenticationProvider
    extends java.lang.Object
    implements AuthenticationProvider, org.springframework.beans.factory.InitializingBean
    使用すべきではありません。
    5.6.0 現在、代替なし
    認証リクエストを検証するために RemoteAuthenticationManager をクエリするクライアント側オブジェクト。

    新しい Authentication オブジェクトは、このクラスによって作成されます。このクラスは、リクエスト Authentication オブジェクトの principalcredentialsRemoteAuthenticationManager によって返される GrantedAuthority[] で構成されます。

    RemoteAuthenticationManager は、呼び出しを実行するために、リモートクライアントプロキシファクトリで特別なユーザー名やパスワードを設定する必要はありません。代わりに、認証リクエスト全体を Authentication リクエストオブジェクト内にのみカプセル化する必要があります。実際には、これは RemoteAuthenticationManager が BASIC またはその他の HTTP レベル認証によって保護されないことを意味します。

    認証が失敗した場合、RemoteAuthenticationException がスローされます。この例外をキャッチしてユーザーに表示し、ユーザーが別の資格情報で再試行できるようにする必要があります。

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

      • RemoteAuthenticationProvider

        public RemoteAuthenticationProvider()
        使用すべきではありません。
    • メソッドの詳細

      • afterPropertiesSet

        public void afterPropertiesSet()
        使用すべきではありません。
        次で指定:
        インターフェース org.springframework.beans.factory.InitializingBeanafterPropertiesSet 
      • authenticate

        public Authentication authenticate​(Authentication authentication)
                                    throws AuthenticationException
        使用すべきではありません。
        インターフェースからコピーされた説明: AuthenticationProvider
        AuthenticationManager.authenticate(Authentication) と同じ契約で認証を実行します。
        次で指定:
        インターフェース AuthenticationProviderauthenticate 
        パラメーター:
        authentication - 認証リクエストオブジェクト。
        戻り値:
        資格情報を含む完全に認証されたオブジェクト。AuthenticationProvider が、渡された Authentication オブジェクトの認証をサポートできない場合、null を返すことがあります。そのような場合、提示された Authentication クラスをサポートする次の AuthenticationProvider が試行されます。
        例外:
        AuthenticationException - 認証が失敗した場合。
      • getRemoteAuthenticationManager

        public RemoteAuthenticationManager getRemoteAuthenticationManager()
        使用すべきではありません。
      • setRemoteAuthenticationManager

        public void setRemoteAuthenticationManager​(RemoteAuthenticationManager remoteAuthenticationManager)
        使用すべきではありません。
      • supports

        public boolean supports​(java.lang.Class<?> authentication)
        使用すべきではありません。
        インターフェースからコピーされた説明: AuthenticationProvider
        この AuthenticationProvider が指定された Authentication オブジェクトをサポートする場合、true を返します。

        true を返すことは、AuthenticationProvider が Authentication クラスの提示されたインスタンスを認証できることを保証しません。それは、それがより詳細な評価をサポートできることを示しています。AuthenticationProvider は、AuthenticationProvider.authenticate(Authentication) メソッドから null を返して、別の AuthenticationProvider を試す必要があることを示すことができます。

        認証を実行できる AuthenticationProvider の選択は、実行時に ProviderManager で行われます。

        次で指定:
        インターフェース AuthenticationProvidersupports 
        戻り値:
        実装が提示された Authentication クラスをより厳密に評価できる場合は true