当前位置: 首页>>代码示例>>Java>>正文


Java ConnectionData.getSecret方法代码示例

本文整理汇总了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();
}
 
开发者ID:mintster,项目名称:nixmash-blog,代码行数:15,代码来源:UserConnection.java

示例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());
}
 
开发者ID:tomwetjens,项目名称:spring-social-garmin,代码行数:9,代码来源:GarminConnectConnection.java

示例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()
  );
}
 
开发者ID:priitl,项目名称:p2p-webtv,代码行数:8,代码来源:CustomSocialConnectionRepository.java

示例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;
        }
    };
}
 
开发者ID:martinlau,项目名称:unidle-old,代码行数:38,代码来源:Functions.java


注:本文中的org.springframework.social.connect.ConnectionData.getSecret方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。