Sha256: d0c219651860784e1bafeaf06a1e7dab9cba340f4801c5c9c6cda2bec1ca0e8f

Contents?: true

Size: 1.37 KB

Versions: 1

Compression:

Stored size: 1.37 KB

Contents

# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake

module Slack
  module Cli
    class App
      desc 'Oauth methods.'
      command 'oauth' do |g|
        g.desc 'Exchanges a temporary OAuth verifier code for an access token.'
        g.long_desc %( Exchanges a temporary OAuth verifier code for an access token. )
        g.command 'access' do |c|
          c.flag 'client_id', desc: 'Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.'
          c.flag 'client_secret', desc: 'Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.'
          c.flag 'code', desc: 'The code param returned via the OAuth callback.'
          c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
          c.flag 'single_channel', desc: 'Request the user to add your app only to a single channel. Only valid with a legacy workspace app.'
          c.action do |_global_options, options, _args|
            puts JSON.dump(@client.oauth_access(options))
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
slack-ruby-client-2.4.0 bin/commands/oauth.rb