code: private void checkAuthorization(Action action) throws NotAuthorizedException {
  		@SuppressWarnings("unchecked")
  		Map<String, List<String>> httpHeaders = (Map<String, List<String>>) wsContext.getMessageContext().get(MessageContext.HTTP_REQUEST_HEADERS);
  		String clientApplicationName = httpHeaders.get(APPSENSOR_CLIENT_APPLICATION_IDENTIFIER_ATTR).get(0);
  
  		ClientApplication clientApplication = appSensorServer.getConfiguration().findClientApplication(clientApplicationName);
  		
  		org.owasp.appsensor.core.accesscontrol.Context context = new org.owasp.appsensor.core.accesscontrol.Context();
  		
  		appSensorServer.getAccessController().assertAuthorized(clientApplication, action, context);
  	}
docs: Check authz before performing action.
  @param action desired action
  @throws NotAuthorizedException thrown if user does not have role.