クラス RemoteAuthenticationProvider
- java.lang.Object
-
- org.springframework.security.authentication.rcp.RemoteAuthenticationProvider
- 実装されているすべてのインターフェース:
org.springframework.beans.factory.InitializingBean,AuthenticationProvider
@Deprecated public class RemoteAuthenticationProvider extends java.lang.Object implements AuthenticationProvider, org.springframework.beans.factory.InitializingBean
使用すべきではありません。5.6.0 現在、代替なし認証リクエストを検証するためにRemoteAuthenticationManagerをクエリするクライアント側オブジェクト。新しい
Authenticationオブジェクトは、このクラスによって作成されます。このクラスは、リクエストAuthenticationオブジェクトのprincipal、credentials、RemoteAuthenticationManagerによって返されるGrantedAuthority[] で構成されます。RemoteAuthenticationManagerは、呼び出しを実行するために、リモートクライアントプロキシファクトリで特別なユーザー名やパスワードを設定する必要はありません。代わりに、認証リクエスト全体をAuthenticationリクエストオブジェクト内にのみカプセル化する必要があります。実際には、これはRemoteAuthenticationManagerが BASIC またはその他の HTTP レベル認証によって保護されないことを意味します。認証が失敗した場合、
RemoteAuthenticationExceptionがスローされます。この例外をキャッチしてユーザーに表示し、ユーザーが別の資格情報で再試行できるようにする必要があります。
コンストラクターの概要
コンストラクター コンストラクター 説明 RemoteAuthenticationProvider()使用すべきではありません。
メソッドのサマリー
すべてのメソッド インスタンスメソッド 具象メソッド 非推奨のメソッド 修飾子と型 メソッド 説明 voidafterPropertiesSet()使用すべきではありません。Authenticationauthenticate(Authentication authentication)使用すべきではありません。AuthenticationManager.authenticate(Authentication)と同じ契約で認証を実行します。RemoteAuthenticationManagergetRemoteAuthenticationManager()使用すべきではありません。voidsetRemoteAuthenticationManager(RemoteAuthenticationManager remoteAuthenticationManager)使用すべきではありません。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- 認証が失敗した場合。
getRemoteAuthenticationManager
public RemoteAuthenticationManager getRemoteAuthenticationManager()
使用すべきではありません。
setRemoteAuthenticationManager
public void setRemoteAuthenticationManager(RemoteAuthenticationManager remoteAuthenticationManager)
使用すべきではありません。
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