Class SpringSecurityAuthenticationSource
- java.lang.Object
-
- org.springframework.security.ldap.authentication.SpringSecurityAuthenticationSource
-
- All Implemented Interfaces:
org.springframework.ldap.core.AuthenticationSource
public class SpringSecurityAuthenticationSource extends java.lang.Object implements org.springframework.ldap.core.AuthenticationSourceAn AuthenticationSource to retrieve authentication information stored in Spring Security'sSecurityContextHolder.This is a copy of Spring LDAP's AcegiAuthenticationSource, updated for use with Spring Security 2.0.
- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor Description SpringSecurityAuthenticationSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCredentials()java.lang.StringgetPrincipal()Get the principals of the logged in user, in this case the distinguished name.voidsetSecurityContextHolderStrategy(SecurityContextHolderStrategy securityContextHolderStrategy)Sets theSecurityContextHolderStrategyto use.
-
-
-
Method Detail
-
getPrincipal
public java.lang.String getPrincipal()
Get the principals of the logged in user, in this case the distinguished name.- Specified by:
getPrincipalin interfaceorg.springframework.ldap.core.AuthenticationSource- Returns:
- the distinguished name of the logged in user.
-
getCredentials
public java.lang.String getCredentials()
- Specified by:
getCredentialsin interfaceorg.springframework.ldap.core.AuthenticationSource- See Also:
AuthenticationSource.getCredentials()
-
setSecurityContextHolderStrategy
public void setSecurityContextHolderStrategy(SecurityContextHolderStrategy securityContextHolderStrategy)
Sets theSecurityContextHolderStrategyto use. The default action is to use theSecurityContextHolderStrategystored inSecurityContextHolder.- Since:
- 5.8
-
-