Class AccessControlUtil
java.lang.Object
org.wso2.carbon.server.admin.module.handler.AccessControlUtil
Utility class for authentication and authorization related operations.
-
Method Summary
Modifier and TypeMethodDescriptiongetAuthorizationPermissionsFromConfigLevel(String serviceName, String operationName) Get the authorization permissions for the operation from the configuration level.static StringgetServiceName(org.apache.axis2.context.MessageContext msgContext) Get the service name from the message context.static BooleanisAuthenticationEnabledAtConfigurationLevel(org.apache.axis2.context.MessageContext msgContext) Get the authorization permissions for the operation from the configuration level.
-
Method Details
-
getServiceName
Get the service name from the message context.- Parameters:
msgContext- The message context of the request- Returns:
- The service name
-
getAuthorizationPermissionsFromConfigLevel
public static List<String> getAuthorizationPermissionsFromConfigLevel(String serviceName, String operationName) Get the authorization permissions for the operation from the configuration level.- Parameters:
serviceName- service name of the operationoperationName- operation name- Returns:
- List of permissions configured for the operation, null if not configured
-
isAuthenticationEnabledAtConfigurationLevel
public static Boolean isAuthenticationEnabledAtConfigurationLevel(org.apache.axis2.context.MessageContext msgContext) Get the authorization permissions for the operation from the configuration level. This method checks at both service and operation level- Parameters:
msgContext- MessageContext- Returns:
- true if authentication is enabled, false if disabled and null if not configured
-