public class JaasAuthenticationHandler extends AbstractUsernamePasswordAuthenticationHandler
Using the JAAS Authentication Handler requires you to configure the appropriate JAAS modules. You can specify the location of a jass.conf file using the VM parameter -Djava.security.auth.login.config=$PATH_TO_JAAS_CONF/jaas.conf.
This example jaas.conf would try Kerberos based authentication, then try LDAP
authentication CAS { com.sun.security.auth.module.Krb5LoginModule sufficient
client=TRUE debug=FALSE useTicketCache=FALSE;
edu.uconn.netid.jaas.LDAPLoginModule sufficient
java.naming.provider.url="ldap://ldapserver.my.edu:389/dc=my,dc=edu"
java.naming.security.principal="uid=jaasauth,dc=my,dc=edu"
java.naming.security.credentials="password" Attribute="uid" startTLS="true"; };
CallbackHandler,
PasswordCallback,
NameCallback| Modifier and Type | Class and Description |
|---|---|
protected static class |
JaasAuthenticationHandler.UsernamePasswordCallbackHandler
A simple JAAS CallbackHandler which accepts a Name String and Password
String in the constructor.
|
log| Constructor and Description |
|---|
JaasAuthenticationHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
authenticateUsernamePasswordInternal(UsernamePasswordCredentials credentials)
Abstract convenience method that assumes the credentials passed in are a
subclass of UsernamePasswordCredentials.
|
void |
setRealm(String realm) |
doAuthentication, getPasswordEncoder, getPrincipalNameTransformer, setClassToSupport, setPasswordEncoder, setPrincipalNameTransformer, setSupportSubClasses, supportsauthenticate, getName, postAuthenticate, preAuthenticate, setNameprotected final boolean authenticateUsernamePasswordInternal(UsernamePasswordCredentials credentials) throws AuthenticationException
AbstractUsernamePasswordAuthenticationHandlerauthenticateUsernamePasswordInternal in class AbstractUsernamePasswordAuthenticationHandlercredentials - the credentials representing the Username and Password
presented to CASAuthenticationException - if authenticity cannot be determined.public void setRealm(String realm)
Copyright © 2004-2012 Jasig. All Rights Reserved.