Package org.brickred.socialauth.exception

Examples of org.brickred.socialauth.exception.SocialAuthException


  public Response executeFeed(final String url, final String methodType,
      final Map<String, String> params,
      final Map<String, String> headerParams, final String body)
      throws Exception {
    if (accessGrant == null) {
      throw new SocialAuthException(
          "Please call verifyResponse function first to get Access Token");
    }
    String reqURL = url;
    String bodyStr = body;
    StringBuffer sb = new StringBuffer();
View Full Code Here


   */
  public AuthProvider connect(final AccessGrant accessGrant)
      throws SocialAuthConfigurationException,
      AccessTokenExpireException, SocialAuthException {
    if (accessGrant.getProviderId() == null || accessGrant.getKey() == null) {
      throw new SocialAuthException("access grant is not valid");
    }
    LOG.debug("Connecting provider : " + accessGrant.getProviderId()
        + ", from given access grant");
    AuthProvider provider = getProviderInstance(accessGrant.getProviderId());
    provider.setAccessGrant(accessGrant);
View Full Code Here

   * @throws SocialAuthException
   */
  public AuthProvider refreshToken(final AccessGrant accessGrant)
      throws SocialAuthConfigurationException, SocialAuthException {
    if (accessGrant.getProviderId() == null || accessGrant.getKey() == null) {
      throw new SocialAuthException("access grant is not valid");
    }
    LOG.debug("Connecting provider : " + accessGrant.getProviderId()
        + ", from given access grant");
    AuthProvider provider = getProviderInstance(accessGrant.getProviderId());
    provider.refreshToken(accessGrant);
View Full Code Here

              .getString("created_time"))));
        }
        list.add(feed);
      }
    } catch (Exception e) {
      throw new SocialAuthException("Error while getting Feeds from "
          + FEED_URL, e);
    }
    return list;
  }
View Full Code Here

        new URL(id); // just validating, don't need the value
        obj = providerMap.get("openid");
        conf = new OAuthConfig(null, null);
        conf.setId(id);
      } catch (MalformedURLException me) {
        throw new SocialAuthException(id
            + " is not a provider or valid OpenId URL");
      }
    } else {
      String key;
      if (domainMap.containsKey(id)) {
View Full Code Here

  }

  @Override
  public void refreshToken(AccessGrant accessGrant)
      throws SocialAuthException {
    throw new SocialAuthException("Not implemented for given provider");

  }
View Full Code Here

    LOG.info("Fetching career details from " + PROFILE_URL);
    Response serviceResponse = null;
    try {
      serviceResponse = providerSupport.api(PROFILE_URL);
    } catch (Exception ie) {
      throw new SocialAuthException(
          "Failed to retrieve the career details from " + PROFILE_URL,
          ie);
    }
    Element root;
    try {
View Full Code Here

        System.out.println(feed);
        list.add(feed);
      }

    } catch (Exception e) {
      throw new SocialAuthException("Error while getting Feeds from "
          + FEED_URL, e);
    }
    return list;
  }
View Full Code Here

              .getString("created_time")));
        }
        list.add(feed);
      }
    } catch (Exception e) {
      throw new SocialAuthException("Error while getting Feeds from "
          + FEED_URL, e);
    }
    return list;
  }
View Full Code Here

    Response serviceResponse = null;
    List<Feed> list;
    try {
      serviceResponse = providerSupport.api(FEED_URL);
    } catch (Exception ie) {
      throw new SocialAuthException("Failed to retrieve the feeds from "
          + FEED_URL, ie);
    }

    if (serviceResponse.getStatus() != 200) {
      throw new SocialAuthException("Failed to retrieve the feeds from  "
          + FEED_URL + ". Staus :" + serviceResponse.getStatus());
    }
    Element root;
    try {
      root = XMLParseUtil.loadXmlResource(serviceResponse
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.