javax.security.auth.message.callback
Class CallerPrincipalCallback

java.lang.Object
  extended by javax.security.auth.message.callback.CallerPrincipalCallback
All Implemented Interfaces:
javax.security.auth.callback.Callback

public class CallerPrincipalCallback
extends java.lang.Object
implements javax.security.auth.callback.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.

Version:
%I%, %G%

Constructor Summary
CallerPrincipalCallback(javax.security.auth.Subject s, java.security.Principal p)
          Create a CallerPrincipalCallback to set the container's representation of the caller principal
CallerPrincipalCallback(javax.security.auth.Subject s, java.lang.String n)
          Create a CallerPrincipalCallback to set the container's representation of the caller principal.
 
Method Summary
 java.lang.String getName()
          Get the caller principal name.
 java.security.Principal getPrincipal()
          Get the caller principal.
 javax.security.auth.Subject getSubject()
          Get the Subject in which the handler will distinguish the caller principal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallerPrincipalCallback

public CallerPrincipalCallback(javax.security.auth.Subject s,
                               java.security.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(javax.security.auth.Subject s,
                               java.lang.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 javax.security.auth.Subject getSubject()
Get the Subject in which the handler will distinguish the caller principal

Returns:
The subject.

getPrincipal

public java.security.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 java.lang.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.



Submit a bug or feature

Copyright © 2009-2011, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.

Generated on 10-February-2011 12:41


Spec-Zone.ru - all specs in one place



free hit counter