javax.security.auth.message.callback

Class SecretKeyCallback

  • All Implemented Interfaces:
    Callback

    public class SecretKeyCallback
    extends Object
    implements Callback
    Callback for acquiring a shared secret from a key repository. This Callback may be used by client or server authentication modules to obtain shared secrets (for example, passwords) without relying on a user during the Callback processing. This Callback is typically empoyed by ClientAuthModules invoked from intermediate components that need to acquire a password to authenticate to their target service.
    • Constructor Detail

      • SecretKeyCallback

        public SecretKeyCallback(SecretKeyCallback.Request request)
        Constructs this SecretKeyCallback with a secret key Request object.

        The request object identifies the secret key to be returned. If the alias is null, the handler of the callback relies on its own default.

        Parameters:
        request - Request object identifying the secret key, or null.
    • Method Detail

      • getRequest

        public SecretKeyCallback.Request getRequest()
        Used by the CallbackHandler to get the Request object which identifies the secret key to be returned.
        Returns:
        The Request object which identifies the private key to be returned, or null. If null, the handler of the callback relies on its own default.
      • setKey

        public void setKey(SecretKey key)
        Used by the CallbackHandler to set the requested secret key within the Callback.
        Parameters:
        key - The secret key, or null if no key was found.
      • getKey

        public SecretKey getKey()
        Used to obtain the secret key set within the Callback.
        Returns:
        The secret key, or null if no key was found.

Document created the 11/06/2005, last modified the 18/08/2025
Source of the printed document:https://www.gaudry.be/en/java-api-javaee-rf-javax/security/auth/message/callback/secretkeycallback.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:fr Manuel PHP : https://docs.oracle.com/en/java/, Class SecretKeyCallback

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author of this site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.