devise_oauth2_providable 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Devise
2
2
  module Oauth2Providable
3
- VERSION = "0.1.4"
3
+ VERSION = "0.1.5"
4
4
  end
5
5
  end
@@ -29,6 +29,7 @@ class TokenEndpoint
29
29
  return nil unless code.valid_request?(req)
30
30
  code.access_token.build
31
31
  when :password
32
+ return nil unless mapping.to.http_authenticatable? :database
32
33
  resource = mapping.to.find_for_authentication(mapping.to.authentication_keys.first => req.username)
33
34
  return nil unless resource
34
35
  valid = resource.valid_for_authentication? { resource.valid_password?(req.password) }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_oauth2_providable
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 4
10
- version: 0.1.4
9
+ - 5
10
+ version: 0.1.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Sonnek