|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Role
This interface represents a Role which is a unit of credential in RBAC. The API does not use this specified interface; it is specified here solely for the purpose of allowing the caller to be able to extract the values of the roles the user has got. In the general case this is not needed, because the PBAAPI is supposed to deliver the ultimate access decision.
However, in case the caller wishes to interrogate the credentials an implementation of the Role interface is required. Then the caller using the interface may retrieve the type and value of the role and treat the results for their own purposes:
Credentials c = getCreds(user);
if (c instanceof Role){
Role r = (Role)c;
String type = r.getType();
Object value = r.getValue();
...// here depending on the type of the Role
// the decision can be made about the value type,
// and then, having the value, the code can use it
}else{
... // unwind the possibly recursive SetOfSubsets credentials?
}
Method Summary | |
---|---|
java.lang.String |
getRoleType()
Returns the type of the role. |
java.lang.Object |
getRoleValue()
Returns the value of the role. |
Method Detail |
---|
java.lang.String getRoleType()
java.lang.Object getRoleValue()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |