Package com.feth.play.module.pa.exceptions

Examples of com.feth.play.module.pa.exceptions.AuthException


        if (error != null) {
            if (error.equals(OAUTH_ACCESS_DENIED)) {
                throw new AccessDeniedException(getKey());
            } else {
                throw new AuthException(error);
            }
        }
    }
View Full Code Here


                        info.getAccessToken()).get()
                .get(getTimeout());

        final JsonNode result = r.asJson();
        if (result.get(Constants.ERROR) != null) {
            throw new AuthException(result.get(
                    Constants.ERROR).asText());
        } else {
            return new GithubAuthUser(result, info, state);
        }
    }
View Full Code Here

        .setQueryParameter(FIELDS, fields)
        .get().get(getTimeout());

    final JsonNode result = r.asJson();
    if (result.get(OAuth2AuthProvider.Constants.ERROR) != null) {
      throw new AuthException(result.get(ERROR).get(MESSAGE).asText());
    } else {
      Logger.debug(result.toString());
      return new FacebookAuthUser(result, info, state);
    }
  }
View Full Code Here

                .get()
                .get(getTimeout());

        final JsonNode result = r.asJson();
        if (r.getStatus() >= 400) {
            throw new AuthException(result.get("meta").get("errorDetail").asText());
        } else {
            Logger.debug(result.toString());
            return new EventBriteAuthUser(result, info, state);
        }
    }
View Full Code Here

        if (error != null) {
            if (error.equals(ACCESS_DENIED)) {
                throw new AccessDeniedException(getKey());
            } else {
                throw new AuthException(error);
            }
        }
    }
View Full Code Here

        .setHeader("Content-Type", "application/json")
        .setHeader("X-Accept", "application/json")
        .post(encodeParamsAsJson(params)).get(getTimeout());

    if (r.getStatus() >= 400) {
      throw new AuthException(r.asJson().asText());
    } else {
      return r.asJson().get(PocketConstants.CODE).asText();
    }
  }
View Full Code Here

TOP

Related Classes of com.feth.play.module.pa.exceptions.AuthException

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.