/** * Constructs the API template without user authorization. This is useful for accessing operations on a provider's API that do not require user authorization. */ protected AbstractOAuth1ApiBinding() { credentials = null; restTemplate = createRestTemplateWithCulledMessageConverters(); configureRestTemplate(restTemplate); }
/** * Constructs the API template without user authorization. This is useful for accessing operations on a provider's API that do not require user authorization. */ protected AbstractOAuth1ApiBinding() { credentials = null; restTemplate = createRestTemplateWithCulledMessageConverters(); configureRestTemplate(restTemplate); }
/** * Constructs the API template with OAuth credentials necessary to perform operations on behalf of a user. * @param consumerKey the application's consumer key * @param consumerSecret the application's consumer secret * @param accessToken the access token * @param accessTokenSecret the access token secret */ protected AbstractOAuth1ApiBinding(String consumerKey, String consumerSecret, String accessToken, String accessTokenSecret) { Assert.notNull(consumerKey, "Constructor argument 'consumerKey' cannot be null."); Assert.notNull(consumerSecret, "Constructor argument 'consumerSecret' cannot be null."); Assert.notNull(accessToken, "Constructor argument 'accessToken' cannot be null."); Assert.notNull(accessTokenSecret, "Constructor argument 'accessTokenSecret' cannot be null."); credentials = new OAuth1Credentials(consumerKey, consumerSecret, accessToken, accessTokenSecret); restTemplate = createRestTemplate(credentials); configureRestTemplate(restTemplate); }
/** * Constructs the API template with OAuth credentials necessary to perform operations on behalf of a user. * @param consumerKey the application's consumer key * @param consumerSecret the application's consumer secret * @param accessToken the access token * @param accessTokenSecret the access token secret */ protected AbstractOAuth1ApiBinding(String consumerKey, String consumerSecret, String accessToken, String accessTokenSecret) { Assert.notNull(consumerKey, "Constructor argument 'consumerKey' cannot be null."); Assert.notNull(consumerSecret, "Constructor argument 'consumerSecret' cannot be null."); Assert.notNull(accessToken, "Constructor argument 'accessToken' cannot be null."); Assert.notNull(accessTokenSecret, "Constructor argument 'accessTokenSecret' cannot be null."); credentials = new OAuth1Credentials(consumerKey, consumerSecret, accessToken, accessTokenSecret); restTemplate = createRestTemplate(credentials); configureRestTemplate(restTemplate); }