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

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

Instance Method Summary collapse

Methods included from ConfigurationInstance

#config

Instance Method Details

#to_h ⇒ Object

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



475
476
477
478
479
480
481
482
483
# File 'lib/kontena/cli/config.rb', line 475

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