public class GroupPrincipalCallback
extends java.lang.Object
implements javax.security.auth.callback.Callback
This callback is intended to be called by a serverAuthModule
during its validateRequest
processing.
Constructor and Description |
---|
GroupPrincipalCallback(javax.security.auth.Subject subject,
java.lang.String[] groups)
Create a GroupPrincipalCallback to establish the container's representation of the corresponding group principals
within the Subject.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getGroups()
Get the array of group names.
|
javax.security.auth.Subject |
getSubject()
Get the Subject in which the handler will establish the group principals.
|
public GroupPrincipalCallback(javax.security.auth.Subject subject, java.lang.String[] groups)
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.
subject
- The Subject in which the container will create group principals.groups
- 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.public javax.security.auth.Subject getSubject()
public java.lang.String[] getGroups()
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.