本文整理汇总了Java中org.springframework.social.connect.ConnectionData.getSecret方法的典型用法代码示例。如果您正苦于以下问题:Java ConnectionData.getSecret方法的具体用法?Java ConnectionData.getSecret怎么用?Java ConnectionData.getSecret使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.social.connect.ConnectionData
的用法示例。
在下文中一共展示了ConnectionData.getSecret方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: UserConnection
import org.springframework.social.connect.ConnectionData; //导入方法依赖的package包/类
public UserConnection(ConnectionData connectionData, String userId)
{
this.userId = userId;
this.providerId = connectionData.getProviderId();
this.providerUserId = connectionData.getProviderUserId();
this.rank = 1;
this.displayName = connectionData.getDisplayName();
this.profileUrl = connectionData.getProfileUrl();
this.imageUrl = connectionData.getImageUrl();
this.accessToken = connectionData.getAccessToken();
this.secret = connectionData.getSecret();
this.refreshToken = connectionData.getRefreshToken();
this.expireTime = connectionData.getExpireTime();
}
示例2: GarminConnectConnection
import org.springframework.social.connect.ConnectionData; //导入方法依赖的package包/类
public GarminConnectConnection(ConnectionData connectionData, GarminConnectAdapter apiAdapter) {
super(apiAdapter);
this.password = connectionData.getSecret();
this.apiAdapter = apiAdapter;
this.initKey(PROVIDER_ID, connectionData.getProviderUserId());
}
示例3: connectionToUserSocialConnection
import org.springframework.social.connect.ConnectionData; //导入方法依赖的package包/类
private SocialUserConnection connectionToUserSocialConnection(Connection<?> connection, Long rank) {
ConnectionData connectionData = connection.createData();
return new SocialUserConnection(userId, connection.getKey().getProviderId(), connection.getKey().getProviderUserId(),
rank, connection.getDisplayName(), connection.getProfileUrl(), connection.getImageUrl(), connectionData.getAccessToken(),
connectionData.getSecret(), connectionData.getRefreshToken(), connectionData.getExpireTime()
);
}
示例4: toUserConnection
import org.springframework.social.connect.ConnectionData; //导入方法依赖的package包/类
public static Function<? super ConnectionData, ? extends UserConnection> toUserConnection(final UserConnection userConnection,
final TextEncryptor textEncryptor,
final Integer rank,
final User user) {
return new Function<ConnectionData, UserConnection>() {
@Override
public UserConnection apply(final ConnectionData input) {
if (input == null) {
return null;
}
userConnection.setDisplayName(input.getDisplayName());
userConnection.setExpireTime(input.getExpireTime());
userConnection.setImageUrl(input.getImageUrl());
userConnection.setProfileUrl(input.getProfileUrl());
userConnection.setProviderId(input.getProviderId());
userConnection.setProviderUserId(input.getProviderUserId());
userConnection.setRank(rank);
userConnection.setUser(user);
if (input.getAccessToken() != null) {
userConnection.setAccessToken(textEncryptor.encrypt(input.getAccessToken()));
}
if (input.getRefreshToken() != null) {
userConnection.setRefreshToken(textEncryptor.encrypt(input.getRefreshToken()));
}
if (input.getSecret() != null) {
userConnection.setSecret(textEncryptor.encrypt(input.getSecret()));
}
return userConnection;
}
};
}