Interface AuthorizationConstraint
-
- All Known Subinterfaces:
EndUserAuthorizationConstraint
public interface AuthorizationConstraintEncapsulates the authorization constraints that restrict access to a given resource.- Author:
- cdivilly
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanauthorized(java.security.Principal principal)Determines if aPrincipalis authorized to access this privilege.AuthenticationChallenge[]challenges()Returns the authenticationAuthenticationChallenges that are bound to this constraint.booleanequals(java.lang.Object obj)AllAuthorizationConstraintimplementations MUST implement theObject.equals(Object)method correctly.booleanequals(AuthorizationConstraint constraint)AllAuthorizationConstraintimplementations MUST implement theequals(AuthorizationConstraint)method correctly.inthashCode()AllAuthorizationConstraintimplementations MUST implement theObject.hashCode()method correctly.java.lang.Stringname()The unique name assigned to this constraint.
-
-
-
Method Detail
-
name
java.lang.String name()
The unique name assigned to this constraint. It is an error for more than oneAuthorizationConstraintto share the same name.- Returns:
- The name
-
challenges
AuthenticationChallenge[] challenges()
Returns the authenticationAuthenticationChallenges that are bound to this constraint.- Returns:
- Array of
AuthenticationChallengeinstances that the constraint is bound to
-
authorized
boolean authorized(java.security.Principal principal)
Determines if aPrincipalis authorized to access this privilege.- Parameters:
principal- ThePrincipalto test for authorization- Returns:
- true if the principal is authorized to access the resource, false otherwise
-
equals
boolean equals(java.lang.Object obj)
AllAuthorizationConstraintimplementations MUST implement theObject.equals(Object)method correctly. Typical implementations of this method should check if the specified object is an instance ofAuthorizationConstraint. If it is then delegate toequals(AuthorizationConstraint). If not then return false.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- The object to test for equality.- Returns:
- true if this instance and the specified instance are equal.
- See Also:
equals(AuthorizationConstraint)
-
equals
boolean equals(AuthorizationConstraint constraint)
AllAuthorizationConstraintimplementations MUST implement theequals(AuthorizationConstraint)method correctly. Typical implementations of this method should check if the specified object is an instance of the same sub-type ofAuthorizationConstraint. If it is then compare each of the properties of the sub-type for equality. If it is not of the same sub-type then return false.- Parameters:
constraint- TheAuthorizationConstraintto test for equality- Returns:
- true if this instance and the specified instance are equal.
-
hashCode
int hashCode()
AllAuthorizationConstraintimplementations MUST implement theObject.hashCode()method correctly.- Overrides:
hashCodein classjava.lang.Object- See Also:
Object.hashCode()
-
-