I am trying to follow the procedure to create a custom realm outlined in the Application Development Guide, p. 4-6, "Creating a Custom Realm".
I created a loginModule that extends com.sun.appserv.security.AppservPasswordLoginModule.
I created a realm the extends com.sun.appserv.security.AppservRealm.
I compile to a jar, and placed the jar in glassfish4\glassfish\domains\domain1\lib.
I added this to \glassfish4\glassfish\domains\domain1\config\login.conf:
myRealm {
com.example.LoginModule required;
};
I added to \glassfish4\glassfish\domains\domain1\config\domain.xml:
And I added a section in web.xml to use myRealm.
It looks like the myRealm class is found (I can tell that the constructor runs).
However, it seems that the login module is not found. I get this warning:
WEB9102: Web Login Failed: com.sun.enterprise.security.auth.login.common.LoginException: Login failed: Invalid null input: name
I'm not sure what I'm missing here.