Class KerberosServiceAuthenticationProvider
- All Implemented Interfaces:
- org.springframework.beans.factory.InitializingBean,- AuthenticationProvider
Authentication Provider which validates Kerberos Service Tickets or SPNEGO Tokens (which includes Kerberos Service Tickets).
 It needs a KerberosTicketValidator, which contains the code to validate
 the ticket, as this code is different between SUN and IBM JRE.
 It also needs an UserDetailsService to load the user properties and the
 GrantedAuthorities, as we only get back the username from Kerbeos
 
SpnegoAuthenticationProcessingFilter.- Since:
- 1.0
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidadditionalAuthenticationChecks(UserDetails userDetails, KerberosServiceRequestToken authentication) Allows subclasses to perform any additional checks of a returnedUserDetailsfor a given authentication request.voidauthenticate(Authentication authentication) Performs authentication with the same contract asAuthenticationManager.authenticate(Authentication).voidsetTicketValidator(KerberosTicketValidator ticketValidator) TheKerberosTicketValidatorto use, for validating the Kerberos/SPNEGO tickets.voidsetUserDetailsService(UserDetailsService userDetailsService) TheUserDetailsServiceto use, for loading the user properties and theGrantedAuthorities.booleanReturnstrueif thisAuthenticationProvidersupports the indicatedAuthenticationobject.
- 
Constructor Details- 
KerberosServiceAuthenticationProviderpublic KerberosServiceAuthenticationProvider()
 
- 
- 
Method Details- 
authenticateDescription copied from interface:AuthenticationProviderPerforms authentication with the same contract asAuthenticationManager.authenticate(Authentication).- Specified by:
- authenticatein interface- AuthenticationProvider
- 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.
 
- 
supportsDescription copied from interface:AuthenticationProviderReturnstrueif thisAuthenticationProvidersupports the indicatedAuthenticationobject.Returning truedoes not guarantee anAuthenticationProviderwill be able to authenticate the presentedAuthenticationobject. 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 by theProviderManager.- Specified by:
- supportsin interface- AuthenticationProvider
- Returns:
- trueif the implementation can more closely evaluate the- Authenticationclass presented
 
- 
afterPropertiesSet- Specified by:
- afterPropertiesSetin interface- org.springframework.beans.factory.InitializingBean
- Throws:
- Exception
 
- 
setUserDetailsServiceTheUserDetailsServiceto use, for loading the user properties and theGrantedAuthorities.- Parameters:
- userDetailsService- the new user details service
 
- 
setTicketValidatorTheKerberosTicketValidatorto use, for validating the Kerberos/SPNEGO tickets.- Parameters:
- ticketValidator- the new ticket validator
 
- 
additionalAuthenticationChecksprotected void additionalAuthenticationChecks(UserDetails userDetails, KerberosServiceRequestToken authentication) throws AuthenticationException Allows subclasses to perform any additional checks of a returnedUserDetailsfor a given authentication request.- Parameters:
- userDetails- as retrieved from the- UserDetailsService
- authentication- validated- KerberosServiceRequestToken
- Throws:
- AuthenticationException- AuthenticationException if the credentials could not be validated (generally a- BadCredentialsException, an- AuthenticationServiceException)
 
 
-