devise_oauth 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13fa230f76d8fd29dcc50ee91a0c116ba840e607
|
4
|
+
data.tar.gz: dc9c5b238f3e3b8bbfc83ff514a267ae84da5855
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5c724e98680faeb0a453a74338e5763a013907eaf6a069615c75fb1cc74e5dc3fcab218218c3d214ef12d2259ac5e7920b861e379a3fa86ca3840b5f6bea5e0
|
7
|
+
data.tar.gz: fd61dfd1553dfc9581e6d8e7b70af59454cd203fa4dcab227508894fc19fc87ac580747ab60f2289a35f36796369f68183cdef803f6d4cf74e8103b6fd76006b
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
devise_oauth (2.0.
|
4
|
+
devise_oauth (2.0.3)
|
5
5
|
devise (>= 2.1)
|
6
6
|
rails (>= 3.2.0)
|
7
7
|
|
@@ -63,7 +63,7 @@ GEM
|
|
63
63
|
i18n (>= 0.4.0)
|
64
64
|
mime-types (~> 1.16)
|
65
65
|
treetop (~> 1.4.8)
|
66
|
-
mime-types (1.
|
66
|
+
mime-types (1.24)
|
67
67
|
multi_json (1.3.6)
|
68
68
|
orm_adapter (0.0.7)
|
69
69
|
polyglot (0.3.3)
|
data/lib/devise/oauth/version.rb
CHANGED
@@ -18,6 +18,7 @@ module Devise
|
|
18
18
|
|
19
19
|
return oauth_error!(403, :access_denied) unless access_token
|
20
20
|
return oauth_error!(403, :access_denied) if access_token.expired?
|
21
|
+
return oauth_error!(403, :access_denied) if access_token.blocked?
|
21
22
|
|
22
23
|
resource = access_token.resource_owner
|
23
24
|
if validate(resource)
|
@@ -47,6 +47,16 @@ describe ProtectedResourcesController do
|
|
47
47
|
it { should respond_with :forbidden }
|
48
48
|
# it { should respond_with_content_type :json }
|
49
49
|
end
|
50
|
+
|
51
|
+
context "can't access protected resource with blocked access token" do
|
52
|
+
before do
|
53
|
+
@token.block!
|
54
|
+
get :index, attributes
|
55
|
+
end
|
56
|
+
|
57
|
+
it { should respond_with :forbidden }
|
58
|
+
# it { should respond_with_content_type :json }
|
59
|
+
end
|
50
60
|
end
|
51
61
|
|
52
62
|
context "Access protected resources with default scope" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise_oauth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yury Korolev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|