Class KerberosLdapAuthenticationProvider
- java.lang.Object
-
- org.springframework.security.kerberos.authentication.KerberosAuthenticationProvider
-
- org.opennms.web.springframework.security.KerberosLdapAuthenticationProvider
-
- All Implemented Interfaces:
org.springframework.security.authentication.AuthenticationProvider
public class KerberosLdapAuthenticationProvider extends org.springframework.security.kerberos.authentication.KerberosAuthenticationProviderAuthentication provider which validates users via Kerberos credentials and then populates the users' authorities using the specified implementation of LdapAuthoritiesPopulator. Created for use cases where no existing UserDetailsService implementation will quite do the job.- Author:
- Jeff Gehlbach
- See Also:
KerberosServiceLdapAuthenticationProvider,KerberosServiceAuthenticationProvider,LdapUserSearch,LdapAuthoritiesPopulator
-
-
Constructor Summary
Constructors Constructor Description KerberosLdapAuthenticationProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.security.core.Authenticationauthenticate(org.springframework.security.core.Authentication authentication)org.springframework.security.kerberos.authentication.KerberosClientgetKerberosClient()org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulatorgetLdapAuthoritiesPopulator()org.springframework.security.ldap.search.LdapUserSearchgetLdapUserSearch()booleangetTrimRealm()voidsetKerberosClient(org.springframework.security.kerberos.authentication.KerberosClient kerberosClient)voidsetLdapAuthoritiesPopulator(org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator ldapAuthoritiesPopulator)voidsetLdapUserSearch(org.springframework.security.ldap.search.LdapUserSearch ldapUserSearch)voidsetTrimRealm(boolean trimRealm)
-
-
-
Method Detail
-
authenticate
public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException- Specified by:
authenticatein interfaceorg.springframework.security.authentication.AuthenticationProvider- Overrides:
authenticatein classorg.springframework.security.kerberos.authentication.KerberosAuthenticationProvider- Throws:
org.springframework.security.core.AuthenticationException
-
setLdapAuthoritiesPopulator
public void setLdapAuthoritiesPopulator(org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator ldapAuthoritiesPopulator)
- Parameters:
ldapAuthoritiesPopulator- The LdapAuthoritiesPopulator to use for retrieving granted authorities from an LDAP directory
-
getLdapAuthoritiesPopulator
public org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator getLdapAuthoritiesPopulator()
-
setLdapUserSearch
public void setLdapUserSearch(org.springframework.security.ldap.search.LdapUserSearch ldapUserSearch)
- Parameters:
ldapUserSearch- The LdapUserSearch with which to look up users in an LDAP directory
-
getLdapUserSearch
public org.springframework.security.ldap.search.LdapUserSearch getLdapUserSearch()
-
setKerberosClient
public void setKerberosClient(org.springframework.security.kerberos.authentication.KerberosClient kerberosClient)
- Overrides:
setKerberosClientin classorg.springframework.security.kerberos.authentication.KerberosAuthenticationProvider
-
getKerberosClient
public org.springframework.security.kerberos.authentication.KerberosClient getKerberosClient()
-
setTrimRealm
public void setTrimRealm(boolean trimRealm)
- Parameters:
trimRealm- Defaults to true. If set to false, do not trim the realm portion (e.g. @EXAMPLE.ORG) from the authenticated user principal name (e.g. user@EXAMPLE.ORG).
-
getTrimRealm
public boolean getTrimRealm()
-
-