java - Simple LDAP SSO auth -



java - Simple LDAP SSO auth -

i have simple ldap auth :

dircontext ctx = null; seek { logger.debug("trying log ldap"); hashtable<string, string> env = new hashtable<string, string>(); env.put(javax.naming.context.initial_context_factory, ninjaproperties.get("ldapfactory")); env.put(javax.naming.context.provider_url, ninjaproperties.get("ldapprovider")); env.put(javax.naming.context.security_authentication, ninjaproperties.get("ldapauthentication")); env.put(javax.naming.context.security_principal, ninjaproperties.get("ldapdomain") + context.getparameter("login")); env.put(javax.naming.context.security_credentials, context.getparameter("password")); ctx = new initialdircontext(env); if(ctx != null){ logger.info( "user [" + context.getparameter("login") + "] logged in successfully." ); ctx.close(); homecoming results.redirect("/termecontroller/consult"); } } grab (exception e) { logger.error("ldap login failed : " + e.tostring()); }

for now, users logg in form. set sso auth, can't find way set easily. need utilize cas or so? or there simple way? thx :)

sso quite broad topic, not sure trying accomplish here. if want sso windows users i.e. allowing windows users authenticated against domain controller access app same credentials waffle that.

java single-sign-on

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

java - Parsing XML, skip certain tags -

c# - ASP.NET MVC Sequence contains no matching element -