mumsnet_jwt 2.2.0 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mumsnet_jwt.rb +2 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aadd88b0e4d6ee25b320644656a96a4cd1c25f3a
4
- data.tar.gz: 5900c62cedc469bac4729db305f0aa9a5c9e3ca4
3
+ metadata.gz: 5f6ec1093764147022748cf5d437fa487872f7a0
4
+ data.tar.gz: f2398cbba22e01e763b62fe2d744588a498ccf40
5
5
  SHA512:
6
- metadata.gz: 4455ba7bac462958ae2a9f734c313e58ab0410aa9f0934ab003ee72a9f94d5b32381697a0e4203d1bf5778494775e14e0308301e2817d123a6cc1f6ba14cd261
7
- data.tar.gz: 538f877f8d8a1f29a22569eb39397f99a6c6801127019558e059bdfcf56d51b37e2b2fa2a74426df11cfa7ac2aabf0ab2363aed1886af974d86d272e42137f47
6
+ metadata.gz: d4bb19d5d78d1ed63f438be9b12adf105e7eb6ddeaa64ddd1ff67c4ce79762c9ad2598b7e77e91685ddbba3e056b67cba286083e75ba5717748a739b9e6d42f3
7
+ data.tar.gz: 7d9c5af7f5e07b4285ed478b100f6e60f0851906dcc6e3cc79da300223782b6a14e9e520ecf4b8249ba7f95dab7d49f0ed849dfef074ff13050d478c91ec19b2
data/lib/mumsnet_jwt.rb CHANGED
@@ -3,10 +3,10 @@ module MumsnetJWT
3
3
  require 'jwt'
4
4
  require 'json'
5
5
  require 'base64'
6
- DEFAULT_EXP = Time.now.utc.to_i + 60 * 60 * 24
7
6
  def tokenify(extra_payload: {})
8
7
  return false if env_defined?
9
- payload = { client_id: ENV['JWT_CLIENT_ID'], exp: DEFAULT_EXP }.merge(extra_payload)
8
+ exp = Time.now.utc.to_i + 60 * 60 * 24
9
+ payload = { client_id: ENV['JWT_CLIENT_ID'], exp: exp }.merge(extra_payload)
10
10
  JWT.encode payload, jwt_secret, 'HS256' unless jwt_secret.nil?
11
11
  end
12
12
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumsnet_jwt
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Murray Catto