-
FEATURED COMPONENTS
First time here? Check out the FAQ!
hai i am implementing spring security with two authentication providers
<authentication-manager erase-credentials="true">
<authentication-provider ref="ldapActiveDirectoryAuthProvider"/>
<authentication-provider user-service-ref="myUserDetailsService"/>
</authentication-manager>
in using spring AOP i am authenticating by below code
public Authentication loginLogging(ProceedingJoinPoint call) throws Throwable {
logger.debug("Entering ");
final Authentication authentication = (Authentication) call.getArgs()[0];
@SuppressWarnings("unused")
Object userObject= authentication.getPrincipal();
-------------------------------------------------------------------------------------------------------------------here i have to get authentication-provider ref Id
final Authentication result;
try {
result = (Authentication) call.proceed();
}catch{
s.o.p("authentication fail ");
}
It is working fine my requirement is
i have to get by which authentication-provider authentication is going /how to retirive authentication provider id dynamically .Can u provide sample code
Asked: 2012-08-06 13:01:26 +0800
Seen: 118 times
Last updated: Aug 06 '12