Package com.sun.enterprise.admin.util
Class AdminCallbackHandler
- java.lang.Object
-
- com.sun.enterprise.admin.util.AdminCallbackHandler
-
- All Implemented Interfaces:
CallbackHandler
public class AdminCallbackHandler extends Object implements CallbackHandler
Handles callbacks for admin authentication other than user-provided username and password, such as the local password, a limited-use token, a ReST token.Note that some of the information the callback handler stores is really for the use of the admin LoginModule. But because we don't control how the login module is instantiated or initialized - but we do control that for the callback handler - we can put that information here. This callback handler sets the info in the callback, which is then available to the LoginModule.
- Author:
- tjquinn
-
-
Field Summary
Fields Modifier and Type Field Description static String
COOKIE_REST_TOKEN
static String
HEADER_X_AUTH_TOKEN
-
Constructor Summary
Constructors Constructor Description AdminCallbackHandler(org.glassfish.hk2.api.ServiceLocator serviceLocator, org.glassfish.grizzly.http.server.Request request, String alternateHostName, String defaultAdminUsername, LocalPassword localPassword)
-
-
-
Field Detail
-
COOKIE_REST_TOKEN
public static final String COOKIE_REST_TOKEN
- See Also:
- Constant Field Values
-
HEADER_X_AUTH_TOKEN
public static final String HEADER_X_AUTH_TOKEN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AdminCallbackHandler
public AdminCallbackHandler(org.glassfish.hk2.api.ServiceLocator serviceLocator, org.glassfish.grizzly.http.server.Request request, String alternateHostName, String defaultAdminUsername, LocalPassword localPassword) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getRemoteHost
public String getRemoteHost()
-
handle
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
- Specified by:
handle
in interfaceCallbackHandler
- Throws:
IOException
UnsupportedCallbackException
-
-