Sha256: a014316e31671ae37dea6bcd0d22fbee175de3059de409fe22c28ce875d51ef0

Contents?: true

Size: 459 Bytes

Versions: 43

Compression:

Stored size: 459 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

43 entries across 43 versions & 2 rubygems

Version Path
omt-cli-1.7.1 lib/fir/util/login.rb
omt-cli-1.7.0 lib/fir/util/login.rb
omt-cli-1.6.9 lib/fir/util/login.rb
omt-cli-1.6.8 lib/fir/util/login.rb
omt-cli-1.6.7 lib/fir/util/login.rb
omt-cli-1.6.6 lib/fir/util/login.rb
omt-cli-1.6.5 lib/fir/util/login.rb
omt-cli-1.6.4 lib/fir/util/login.rb
fir-cli-1.6.4 lib/fir/util/login.rb
fir-cli-1.6.4.beta1 lib/fir/util/login.rb
fir-cli-1.6.3 lib/fir/util/login.rb
fir-cli-1.6.2 lib/fir/util/login.rb
fir-cli-1.6.1 lib/fir/util/login.rb
fir-cli-1.6.0 lib/fir/util/login.rb
fir-cli-1.5.1 lib/fir/util/login.rb
fir-cli-1.5.0 lib/fir/util/login.rb
fir-cli-1.4.9 lib/fir/util/login.rb
fir-cli-1.4.8 lib/fir/util/login.rb
fir-cli-1.4.7 lib/fir/util/login.rb
fir-cli-1.4.6 lib/fir/util/login.rb