クラス RunAsImplAuthenticationProvider

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

    public class RunAsImplAuthenticationProvider
    extends java.lang.Object
    implements org.springframework.beans.factory.InitializingBean, AuthenticationProvider, org.springframework.context.MessageSourceAware
    RunAsUserToken を認証できる AuthenticationProvider 実装。

    RunAsUserToken を生成するためにアダプターが使用するキーと一致する必要があるキーを使用して、Bean コンテキストで構成されます。RunAsImplAuthenticationProvider -configured キーに一致するハッシュコードを提示するすべての RunAsUserToken インスタンスを有効として扱います。

    キーが一致しない場合、BadCredentialsException がスローされます。

    • フィールドの詳細

      • messages

        protected org.springframework.context.support.MessageSourceAccessor messages
    • コンストラクターの詳細

      • RunAsImplAuthenticationProvider

        public RunAsImplAuthenticationProvider()
    • メソッドの詳細

      • 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 - 認証が失敗した場合。
      • getKey

        public java.lang.String getKey()
      • setKey

        public void setKey​(java.lang.String key)
      • setMessageSource

        public void setMessageSource​(org.springframework.context.MessageSource messageSource)
        次で指定:
        インターフェース org.springframework.context.MessageSourceAwaresetMessageSource 
      • 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