Package org.apache.wiki.auth
Class GroupPrincipal
java.lang.Object
org.apache.wiki.auth.GroupPrincipal
- All Implemented Interfaces:
Serializable
,Principal
Immutable Principal that represents a Group. GroupPrincipals are injected
into a Subject's principal list at the time of authentication (login), and
serve as proxies for Group objects for the purposes of making Java 2 security
policy decisions. We add GroupPrincipals instead of the actual Groups because
calling classes should never be able to obtain a mutable object (Group
memberships can be changed by callers). Administrators who wish to grant
privileges to specific wiki groups via the security policy file should always specify
principals of type GroupPrincipal.
- Since:
- 2.3.79
- See Also:
-
Constructor Details
-
GroupPrincipal
Constructs a new GroupPrincipal object with a supplied name.- Parameters:
group
- the wiki group; cannot benull
-
-
Method Details
-
getName
Returns the name of the group principal. -
equals
Two GroupPrincipals are equal if their names are equal. -
hashCode
Returns the hashcode for this object. -
toString
Returns a string representation of this object.
-