diff options
author | HombreLaser <sebastian-440@live.com> | 2023-02-24 23:25:26 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2023-02-24 23:25:26 -0600 |
commit | e1a240c563b0e10e0ceae7c167fdcde752f3d865 (patch) | |
tree | 05408f95e5896f243bcd010dd01153ad78f35d7d /app/controllers/services | |
parent | 0307ed7be55784cc54a2055c22bc5465405832ea (diff) |
Añade autenticación
Diffstat (limited to 'app/controllers/services')
-rw-r--r-- | app/controllers/services/token_generation_service.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/services/token_generation_service.rb b/app/controllers/services/token_generation_service.rb index b1bc10a..94f9907 100644 --- a/app/controllers/services/token_generation_service.rb +++ b/app/controllers/services/token_generation_service.rb @@ -6,6 +6,7 @@ module Services def initialize(params) @email = params[:email] @role = params[:role] + @session_key = params[:session_key] end def call(expiration) @@ -15,7 +16,7 @@ module Services private def payload - { data: @email, aud: @role } + { data: @email, aud: @role, jti: @session_key } end end end |