Class: Kontena::Cli::Config::Account

Inherits:
OpenStruct
  • Object
show all
Includes:
ConfigurationInstance, Fields, TokenSerializer
Defined in:
lib/kontena/cli/config.rb

Instance Method Summary collapse

Methods included from ConfigurationInstance

#config

Methods included from Fields

#keys, #values_at

Instance Method Details

#to_hObject

Strip token info from master-account, the token is saved with the server.



557
558
559
560
561
562
563
564
565
# File 'lib/kontena/cli/config.rb', line 557

def to_h
  if self.name == 'master'
    super.to_h.reject do |k,_|
      [:url, :token, :refresh_token, :token_expires_at].include?(k)
    end
  else
    super
  end
end