org.mycore.user.authentication
Class MCRJAASAuthenticator
java.lang.Object
org.mycore.user.authentication.MCRJAASAuthenticator
public class MCRJAASAuthenticator
- extends Object
Authenticates a user by checking the password against a
JAAS LoginModule. You need a jaas.conf file, for example
the following configuration to authenticate using Kerberos service:
MCRJAASAuthenticator {
com.sun.security.auth.module.Krb5LoginModule required
principal="myhost@Example.CORP" useTicketCache=false;
};
The following configuration property must be set:
MCR.UserAuthenticator.[ID].LoginContextID
the ID of the JAAS login context, as declared in jaas.conf.
Default is "MCRJAASAuthenticator" as in the sample jaas.conf above.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MCRJAASAuthenticator
public MCRJAASAuthenticator()
init
public void init(String ID)
authenticate
public boolean authenticate(String username,
String password)
main
public static void main(String[] args)
- A small test application, modify source code to test class.
You need a jaas.conf file. Start main method with
java -Djava.security.auth.login.config=jaas.conf org.mycore.user.authentication.MCRJAASAuthenticator