Java Code Examples for org.springframework.social.connect.support.OAuth2Connection

The following examples show how to use org.springframework.social.connect.support.OAuth2Connection. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: cola   Source File: WechatConnectionFactory.java    License: MIT License 4 votes vote down vote up
@Override
public Connection<Wechat> createConnection(AccessGrant accessGrant) {
    return new OAuth2Connection<>(getProviderId(), extractProviderUserId(accessGrant), accessGrant.getAccessToken(),
            accessGrant.getRefreshToken(), accessGrant.getExpireTime(), getOAuth2ServiceProvider(), getApiAdapter(extractProviderUserId(accessGrant)));
}
 
Example 2
Source Project: cola   Source File: WechatConnectionFactory.java    License: MIT License 4 votes vote down vote up
@Override
public Connection<Wechat> createConnection(ConnectionData data) {
    return new OAuth2Connection<>(data, getOAuth2ServiceProvider(), getApiAdapter(data.getProviderUserId()));
}
 
Example 3
Source Project: cola   Source File: WechatMpConnectionFactory.java    License: MIT License 4 votes vote down vote up
@Override
public Connection<WechatMp> createConnection(AccessGrant accessGrant) {
    return new OAuth2Connection<>(getProviderId(), extractProviderUserId(accessGrant), accessGrant.getAccessToken(),
            accessGrant.getRefreshToken(), accessGrant.getExpireTime(), getOAuth2ServiceProvider(), getApiAdapter(extractProviderUserId(accessGrant)));
}
 
Example 4
Source Project: cola   Source File: WechatMpConnectionFactory.java    License: MIT License 4 votes vote down vote up
@Override
public Connection<WechatMp> createConnection(ConnectionData data) {
    return new OAuth2Connection<>(data, getOAuth2ServiceProvider(), getApiAdapter(data.getProviderUserId()));
}
 
Example 5
Source Project: pre   Source File: WeixinConnectionFactory.java    License: GNU General Public License v3.0 4 votes vote down vote up
@Override
public Connection<Weixin> createConnection(AccessGrant accessGrant) {
    return new OAuth2Connection<Weixin>(getProviderId(), extractProviderUserId(accessGrant), accessGrant.getAccessToken(),
            accessGrant.getRefreshToken(), accessGrant.getExpireTime(), getOAuth2ServiceProvider(), getApiAdapter(extractProviderUserId(accessGrant)));
}
 
Example 6
Source Project: pre   Source File: WeixinConnectionFactory.java    License: GNU General Public License v3.0 4 votes vote down vote up
@Override
public Connection<Weixin> createConnection(ConnectionData data) {
    return new OAuth2Connection<Weixin>(data, getOAuth2ServiceProvider(), getApiAdapter(data.getProviderUserId()));
}
 
Example 7
Source Project: FEBS-Security   Source File: WeiXinConnectionFactory.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public Connection<WeiXin> createConnection(AccessGrant accessGrant) {
    return new OAuth2Connection<>(getProviderId(), extractProviderUserId(accessGrant), accessGrant.getAccessToken(),
            accessGrant.getRefreshToken(), accessGrant.getExpireTime(), getOAuth2ServiceProvider(), getApiAdapter(extractProviderUserId(accessGrant)));
}
 
Example 8
Source Project: FEBS-Security   Source File: WeiXinConnectionFactory.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public Connection<WeiXin> createConnection(ConnectionData data) {
    return new OAuth2Connection<>(data, getOAuth2ServiceProvider(), getApiAdapter(data.getProviderUserId()));
}
 
Example 9
public Connection<Yahoo2> createConnection(AccessGrant accessGrant) {
	return new OAuth2Connection<Yahoo2>(getProviderId(), extractProviderUserId(accessGrant), accessGrant.getAccessToken(),
			accessGrant.getRefreshToken(), accessGrant.getExpireTime(), getOAuth2ServiceProviderWithGuid(accessGrant), getApiAdapter());		
}
 
Example 10
Source Project: paascloud-master   Source File: WeixinConnectionFactory.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * Create connection connection.
 *
 * @param accessGrant the access grant
 *
 * @return the connection
 */
@Override
public Connection<Weixin> createConnection(AccessGrant accessGrant) {
	return new OAuth2Connection<>(getProviderId(), extractProviderUserId(accessGrant), accessGrant.getAccessToken(),
			accessGrant.getRefreshToken(), accessGrant.getExpireTime(), getOAuth2ServiceProvider(), getApiAdapter(extractProviderUserId(accessGrant)));
}
 
Example 11
Source Project: paascloud-master   Source File: WeixinConnectionFactory.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * Create connection connection.
 *
 * @param data the data
 *
 * @return the connection
 */
@Override
public Connection<Weixin> createConnection(ConnectionData data) {
	return new OAuth2Connection<>(data, getOAuth2ServiceProvider(), getApiAdapter(data.getProviderUserId()));
}