Skip to content

Commit 2098997

Browse files
committed
Adding the ability to use Oauth if you supply the token consumer key and secret when initializing a new instance of BitBucket.
1 parent 124d41d commit 2098997

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/bitbucket_rest_api/connection.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def default_middleware(options={})
4242
#builder.use BitBucket::Request::Jsonize
4343
builder.use Faraday::Request::Multipart
4444
builder.use Faraday::Request::UrlEncoded
45-
builder.use FaradayMiddleware::OAuth, {:consumer_key => client_id, :consumer_secret => client_secret, :token => oauth_token, :token_secret => oauth_secret} if oauth_token? and oauth_secret?
45+
builder.use FaradayMiddleware::OAuth, {:consumer_key => client_id, :consumer_secret => client_secret, :token => oauth_token, :token_secret => oauth_secret} if client_id? and client_secret?
4646
builder.use BitBucket::Request::BasicAuth, authentication if basic_authed?
4747
builder.use FaradayMiddleware::EncodeJson
4848

0 commit comments

Comments
 (0)