Package org.springframework.social

Examples of org.springframework.social.InsufficientPermissionException


    } else if(errorType.equals("param_error")) {
      throw new ParamErrorException(code, errorType, message);
    } else if(errorType.equals("endpoint_error")) {
      throw new ResourceNotFoundException(message);
    } else if(errorType.equals("not_authorized")) {
      throw new InsufficientPermissionException(message);
    } else if(errorType.equals("rate_limit_exceeded")) {
      throw new RateLimitExceededException();
    } else if(errorType.equals("server_error")) {
      throw new InternalServerErrorException(message);
    }
View Full Code Here


        throw new InvalidAuthorizationException(FACEBOOK, message);
      }
      throw new NotAuthorizedException(FACEBOOK, message);
    } else if (statusCode == HttpStatus.FORBIDDEN) {
      if (message.contains("Requires extended permission")) {
        throw new InsufficientPermissionException(FACEBOOK, message.split(": ")[1]);
      } else if (message.contains("Permissions error")) {
        throw new InsufficientPermissionException(FACEBOOK);
      } else if (message.contains("The user hasn't authorized the application to perform this action")) {
        throw new InsufficientPermissionException(FACEBOOK);
      } else {
        throw new OperationNotPermittedException(FACEBOOK, message);
      }
    } else if (statusCode == HttpStatus.NOT_FOUND) {
      throw new ResourceNotFoundException(FACEBOOK, message);
View Full Code Here

    if (logger.isDebugEnabled()) {
      logger.debug("Error from Facebook: " + json);
    }
    if (json.equals("false")) {
      // Sometimes FB returns "false" when requesting an object that the access token doesn't have permission for.
      throw new InsufficientPermissionException("facebook");
    }
       
    try {
        Map<String, Object> responseMap = mapper.<Map<String, Object>>readValue(json, new TypeReference<Map<String, Object>>() {});
        if (responseMap.containsKey("error")) {
View Full Code Here

TOP

Related Classes of org.springframework.social.InsufficientPermissionException

Copyright © 2018 www.massapicom. 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.