All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.healthy.common.security.social.qq.connet.QQOAuth2ServiceProvider Maven / Gradle / Ivy

There is a newer version: 1.2.1.RELEASE
Show newest version
package com.healthy.common.security.social.qq.connet;

import com.healthy.common.security.social.qq.api.QQ;
import com.healthy.common.security.social.qq.api.impl.QQImpl;
import org.springframework.social.oauth2.AbstractOAuth2ServiceProvider;

public class QQOAuth2ServiceProvider extends AbstractOAuth2ServiceProvider {

    private static final String URL_AUTHORIZE = "https://graph.qq.com/oauth2.0/authorize";
    private static final String URL_ACCESS_TOKEN = "https://graph.qq.com/oauth2.0/token";
    private final String appId;

    public QQOAuth2ServiceProvider(String appId, String appSecret) {
        super(new QQOAuth2Template(appId, appSecret, URL_AUTHORIZE, URL_ACCESS_TOKEN));
        this.appId = appId;
    }

    @Override
    public QQ getApi(String accessToken) {
        return new QQImpl(accessToken, appId);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy