mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
16 lines
255 B
Ruby
16 lines
255 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Subscription::EncodeJwtToken
|
|
def initialize(payload, secret_key)
|
|
@payload = payload
|
|
@secret_key = secret_key
|
|
end
|
|
|
|
def call
|
|
JWT.encode(
|
|
@payload,
|
|
@secret_key,
|
|
'HS256'
|
|
)
|
|
end
|
|
end
|