|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object issrg.security.GUICallbackHandler
public class GUICallbackHandler
This is a CallbackHandler that can display a dialog per each invocation of handle method. Therefore, it is possible to display a single dialog to collect all the necessary information in one go, or multiple dialogs can be displayed.
See JAAS documentation on details of the role of CallbackHandler in authentication process.
You will notice that PERMIS core does not use JAAS at all (no need to authenticate users - they are already authenticated). It is PERMIS utilities and tools that use the Callbacks to get the password to the PKCS#12 files or Java keystores. Note that they do not use the Callbacks in the purely JAAS way, since ultimately the access to the private keys is needed, and not just authentication of users is required; but the use of JAAS classes helps to build tools that do not depend on the type of interface available. This specifically caters for GUI-less environments, e.g. application servers.
Constructor Summary | |
---|---|
GUICallbackHandler()
|
Method Summary | |
---|---|
void |
handle(javax.security.auth.callback.Callback[] callbacks)
This is the implementation of the JAAS method to display a number of controls to collect user input, which is used in authentication. |
void |
setParentFrame(java.awt.Frame pf)
This method sets the frame to which the dialogs will be modal. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GUICallbackHandler()
Method Detail |
---|
public void setParentFrame(java.awt.Frame pf)
pf
- - the parent Frame; all dialogs will be modal to this Frame; if
null is specified, then the dialog will be modal to the main window of
the applicationpublic void handle(javax.security.auth.callback.Callback[] callbacks) throws javax.security.auth.callback.UnsupportedCallbackException
Because GUICallbackHandler caters for the specific purpose, it supports only some of the standard Callbacks, and all of the Callbacks defined by PERMIS. The following Callbacks are supported:
Note that each Callback may appear multiple times. For example, it is possible to prompt for multiple shares of the password to be input in the same dialog.
handle
in interface javax.security.auth.callback.CallbackHandler
callbacks
- - the array of Callbacks, each representing a control
for user input, as specified in JAAS framework
javax.security.auth.callback.UnsupportedCallbackException
- if at least one of the Callbacks is
not supported and cannot be displayedsetParentFrame(java.awt.Frame)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |