クラス OpenIDAuthenticationProvider
- java.lang.Object
-
- org.springframework.security.openid.OpenIDAuthenticationProvider
- 実装されているすべてのインターフェース:
org.springframework.beans.factory.InitializingBean,AuthenticationProvider
@Deprecated public class OpenIDAuthenticationProvider extends java.lang.Object implements AuthenticationProvider, org.springframework.beans.factory.InitializingBean
使用すべきではありません。OpenID 1.0 および 2.0 プロトコルは非推奨になり、ユーザーはspring-security-oauth2でサポートされる OpenID Connect に移行することをお勧めします。認証済みユーザーのローカル権限を取得することにより、OpenID 認証を完了します。権限は、構成された
UserDetailsServiceを呼び出すことによって取得されます。返されるUserDetailsには、少なくとも、認証されたユーザーに適用可能なユーザー名とGrantedAuthorityオブジェクトが含まれている必要があります。デフォルトでは、Spring Security はパスワードとUserDetailsの有効 / 無効ステータスを無視します。これは認証に関連し、別のプロバイダーサーバーによって強制されているはずです。実装によって返される
UserDetailsは、生成されたAuthenticationトークンに格納されるため、メールアドレス、電話番号などの追加のプロパティを簡単に格納できます。
コンストラクターの概要
コンストラクター コンストラクター 説明 OpenIDAuthenticationProvider()使用すべきではありません。
メソッドのサマリー
すべてのメソッド インスタンスメソッド 具象メソッド 非推奨のメソッド 修飾子と型 メソッド 説明 voidafterPropertiesSet()使用すべきではありません。Authenticationauthenticate(Authentication authentication)使用すべきではありません。AuthenticationManager.authenticate(Authentication)と同じ契約で認証を実行します。protected AuthenticationcreateSuccessfulAuthentication(UserDetails userDetails, OpenIDAuthenticationToken auth)使用すべきではありません。プロバイダーから返される最終的な Authentication オブジェクトの作成を処理します。voidsetAuthenticationUserDetailsService(AuthenticationUserDetailsService<OpenIDAuthenticationToken> userDetailsService)使用すべきではありません。認証された OpenID ユーザーのUserDetailsをロードするために使用されます。voidsetAuthoritiesMapper(GrantedAuthoritiesMapper authoritiesMapper)使用すべきではありません。voidsetUserDetailsService(UserDetailsService userDetailsService)使用すべきではありません。認証された OpenID ユーザーのUserDetailsをロードするために使用されます。booleansupports(java.lang.Class<?> authentication)使用すべきではありません。このAuthenticationProviderが指定されたAuthenticationオブジェクトをサポートする場合、trueを返します。
メソッドの詳細
afterPropertiesSet
public void afterPropertiesSet()
使用すべきではありません。- 次で指定:
- インターフェース
org.springframework.beans.factory.InitializingBeanのafterPropertiesSet
authenticate
public Authentication authenticate(Authentication authentication) throws AuthenticationException
使用すべきではありません。インターフェースからコピーされた説明:AuthenticationProviderAuthenticationManager.authenticate(Authentication)と同じ契約で認証を実行します。- 次で指定:
- インターフェース
AuthenticationProviderのauthenticate - パラメーター:
authentication- 認証リクエストオブジェクト。- 戻り値:
- 資格情報を含む完全に認証されたオブジェクト。
AuthenticationProviderが、渡されたAuthenticationオブジェクトの認証をサポートできない場合、nullを返すことがあります。そのような場合、提示されたAuthenticationクラスをサポートする次のAuthenticationProviderが試行されます。 - 例外:
AuthenticationException- 認証が失敗した場合。
createSuccessfulAuthentication
protected Authentication createSuccessfulAuthentication(UserDetails userDetails, OpenIDAuthenticationToken auth)
使用すべきではありません。プロバイダーから返される最終的な Authentication オブジェクトの作成を処理します。デフォルトの実装は、オリジナルから新しい OpenIDAuthenticationToken を作成するだけですが、UserDetails をプリンシパルとして使用し、UserDetailsService によってロードされた権限を含めます。
- パラメーター:
userDetails- ロードされた UserDetails オブジェクトauth- 認証メソッドに渡されるトークン- 戻り値:
- 認証されたユーザーを表すトークン。
setUserDetailsService
public void setUserDetailsService(UserDetailsService userDetailsService)
使用すべきではありません。認証された OpenID ユーザーのUserDetailsをロードするために使用されます。
setAuthenticationUserDetailsService
public void setAuthenticationUserDetailsService(AuthenticationUserDetailsService<OpenIDAuthenticationToken> userDetailsService)
使用すべきではありません。認証された OpenID ユーザーのUserDetailsをロードするために使用されます。
supports
public boolean supports(java.lang.Class<?> authentication)
使用すべきではありません。インターフェースからコピーされた説明:AuthenticationProviderこのAuthenticationProviderが指定されたAuthenticationオブジェクトをサポートする場合、trueを返します。trueを返すことは、AuthenticationProviderがAuthenticationクラスの提示されたインスタンスを認証できることを保証しません。それは、それがより詳細な評価をサポートできることを示しています。AuthenticationProviderは、AuthenticationProvider.authenticate(Authentication)メソッドからnullを返して、別のAuthenticationProviderを試す必要があることを示すことができます。認証を実行できる
AuthenticationProviderの選択は、実行時にProviderManagerで行われます。- 次で指定:
- インターフェース
AuthenticationProviderのsupports - 戻り値:
- 実装が提示された
Authenticationクラスをより厳密に評価できる場合はtrue
setAuthoritiesMapper
public void setAuthoritiesMapper(GrantedAuthoritiesMapper authoritiesMapper)
使用すべきではありません。