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 Details

    • 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 operation
      operationName - 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