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: 937cea68a92a99fb2f02b091270ea9f83be17d3d
4
- data.tar.gz: 4165d14ca20b41927cdaa41e763f7437438da9d9
3
+ metadata.gz: 13fa230f76d8fd29dcc50ee91a0c116ba840e607
4
+ data.tar.gz: dc9c5b238f3e3b8bbfc83ff514a267ae84da5855
5
5
  SHA512:
6
- metadata.gz: c511dc68b6f02bb89b5b7f8f9337f4a15022c6749b4d0d8ac1bc40a32be2fa4dd012199405fbc084de860e8d8fc3d922a1f58b1f8bf32f2faecdb2d48c8249c6
7
- data.tar.gz: 0c5671e2e5694a7390eab3242f5d9e1464c2cd3ea8b1704e890ed258affb45099530a9bfb524d6e1bca1f7e3ba25a1334458dfe749b64bda79aebc9d6c648cb9
6
+ metadata.gz: d5c724e98680faeb0a453a74338e5763a013907eaf6a069615c75fb1cc74e5dc3fcab218218c3d214ef12d2259ac5e7920b861e379a3fa86ca3840b5f6bea5e0
7
+ data.tar.gz: fd61dfd1553dfc9581e6d8e7b70af59454cd203fa4dcab227508894fc19fc87ac580747ab60f2289a35f36796369f68183cdef803f6d4cf74e8103b6fd76006b
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- devise_oauth (2.0.2)
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.23)
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)
@@ -1,5 +1,5 @@
1
1
  module Devise
2
2
  module Oauth
3
- VERSION = "2.0.2"
3
+ VERSION = "2.0.3"
4
4
  end
5
5
  end
@@ -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.2
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-06-18 00:00:00.000000000 Z
11
+ date: 2013-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails