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

The following examples show how to use org.springframework.social.connect.support.OAuth2Connection. 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 File: WechatConnectionFactory.java    From cola with 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 File: WechatConnectionFactory.java    From cola with 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 File: WechatMpConnectionFactory.java    From cola with 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 File: WechatMpConnectionFactory.java    From cola with 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 File: WeixinConnectionFactory.java    From pre with 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 File: WeixinConnectionFactory.java    From pre with 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 File: WeiXinConnectionFactory.java    From FEBS-Security with 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 File: WeiXinConnectionFactory.java    From FEBS-Security with 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
Source File: YahooOAuth2ConnectionFactory.java    From cloudstreetmarket.com with GNU General Public License v3.0 4 votes vote down vote up
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 File: WeixinConnectionFactory.java    From paascloud-master with 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 File: WeixinConnectionFactory.java    From paascloud-master with 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()));
}