Class: JwtCli::Runner

Inherits:
Thor
  • Object
show all
Defined in:
lib/jwt_cli/runner.rb

Instance Method Summary collapse

Instance Method Details

#startObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/jwt_cli/runner.rb', line 4

def start
  say 'Starting with Json Web Tokens generation.'

  builder = JwtCli::InputBuilder.new
  builder.add_user_id
  ask_for_email(builder)
  ask_for_additional_info(builder)
  payload = builder.build

  token = JwtCli::Token.generate(payload)
  Clipboard.copy(token)

  say 'The JWT has been copied to your clipboard!'
end