Class AccessControlUtil


  • public class AccessControlUtil
    extends Object
    Utility class for authentication and authorization related operations
    • 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 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)
        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