クラス UserDetailsByNameServiceWrapper<T extends Authentication>

java.lang.ObjectSE
org.springframework.security.core.userdetails.UserDetailsByNameServiceWrapper<T>
実装されたすべてのインターフェース:
org.springframework.beans.factory.InitializingBeanAuthenticationUserDetailsService<T>

public class UserDetailsByNameServiceWrapper<T extends Authentication> extends ObjectSE implements AuthenticationUserDetailsService<T>, org.springframework.beans.factory.InitializingBean
AuthenticationUserDetailsService のこの実装は、通常の Spring Security UserDetailsService 実装をラップして、 Authentication オブジェクトに含まれるユーザー名に基づいて UserDetails オブジェクトを取得します。
導入:
2.0
  • コンストラクターの詳細

    • UserDetailsByNameServiceWrapper

      public UserDetailsByNameServiceWrapper()
      setter を使用する Spring Security 2.0.x の方法との互換性のために空のラッパーを構築します。
    • UserDetailsByNameServiceWrapper

      public UserDetailsByNameServiceWrapper(UserDetailsService userDetailsService)
      委譲先のサービスとして提供された UserDetailsService を使用して、新しいラッパーを構築します。
      パラメーター:
      userDetailsService - 委譲先の UserDetailsService。
  • メソッドの詳細

    • afterPropertiesSet

      public void afterPropertiesSet()
      すべての必須プロパティが設定されているかどうかを確認します。
      次で指定:
      インターフェース org.springframework.beans.factory.InitializingBeanafterPropertiesSet 
      関連事項:
      • InitializingBean.afterPropertiesSet()
    • loadUserDetails

      public UserDetails loadUserDetails(T authentication) throws UsernameNotFoundException
      ラップされた UserDetailsService 実装から UserDetails オブジェクトを取得します
      次で指定:
      インターフェース AuthenticationUserDetailsService<T extends Authentication>loadUserDetails 
      パラメーター:
      authentication - 事前認証された認証トークン
      戻り値:
      指定された認証トークンの UserDetails。null になることはありません。
      例外:
      UsernameNotFoundException - 指定された認証トークンのユーザー詳細が見つからない場合
    • setUserDetailsService

      public void setUserDetailsService(UserDetailsService aUserDetailsService)
      ラップされた UserDetailsService 実装を設定します
      パラメーター:
      aUserDetailsService - セットするラップされた UserDetailsService