acts_as_hoc_user 1.0.5 → 1.0.6

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: 84d52cb850c3ccf03e9f140ff62d46a500eaa987
4
- data.tar.gz: 328385427cf08a7138231973037d89d74c7b9e8f
3
+ metadata.gz: 3b20255425db981229b49aa8c7ed524196d54a3c
4
+ data.tar.gz: 1020d43895c0e99f8e3d38c17431e25fbc958d55
5
5
  SHA512:
6
- metadata.gz: 7b88bf942bcccd322362eb17f0ba8ecb993e9d0660c37762f4c49ddb81484bb157800ffd55c5fb8c7abd2c3f239705e58dc5456a96fad0e58ef6a8c8282bd410
7
- data.tar.gz: fc447951930ec00aa25bc1d32a46ea1d1a8e93d447f865818e90b8fc1a145bdbffa21999743013d83f57953c9037d55944f43e5e2a16e5b1d0ad9ce9102625c3
6
+ metadata.gz: d751125490e6e4dfadc7e05a162ed0872661e3c9253831f9c1054115124c6aebcc3e3967297ad44499cbce68f7ea08bd4426fd13c404952aaba3797eb80f7fe3
7
+ data.tar.gz: 73785b7486d518ed5286b3901b83e7c64c9b4998ca6b2f962a223818062ad691f1cf47b9d7ca08163f0289c73b4f880b76c233b0c3b5a917d5a4a8f51659cf72
@@ -4,11 +4,11 @@ module ActsAsHocUser
4
4
  class << self
5
5
  def encode(payload, exp = 48.hours.from_now)
6
6
  payload[:exp] = exp.to_i
7
- JWT.encode(payload, Rails.application.secrets.secret_key_base)
7
+ JWT.encode(payload, Rails.application.config.acts_as_hoc_user_secret)
8
8
  end
9
9
 
10
10
  def decode(token)
11
- body = JWT.decode(token, Rails.application.secrets.secret_key_base)[0]
11
+ body = JWT.decode(token, Rails.application.config.acts_as_hoc_user_secret)[0]
12
12
  HashWithIndifferentAccess.new body
13
13
  rescue
14
14
  nil
@@ -1,3 +1,3 @@
1
1
  module ActsAsHocUser
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
@@ -1,3 +1,4 @@
1
1
  ActsAsHocUser.configure do |config|
2
2
  config.min_password_length = 6
3
+ config.acts_as_hoc_user_secret = "replace me"
3
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_hoc_user
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gert Lavsen