クラス 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()
使用すべきではありません。
メソッドのサマリー
すべてのメソッド インスタンスメソッド 具象メソッド 非推奨のメソッド 修飾子と型 メソッド 説明 void
afterPropertiesSet()
使用すべきではありません。Authentication
authenticate(Authentication authentication)
使用すべきではありません。AuthenticationManager.authenticate(Authentication)
と同じ契約で認証を実行します。protected Authentication
createSuccessfulAuthentication(UserDetails userDetails, OpenIDAuthenticationToken auth)
使用すべきではありません。プロバイダーから返される最終的な Authentication オブジェクトの作成を処理します。void
setAuthenticationUserDetailsService(AuthenticationUserDetailsService<OpenIDAuthenticationToken> userDetailsService)
使用すべきではありません。認証された OpenID ユーザーのUserDetails
をロードするために使用されます。void
setAuthoritiesMapper(GrantedAuthoritiesMapper authoritiesMapper)
使用すべきではありません。void
setUserDetailsService(UserDetailsService userDetailsService)
使用すべきではありません。認証された OpenID ユーザーのUserDetails
をロードするために使用されます。boolean
supports(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
使用すべきではありません。インターフェースからコピーされた説明:AuthenticationProvider
AuthenticationManager.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)
使用すべきではありません。