public class DefaultDiscoAuthorizer extends Object implements Authorizer
DefaultDiscoAuthorizer
provides a default
implementation of the Authorizer
interface.Modifier and Type | Field and Description |
---|---|
static String |
RESOURCE_SEPERATOR
Separator for resource.
|
AUTH_TYPE, MESSAGE, USER_ID
Constructor and Description |
---|
DefaultDiscoAuthorizer()
Default Constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
getAuthorizationDecision(Object credential,
String action,
Object data,
Map env)
Returns authorization decision for the given action(query or modify)
and to the given select data.
|
boolean |
isAuthorized(Object credential,
String action,
Object data,
Map env)
Checks if the WSC is authorized to query or modify the select data.
|
public static final String RESOURCE_SEPERATOR
public boolean isAuthorized(Object credential, String action, Object data, Map env)
isAuthorized
in interface Authorizer
credential
- credential of a WSC.
In this implmentation, credential is the SSOToken of the WSC.action
- request action.
In this implementation, action is either
DiscoConstants.ACTION_LOOKUP
or
DiscoConstants.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_ID
Value: id of the user whose resource is being accessed.
In this implementation, the value is the userDN.
Key: AUTH_TYPE
Value: The authentication mechanism WSC used.
Key: MESSAGE
Value:
com.sun.identity.liberty.ws.soapbinding.Message
.public Object getAuthorizationDecision(Object credential, String action, Object data, Map env) throws Exception
getAuthorizationDecision
in interface Authorizer
credential
- credential of a WSC
.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_ID
Value: id of the user whose resource is being accessed.
Key: AUTH_TYPE
Value: The authentication mechanism WSC
used.
Key: MESSAGE
Value:
com.sun.identity.liberty.ws.soapbinding.Message
.AuthorizationDecision
object contains authorization
decision information for the given resource.Exception
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.