Can you not use two different LdapRealms, each with its own configured UserDnTemplate?
Cheers, -- Les Hazlewood CTO, Stormpath | http://stormpath.com | 888.391.5282 twitter: @lhazlewood | http://twitter.com/lhazlewood blog: http://leshazlewood.com stormpath blog: http://www.stormpath.com/blog On Fri, Apr 27, 2012 at 5:30 AM, anupamb82 <[email protected]> wrote: > I need to authenticate users with my LDAP url. Since each user is from a > different country it has a different User Distinguished name in my LDAP > system. > e.g. > CN=userid1234,OU=User Accounts,OU=India,DC=example,DC=com > CN=userid4567,OU=User Accounts,OU=USA,DC=example,DC=com > > How can I get the User distinguished name before getting the > UsernamePasswordToken using the below java code ? > > UsernamePasswordToken token = new UsernamePasswordToken(username, password); > > -- > View this message in context: > http://shiro-user.582556.n2.nabble.com/LDAP-Authentication-with-different-userDnTemplate-value-tp7506063.html > Sent from the Shiro User mailing list archive at Nabble.com.
