doorkeeper 0.5.0 → 0.6.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of doorkeeper might be problematic. Click here for more details.
- data/.travis.yml +15 -6
- data/CHANGELOG.md +19 -1
- data/Gemfile +23 -7
- data/README.md +62 -27
- data/app/controllers/doorkeeper/application_controller.rb +1 -1
- data/app/controllers/doorkeeper/authorizations_controller.rb +45 -35
- data/app/controllers/doorkeeper/token_info_controller.rb +10 -9
- data/app/controllers/doorkeeper/tokens_controller.rb +13 -32
- data/app/validators/redirect_uri_validator.rb +11 -0
- data/app/views/doorkeeper/applications/_form.html.erb +6 -1
- data/app/views/doorkeeper/applications/edit.html.erb +2 -2
- data/app/views/doorkeeper/applications/new.html.erb +2 -2
- data/app/views/doorkeeper/applications/show.html.erb +4 -1
- data/app/views/doorkeeper/authorizations/error.html.erb +1 -1
- data/app/views/doorkeeper/authorizations/new.html.erb +17 -17
- data/app/views/doorkeeper/authorizations/show.html.erb +4 -0
- data/config/locales/en.yml +10 -0
- data/doorkeeper.gemspec +3 -3
- data/lib/doorkeeper.rb +11 -2
- data/lib/doorkeeper/config.rb +6 -1
- data/lib/doorkeeper/errors.rb +15 -0
- data/lib/doorkeeper/helpers/controller.rb +24 -0
- data/lib/doorkeeper/models/access_grant.rb +1 -1
- data/lib/doorkeeper/models/access_token.rb +2 -3
- data/lib/doorkeeper/models/active_record/access_token.rb +6 -0
- data/lib/doorkeeper/models/mongo_mapper/access_grant.rb +28 -0
- data/lib/doorkeeper/models/mongo_mapper/access_token.rb +51 -0
- data/lib/doorkeeper/models/mongo_mapper/application.rb +30 -0
- data/lib/doorkeeper/models/mongo_mapper/revocable.rb +15 -0
- data/lib/doorkeeper/models/{mongoid → mongoid2}/access_grant.rb +1 -1
- data/lib/doorkeeper/models/{mongoid → mongoid2}/access_token.rb +6 -0
- data/lib/doorkeeper/models/{mongoid → mongoid2}/application.rb +2 -2
- data/lib/doorkeeper/models/mongoid3/access_grant.rb +22 -0
- data/lib/doorkeeper/models/mongoid3/access_token.rb +41 -0
- data/lib/doorkeeper/models/mongoid3/application.rb +22 -0
- data/lib/doorkeeper/oauth/authorization/code.rb +9 -17
- data/lib/doorkeeper/oauth/authorization/token.rb +8 -18
- data/lib/doorkeeper/oauth/authorization/uri_builder.rb +2 -0
- data/lib/doorkeeper/oauth/authorization_code_request.rb +82 -0
- data/lib/doorkeeper/oauth/client_credentials_request.rb +2 -4
- data/lib/doorkeeper/oauth/code_request.rb +28 -0
- data/lib/doorkeeper/oauth/code_response.rb +37 -0
- data/lib/doorkeeper/oauth/error_response.rb +23 -9
- data/lib/doorkeeper/oauth/helpers/uri_checker.rb +4 -0
- data/lib/doorkeeper/oauth/password_access_token_request.rb +21 -65
- data/lib/doorkeeper/oauth/pre_authorization.rb +62 -0
- data/lib/doorkeeper/oauth/refresh_token_request.rb +58 -0
- data/lib/doorkeeper/oauth/token_request.rb +28 -0
- data/lib/doorkeeper/oauth/token_response.rb +29 -0
- data/lib/doorkeeper/rails/routes.rb +4 -3
- data/lib/doorkeeper/request.rb +33 -0
- data/lib/doorkeeper/request/authorization_code.rb +23 -0
- data/lib/doorkeeper/request/client_credentials.rb +23 -0
- data/lib/doorkeeper/request/code.rb +24 -0
- data/lib/doorkeeper/request/password.rb +23 -0
- data/lib/doorkeeper/request/refresh_token.rb +23 -0
- data/lib/doorkeeper/request/token.rb +24 -0
- data/lib/doorkeeper/server.rb +54 -0
- data/lib/doorkeeper/validations.rb +1 -0
- data/lib/doorkeeper/version.rb +1 -1
- data/lib/generators/doorkeeper/mongo_mapper/indexes_generator.rb +12 -0
- data/lib/generators/doorkeeper/templates/README +15 -1
- data/lib/generators/doorkeeper/templates/indexes.rb +3 -0
- data/lib/generators/doorkeeper/templates/initializer.rb +8 -1
- data/script/run_all +9 -9
- data/spec/controllers/authorizations_controller_spec.rb +8 -19
- data/spec/controllers/token_info_controller_spec.rb +9 -9
- data/spec/controllers/tokens_controller_spec.rb +2 -1
- data/spec/dummy/app/models/user.rb +11 -4
- data/spec/dummy/config/application.rb +8 -1
- data/spec/dummy/config/boot.rb +1 -1
- data/spec/dummy/config/initializers/doorkeeper.rb +9 -1
- data/spec/dummy/config/mongo.yml +11 -0
- data/spec/dummy/config/{mongoid.yml → mongoid2.yml} +3 -1
- data/spec/dummy/config/mongoid3.yml +18 -0
- data/spec/generators/install_generator_spec.rb +1 -0
- data/spec/lib/oauth/authorization_code_request_spec.rb +80 -0
- data/spec/lib/oauth/client_credentials_request_spec.rb +1 -3
- data/spec/lib/oauth/code_request_spec.rb +44 -0
- data/spec/lib/oauth/error_response_spec.rb +7 -7
- data/spec/lib/oauth/password_access_token_request_spec.rb +30 -143
- data/spec/lib/oauth/pre_authorization_spec.rb +80 -0
- data/spec/lib/oauth/refresh_token_request_spec.rb +56 -0
- data/spec/lib/oauth/token_request_spec.rb +46 -0
- data/spec/lib/oauth/{client_credentials/response_spec.rb → token_response_spec.rb} +13 -19
- data/spec/lib/server_spec.rb +24 -0
- data/spec/requests/endpoints/authorization_spec.rb +11 -27
- data/spec/requests/endpoints/token_spec.rb +17 -0
- data/spec/requests/flows/authorization_code_errors_spec.rb +0 -45
- data/spec/requests/flows/authorization_code_spec.rb +12 -2
- data/spec/requests/flows/client_credentials_spec.rb +1 -1
- data/spec/requests/flows/password_spec.rb +1 -0
- data/spec/requests/flows/refresh_token_spec.rb +6 -4
- data/spec/spec_helper_integration.rb +4 -2
- data/spec/support/orm/mongo_mapper.rb +26 -0
- data/spec/support/orm/mongoid.rb +7 -2
- data/spec/validators/redirect_uri_validator_spec.rb +11 -4
- metadata +67 -42
- data/gemfiles/gemfile.rails-3.1.x +0 -17
- data/gemfiles/gemfile.rails-3.2.x +0 -17
- data/lib/doorkeeper/oauth/access_token_request.rb +0 -139
- data/lib/doorkeeper/oauth/authorization_request.rb +0 -114
- data/lib/doorkeeper/oauth/client_credentials/response.rb +0 -42
- data/spec/lib/oauth/access_token_request_spec.rb +0 -246
- data/spec/lib/oauth/authorization_request_spec.rb +0 -287
@@ -0,0 +1,23 @@
|
|
1
|
+
module Doorkeeper
|
2
|
+
module Request
|
3
|
+
class Password
|
4
|
+
def self.build(server)
|
5
|
+
new(server.client, server.resource_owner, server)
|
6
|
+
end
|
7
|
+
|
8
|
+
attr_accessor :client, :resource_owner, :server
|
9
|
+
|
10
|
+
def initialize(client, resource_owner, server)
|
11
|
+
@client, @resource_owner, @server = client, resource_owner, server
|
12
|
+
end
|
13
|
+
|
14
|
+
def request
|
15
|
+
@request ||= OAuth::PasswordAccessTokenRequest.new(Doorkeeper.configuration, client, resource_owner, server.parameters)
|
16
|
+
end
|
17
|
+
|
18
|
+
def authorize
|
19
|
+
request.authorize
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Doorkeeper
|
2
|
+
module Request
|
3
|
+
class RefreshToken
|
4
|
+
def self.build(server)
|
5
|
+
new(server.current_refresh_token, server.client)
|
6
|
+
end
|
7
|
+
|
8
|
+
attr_accessor :refresh_token, :client
|
9
|
+
|
10
|
+
def initialize(refresh_token, client)
|
11
|
+
@refresh_token, @client = refresh_token, client
|
12
|
+
end
|
13
|
+
|
14
|
+
def request
|
15
|
+
@request ||= OAuth::RefreshTokenRequest.new(Doorkeeper.configuration, refresh_token, client)
|
16
|
+
end
|
17
|
+
|
18
|
+
def authorize
|
19
|
+
request.authorize
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Doorkeeper
|
2
|
+
module Request
|
3
|
+
class Token
|
4
|
+
# TODO: this is so wrong!
|
5
|
+
def self.build(server)
|
6
|
+
new(server.context.send(:pre_auth), server)
|
7
|
+
end
|
8
|
+
|
9
|
+
attr_accessor :pre_auth, :server
|
10
|
+
|
11
|
+
def initialize(pre_auth, server)
|
12
|
+
@pre_auth, @server = pre_auth, server
|
13
|
+
end
|
14
|
+
|
15
|
+
def request
|
16
|
+
@request ||= OAuth::TokenRequest.new(pre_auth, server.current_resource_owner)
|
17
|
+
end
|
18
|
+
|
19
|
+
def authorize
|
20
|
+
request.authorize
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
module Doorkeeper
|
2
|
+
class Server
|
3
|
+
attr_accessor :context
|
4
|
+
|
5
|
+
def initialize(context = nil)
|
6
|
+
@context = context
|
7
|
+
end
|
8
|
+
|
9
|
+
def authorization_request(strategy)
|
10
|
+
klass = Request.authorization_strategy strategy
|
11
|
+
klass.build self
|
12
|
+
end
|
13
|
+
|
14
|
+
def token_request(strategy)
|
15
|
+
klass = Request.token_strategy strategy
|
16
|
+
klass.build self
|
17
|
+
end
|
18
|
+
|
19
|
+
# TODO: context should be the request
|
20
|
+
def parameters
|
21
|
+
context.request.parameters
|
22
|
+
end
|
23
|
+
|
24
|
+
def client
|
25
|
+
@client ||= OAuth::Client.authenticate(credentials)
|
26
|
+
end
|
27
|
+
|
28
|
+
def client_via_uid
|
29
|
+
@client_via_uid ||= OAuth::Client.find(parameters[:client_id])
|
30
|
+
end
|
31
|
+
|
32
|
+
def current_resource_owner
|
33
|
+
context.send :current_resource_owner
|
34
|
+
end
|
35
|
+
|
36
|
+
def current_refresh_token
|
37
|
+
Doorkeeper::AccessToken.by_refresh_token(parameters[:refresh_token])
|
38
|
+
end
|
39
|
+
|
40
|
+
def grant
|
41
|
+
Doorkeeper::AccessGrant.authenticate(parameters[:code])
|
42
|
+
end
|
43
|
+
|
44
|
+
# TODO: Use configuration and evaluate proper context on block
|
45
|
+
def resource_owner
|
46
|
+
context.send :resource_owner_from_credentials
|
47
|
+
end
|
48
|
+
|
49
|
+
def credentials
|
50
|
+
methods = Doorkeeper.configuration.client_credentials_methods
|
51
|
+
@credentials ||= OAuth::Client::Credentials.from_request(context.request, *methods)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
data/lib/doorkeeper/version.rb
CHANGED
@@ -0,0 +1,12 @@
|
|
1
|
+
module Doorkeeper
|
2
|
+
module MongoMapper
|
3
|
+
class IndexesGenerator < ::Rails::Generators::Base
|
4
|
+
source_root File.expand_path('../../templates', __FILE__)
|
5
|
+
desc "Creates an indexes file for use with MongoMapper's rake db:index"
|
6
|
+
|
7
|
+
def install
|
8
|
+
template "indexes.rb", "db/indexes.rb"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -17,12 +17,26 @@ And run
|
|
17
17
|
|
18
18
|
rake db:migrate
|
19
19
|
|
20
|
-
If you want to use Mongoid, configure the orm in initializers/doorkeeper.rb
|
20
|
+
If you want to use Mongoid, configure the orm in initializers/doorkeeper.rb:
|
21
21
|
|
22
|
+
# Mongoid
|
22
23
|
Doorkeeper.configure do
|
23
24
|
orm :mongoid
|
24
25
|
end
|
25
26
|
|
27
|
+
If you want to use MongoMapper, configure the orm in
|
28
|
+
initializers/doorkeeper.rb:
|
29
|
+
|
30
|
+
# MongoMapper
|
31
|
+
Doorkeeper.configure do
|
32
|
+
orm :mongo_mapper
|
33
|
+
end
|
34
|
+
|
35
|
+
And run
|
36
|
+
|
37
|
+
rails generate doorkeeper:mongo_mapper:indexes
|
38
|
+
rake db:index
|
39
|
+
|
26
40
|
Step 3.
|
27
41
|
That's it, that's all. Enjoy!
|
28
42
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Doorkeeper.configure do
|
2
2
|
# Change the ORM that doorkeeper will use.
|
3
|
-
# Currently supported options are :active_record
|
3
|
+
# Currently supported options are :active_record, :mongoid2, :mongoid3, :mongo_mapper
|
4
4
|
orm :active_record
|
5
5
|
|
6
6
|
# This block will be called to check whether the resource owner is authenticated or not.
|
@@ -54,4 +54,11 @@ Doorkeeper.configure do
|
|
54
54
|
# falls back to the `:access_token` or `:bearer_token` params from the `params` object.
|
55
55
|
# Check out the wiki for mor information on customization
|
56
56
|
# access_token_methods :from_bearer_authorization, :from_access_token_param, :from_bearer_param
|
57
|
+
|
58
|
+
# Change the test redirect uri for client apps
|
59
|
+
# When clients register with the following redirect uri, they won't be redirected to any server and the authorization code will be displayed within the provider
|
60
|
+
# The value can be any string. Use nil to disable this feature. When disabled, clients must provide a valid URL
|
61
|
+
# (Similar behaviour: https://developers.google.com/accounts/docs/OAuth2InstalledApp#choosingredirecturi)
|
62
|
+
#
|
63
|
+
# test_redirect_uri 'urn:ietf:wg:oauth:2.0:oob'
|
57
64
|
end
|
data/script/run_all
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
set -e
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
RBENV_VERSION=1.8.7-p352 DOORKEEPER_ORM=mongoid bundle exec rake
|
4
|
+
rails=3.2.8 orm=active_record bundle install --quiet
|
5
|
+
rails=3.2.8 orm=active_record bundle exec rake
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
RBENV_VERSION=1.9.2-p290 DOORKEEPER_ORM=mongoid bundle exec rake
|
7
|
+
rails=3.2.8 orm=mongoid2 bundle install --quiet
|
8
|
+
rails=3.2.8 orm=mongoid2 bundle exec rake
|
11
9
|
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
rails=3.2.8 orm=mongoid3 bundle install --quiet
|
11
|
+
rails=3.2.8 orm=mongoid3 bundle exec rake
|
12
|
+
|
13
|
+
rails=3.2.8 orm=mongo_mapper bundle install --quiet
|
14
|
+
rails=3.2.8 orm=mongo_mapper bundle exec rake
|
@@ -101,31 +101,20 @@ describe Doorkeeper::AuthorizationsController, "implicit grant flow" do
|
|
101
101
|
describe "GET #new with errors" do
|
102
102
|
before do
|
103
103
|
default_scopes_exist :public
|
104
|
-
get :new, :
|
104
|
+
get :new, :an_invalid => 'request'
|
105
105
|
end
|
106
106
|
|
107
|
-
it "
|
108
|
-
response.
|
109
|
-
end
|
110
|
-
|
111
|
-
it "redirects to client redirect uri" do
|
112
|
-
response.location.should =~ %r[^#{client.redirect_uri}]
|
113
|
-
end
|
114
|
-
|
115
|
-
it "does not include access token in fragment" do
|
116
|
-
fragments("access_token").should be_nil
|
107
|
+
it "does not redirect" do
|
108
|
+
response.should_not be_redirect
|
117
109
|
end
|
118
110
|
|
119
|
-
it
|
120
|
-
|
111
|
+
it 'renders error template' do
|
112
|
+
response.should render_template(:error)
|
121
113
|
end
|
122
114
|
|
123
|
-
it
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
it "does not issue any access token" do
|
128
|
-
Doorkeeper::AccessToken.all.should be_empty
|
115
|
+
it 'does not issue any token' do
|
116
|
+
Doorkeeper::AccessGrant.count.should be 0
|
117
|
+
Doorkeeper::AccessToken.count.should be 0
|
129
118
|
end
|
130
119
|
end
|
131
120
|
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
require 'spec_helper_integration'
|
2
2
|
|
3
3
|
describe Doorkeeper::TokenInfoController do
|
4
|
-
|
4
|
+
|
5
5
|
describe "when requesting tokeninfo with valid token" do
|
6
6
|
|
7
7
|
let(:doorkeeper_token) { FactoryGirl.create(:access_token) }
|
8
8
|
|
9
9
|
before(:each) do
|
10
|
-
controller.stub(:doorkeeper_token) { doorkeeper_token }
|
10
|
+
controller.stub(:doorkeeper_token) { doorkeeper_token }
|
11
11
|
end
|
12
12
|
|
13
13
|
def do_get
|
@@ -17,13 +17,13 @@ describe Doorkeeper::TokenInfoController do
|
|
17
17
|
describe "successful request" do
|
18
18
|
|
19
19
|
it "responds with tokeninfo" do
|
20
|
-
do_get
|
20
|
+
do_get
|
21
21
|
response.body.should eq doorkeeper_token.to_json
|
22
22
|
end
|
23
23
|
|
24
24
|
it "responds with a 200 status" do
|
25
|
-
do_get
|
26
|
-
response.status.should eq 200
|
25
|
+
do_get
|
26
|
+
response.status.should eq 200
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -33,19 +33,19 @@ describe Doorkeeper::TokenInfoController do
|
|
33
33
|
end
|
34
34
|
it "responds with 401 when doorkeeper_token is not valid" do
|
35
35
|
do_get
|
36
|
-
response.status.should eq 401
|
36
|
+
response.status.should eq 401
|
37
37
|
end
|
38
38
|
|
39
39
|
it "responds with 401 when doorkeeper_token is invalid, expired or revoked" do
|
40
40
|
controller.stub(:doorkeeper_token => doorkeeper_token)
|
41
|
-
doorkeeper_token.stub(:accessible? => false)
|
41
|
+
doorkeeper_token.stub(:accessible? => false)
|
42
42
|
do_get
|
43
|
-
response.status.should eq 401
|
43
|
+
response.status.should eq 401
|
44
44
|
end
|
45
45
|
|
46
46
|
it "responds body message for error" do
|
47
47
|
do_get
|
48
|
-
response.body.should eq Doorkeeper::OAuth::ErrorResponse.new(:name => :invalid_request, :status => :unauthorized).
|
48
|
+
response.body.should eq Doorkeeper::OAuth::ErrorResponse.new(:name => :invalid_request, :status => :unauthorized).body.to_json
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
@@ -11,6 +11,7 @@ describe Doorkeeper::TokensController do
|
|
11
11
|
end
|
12
12
|
|
13
13
|
it "returns the authorization" do
|
14
|
+
pending 'verify need of these specs'
|
14
15
|
token.should_receive(:authorization)
|
15
16
|
post :create
|
16
17
|
end
|
@@ -26,10 +27,10 @@ describe Doorkeeper::TokensController do
|
|
26
27
|
end
|
27
28
|
|
28
29
|
it "returns the error response" do
|
30
|
+
pending 'verify need of these specs'
|
29
31
|
token.stub(:error_response => stub(:to_json => [], :status => :unauthorized))
|
30
32
|
post :create
|
31
33
|
response.status.should == 401
|
32
34
|
end
|
33
35
|
end
|
34
|
-
|
35
36
|
end
|
@@ -1,9 +1,8 @@
|
|
1
|
-
|
1
|
+
case DOORKEEPER_ORM
|
2
|
+
when :active_record
|
2
3
|
class User < ActiveRecord::Base
|
3
4
|
end
|
4
|
-
|
5
|
-
|
6
|
-
if defined? Mongoid
|
5
|
+
when :mongoid2, :mongoid3
|
7
6
|
class User
|
8
7
|
include Mongoid::Document
|
9
8
|
include Mongoid::Timestamps
|
@@ -11,6 +10,14 @@ if defined? Mongoid
|
|
11
10
|
field :name, :type => String
|
12
11
|
field :password, :type => String
|
13
12
|
end
|
13
|
+
when :mongo_mapper
|
14
|
+
class User
|
15
|
+
include MongoMapper::Document
|
16
|
+
timestamps!
|
17
|
+
|
18
|
+
key :name, String
|
19
|
+
key :password, String
|
20
|
+
end
|
14
21
|
end
|
15
22
|
|
16
23
|
class User
|
@@ -6,7 +6,14 @@ require "sprockets/railtie"
|
|
6
6
|
|
7
7
|
Bundler.require :default
|
8
8
|
|
9
|
-
|
9
|
+
orm = if [:mongoid2, :mongoid3].include?(DOORKEEPER_ORM)
|
10
|
+
Mongoid.load!(File.join(File.dirname(File.expand_path(__FILE__)), "#{DOORKEEPER_ORM}.yml"))
|
11
|
+
:mongoid
|
12
|
+
else
|
13
|
+
DOORKEEPER_ORM
|
14
|
+
end
|
15
|
+
|
16
|
+
require "#{orm}/railtie"
|
10
17
|
|
11
18
|
module Dummy
|
12
19
|
class Application < Rails::Application
|
data/spec/dummy/config/boot.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'bundler/setup'
|
3
3
|
|
4
|
-
DOORKEEPER_ORM = (ENV['
|
4
|
+
DOORKEEPER_ORM = (ENV['orm'] || :active_record).to_sym unless defined?(DOORKEEPER_ORM)
|
5
5
|
|
6
6
|
$:.unshift File.expand_path('../../../../lib', __FILE__)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Doorkeeper.configure do
|
2
2
|
# Change the ORM that doorkeeper will use
|
3
|
-
# Currently supported
|
3
|
+
# Currently supported options are :active_record, :mongoid2, :mongoid3, :mongo_mapper
|
4
4
|
orm DOORKEEPER_ORM
|
5
5
|
|
6
6
|
# This block will be called to check whether the
|
@@ -51,4 +51,12 @@ Doorkeeper.configure do
|
|
51
51
|
# fallsback to `:access_token` or `:bearer_token` from `params` object
|
52
52
|
# Check out the wiki for mor information on customization
|
53
53
|
# access_token_methods :from_bearer_authorization, :from_access_token_param, :from_bearer_param
|
54
|
+
|
55
|
+
|
56
|
+
# Change the test redirect uri for client apps
|
57
|
+
# When clients register with the following redirect uri, they won't be redirected to any server and the authorization code will be displayed within the provider
|
58
|
+
# The value can be any string. Use nil to disable this feature. When disabled, clients must provide a valid URL
|
59
|
+
# (Similar behaviour: https://developers.google.com/accounts/docs/OAuth2InstalledApp#choosingredirecturi)
|
60
|
+
#
|
61
|
+
# test_redirect_uri 'urn:ietf:wg:oauth:2.0:oob'
|
54
62
|
end
|