Top Description Fields Constructors Methods
jakarta.security.auth.message.callback

public Class GroupPrincipalCallback

extends Object
implements Callback
Class Inheritance
All Implemented Interfaces
javax.security.auth.callback.Callback
Imports
javax.security.auth.Subject, javax.security.auth.callback.Callback

Callback establishing group principals within the argument subject.

This callback is intended to be called by a serverAuthModule during its validateRequest processing.

Field Summary

Modifier and TypeField and Description
private String[]
private Subject

Constructor Summary

AccessConstructor and Description
public
GroupPrincipalCallback(Subject
The Subject in which the container will create group principals.
subject
,
String[]
An array of Strings, where each element contains the name of a group that will be used to create a corresponding group principal within the Subject.
groups
)

Create a GroupPrincipalCallback to establish the container's representation of the corresponding group principals within the Subject.

Method Summary

Modifier and TypeMethod and Description
public String[]

Returns:

Null, or an array containing 0 or more String group names.
getGroups
()

Get the array of group names.

public Subject

Returns:

The subject.
getSubject
()

Get the Subject in which the handler will establish the group principals.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

groupsback to summary
private String[] groups
subjectback to summary
private Subject subject

Constructor Detail

GroupPrincipalCallbackback to summary
public GroupPrincipalCallback(Subject subject, String[] groups)

Create a GroupPrincipalCallback to establish the container's representation of the corresponding group principals within the Subject.

When a null value is passed to the groups argument, the handler will establish the container's representation of no group principals within the Subject. Otherwise, the handler's processing of this callback is additive, yielding the union (without duplicates) of the principals existing within the Subject, and those created with the names occurring within the argument array. The CallbackHandler will define the type of the created principals.

Parameters
subject:Subject

The Subject in which the container will create group principals.

groups:String[]

An array of Strings, where each element contains the name of a group that will be used to create a corresponding group principal within the Subject.

Method Detail

getGroupsback to summary
public String[] getGroups()

Get the array of group names.

When the return value is null, the handler will establish the container's representation of no group principals within the Subject. Otherwise, the handler's processing of this callback is additive, yielding the union (without duplicates) of the principals created with the names in the returned array and those existing within the Subject.

Returns:String[]

Null, or an array containing 0 or more String group names.

getSubjectback to summary
public Subject getSubject()

Get the Subject in which the handler will establish the group principals.

Returns:Subject

The subject.