solidus_jwt 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 780275b1ea2a6b627290d2c6b5dd4d5f78e7d977
4
- data.tar.gz: b04f13bd9c346d80af9d2da217d0de7728d1cdec
3
+ metadata.gz: 20a8812041640dfdc3cc4e17aa167507f99fd01b
4
+ data.tar.gz: 8005596f40d291047b2c940abd721b9bb57776b7
5
5
  SHA512:
6
- metadata.gz: eb1830caa1c3ac263c4718178b6558eb9f8a1040330f2ad78d38a6cc2b9723d6b1932c8ad75890cae6a60b49b250b54174a8140b60718cdc8acb83ac04ad320c
7
- data.tar.gz: ff34c666903253b254b6ff71590341d4cadae3086b490ee1391c80c7ed46188a7fad46b25531bcb255252019deb34602d8a37828a9678173f05809c7c105fdd2
6
+ metadata.gz: c120947ba2b1adf7b57d0128bcc32c35ffd13758f91c52a705221b138e4851bb9e7f58841216a1e2edfe85b68096efdea495493b63003ebc9f8b234da20eaa33
7
+ data.tar.gz: ea576aff33c96f219989f760fdbaed27393a76270ed99090a091138fdf5856b0622e7bcb0f0e428688ff4756286011951166abe24bc9ff4a6233ab2b76c0da73
data/README.md CHANGED
@@ -27,6 +27,8 @@ bundle exec rails g solidus_jwt:install
27
27
  Configuration
28
28
  -------------
29
29
  ```ruby
30
+ # config/initializers/solidus_jwt.rb
31
+
30
32
  SolidusJwt::Config.configure do |config|
31
33
  config.jwt_secret = 'secret'
32
34
  config.allow_spree_api_key = true
@@ -11,9 +11,10 @@ module SolidusJwt
11
11
  #
12
12
  def encode(payload:, expires_in: nil)
13
13
  # @see https://github.com/jwt/ruby-jwt#support-for-reserved-claim-names
14
+ current_time = Time.current.to_i
14
15
  extras = {}
15
- extras['exp'] = Time.current.to_i + expires_in if expires_in.present?
16
- extras['iat'] = Time.current
16
+ extras['exp'] = current_time + expires_in if expires_in.present?
17
+ extras['iat'] = current_time
17
18
 
18
19
  payload = extras.merge(payload).as_json
19
20
  JWT.encode(payload, SolidusJwt::Config.jwt_secret,
@@ -1,7 +1,7 @@
1
1
  module SolidusJwt
2
2
  MAJOR = 0
3
3
  MINOR = 0
4
- PATCH = 1
4
+ PATCH = 2
5
5
  PRERELEASE = nil
6
6
 
7
7
  def self.version
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_jwt
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
  - Taylor Scott
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-12 00:00:00.000000000 Z
11
+ date: 2019-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: solidus_core
@@ -236,16 +236,16 @@ dependencies:
236
236
  name: sqlite3
237
237
  requirement: !ruby/object:Gem::Requirement
238
238
  requirements:
239
- - - ">="
239
+ - - "~>"
240
240
  - !ruby/object:Gem::Version
241
- version: '0'
241
+ version: 1.3.6
242
242
  type: :development
243
243
  prerelease: false
244
244
  version_requirements: !ruby/object:Gem::Requirement
245
245
  requirements:
246
- - - ">="
246
+ - - "~>"
247
247
  - !ruby/object:Gem::Version
248
- version: '0'
248
+ version: 1.3.6
249
249
  description: Add Json Web Tokens to Solidus API
250
250
  email: t.skukx@gmail.com
251
251
  executables: []