Examples of AuthorizationException


Examples of org.jboss.security.authorization.AuthorizationException

         ACLProvider module = (ACLProvider)modules.get(i)
         try
         {
            Set<T> er = module.getEntitlements(clazz, resource, identity);
            if(er == null)
               throw new AuthorizationException("module "+module.getClass().getName()
                     +" generated null entitlements.");
            entitlements.addAll(er);
         }
         catch(Exception ae)
         {
            throw new AuthorizationException(ae.getMessage());
         }
      }
      return entitlements;
   }
View Full Code Here

Examples of org.jclouds.rest.AuthorizationException

      switch (response.getStatusCode()) {
         case 400:
            break;
         case 401:
         case 403:
            exception = new AuthorizationException(message, exception);
            break;
         case 404:
            if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
               exception = new ResourceNotFoundException(message, exception);
            }
View Full Code Here

Examples of org.jclouds.rest.AuthorizationException

            case 400:
               exception = new IllegalArgumentException(message, exception);
               break;
            case 401:
            case 403:
               exception = new AuthorizationException(message, exception);
               break;
            case 404:
               if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
                  exception = new ResourceNotFoundException(message, exception);
               }
View Full Code Here

Examples of org.jclouds.rest.AuthorizationException

      } else if (ILLEGAL_STATE_PATTERN.matcher(error).matches()) {
         refinedException = new IllegalStateException(error, exception);
      } else if (ILLEGAL_ARGUMENT_PATTERN.matcher(error).matches()) {
         refinedException = new IllegalArgumentException(error, exception);
      } else if (AUTH_PATTERN.matcher(error).matches()) {
         refinedException = new AuthorizationException(error, exception);
      } else if (NOT_IMPLEMENTED_PATTERN.matcher(error).matches()) {
         refinedException = new UnsupportedOperationException(error, exception);
      }
      return refinedException;
   }
View Full Code Here

Examples of org.jclouds.rest.AuthorizationException

        }
      }

      // Create custom exception for error codes we know about
      if (response.getStatusCode() == 401) {
         exception = new AuthorizationException(message, exception);
      } else if (response.getStatusCode() == 403 || response.getStatusCode() == 404) {
         exception = new ResourceNotFoundException(message, exception);
      }

      command.setException(exception);
View Full Code Here

Examples of org.jclouds.rest.AuthorizationException

      switch (response.getStatusCode()) {
         case 400:
            break;
         case 401:
         case 403:
            exception = new AuthorizationException(message, exception);
            break;
         case 404:
            if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
               exception = new ResourceNotFoundException(message, exception);
            }
View Full Code Here

Examples of org.jclouds.rest.AuthorizationException

   @Override
   public HttpRequest filter(HttpRequest request) throws HttpException {
      Credentials currentCreds = checkNotNull(creds.get(), "credential supplier returned null");
      if (currentCreds.identity.indexOf(':') == -1) {
         throw new AuthorizationException(String.format("Identity %s does not match format tenantId:username",
               currentCreds.identity), null);
      }
      String tenantId = currentCreds.identity.substring(0, currentCreds.identity.indexOf(':'));
      String username = currentCreds.identity.substring(currentCreds.identity.indexOf(':') + 1);
      return request.toBuilder().replaceHeader("TID", tenantId)
View Full Code Here

Examples of org.jclouds.rest.AuthorizationException

                  exception = new IllegalStateException(message, exception);
               else
                  exception = new IllegalArgumentException(message, exception);
               break;
            case 401:
               exception = new AuthorizationException(message, exception);
               break;
            case 402:
               exception = new IllegalStateException(message, exception);
               break;
            case 404:
View Full Code Here

Examples of org.jclouds.rest.AuthorizationException

               : new HttpResponseException(command, response);
      message = message != null ? message : String.format("%s -> %s", command.getCurrentRequest().getRequestLine(),
               response.getStatusLine());
      switch (response.getStatusCode()) {
         case 401:
            exception = new AuthorizationException(message, exception);
            break;
         case 404:
            if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
               exception = new ResourceNotFoundException(message, exception);
            }
View Full Code Here

Examples of org.jclouds.rest.AuthorizationException

               : new HttpResponseException(command, response);
      message = message != null ? message : String.format("%s -> %s", command.getCurrentRequest().getRequestLine(),
               response.getStatusLine());
      switch (response.getStatusCode()) {
         case 401:
            exception = new AuthorizationException(exception.getMessage(), exception);
            break;
         case 404:
            if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
               String path = command.getCurrentRequest().getEndpoint().getPath();
               Matcher matcher = CONTAINER_PATH.matcher(path);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.