morpho 1.1.0 → 1.1.1

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
  SHA256:
3
- metadata.gz: c7caf113b827232f529da9eae464def330b46e1f507d0a1e440aedc5325cf690
4
- data.tar.gz: 9a8163a9bd725cd0f525ab3bbfe50f084d91e2c98f92a4811641e2a39e08b5c2
3
+ metadata.gz: f1b8f7ef0ece2c917cec0876be3320c0116dbc38805527ace6eb9c1ce8e38236
4
+ data.tar.gz: 1d90f41b51f124122cb6c592c65646d25bad6279d936188b2fada30adbef4a21
5
5
  SHA512:
6
- metadata.gz: 6a446b9690227aa894fe7497a03e0c3d6ba743b2547b275a6c11c56eefe8361a05ccf5f5db1c3e690c4144dfd9d6216a8990c6470ae01637fb148ca31c44b093
7
- data.tar.gz: 2066ae49183978f79be5f0ba700657acee923d9e94807609a3a71305532b14f33e02fdeb94886eb413b53a3e53324e2e8ca7b6e6d9f340ebb2572b1ce229c2b6
6
+ metadata.gz: 3c1b55ef40e0c560cbf4a53b9f389be420f54749ebdd21390b359e22e318709cf20e1c3e45e0abfec6c40f06f7516269de4c16264a939ac6d09c37fe7ad438c0
7
+ data.tar.gz: 021b8958298735fec744065e88e095a404205c6959d3edd2badb68d996a34dbcf245494012b051c664b218eee642206e58e01238120f71bc0336ec92770c6537
@@ -18,13 +18,13 @@ module Morpho
18
18
  end
19
19
 
20
20
  def authentication_token
21
- @authentication_token ||= Morpho::JWT::AuthenticationToken.new(request)
21
+ @authentication_token ||= ::Morpho::JWT::AuthenticationToken.new(request)
22
22
  rescue
23
23
  nil
24
24
  end
25
25
 
26
26
  def token
27
- @token ||= Morpho::JWT::Token.new(authentication_token)
27
+ @token ||= ::Morpho::JWT::Token.new(authentication_token)
28
28
  rescue
29
29
  nil
30
30
  end
@@ -29,7 +29,7 @@ module Morpho
29
29
  when :not_found
30
30
  render_not_found({ base: I18n.t('morpho.api.messages.sign_in.not_found') })
31
31
  when :forbidden
32
- render_forbidden({ base: I18n.t('morpho.api.messages.sign_in.not_active') })
32
+ render_forbidden({ base: I18n.t('morpho.api.messages.sign_in.forbidden') })
33
33
  when :locked
34
34
  render_locked({ base: I18n.t('morpho.api.messages.sign_in.locked') })
35
35
  when :unauthorized
@@ -64,7 +64,7 @@ module Morpho
64
64
  end
65
65
 
66
66
  def authentication_token (options, **)
67
- options['token'] = Morpho::JWT::Payload.new(options['user.model'])
67
+ options['token'] = ::Morpho::JWT::Payload.new(options['user.model'])
68
68
  end
69
69
  end
70
70
  end
@@ -29,7 +29,7 @@ module Morpho
29
29
  end
30
30
 
31
31
  def authentication_token (options, **)
32
- options['token'] = Morpho::JWT::Payload.new(options['model'])
32
+ options['token'] = ::Morpho::JWT::Payload.new(options['model'])
33
33
  end
34
34
  end
35
35
  end
@@ -65,7 +65,7 @@ module Morpho
65
65
  end
66
66
 
67
67
  def authentication_token (options, **)
68
- options['token'] = Morpho::JWT::Payload.new(options['model'])
68
+ options['token'] = ::Morpho::JWT::Payload.new(options['model'])
69
69
  end
70
70
  end
71
71
  end
@@ -3,7 +3,7 @@ module Morpho
3
3
  def self.new(user)
4
4
  expires_at = Time.now.to_i + Morpho.config.jwt.expiration_time
5
5
  issued_at = Time.now.to_i
6
- token = Morpho::JWT::Encode.new({ exp: expires_at, iat: issued_at, email: user.email })
6
+ token = ::Morpho::JWT::Encode.new({ exp: expires_at, iat: issued_at, email: user.email })
7
7
 
8
8
  { authentication_token: token, expires_at: expires_at, refresh_token: user.refresh_token }
9
9
  end
@@ -2,7 +2,7 @@ module Morpho
2
2
  class JWT::Token
3
3
  def self.new(authentication_token)
4
4
  begin
5
- token = Morpho::JWT::Decode.new(authentication_token)
5
+ token = ::Morpho::JWT::Decode.new(authentication_token)
6
6
 
7
7
  HashWithIndifferentAccess.new(token.first)
8
8
  rescue
@@ -1,3 +1,3 @@
1
1
  module Morpho
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: morpho
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hugo Gilmar Erazo