Module: FIS

Defined in:
lib/fis.rb,
lib/fis/ui.rb,
lib/fis/cli.rb,
lib/fis/auth.rb,
lib/fis/command.rb,
lib/fis/version.rb,
lib/fis/cli/auth.rb,
lib/fis/auth/client.rb,
lib/fis/auth/runner.rb,
lib/fis/auth/server.rb,
lib/fis/client/base.rb,
lib/fis/client/user.rb,
lib/fis/configuration.rb,
lib/fis/cli/commands/login.rb,
lib/fis/cli/commands/logout.rb,
lib/fis/cli/commands/whoami.rb

Overview

PKCE modifies the standard authorization code grant. doorkeeper.gitbook.io/guides/ruby-on-rails/pkce-flow

Defined Under Namespace

Modules: Auth, CLI, Client Classes: Command, Configuration, Error, UI

Constant Summary collapse

VERSION =
'0.1.1'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.uiObject



33
34
35
# File 'lib/fis.rb', line 33

def ui
  @ui ||= UI.new(TTY::Prompt.new)
end

Class Method Details

.clientObject



41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/fis.rb', line 41

def client
  @client ||= begin
    token = config.fetch(:identity, :portal, :token)

    if token.nil? || token.empty?
      FIS.ui.newline
      FIS.ui.error("You're not logged in. Please run `fis auth login` to continue.")
      exit
    end

    Client::Base.new(token: token)
  end
end

.configObject



37
38
39
# File 'lib/fis.rb', line 37

def config
  @config ||= Configuration.new
end