javax.security.auth.message.callback

Class CallerPrincipalCallback

  • All Implemented Interfaces:
    Callback

    public class CallerPrincipalCallback
    extends Object
    implements Callback
    Callback for setting the container's caller (or Remote user) principal. This callback is intended to be called by a serverAuthModule during its validateRequest processing.
    • Constructor Detail

      • CallerPrincipalCallback

        public CallerPrincipalCallback(Subject s,
                                       Principal p)
        Create a CallerPrincipalCallback to set the container's representation of the caller principal
        Parameters:
        s - The Subject in which the container will distinguish the caller identity.
        p - The Principal that will be distinguished as the caller principal. This value may be null.

        The CallbackHandler must use the argument Principal to establish the caller principal associated with the invocation being processed by the container. When the argument Principal is null, the handler must establish the container's representation of the unauthenticated caller principal. The handler may perform principal mapping of non-null argument Principal values, but it must be possible to configure the handler such that it establishes the non-null argument Principal as the caller principal.

      • CallerPrincipalCallback

        public CallerPrincipalCallback(Subject s,
                                       String n)
        Create a CallerPrincipalCallback to set the container's representation of the caller principal.
        Parameters:
        s - The Subject in which the container will distinguish the caller identity.
        n - The String value that will be returned when getName() is called on the principal established as the caller principal or null.

        The CallbackHandler must use the n argument to establish the caller principal associated with the invocation being processed by the container. When the n argument is null, the handler must establish the container's representation of the unauthenticated caller principal (which may or may not be equal to null, depending on the requirements of the container type ). The handler may perform principal mapping of non-null values of n, but it must be possible to configure the handler such that it establishes the non-null argument value as the value returned when getName is called on the established principal.

    • Method Detail

      • getSubject

        public Subject getSubject()
        Get the Subject in which the handler will distinguish the caller principal
        Returns:
        The subject.
      • getPrincipal

        public Principal getPrincipal()
        Get the caller principal.
        Returns:
        The principal or null.

        When the values returned by this method and the getName methods are null, the handler must establish the container's representation of the unauthenticated caller principal within the Subject.

      • getName

        public String getName()
        Get the caller principal name.
        Returns:
        The principal name or null.

        When the values returned by this method and the getPrincipal methods are null, the handler must establish the container's representation of the unauthenticated caller principal within the Subject.

Traduction non disponible

Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Version en cache

21/08/2025 17:01:53 Cette version de la page est en cache (à la date du 21/08/2025 17:01:53) afin d'accélérer le traitement.
Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la version plus récente de la page.

Document créé le 11/06/2005, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/security/auth/message/callback/CallerPrincipalCallback.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com, CallerPrincipalCallback (Java(TM) EE 7 Specification APIs)

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.