red_token_auth 0.5.1 → 0.5.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: c2eced53b9e868ed493db9af6b2ec5dffaeae6a6
4
- data.tar.gz: 7f935d3e9bac36db410c14ee32259f766e88dbe8
3
+ metadata.gz: aef13fd2edcda81c3b5333e9820c871ba18b397b
4
+ data.tar.gz: 775d144b9d7e70aeea4c621a5a01cf02a91c7e41
5
5
  SHA512:
6
- metadata.gz: 74509f0d62352278470ef73734ab5ef383d1013b7e7b2dd0f8c8352e440f0201d66016cedb53c1c4caf2af7bff141c30bff267f8afa99a30eac6a11baff44a79
7
- data.tar.gz: 4997f9bbe4ab92b91fff89c5d7424b1cef6160adab6b2c80fe424a168d52a6d813ea677cf83cd001741f6242b754d32f0b711b41a3126350706971334a9dae21
6
+ metadata.gz: b467321147ff87a17fc66dd055085709bd9d51c3810e9a6a930ec67d3aef30aae2da2ba71fe39b53ddd715f4b8bf381b3a7a8d25f539d284ddf38bf0f54a22cd
7
+ data.tar.gz: c3f47a1799cee1eec0d13b729ddc11a76938f05aaa1a1544ccd500e313a4c5e636c6fa05e2525dba53150164fc0be7d5961698ca72b68919570d30ace3de36c7
data/README.md CHANGED
@@ -36,8 +36,6 @@ You'll be able to include the module in the model like so.
36
36
  class User
37
37
  include Mongoid::Document
38
38
  include RedTokenAuth
39
- # Include this if you intend to use OmniAuth
40
- include RedTokenAuth::Omniauthable
41
39
 
42
40
  # Mandatory fields for this gem.
43
41
  field :email, type: String
@@ -45,7 +43,6 @@ class User
45
43
  field :reset_password_token, type: String
46
44
  field :reset_password_token_sent_at, type: Time
47
45
  field :authentication_token, type: String
48
- # You'll need these fields if you are working with Omniauth.
49
46
  field :uid, type: String
50
47
  # Default must be "email".
51
48
  field :provider, type: String, default: "email"
@@ -24,6 +24,7 @@ module RedTokenAuth
24
24
  include SignInOut
25
25
  include Password
26
26
  include Validations
27
+ include Omniauthable
27
28
  end
28
29
 
29
30
  def self.configuration
@@ -12,7 +12,7 @@ module RedTokenAuth
12
12
  klass = resource.to_s.capitalize.constantize
13
13
 
14
14
  #TODO: make this query configurable.
15
- @resource = klass.where(email: request.headers["uid"]).first
15
+ @resource = klass.where(uid: request.headers["uid"]).first
16
16
 
17
17
  unless @resource && @resource.authenticate_token(request.headers["access-token"])
18
18
  render_unauthorized
@@ -1,3 +1,3 @@
1
1
  module RedTokenAuth
2
- VERSION = '0.5.1'
2
+ VERSION = '0.5.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: red_token_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caio Ergos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-27 00:00:00.000000000 Z
11
+ date: 2017-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -181,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
181
181
  version: '0'
182
182
  requirements: []
183
183
  rubyforge_project:
184
- rubygems_version: 2.6.11
184
+ rubygems_version: 2.6.12
185
185
  signing_key:
186
186
  specification_version: 4
187
187
  summary: Simple token based authentication for Mongoid.