devise_api_auth 0.0.1 → 0.0.2

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: 8d64c0bde2b6418360e798e9f84644c4cce2f202
4
- data.tar.gz: 12a5b6bc4a801786d567d1c05f6535f89ec997f8
3
+ metadata.gz: bff800aff95bdf1cd752dcb5c38c412b5759c146
4
+ data.tar.gz: b27e4fbafb441c50b74af3f4a0571132cd4d9824
5
5
  SHA512:
6
- metadata.gz: 3f46f95e88fbf63cacc0b73f48637f10d3ca5749cdb76ec2b5ffa7b22d01fe7d494ef5b4e80c9c08c8ee144582dee135b862fb852f84c8157eadb64300b357a9
7
- data.tar.gz: 1643aa19a2f8a12787a57c2297614c8d3926676208d940a21048460c2eb069561987b6ff59952308c141adfc43752da6848a1d0eda04f02b2608d636b02e8542
6
+ metadata.gz: 0cea3eb170c9d54a7d01f9dd7d22b6e7a0ff4c71099b9d2a56fe652d1b0f3593766950b5b301f3384a329586257fce1ecd982a0b06e2a17b8de6437b881f5a20
7
+ data.tar.gz: 7a3ca779f8376c94767dd300d0cc9fb2c484cf929701c58a4371dfe70b0b3fdd0dd174e45e12e5b3e88fd40b7ecf2e150c76ece39fb3d01db624143417f177e1
@@ -4,7 +4,6 @@ require 'devise_api_auth/date_csrf'
4
4
  require 'devise_api_auth/token_utils'
5
5
 
6
6
  module DeviseApiAuth
7
- # VERSION = '0.0.1'
8
7
  end
9
8
 
10
9
 
@@ -7,7 +7,7 @@ module ApiTokenAuthentication
7
7
  end
8
8
 
9
9
  def authenticate!
10
- if _token_matcher.match! && !_user.nil?
10
+ if _token_matcher.match! && !_user.nil? && _validate_user
11
11
  success!(_user)
12
12
  else
13
13
  fail('Failed api token authentication')
@@ -33,7 +33,7 @@ module ApiTokenAuthentication
33
33
  end
34
34
 
35
35
  def _user_id
36
- _secure_credentials[:id]
36
+ _secure_credentials[_config_options[:model_id_attribute].to_sym]
37
37
  end
38
38
 
39
39
  def _secure_credentials
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_api_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jose Castellanos