warden-oauth2-strategies 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0df4f6d65b46e8d81c518dd75a1fe96556fdd753
4
- data.tar.gz: 0e2d53987f68527aaaa9a4eb7a85fd68b2570d29
3
+ metadata.gz: d7edd648b053bdf48c70c637a5fecd7c867ad24e
4
+ data.tar.gz: 704884c8f5e5600e5d2fb1a7eadf521e8585fcea
5
5
  SHA512:
6
- metadata.gz: e8f08fc873bf11a9c781f5d714c31d02e132fdaf06345e59a9752b9e0971adff7256ff2567837ede5aa564d8f8db3044c29107a49644a4b045d94c51d6b0170b
7
- data.tar.gz: 4e14388e4bbfe21b1938a8f7172e37736f983e08190b4217ce1d7455324a1a8b92da1b51606ec638b331b301bddbed1e296b419f68cf117b03097361b71314b1
6
+ metadata.gz: 06d720cdd64110f2362e8ebed12d06d6c8084012fa65f59484ee629a90767e4ee10b14bdcda86ad06b447104d330c255faf138e19c03ca4710fed2b71098d95a
7
+ data.tar.gz: 5ff13989b55d69217f7bb02e8e3d769e0b342112b6a7afea7d596cd4d369c834b03d55de6ed4ea713d14d1cfe423e88bfc98108bd2c75b81719015482a0f936a
@@ -10,7 +10,7 @@ module Warden
10
10
 
11
11
  def authenticate!
12
12
  self.error_description = 'Bearer Token is not provided'
13
- fail! 'invalid_client'
13
+ fail! 'token_required'
14
14
  end
15
15
  end
16
16
  end
@@ -28,8 +28,9 @@ module Warden
28
28
 
29
29
  def error_status
30
30
  case message
31
- when 'invalid_token' then 401
31
+ when 'invalid_token', 'token_required' then 401
32
32
  when 'invalid_scope' then 403
33
+ when 'invalid_request' then 400
33
34
  else 400
34
35
  end
35
36
  end
@@ -1,5 +1,5 @@
1
1
  module Warden
2
2
  module OAuth2
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.2'
4
4
  end
5
5
  end
@@ -24,8 +24,8 @@ describe Warden::OAuth2::Strategies::AccessingProtectedResource do
24
24
  it 'fails with invalid_client' do
25
25
  subject._run!
26
26
  subject.result.should == :failure
27
- subject.message.should == 'invalid_client'
28
- subject.error_status.should == 400
27
+ subject.message.should == 'token_required'
28
+ subject.error_status.should == 401
29
29
  subject.error_description.should_not be_empty
30
30
  end
31
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: warden-oauth2-strategies
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - AirService
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-04 00:00:00.000000000 Z
11
+ date: 2014-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: warden
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  version: '0'
128
128
  requirements: []
129
129
  rubyforge_project:
130
- rubygems_version: 2.2.1
130
+ rubygems_version: 2.1.11
131
131
  signing_key:
132
132
  specification_version: 4
133
133
  summary: OAuth 2.0 strategies for Warden