summaryrefslogtreecommitdiff
path: root/app/controllers/services/token_generation_service.rb
blob: 2df2ea639580c71db4d81e5bf9789958d2242df4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

module Services
  # The service responsible for JWT generation.
  class TokenGenerationService
    def initialize(params)
      @email = params[:email]
      @role = params[:role]
    end

    private

    def payload
      { data: @email, aud: @role }
    end
  end
end