doorkeeper 1.0.0.rc2 → 1.0.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -1
- data/lib/doorkeeper/version.rb +1 -1
- data/spec/controllers/applications_controller_spec.rb +4 -4
- data/spec/controllers/authorizations_controller_spec.rb +9 -9
- data/spec/controllers/protected_resources_controller_spec.rb +10 -10
- data/spec/controllers/token_info_controller_spec.rb +4 -4
- data/spec/controllers/tokens_controller_spec.rb +4 -4
- data/spec/lib/config_spec.rb +21 -21
- data/spec/lib/models/expirable_spec.rb +13 -13
- data/spec/lib/models/revocable_spec.rb +5 -5
- data/spec/lib/models/scopes_spec.rb +3 -3
- data/spec/lib/oauth/authorization/uri_builder_spec.rb +5 -5
- data/spec/lib/oauth/authorization_code_request_spec.rb +7 -7
- data/spec/lib/oauth/client/credentials_spec.rb +8 -8
- data/spec/lib/oauth/client/methods_spec.rb +8 -8
- data/spec/lib/oauth/client_credentials/creator_spec.rb +2 -2
- data/spec/lib/oauth/client_credentials/issuer_spec.rb +10 -9
- data/spec/lib/oauth/client_credentials/validation_spec.rb +6 -6
- data/spec/lib/oauth/client_credentials_request_spec.rb +7 -7
- data/spec/lib/oauth/client_spec.rb +8 -8
- data/spec/lib/oauth/code_request_spec.rb +4 -4
- data/spec/lib/oauth/error_response_spec.rb +22 -15
- data/spec/lib/oauth/error_spec.rb +1 -1
- data/spec/lib/oauth/helpers/scope_checker_spec.rb +13 -13
- data/spec/lib/oauth/helpers/unique_token_spec.rb +2 -2
- data/spec/lib/oauth/helpers/uri_checker_spec.rb +13 -13
- data/spec/lib/oauth/invalid_token_response_spec.rb +9 -4
- data/spec/lib/oauth/password_access_token_request_spec.rb +7 -7
- data/spec/lib/oauth/pre_authorization_spec.rb +14 -14
- data/spec/lib/oauth/refresh_token_request_spec.rb +8 -8
- data/spec/lib/oauth/scopes_spec.rb +27 -19
- data/spec/lib/oauth/token_request_spec.rb +4 -4
- data/spec/lib/oauth/token_response_spec.rb +11 -11
- data/spec/lib/oauth/token_spec.rb +9 -9
- data/spec/lib/server_spec.rb +1 -1
- data/spec/models/doorkeeper/access_token_spec.rb +15 -15
- data/spec/models/doorkeeper/application_spec.rb +21 -21
- data/spec/requests/flows/authorization_code_spec.rb +1 -1
- data/spec/requests/flows/client_credentials_spec.rb +1 -1
- data/spec/requests/flows/refresh_token_spec.rb +6 -6
- data/spec/requests/protected_resources/private_api_spec.rb +3 -3
- data/spec/routing/custom_controller_routes_spec.rb +16 -16
- data/spec/routing/default_routes_spec.rb +7 -7
- data/spec/routing/scoped_routes_spec.rb +7 -7
- data/spec/support/helpers/authorization_request_helper.rb +3 -3
- data/spec/support/helpers/model_helper.rb +6 -6
- data/spec/support/helpers/request_spec_helper.rb +9 -9
- data/spec/support/shared/controllers_shared_context.rb +6 -6
- data/spec/support/shared/models_shared_examples.rb +6 -6
- data/spec/validators/redirect_uri_validator_spec.rb +12 -12
- metadata +4 -4
@@ -7,41 +7,41 @@ describe RedirectUriValidator do
|
|
7
7
|
|
8
8
|
it 'is valid when the uri is a uri' do
|
9
9
|
subject.redirect_uri = "http://example.com/callback"
|
10
|
-
subject.
|
10
|
+
expect(subject).to be_valid
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'accepts test redirect uri' do
|
14
14
|
subject.redirect_uri = 'urn:ietf:wg:oauth:2.0:oob'
|
15
|
-
subject.
|
15
|
+
expect(subject).to be_valid
|
16
16
|
end
|
17
17
|
|
18
18
|
it 'rejects if test uri is disabled' do
|
19
|
-
RedirectUriValidator.
|
19
|
+
allow(RedirectUriValidator).to receive(:test_redirect_uri).and_return(nil)
|
20
20
|
subject.redirect_uri = "urn:some:test"
|
21
|
-
subject.
|
21
|
+
expect(subject).not_to be_valid
|
22
22
|
end
|
23
23
|
|
24
24
|
it 'is invalid when the uri is not a uri' do
|
25
25
|
subject.redirect_uri = ']'
|
26
|
-
subject.
|
27
|
-
subject.errors[:redirect_uri].first.
|
26
|
+
expect(subject).not_to be_valid
|
27
|
+
expect(subject.errors[:redirect_uri].first).to eq("must be a valid URI.")
|
28
28
|
end
|
29
29
|
|
30
30
|
it 'is invalid when the uri is relative' do
|
31
31
|
subject.redirect_uri = "/abcd"
|
32
|
-
subject.
|
33
|
-
subject.errors[:redirect_uri].first.
|
32
|
+
expect(subject).not_to be_valid
|
33
|
+
expect(subject.errors[:redirect_uri].first).to eq("must be an absolute URI.")
|
34
34
|
end
|
35
35
|
|
36
36
|
it 'is invalid when the uri has a fragment' do
|
37
37
|
subject.redirect_uri = "http://example.com/abcd#xyz"
|
38
|
-
subject.
|
39
|
-
subject.errors[:redirect_uri].first.
|
38
|
+
expect(subject).not_to be_valid
|
39
|
+
expect(subject.errors[:redirect_uri].first).to eq("cannot contain a fragment.")
|
40
40
|
end
|
41
41
|
|
42
42
|
it 'is invalid when the uri has a query parameter' do
|
43
43
|
subject.redirect_uri = "http://example.com/abcd?xyz=123"
|
44
|
-
subject.
|
45
|
-
subject.errors[:redirect_uri].first.
|
44
|
+
expect(subject).not_to be_valid
|
45
|
+
expect(subject.errors[:redirect_uri].first).to eq("cannot contain a query parameter.")
|
46
46
|
end
|
47
47
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: doorkeeper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felipe Elias Philipp
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-01-
|
12
|
+
date: 2014-01-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|
@@ -389,9 +389,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
389
389
|
version: '0'
|
390
390
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
391
391
|
requirements:
|
392
|
-
- - "
|
392
|
+
- - ">="
|
393
393
|
- !ruby/object:Gem::Version
|
394
|
-
version:
|
394
|
+
version: '0'
|
395
395
|
requirements: []
|
396
396
|
rubyforge_project:
|
397
397
|
rubygems_version: 2.2.0
|