Class DesKeyGenHandler

  • All Implemented Interfaces:
    org.forgerock.http.Handler

    public class DesKeyGenHandler
    extends Object
    implements org.forgerock.http.Handler
    Creates a static response with a generated DES key.
    This handler takes no configuration settings.
     
     {
       "name": "KeyGenerator",
       "type": "DesKeyGenHandler"
     }
     
     
    When called, it generates a base64-encoded DES key, and returns the "key" value in a JSON response:
    {"key":"/R/9khUxnaQ="}
    If the handler fails to find a key generator for DES keys, then it does not return a "key", but instead returns an "error":
    {"error":"Failed to generate a key: ..."}
    • Constructor Detail

      • DesKeyGenHandler

        public DesKeyGenHandler()
    • Method Detail

      • handle

        public org.forgerock.util.promise.Promise<org.forgerock.http.protocol.Response,​org.forgerock.util.promise.NeverThrowsException> handle​(org.forgerock.services.context.Context context,
                                                                                                                                                     org.forgerock.http.protocol.Request request)
        Specified by:
        handle in interface org.forgerock.http.Handler