Package org.springframework.social

Examples of org.springframework.social.NotAuthorizedException


        return null;
    }
 
  private void handleFoursquareError(int code, String errorType, String message) {
    if(errorType.equals("invalid_auth")) {
      throw new NotAuthorizedException(message);
    } 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")) {
View Full Code Here


      } else if (message.equals("Invalid OAuth access token.")) {  // Bogus access token
        throw new InvalidAuthorizationException(FACEBOOK, message);
      } else if (message.startsWith("Error validating application.")) { // Access token with incorrect app ID
        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);
View Full Code Here

TOP

Related Classes of org.springframework.social.NotAuthorizedException

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.