public class DaoX509AuthoritiesPopulator extends java.lang.Object implements X509AuthoritiesPopulator, org.springframework.beans.factory.InitializingBean, org.springframework.context.MessageSourceAware
UserDetailsService.| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.context.support.MessageSourceAccessor |
messages
Deprecated.
|
| Constructor and Description |
|---|
DaoX509AuthoritiesPopulator()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Deprecated.
|
UserDetails |
getUserDetails(java.security.cert.X509Certificate clientCert)
Deprecated.
Obtains the granted authorities for the specified user.
|
void |
setMessageSource(org.springframework.context.MessageSource messageSource)
Deprecated.
|
void |
setSubjectDNRegex(java.lang.String subjectDNRegex)
Deprecated.
Sets the regular expression which will by used to extract the user name from the certificate's Subject
DN.
|
void |
setUserDetailsService(UserDetailsService userDetailsService)
Deprecated.
|
protected org.springframework.context.support.MessageSourceAccessor messages
public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionpublic UserDetails getUserDetails(java.security.cert.X509Certificate clientCert) throws AuthenticationException
X509AuthoritiesPopulatorMay throw any
AuthenticationException or return null if the authorities are unavailable.
getUserDetails in interface X509AuthoritiesPopulatorclientCert - the X.509 certificate suppliedAuthenticationException - if the user details are not available or the certificate isn't valid for the
application's purpose.public void setMessageSource(org.springframework.context.MessageSource messageSource)
setMessageSource in interface org.springframework.context.MessageSourceAwarepublic void setSubjectDNRegex(java.lang.String subjectDNRegex)
It should contain a single group; for example the default expression "CN=(.?)," matches the common name field. So "CN=Jimi Hendrix, OU=..." will give a user name of "Jimi Hendrix".
The matches are case insensitive. So "emailAddress=(.?)," will match "EMAILADDRESS=jimi@hendrix.org, CN=..." giving a user name "jimi@hendrix.org"
subjectDNRegex - the regular expression to find in the subjectpublic void setUserDetailsService(UserDetailsService userDetailsService)