Class AccessControlUtil
- java.lang.Object
-
- org.wso2.carbon.server.admin.module.handler.AccessControlUtil
-
public class AccessControlUtil extends Object
Utility class for authentication and authorization related operations
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<String>getAuthorizationPermissionsFromConfigLevel(String serviceName, String operationName)Get the authorization permissions for the operation from the configuration levelstatic StringgetServiceName(org.apache.axis2.context.MessageContext msgContext)Get the service name from the message contextstatic BooleanisAuthenticationEnabledAtConfigurationLevel(org.apache.axis2.context.MessageContext msgContext)Check whether authentication is enabled for the service from the configuration level.
-
-
-
Method Detail
-
getServiceName
public static String getServiceName(org.apache.axis2.context.MessageContext msgContext)
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)
Check whether authentication is enabled for the service from the configuration level.- Parameters:
msgContext- MessageContext- Returns:
- true if authentication is enabled, false if disabled and null if not configured
-
-