Sha256: b232b222bf8aa868c16b54f91f65ec17570faa88b9bbf87f7b423c4acdf2f784

Contents?: true

Size: 615 Bytes

Versions: 20

Compression:

Stored size: 615 Bytes

Contents

require 'shopify_cli'

module ShopifyCli
  module Commands
    class Logout < ShopifyCli::Command
      LOGIN_TOKENS = [
        :identity_access_token, :identity_refresh_token, :identity_exchange_token,
        :admin_access_token, :admin_refresh_token, :admin_exchange_token
      ]

      def call(*)
        LOGIN_TOKENS.each do |token|
          ShopifyCli::DB.del(token) if ShopifyCli::DB.exists?(token)
        end
        @ctx.puts(@ctx.message('core.logout.success'))
      end

      def self.help
        ShopifyCli::Context.message('core.logout.help', ShopifyCli::TOOL_NAME)
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
shopify-cli-1.6.0 lib/shopify-cli/commands/logout.rb
shopify-cli-1.5.0 lib/shopify-cli/commands/logout.rb
shopify-cli-1.4.1 lib/shopify-cli/commands/logout.rb
shopify-cli-1.4.0 lib/shopify-cli/commands/logout.rb
shopify-cli-1.3.1 lib/shopify-cli/commands/logout.rb
shopify-cli-1.3.0 lib/shopify-cli/commands/logout.rb
shopify-cli-1.2.0 lib/shopify-cli/commands/logout.rb
shopify-cli-1.1.2 lib/shopify-cli/commands/logout.rb
shopify-cli-1.1.1 lib/shopify-cli/commands/logout.rb
shopify-cli-1.1.0 lib/shopify-cli/commands/logout.rb
shopify-cli-1.0.5 lib/shopify-cli/commands/logout.rb
shopify-cli-1.0.4 lib/shopify-cli/commands/logout.rb
shopify-cli-1.0.3 lib/shopify-cli/commands/logout.rb
shopify-cli-1.0.2 lib/shopify-cli/commands/logout.rb
shopify-cli-1.0.1 lib/shopify-cli/commands/logout.rb
shopify-cli-1.0.0 lib/shopify-cli/commands/logout.rb
shopify-cli-0.9.3 lib/shopify-cli/commands/logout.rb
shopify-cli-0.9.2 lib/shopify-cli/commands/logout.rb
shopify-cli-0.9.1 lib/shopify-cli/commands/logout.rb
shopify-cli-0.9.0 lib/shopify-cli/commands/logout.rb