warden-oauth2-strategies 0.0.8 → 0.0.9
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: a3b04b43a1ab21e63c96d813798df131ca000cd6
|
4
|
+
data.tar.gz: 13a5a55111b8e549714c0549c8a8e54752e6ce8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d43b39328c1c571dbe0918ed64a7bad19da8ee5d616f905fe3b18c60662afaf64fcd188d841a424b95aea9ee423dab9ffdf899947901ee7636f0f362408122da
|
7
|
+
data.tar.gz: dc5d9fae7c83be21f6b04d50ab6dafd890e7ab24016f1a35fc7f2f96e052b29bf3a193fb3f8287b6bc7c1dce427fab258ba90e5c9e1e67593aecf560fd03b76f
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Warden::OAuth2 [](https://travis-ci.org/airservice/warden-oauth2)
|
2
2
|
|
3
3
|
This is a fork of [original project](https://github.com/opperator/warden-oauth2) which is actually maintained.
|
4
4
|
This library provides a robust set of authorization strategies for
|
@@ -16,10 +16,10 @@ module Warden
|
|
16
16
|
def client_authenticated
|
17
17
|
if params['username'] && params['password']
|
18
18
|
valid_client = client.valid?(username: params['username'], password: params['password'])
|
19
|
-
valid_client ? super : fail(
|
19
|
+
valid_client ? super : fail('invalid_client')
|
20
20
|
else
|
21
|
-
fail
|
22
|
-
self.error_description =
|
21
|
+
fail('invalid_request')
|
22
|
+
self.error_description = 'Incorrect username or password'
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
@@ -32,14 +32,14 @@ describe Warden::OAuth2::Strategies::ResourceOwnerPasswordCredentials do
|
|
32
32
|
client_model.stub(locate: client_instance)
|
33
33
|
subject.stub(:params).and_return('client_id' => 'awesome', 'username' => 'someuser', 'password' => 'incorrect')
|
34
34
|
subject._run!
|
35
|
-
subject.message.should ==
|
35
|
+
subject.message.should == 'invalid_client'
|
36
36
|
subject.error_status.should == 401
|
37
37
|
end
|
38
38
|
it 'should fail if username and password are not provided' do
|
39
39
|
client_model.stub(locate: double)
|
40
40
|
subject.stub(:params).and_return('client_id' => 'awesome')
|
41
41
|
subject._run!
|
42
|
-
subject.message.should ==
|
42
|
+
subject.message.should == 'invalid_request'
|
43
43
|
subject.error_status.should == 400
|
44
44
|
subject.error_description.should_not be_empty
|
45
45
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: warden-oauth2-strategies
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AirService
|
@@ -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.
|
130
|
+
rubygems_version: 2.2.2
|
131
131
|
signing_key:
|
132
132
|
specification_version: 4
|
133
133
|
summary: OAuth 2.0 strategies for Warden
|