Class: Wikiwiki::CLI::Commands::Auth
- Defined in:
- lib/wikiwiki/cli/commands/auth.rb
Overview
Authenticate and output JWT token
Instance Method Summary collapse
-
#call(out: $stdout, err: $stderr, **options) ⇒ void
Execute the auth command.
Instance Method Details
#call(out: $stdout, err: $stderr, **options) ⇒ void
This method returns an undefined value.
Execute the auth command
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/wikiwiki/cli/commands/auth.rb', line 16 def call(out: $stdout, err: $stderr, **) wiki = create_wiki(out:, err:, **) token = wiki.token if [:json] out.puts Formatter::JSON.new.format({"token" => token}) else out.puts token say("Authentication successful", out:, **) end end |