Class DefaultDiscoAuthorizer
- java.lang.Object
-
- com.sun.identity.liberty.ws.disco.plugins.DefaultDiscoAuthorizer
-
- All Implemented Interfaces:
Authorizer
public class DefaultDiscoAuthorizer extends Object implements Authorizer
This classDefaultDiscoAuthorizerprovides a default implementation of theAuthorizerinterface.
-
-
Field Summary
Fields Modifier and Type Field Description static StringRESOURCE_SEPERATORSeparator for resource.-
Fields inherited from interface com.sun.identity.liberty.ws.interfaces.Authorizer
AUTH_TYPE, MESSAGE, USER_ID
-
-
Constructor Summary
Constructors Constructor Description DefaultDiscoAuthorizer()Default Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetAuthorizationDecision(Object credential, String action, Object data, Map env)Returns authorization decision for the given action(query or modify) and to the given select data.booleanisAuthorized(Object credential, String action, Object data, Map env)Checks if the WSC is authorized to query or modify the select data.
-
-
-
Field Detail
-
RESOURCE_SEPERATOR
public static final String RESOURCE_SEPERATOR
Separator for resource.- See Also:
- Constant Field Values
-
-
Method Detail
-
isAuthorized
public boolean isAuthorized(Object credential, String action, Object data, Map env)
Checks if the WSC is authorized to query or modify the select data.- Specified by:
isAuthorizedin interfaceAuthorizer- Parameters:
credential- credential of a WSC. In this implmentation, credential is the SSOToken of the WSC.action- request action. In this implementation, action is eitherDiscoConstants.ACTION_LOOKUPorDiscoConstants.ACTION_UPDATE.data- Object who is being accessed. In this implementation, data is of type ResourceOfferingType.env- A Map contains information useful for policy evaluation. The following key is defined and its value should be passed in: Key:USER_IDValue: id of the user whose resource is being accessed. In this implementation, the value is the userDN. Key:AUTH_TYPEValue: The authentication mechanism WSC used. Key:MESSAGEValue:com.sun.identity.liberty.ws.soapbinding.Message.- Returns:
- true if the WSC is authorized.
-
getAuthorizationDecision
public Object getAuthorizationDecision(Object credential, String action, Object data, Map env) throws Exception
Returns authorization decision for the given action(query or modify) and to the given select data. Currently this method always returns null.- Specified by:
getAuthorizationDecisionin interfaceAuthorizer- Parameters:
credential- credential of aWSC.action- request action.data- Object who is being accessed.env- A Map contains information useful for policy evaluation. The following key is defined and its value should be passed in: Key:USER_IDValue: id of the user whose resource is being accessed. Key:AUTH_TYPEValue: The authentication mechanismWSCused. Key:MESSAGEValue:com.sun.identity.liberty.ws.soapbinding.Message.- Returns:
AuthorizationDecisionobject contains authorization decision information for the given resource.- Throws:
Exception
-
-