mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 17:51:39 -05:00
16 lines
264 B
Ruby
16 lines
264 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Subscription::DecodeJwtToken
|
|
def initialize(token)
|
|
@token = token
|
|
end
|
|
|
|
def call
|
|
JWT.decode(
|
|
@token,
|
|
ENV['JWT_SECRET_KEY'],
|
|
true,
|
|
{ algorithm: 'HS256' }
|
|
).first.symbolize_keys
|
|
end
|
|
end
|