Skip to content

Commit bda8447

Browse files
committed
Merge pull request #8 from iconnor/master
Update to oauth2
2 parents 506ae7a + 9fda1bc commit bda8447

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

lib/omniauth/strategies/bitbucket.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
require 'omniauth-oauth'
1+
require 'omniauth-oauth2'
22

33
module OmniAuth
44
module Strategies
5-
class Bitbucket < OmniAuth::Strategies::OAuth
5+
class Bitbucket < OmniAuth::Strategies::OAuth2
66
# This is where you pass the options you would pass when
77
# initializing your consumer from the OAuth gem.
88
option :client_options, {
99
:site => 'https://bitbucket.org',
10-
:request_token_path => '/api/1.0/oauth/request_token',
11-
:authorize_path => '/api/1.0/oauth/authenticate',
12-
:access_token_path => '/api/1.0/oauth/access_token'
10+
:authorize_url => 'https://bitbucket.org/site/oauth2/authorize',
11+
:token_url => 'https://bitbucket.org/site/oauth2/access_token'
1312
}
1413

1514
# These are called after authentication has succeeded. If

omniauth-bitbucket.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
1818

1919
# specify any dependencies here; for example:
2020
s.add_dependency 'omniauth', '~> 1.1'
21-
s.add_dependency 'omniauth-oauth', '~> 1.0'
21+
s.add_dependency 'omniauth-oauth2', '>= 1.1.1', '< 2.0'
2222
s.add_dependency 'multi_json', '~> 1.7'
2323

2424
s.add_development_dependency 'rspec', '~> 2.7'

0 commit comments

Comments
 (0)