I am trying to create a custom module and login module for Glassfish 4.
I followed the procedure described in the “Glassfish 4 Application Development Guide” p. 4-6, “Creating a Custom Kingdom”.
I also followed the steps in this article .
I created a loginModule that extends com.sun.appserv.security.AppservPasswordLoginModule.
I created a scope (SaltRealm) that extends com.sun.appserv.security.AppservRealm.
I'm going to the jar and put the jar in glassfish4 \ glassfish \ domains \ domain1 \ lib.
I added this to \ glassfish4 \ glassfish \ domains \ domain1 \ config \ login.conf:
saltRealm {
com.example.LoginModule required;
};
I added to \ glassfish4 \ glassfish \ domains \ domain1 \ config \ domain.xml:
<auth-realm classname="com.example.SaltRealm" name="saltRealm">
<property name="jaas-context" value="saltRealm"></property>
</auth-realm>
web.xml saltRealm.
<login-config>
<auth-method>FORM</auth-method>
<realm-name>saltRealm</realm-name>
<form-login-config>
<form-login-page>/login.xhtml</form-login-page>
<form-error-page>/error.xhtml</form-error-page>
</form-login-config>
</login-config>
, saltRealm ( , ).
, , . :
WEB9102: -: com.sun.enterprise.security.auth.login.common.LoginException: : :
, .