Class RunAsImplAuthenticationProvider
- java.lang.Object
-
- org.springframework.security.access.intercept.RunAsImplAuthenticationProvider
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.MessageSourceAware,AuthenticationProvider
@Deprecated public class RunAsImplAuthenticationProvider extends java.lang.Object implements org.springframework.beans.factory.InitializingBean, AuthenticationProvider, org.springframework.context.MessageSourceAware
Deprecated.Authentication is now separated from authorization in Spring Security. This class is only used by now-deprecated components. There is not yet an equivalent replacement in Spring Security.AnAuthenticationProviderimplementation that can authenticate aRunAsUserToken.Configured in the bean context with a key that should match the key used by adapters to generate the
RunAsUserToken. It treats as valid anyRunAsUserTokeninstance presenting a hash code that matches theRunAsImplAuthenticationProvider-configured key.If the key does not match, a
BadCredentialsExceptionis thrown.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.springframework.context.support.MessageSourceAccessormessagesDeprecated.
-
Constructor Summary
Constructors Constructor Description RunAsImplAuthenticationProvider()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidafterPropertiesSet()Deprecated.Authenticationauthenticate(Authentication authentication)Deprecated.Performs authentication with the same contract asAuthenticationManager.authenticate(Authentication).java.lang.StringgetKey()Deprecated.voidsetKey(java.lang.String key)Deprecated.voidsetMessageSource(org.springframework.context.MessageSource messageSource)Deprecated.booleansupports(java.lang.Class<?> authentication)Deprecated.Returnstrueif thisAuthenticationProvidersupports the indicatedAuthenticationobject.
-
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet()
Deprecated.- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
authenticate
public Authentication authenticate(Authentication authentication) throws AuthenticationException
Deprecated.Description copied from interface:AuthenticationProviderPerforms authentication with the same contract asAuthenticationManager.authenticate(Authentication).- Specified by:
authenticatein interfaceAuthenticationProvider- Parameters:
authentication- the authentication request object.- Returns:
- a fully authenticated object including credentials. May return
nullif theAuthenticationProvideris unable to support authentication of the passedAuthenticationobject. In such a case, the nextAuthenticationProviderthat supports the presentedAuthenticationclass will be tried. - Throws:
AuthenticationException- if authentication fails.
-
getKey
public java.lang.String getKey()
Deprecated.
-
setKey
public void setKey(java.lang.String key)
Deprecated.
-
setMessageSource
public void setMessageSource(org.springframework.context.MessageSource messageSource)
Deprecated.- Specified by:
setMessageSourcein interfaceorg.springframework.context.MessageSourceAware
-
supports
public boolean supports(java.lang.Class<?> authentication)
Deprecated.Description copied from interface:AuthenticationProviderReturnstrueif thisAuthenticationProvidersupports the indicatedAuthenticationobject.Returning
truedoes not guarantee anAuthenticationProviderwill be able to authenticate the presented instance of theAuthenticationclass. It simply indicates it can support closer evaluation of it. AnAuthenticationProvidercan still returnnullfrom theAuthenticationProvider.authenticate(Authentication)method to indicate anotherAuthenticationProvidershould be tried.Selection of an
AuthenticationProvidercapable of performing authentication is conducted at runtime theProviderManager.- Specified by:
supportsin interfaceAuthenticationProvider- Returns:
trueif the implementation can more closely evaluate theAuthenticationclass presented
-
-