warden-oauth2-strategies 0.0.8 → 0.0.9

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: d058d337570bf20c44cf52997b3354f8a91b90f9
4
- data.tar.gz: 8adef9735a0c873a7654bbefa8be3f4ec97a3aae
3
+ metadata.gz: a3b04b43a1ab21e63c96d813798df131ca000cd6
4
+ data.tar.gz: 13a5a55111b8e549714c0549c8a8e54752e6ce8d
5
5
  SHA512:
6
- metadata.gz: 70bb686e79781c318eb6fa3b4c2d8f7f46b899c08352747b8eef7b22cd1c9f63ed3a8b5727d9ed82ea8cf271b2c3ed4e8daeae8b0a43f741bfa05494b0d5875c
7
- data.tar.gz: 27a76dc67de1cc68edd4046cecf00b4fe39eddbf58afaa8f4830ae5ac5041234093913c1c7fb8f57d1bf124de9528b63ecb1415db2c9ef021ba3e7a676fa66d5
6
+ metadata.gz: d43b39328c1c571dbe0918ed64a7bad19da8ee5d616f905fe3b18c60662afaf64fcd188d841a424b95aea9ee423dab9ffdf899947901ee7636f0f362408122da
7
+ data.tar.gz: dc5d9fae7c83be21f6b04d50ab6dafd890e7ab24016f1a35fc7f2f96e052b29bf3a193fb3f8287b6bc7c1dce427fab258ba90e5c9e1e67593aecf560fd03b76f
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Warden::OAuth2 [![CI Status](https://secure.travis-ci.org/airservice/warden-oauth2.png)](http://travis-ci.org/airservice/warden-oauth2)
1
+ # Warden::OAuth2 [![Build Status](https://travis-ci.org/airservice/warden-oauth2.svg?branch=master)](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("invalid_client")
19
+ valid_client ? super : fail('invalid_client')
20
20
  else
21
- fail "invalid_request"
22
- self.error_description = "username or password are not provided"
21
+ fail('invalid_request')
22
+ self.error_description = 'Incorrect username or password'
23
23
  end
24
24
  end
25
25
  end
@@ -1,5 +1,5 @@
1
1
  module Warden
2
2
  module OAuth2
3
- VERSION = '0.0.8'
3
+ VERSION = '0.0.9'
4
4
  end
5
5
  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 == "invalid_client"
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 == "invalid_request"
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.8
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.1.11
130
+ rubygems_version: 2.2.2
131
131
  signing_key:
132
132
  specification_version: 4
133
133
  summary: OAuth 2.0 strategies for Warden