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 +4 -4
- data/app/api/morpho/helpers/jwt_utils.rb +2 -2
- data/app/api/morpho/resources/tokens.rb +1 -1
- data/app/concepts/morpho/user/operation/external_sign_in.rb +1 -1
- data/app/concepts/morpho/user/operation/refresh_token.rb +1 -1
- data/app/concepts/morpho/user/operation/sign_in.rb +1 -1
- data/app/services/morpho/jwt/payload.rb +1 -1
- data/app/services/morpho/jwt/token.rb +1 -1
- data/lib/morpho/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1b8f7ef0ece2c917cec0876be3320c0116dbc38805527ace6eb9c1ce8e38236
|
4
|
+
data.tar.gz: 1d90f41b51f124122cb6c592c65646d25bad6279d936188b2fada30adbef4a21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
@@ -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
|
data/lib/morpho/version.rb
CHANGED