Examples of AuthorizationException


Examples of org.jclouds.rest.AuthorizationException

         message = message != null ? message : String.format("%s -> %s", command.getCurrentRequest().getRequestLine(),
               response.getStatusLine());
         switch (response.getStatusCode()) {
            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.jsecurity.authz.AuthorizationException

  }

  protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
    //null usernames are invalid
    if (principals == null) {
      throw new AuthorizationException("PrincipalCollection method argument cannot be null.");
    }

    String username = (String) principals.fromRealm(getName()).iterator().next();

View Full Code Here

Examples of org.nasutekds.server.admin.client.AuthorizationException

      try {
        ManagedObjectPath<?, ?> path = getManagedObjectPath();
        LdapName dn = LDAPNameBuilder.create(path, driver.getLDAPProfile());
        driver.getLDAPConnection().modifyEntry(dn, mods);
      } catch (NoPermissionException e) {
        throw new AuthorizationException(e);
      } catch (OperationNotSupportedException e) {
        // Unwilling to perform.
        if (e.getMessage() == null) {
          throw new OperationRejectedException(OperationType.MODIFY, d
              .getUserFriendlyName());
View Full Code Here

Examples of org.nimbustools.api.services.rm.AuthorizationException

                               Subject subject, Long elapsedMins,
                               Long reservedMins, int numWorkspaces, double chargeRatio)

            throws AuthorizationException, ResourceRequestDeniedException {

        throw new AuthorizationException("Authorization callout is disabled, " +
                "it is illegal to call isPermitted()");
    }
View Full Code Here

Examples of org.nxplanner.security.AuthorizationException

        try {
            context.populate(object);
            int objectIdentifier = ((Integer)PropertyUtils.getProperty(object, "id")).intValue();
            if (!SystemAuthorizer.get().hasPermission(context.getProjectId(),
                    SecurityHelper.getRemoteUserId(ThreadServletRequest.get()), object, permission)) {
                throw new AuthorizationException("not authorized for object "+permission+": "+
                        objectClass+" "+objectIdentifier);
            }
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
View Full Code Here

Examples of org.sonatype.security.authorization.AuthorizationException

  {
    try {
      this.getSecurityManager().checkPermission(principal, permission);
    }
    catch (org.apache.shiro.authz.AuthorizationException e) {
      throw new AuthorizationException(e.getMessage(), e);
    }

  }
View Full Code Here

Examples of org.thechiselgroup.choosel.workbench.client.authentication.AuthorizationException

        Collection<PersistentSharingInvitation> invitations = getSharingInvitation(
                invitationUid, workspace, password, manager);

        if (invitations.isEmpty()) {
            throw new AuthorizationException(
                    "User not authorized to access workspace");
        }
    }
View Full Code Here

Examples of org.uberfire.security.authz.AuthorizationException

                }
            }
        };

        if ( !authzManager.authorize( resource, subject ) ) {
            throw new AuthorizationException( "Invalid credentials." );
        }

        return ctx.proceed();
    }
View Full Code Here

Examples of qubexplorer.AuthorizationException

            query.setMetrics(VIOLATIONS_DENSITY_METRICS);
            Resource r = sonar.find(query);
            return r.getMeasure(VIOLATIONS_DENSITY_METRICS).getValue();
        } catch(ConnectionException ex) {
            if(isError401(ex)){
                throw new AuthorizationException(ex);
            }else{
                throw ex;
            }
        }
    }
View Full Code Here

Examples of tigase.db.AuthorizationException

  public boolean plainAuth(final String user, final String password)
    throws UserNotFoundException, TigaseDBException, AuthorizationException {
    try {
      checkConnection();
      if (!isActive(user)) {
        throw new AuthorizationException("User account has been blocked.");
      } // end of if (!isActive(user))
      //      String enc_passwd = ls_digest(password);
      String db_password = getPassword(user);
      boolean login_ok = db_password.equals(password);
      if (login_ok) {
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.