/** * The request token secret. * @return the token's secret */ public String getSecret() { return requestToken.getSecret(); }
/** * The request token secret. * @return the token's secret */ public String getSecret() { return requestToken.getSecret(); }
/** * Create a OAuth1-based Connection from the access token response returned after {@link #getOAuthOperations() completing the OAuth1 flow}. * @param accessToken the access token * @return the new service provider connection * @see OAuth1Operations#exchangeForAccessToken(org.springframework.social.oauth1.AuthorizedRequestToken, org.springframework.util.MultiValueMap) */ public Connection<A> createConnection(OAuthToken accessToken) { String providerUserId = extractProviderUserId(accessToken); return new OAuth1Connection<A>(getProviderId(), providerUserId, accessToken.getValue(), accessToken.getSecret(), getOAuth1ServiceProvider(), getApiAdapter()); }
/** * Create a OAuth1-based Connection from the access token response returned after {@link #getOAuthOperations() completing the OAuth1 flow}. * @param accessToken the access token * @return the new service provider connection * @see OAuth1Operations#exchangeForAccessToken(org.springframework.social.oauth1.AuthorizedRequestToken, org.springframework.util.MultiValueMap) */ public Connection<A> createConnection(OAuthToken accessToken) { String providerUserId = extractProviderUserId(accessToken); return new OAuth1Connection<A>(getProviderId(), providerUserId, accessToken.getValue(), accessToken.getSecret(), getOAuth1ServiceProvider(), getApiAdapter()); }
@Override public Connection applyTo(final Connection connection, final OAuthToken token) { final Connection.Builder mutableConnection = new Connection.Builder().createFrom(connection) .lastUpdated(new Date()); Applicator.applyProperty(mutableConnection, accessTokenValueProperty, token.getValue()); Applicator.applyProperty(mutableConnection, accessTokenSecretProperty, token.getSecret()); Applicator.applyProperty(mutableConnection, consumerKeyProperty, consumerKey); Applicator.applyProperty(mutableConnection, consumerSecretProperty, consumerSecret); return mutableConnection.build(); }
@Override public Connection applyTo(final Connection connection, final OAuthToken token) { final Connection.Builder mutableConnection = new Connection.Builder().createFrom(connection) .lastUpdated(new Date()); Applicator.applyProperty(mutableConnection, accessTokenValueProperty, token.getValue()); Applicator.applyProperty(mutableConnection, accessTokenSecretProperty, token.getSecret()); Applicator.applyProperty(mutableConnection, consumerKeyProperty, consumerKey); Applicator.applyProperty(mutableConnection, consumerSecretProperty, consumerSecret); return mutableConnection.build(); }