Class ChallengeCallbackHandler

  • All Implemented Interfaces:
    javax.security.auth.callback.CallbackHandler

    public class ChallengeCallbackHandler
    extends java.lang.Object
    implements javax.security.auth.callback.CallbackHandler
    JAAS 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.Request getRequest()
      Returns the handled request.
      org.restlet.Response getResponse()
      Returns the handled response.
      protected void handle​(javax.security.auth.callback.Callback callback)
      Handles a callback.
      void handle​(javax.security.auth.callback.Callback[] callbacks)
      Handles the callbacks.
      void setRequest​(org.restlet.Request request)
      Sets the handled request.
      void setResponse​(org.restlet.Response response)
      Sets the handled response.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ChallengeCallbackHandler

        public ChallengeCallbackHandler​(org.restlet.Request request,
                                        org.restlet.Response response)
        Constructor.
        Parameters:
        request - The handled request.
        response - 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.UnsupportedCallbackException
        Handles a callback. The default implementation automatically sets the identifier on NameCallback instances and the secret on PasswordCallback.
        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.UnsupportedCallbackException
        Handles the callbacks. The default implementation delegates the handling to the handle(Callback) method.
        Specified by:
        handle in interface javax.security.auth.callback.CallbackHandler
        Parameters:
        callbacks - The callbacks to handle.
        Throws:
        java.io.IOException
        javax.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.