Examples of OAuthSession


Examples of models.OAuthSession

   * Use Force.com API to retrieve data (authentication with OAuth). Returns JsonObject.
   * @param query - SOQL query string
   * @return JsonObject with results
   */
  public static JsonObject query(String query, boolean retry) {
    OAuthSession oauth = ForceDotComOAuth2.getOAuthSession();
    if (oauth == null) {
      Application.index();
    }
    WSRequest req = WS.url(oauth.instance_url
        + "/services/data/v28.0/query/?q=%s", query);
View Full Code Here

Examples of models.OAuthSession

   * Uses caching and will use cached result, if possible.
   *
   * @param retry
   */
  public static JsonObject getUserPerms(boolean retry) {
    OAuthSession oauth = ForceDotComOAuth2.getOAuthSession();
    if (oauth == null) {
      Application.index();
    }
   
    String cacheKey = session.getId() + "-userperms";
View Full Code Here

Examples of org.agorava.api.oauth.OAuthSession

    }

    @Override
    public String getVerifier() {
        OAuthSession session = getSession();
        return session.getVerifier();
    }
View Full Code Here

Examples of org.agorava.api.oauth.OAuthSession

        return session.getVerifier();
    }

    @Override
    public void setVerifier(String verifierStr) {
        OAuthSession session = getSession();
        session.setVerifier(verifierStr);
    }
View Full Code Here

Examples of org.agorava.api.oauth.OAuthSession

        session.setVerifier(verifierStr);
    }

    @Override
    public Token getAccessToken() {
        OAuthSession session = getSession();
        return session.getAccessToken();
    }
View Full Code Here

Examples of org.agorava.api.oauth.OAuthSession

        return session.getAccessToken();
    }

    @Override
    public void setAccessToken(Token token) {
        OAuthSession session = getSession();
        session.setAccessToken(token);

    }
View Full Code Here

Examples of org.agorava.api.oauth.OAuthSession

        return config.getSocialMediaName();
    }

    @Override
    public void setAccessToken(String token, String secret) {
        OAuthSession session = getSession();
        session.setAccessToken(new Token(token, secret));

    }
View Full Code Here

Examples of org.agorava.api.oauth.OAuthSession

        return OAuthSession.NULL;
    }

    @Override
    public OAuthSession setCurrent(String id) throws IllegalArgumentException {
        OAuthSession res = get(id);
        if (res == null)
            throw new IllegalArgumentException("There is no session with id " + id + " in the repository");
        else
            return res;
    }
View Full Code Here

Examples of org.agorava.api.oauth.OAuthSession

        return false;
    }

    @Override
    public boolean remove(String id) {
        OAuthSession elt = get(id);
        if (elt != null) {
            return remove(elt);
        }
        return false;
    }
View Full Code Here

Examples of org.agorava.api.oauth.OAuthSession

        return startDanceFor(providerName, null);
    }

    @Override
    public synchronized void endDance() {
        OAuthSession currentSession = getCurrentSession();
        if (currentSession.getAccessToken() == null) {
            currentSession.setAccessToken(getCurrentService().getAccessToken(currentSession.getRequestToken(),
                    currentSession.getVerifier()));
        }
        if (currentSession.getAccessToken() != null) {
            currentSession.setRequestToken(null);
            currentSession.setUserProfile(getCurrentUserProfileService().getUserProfile());
            currentSession.getRepo().add(currentSession);
            completeEvt.select(currentSession.getServiceQualifier()).fire(new OAuthComplete(SocialEvent.Status.SUCCESS, "",
                    currentSession));

            //TODO: reactivate logger
        } else {
            // FIXME Launch an exception !!
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.