To enable authentication mechanism in a client container it is necessary to
choose a callback handler
Callback handlers are responsible to get the user identity and to store it.
The choice of the callback handler is done
in the application-xml
file, for example:
<application-client> <callback-handler>org.ow2.jonas.security.auth.callback.LoginCallbackHandler</callback-handler> </application-client>
JOnAS provides several callback handlers[8]:
LoginCallbackHandler
: it is a text
based handler that gets the user and password via stdin
DialogCallbackHandler:
handler using
a Swing dialog window to query user and password
NoInputCallbackHandler
: is
responsible to store a user/password
CertificateCallback
: is responsible
to store a certificate
configure JASS for setting the LoginModules to be used to
perform authentication see Section 2.5.4, “JAAS configuration”
In the $JONAS_ROOT/examples/java
ee5-earsample
directory can be found examples of clients using JAAS authentication as
well as one java client without container client that uses also
JAAS.