Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package ru.hh.oauth.subscribe.apis;
 
public class LinkedInApi20 extends DefaultApi20 {
    private static final String AUTHORIZE_URL
            = "https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=%s&redirect_uri=%s&" + . + "=%s";
    private static final String SCOPED_AUTHORIZE_URL =  + "&scope=%s";
    @Override
    public Verb getAccessTokenVerb() {
        return .;
    }
    @Override
    public String getAccessTokenEndpoint() {
        return "https://www.linkedin.com/uas/oauth2/accessToken";
    }
    @Override
    public String getAuthorizationUrl(final OAuthConfig config) {
        Preconditions.checkValidUrl(config.getCallback(), "Must provide a valid url as callback. LinkedIn does not support OOB");
        if (config.hasScope()) {
            return String.format(
                    config.getApiKey(), OAuthEncoder.encode(config.getCallback()), config.getState(), OAuthEncoder.encode(
                            config.getScope()));
        } else {
            return String.format(config.getApiKey(), OAuthEncoder.encode(config.getCallback()), config.getState());
        }
    }
    @Override
        return new JsonTokenExtractor();
    }
    @Override
    public OAuthService createService(final OAuthConfig config) {
        return new LinkedIn20ServiceImpl(thisconfig);
    }
New to GrepCode? Check out our FAQ X