Package org.restlet.ext.jaas
Class ChallengeCallbackHandler
- java.lang.Object
-
- org.restlet.ext.jaas.ChallengeCallbackHandler
-
- All Implemented Interfaces:
javax.security.auth.callback.CallbackHandler
public class ChallengeCallbackHandler extends java.lang.Object implements javax.security.auth.callback.CallbackHandlerJAAS callback handler that automatically provides the identifier and secret when asked by login modules.- Author:
- Jerome Louvel
-
-
Constructor Summary
Constructors Constructor Description ChallengeCallbackHandler(org.restlet.Request request, org.restlet.Response response)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.restlet.RequestgetRequest()Returns the handled request.org.restlet.ResponsegetResponse()Returns the handled response.protected voidhandle(javax.security.auth.callback.Callback callback)Handles a callback.voidhandle(javax.security.auth.callback.Callback[] callbacks)Handles the callbacks.voidsetRequest(org.restlet.Request request)Sets the handled request.voidsetResponse(org.restlet.Response response)Sets the handled response.
-
-
-
Method Detail
-
getRequest
public org.restlet.Request getRequest()
Returns the handled request.- Returns:
- The handled request.
-
getResponse
public org.restlet.Response getResponse()
Returns the handled response.- Returns:
- The handled response.
-
handle
protected void handle(javax.security.auth.callback.Callback callback) throws javax.security.auth.callback.UnsupportedCallbackExceptionHandles a callback. The default implementation automatically sets the identifier onNameCallbackinstances and the secret onPasswordCallback.- Parameters:
callback- The callback to handle.- Throws:
javax.security.auth.callback.UnsupportedCallbackException
-
handle
public void handle(javax.security.auth.callback.Callback[] callbacks) throws java.io.IOException, javax.security.auth.callback.UnsupportedCallbackExceptionHandles the callbacks. The default implementation delegates the handling to thehandle(Callback)method.- Specified by:
handlein interfacejavax.security.auth.callback.CallbackHandler- Parameters:
callbacks- The callbacks to handle.- Throws:
java.io.IOExceptionjavax.security.auth.callback.UnsupportedCallbackException
-
setRequest
public void setRequest(org.restlet.Request request)
Sets the handled request.- Parameters:
request- The handled request.
-
setResponse
public void setResponse(org.restlet.Response response)
Sets the handled response.- Parameters:
response- The handled response.
-
-