クラス AbstractJaasAuthenticationProvider

    • フィールドの詳細

      • log

        protected final org.apache.commons.logging.Log log
    • コンストラクターの詳細

      • AbstractJaasAuthenticationProvider

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

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        必要なプロパティが設定されていることを検証します。さらに、setCallbackHandlers(JaasAuthenticationCallbackHandler[]) が有効なハンドラーで呼び出されていない場合は、JaasNameCallbackHandler および JaasPasswordCallbackHandler を使用するように初期化します。
        次で指定:
        インターフェース org.springframework.beans.factory.InitializingBeanafterPropertiesSet 
        例外:
        java.lang.Exception
      • authenticate

        public Authentication authenticate​(Authentication auth)
                                    throws AuthenticationException
        認証オブジェクトのプリンシパルとクレデンシャルを指定してユーザーにログインしようとします
        次で指定:
        インターフェース AuthenticationProviderauthenticate 
        パラメーター:
        auth - 認証される認証オブジェクト。
        戻り値:
        grantedAuthorities が設定された、認証された Authentication オブジェクト。
        例外:
        AuthenticationException - この実装は、「ロックされた」アカウントまたは 'disabled' アカウントを処理しません。このメソッドは、loginContext.login() メソッドが失敗した場合にスローされる LoginException のメッセージとともに、AuthenticationServiceException のみをスローします。
      • createLoginContext

        protected abstract javax.security.auth.login.LoginContext createLoginContext​(javax.security.auth.callback.CallbackHandler handler)
                                                                              throws javax.security.auth.login.LoginException
        認証に使用する LoginContext を作成します。
        パラメーター:
        handler - LoginContext に使用する必要がある CallbackHandler(非 null)。
        戻り値:
        認証に使用する LoginContext
        例外:
        javax.security.auth.login.LoginException
      • handleLogout

        protected void handleLogout​(SessionDestroyedEvent event)
        破棄されたセッションのセキュリティコンテキストを取得し、JaasAuthenticationToken を含むすべてのセッションに対して LoginContext.logout() を呼び出すことにより、ログアウトを処理します。
        パラメーター:
        event - 現在のセッションを含むセッションイベント
      • onApplicationEvent

        public void onApplicationEvent​(SessionDestroyedEvent event)
        次で指定:
        インターフェース org.springframework.context.ApplicationListener<SessionDestroyedEvent>onApplicationEvent 
      • setAuthorityGranters

        public void setAuthorityGranters​(AuthorityGranter[] authorityGranters)
        認証に付与されるロール名について調べられる AuthorityGranters を設定します。
        パラメーター:
        authorityGranters - AuthorityGranter 配列
        関連事項:
        JaasAuthenticationProvider
      • setCallbackHandlers

        public void setCallbackHandlers​(JaasAuthenticationCallbackHandler[] callbackHandlers)
        JAASAuthentcationCallbackHandler 配列を設定して、LoginContext.login メソッドによって生成されたコールバックオブジェクトを処理します。
        パラメーター:
        callbackHandlers - JAASAuthenticationCallbackHandlers の配列
      • setLoginContextName

        public void setLoginContextName​(java.lang.String loginContextName)
        loginContextName を設定します。この名前は、loginConfig プロパティで指定された構成へのインデックスとして使用されます。
        パラメーター:
        loginContextName -
      • setLoginExceptionResolver

        public void setLoginExceptionResolver​(LoginExceptionResolver loginExceptionResolver)
      • supports

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

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

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

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

        public void setApplicationEventPublisher​(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
        次で指定:
        インターフェース org.springframework.context.ApplicationEventPublisherAwaresetApplicationEventPublisher 
      • getApplicationEventPublisher

        protected org.springframework.context.ApplicationEventPublisher getApplicationEventPublisher()