Class SecretKeyCallback

java.lang.Object
jakarta.security.auth.message.callback.SecretKeyCallback
All Implemented Interfaces:
Callback

public class SecretKeyCallback extends Object implements Callback
A callback enabling an authentication module to request a secret key from the runtime, by supplying an alias. Other request types may also be supported.
  • Constructor Details

    • SecretKeyCallback

      public SecretKeyCallback(SecretKeyCallback.Request request)
      Constructs a SecretKeyCallback with the specified request.
      Parameters:
      request - The request describing the secret key to obtain
  • Method Details

    • getRequest

      public SecretKeyCallback.Request getRequest()
      Returns the request associated with this callback.
      Returns:
      The request describing the secret key to obtain
    • setKey

      public void setKey(SecretKey key)
      Sets the secret key obtained by the runtime.
      Parameters:
      key - The secret key
    • getKey

      public SecretKey getKey()
      Returns the secret key.
      Returns:
      The secret key, or null if not set