Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package ru.hh.oauth.subscribe.apis;
 
public class ViadeoApi extends DefaultApi20 {
    private static final String AUTHORIZE_URL = "https://secure.viadeo.com/oauth-provider/authorize2?client_id=%s&redirect_uri=%s&response_type=code";
    private static final String SCOPED_AUTHORIZE_URL =  + "&scope=%s";
    @Override
        return new JsonTokenExtractor();
    }
    @Override
    public String getAccessTokenEndpoint() {
        return "https://secure.viadeo.com/oauth-provider/access_token2?grant_type=" + .;
    }
    @Override
    public String getAuthorizationUrl(OAuthConfig config) {
        Preconditions.checkValidUrl(config.getCallback(), "Must provide a valid url as callback. Viadeo does not support OOB");
        // Append scope if present
        if (config.hasScope()) {
            return String.format(config.getApiKey(), OAuthEncoder.encode(config.getCallback()), OAuthEncoder.encode(config.
                    getScope()));
        } else {
            return String.format(config.getApiKey(), OAuthEncoder.encode(config.getCallback()));
        }
    }
New to GrepCode? Check out our FAQ X