Sha256: a48a46c137a317d339e63a4b88707d6b2bbeef12b381e71ee849027be6738ad8

Contents?: true

Size: 458 Bytes

Versions: 27

Compression:

Stored size: 458 Bytes

Contents

# encoding: utf-8

module FIR
  module Login
    def login(token)
      check_token_cannot_be_blank token

      user_info = fetch_user_info(token)

      logger.info "Login succeed, previous user's email: #{config[:email]}" unless config.blank?
      write_config(email: user_info.fetch(:email, ''), token: token)
      reload_config
      logger.info "Login succeed, current  user's email: #{config[:email]}"
      logger_info_blank_line
    end
  end
end

Version data entries

27 entries across 27 versions & 3 rubygems

Version Path
fir-cli-xsl-2.0.3 lib/fir/util/login.rb
fir-cli-2.0.0 lib/fir/util/login.rb
fir-cli-2.0.0.beta3 lib/fir/util/login.rb
fir-cli-xsl-2.0.2 lib/fir/util/login.rb
fir-cli-2.0.0.beta2 lib/fir/util/login.rb
fir-cli-2.0.0.beta lib/fir/util/login.rb
fir-cli-1.7.4.1 lib/fir/util/login.rb
fir-cli-1.7.4 lib/fir/util/login.rb
fir-cli-1.7.3 lib/fir/util/login.rb
fir-cli-xsl-2.0.1 lib/fir/util/login.rb
fir-cli-xsl-2.0.0 lib/fir/util/login.rb
fir-cli-xsl-1.0.4 lib/fir/util/login.rb
fir-cli-x-1.7.2.1 lib/fir/util/login.rb
fir-cli-1.7.2 lib/fir/util/login.rb
fir-cli-1.7.1 lib/fir/util/login.rb
fir-cli-1.7.0 lib/fir/util/login.rb
fir-cli-1.6.13 lib/fir/util/login.rb
fir-cli-1.6.12 lib/fir/util/login.rb
fir-cli-1.6.11 lib/fir/util/login.rb
fir-cli-1.6.10 lib/fir/util/login.rb