users@glassfish.java.net

Re: SSO with Active Directory and Kerberos

From: <forums_at_java.net>
Date: Tue, 21 Jan 2014 00:02:16 -0600 (CST)

You need JAAS. 1. a file .java.login.config WindowsLoginJaas {
com.sun.security.auth.module.NTLoginModule required debug=false; }; 2. In
your client import javax.security.auth.Subject; import
javax.security.auth.login.LoginContext; import
javax.security.auth.login.LoginException; import com.sun.security.auth.*; ...
System.setProperty("java.security.auth.login.config", "url to above file");
lc = new LoginContext("WindowsLoginJaas"); lc.login(); lc.getSubject();
sub.getPrincipals(); ...

--
[Message sent by forum member 'moj2ee']
View Post: http://forums.java.net/node/900571