Examples of InvalidCredentialsException


Examples of br.gov.frameworkdemoiselle.security.InvalidCredentialsException

      byte[] decoded = Base64.decodeBase64(matcher.group(1));
      result = new String(decoded).split(":");
    }

    if (result == null || result.length != 2) {
      throw new InvalidCredentialsException("Formato inválido do cabeçalho");
    }

    return result;
  }
View Full Code Here

Examples of co.arcs.groove.thresher.GroovesharkException.InvalidCredentialsException

            JsonNode node) throws InvalidCredentialsException {
        this.client = client;
        JsonNode result = node.get("result");
        this.id = result.get("userID").asLong();
        if (id == 0) {
            throw new InvalidCredentialsException();
        }
        this.email = email;
        this.password = password;
    }
View Full Code Here

Examples of com.dbxml.db.core.security.InvalidCredentialsException

   public void authenticate(String userID, String password) throws SecurityException {
      if ( !this.userID.equals(userID) )
         throw new InvalidUserException("Unknown User '"+userID+"'");
      if ( !this.password.equals(password) )
         throw new InvalidCredentialsException("Invalid credentials for User '"+userID+"'");
   }
View Full Code Here

Examples of com.google.gdata.client.GoogleService.InvalidCredentialsException

  private AuthenticationException getAuthException(Map<String, String> pairs) {

    String errorName = pairs.get("Error");

    if ("BadAuthentication".equals(errorName)) {
      return new InvalidCredentialsException("Invalid credentials");

    } else if ("AccountDeleted".equals(errorName)) {
      return new AccountDeletedException("Account deleted");

    } else if ("AccountDisabled".equals(errorName)) {
View Full Code Here

Examples of com.google.gdata.client.GoogleService.InvalidCredentialsException

  private AuthenticationException getAuthException(Map<String, String> pairs) {

    String errorName = pairs.get("Error");

    if ("BadAuthentication".equals(errorName)) {
      return new InvalidCredentialsException("Invalid credentials");

    } else if ("AccountDeleted".equals(errorName)) {
      return new AccountDeletedException("Account deleted");

    } else if ("AccountDisabled".equals(errorName)) {
View Full Code Here

Examples of com.streamreduce.core.service.exception.InvalidCredentialsException

        try {
            List<JSONObject> response =  makeRequest(userUrl);
            return (response.size() == 1 ? response.get(0) : null);
        } catch (InvalidCredentialsException e) {
            throw new InvalidCredentialsException("The GitHub connection credentials for " +
                                                          getConnectionCredentials().getIdentity() + " are invalid.");
        }
    }
View Full Code Here

Examples of com.streamreduce.core.service.exception.InvalidCredentialsException

    @Override
    public void validateConnection() throws InvalidCredentialsException, IOException {
        List<JSONObject> profileIds = getProfiles();
        if (CollectionUtils.isEmpty(profileIds)) {
            throw new InvalidCredentialsException("You must have one or more profiles defined in Google Analytics in order to continue.");
        }
    }
View Full Code Here

Examples of com.streamreduce.core.service.exception.InvalidCredentialsException

        oAuthService.signRequest(token, request);

        Response response = request.send();

        if (response.getCode() == 401 || response.getCode() == 403) {
            throw new InvalidCredentialsException("The OAuth Token is invalid, or has been revoked");
        } else if (response.getCode() != 200) {
            throw new IOException("Unexpected status code of " + response.getCode() + ": " + response.getBody() +
                                          " for a " + method + " request to" + url);
        }
View Full Code Here

Examples of com.streamreduce.core.service.exception.InvalidCredentialsException

            if (entity != null) {
                response = EntityUtils.toString(entity);
            }
            int responseCode = httpResponse.getStatusLine().getStatusCode();
            if (responseCode == 401 || responseCode == 403) {
                throw new InvalidCredentialsException("The connection credentials are invalid.");
            } else if (responseCode < 200 || responseCode > 299) {
                throw new IOException("Unexpected status code of " + responseCode + " for a " + method + " request to " + url);
            }

            if (responseHeaders != null) {
View Full Code Here

Examples of com.streamreduce.core.service.exception.InvalidCredentialsException

            String username = getConnectionCredentials().getIdentity();
            String password = getConnectionCredentials().getCredential();

            if (!StringUtils.hasText(username) || !StringUtils.hasText(password)) {
                throw new InvalidCredentialsException("You must supply an identity/username for cloud connections.");
            }

            try {
                computeServiceContext = ContextBuilder.newBuilder("aws-ec2")
                                                      .credentials(username, password)
                                                      .modules(ImmutableSet.<Module>of(
                                                              new SshjSshClientModule(),
                                                              new SLF4JLoggingModule()))
                                                      .overrides(overrides)
                                                      .buildView(ComputeServiceContext.class);

                // since the compute service context doesn't try to auth against AWS until it
                // needs to, make a call to listNodes() to force the auth.
                computeServiceContext.getComputeService().listNodes();
            } catch (AuthorizationException ae) {
                throw new InvalidCredentialsException(ae);
            }
        }

        return computeServiceContext;
    }
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.