Class: WithAccounts::Jwts::CreateToken

Inherits:
LetsDoThis::Act
  • Object
show all
Defined in:
app/scenarios/with_accounts/jwts/create_token.rb

Constant Summary collapse

HMAC_SECRET =
ENV.fetch('HMAC_SECRET', 'stemporalyasdasdasdasdasdjdhfjds').byteslice(0..31)

Instance Method Summary collapse

Instance Method Details

#instructions(stage) ⇒ Object



5
6
7
# File 'app/scenarios/with_accounts/jwts/create_token.rb', line 5

def instructions(stage)
  { new_token: (JWT.encode stage.payload, HMAC_SECRET, 'HS256') }
end