Package org.brickred.socialauth.exception

Examples of org.brickred.socialauth.exception.SocialAuthException


    if (accessGrant != null) {
      LOG.debug("Obtaining user profile");
      getProfile();
      return this.userProfile;
    } else {
      throw new SocialAuthException("Access token not found");
    }
  }
View Full Code Here


    LOG.debug("Obtaining user profile. Profile URL : " + url);
    Response serviceResponse = null;
    try {
      serviceResponse = authenticationStrategy.executeFeed(url);
    } catch (Exception e) {
      throw new SocialAuthException(
          "Failed to retrieve the user profile from  " + url, e);
    }
    if (serviceResponse.getStatus() != 200) {
      throw new SocialAuthException(
          "Failed to retrieve the user profile from  " + url
              + ". Staus :" + serviceResponse.getStatus());
    }
    String result;
    try {
      result = serviceResponse
          .getResponseBodyAsString(Constants.ENCODING);
      LOG.debug("User Profile :" + result);
    } catch (Exception exc) {
      throw new SocialAuthException("Failed to read response from  "
          + url, exc);
    }
    try {
      JSONObject pRes = new JSONObject(result);
      JSONObject pObj = pRes.getJSONObject("main");
View Full Code Here

   *            Message to be shown as user's status
   * @throws Exception
   */
  @Override
  public Response updateStatus(final String msg) throws Exception {
    throw new SocialAuthException(
        "Mendeley does not support status updates");
  }
View Full Code Here

   *         name and profile URL will be available
   */
  @Override
  public List<Contact> getContactList() throws Exception {
    LOG.warn("WARNING: Not implemented for Mendeley");
    throw new SocialAuthException(
        "Get contact list is not implemented for Mendeley");
  }
View Full Code Here

  public Response api(final String url, final String methodType,
      final Map<String, String> params,
      final Map<String, String> headerParams, final String body)
      throws Exception {
    if (!isVerify) {
      throw new SocialAuthException(
          "Please call verifyResponse function first to get Access Token");
    }
    Response response = null;
    LOG.debug("Calling URL : " + url);
    response = authenticationStrategy.executeFeed(url, methodType, params,
View Full Code Here

  @Override
  public Response uploadImage(final String message, final String fileName,
      final InputStream inputStream) throws Exception {
    LOG.warn("WARNING: Not implemented for Mendeley");
    throw new SocialAuthException(
        "Upload Image is not implemented for Mendeley");
  }
View Full Code Here

  public Response api(final String url, final String methodType,
      final Map<String, String> params,
      final Map<String, String> headerParams, final String body)
      throws Exception {
    if (!isVerify) {
      throw new SocialAuthException(
          "Please call verifyResponse function first to get Access Token");
    }
    Response response = null;
    LOG.debug("Calling URL : " + url);
    response = authenticationStrategy.executeFeed(url, methodType, params,
View Full Code Here

   * <code>api()</code> method instead to update user status.
   */
  @Override
  public Response updateStatus(final String msg) throws Exception {
    LOG.warn("WARNING: Not implemented for GenericOauth1Provider");
    throw new SocialAuthException(
        "Update Status is not implemented for GenericOauth1Provider");
  }
View Full Code Here

   * <code>api()</code> method instead to get user contacts.
   */
  @Override
  public List<Contact> getContactList() throws Exception {
    LOG.warn("WARNING: Not implemented for GenericOauth1Provider");
    throw new SocialAuthException(
        "Get Contacts is not implemented for GenericOauth1Provider");
  }
View Full Code Here

   * <code>api()</code> method instead to get user profile.
   */
  @Override
  public Profile getUserProfile() throws Exception {
    LOG.warn("WARNING: Not implemented for GenericOauth1Provider");
    throw new SocialAuthException(
        "Get Profile is not implemented for GenericOauth1Provider");
  }
View Full Code Here

TOP

Related Classes of org.brickred.socialauth.exception.SocialAuthException

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.