Sha256: ae531b65bcf6cdbe3f1ad5faa9be554bfcab68b6c03240bdf22849f2bcf48a86

Contents?: true

Size: 1.49 KB

Versions: 4

Compression:

Stored size: 1.49 KB

Contents

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

module Slack
  module Cli
    class App
      desc 'OpenidConnect methods.'
      command 'openid_connect' do |g|
        g.desc 'Exchanges a temporary OAuth verifier code for an access token for Sign in with Slack.'
        g.long_desc %( Exchanges a temporary OAuth verifier code for an access token for Sign in with Slack. )
        g.command 'token' do |c|
          c.flag 'client_id', desc: 'Issued when you created your application.'
          c.flag 'client_secret', desc: 'Issued when you created your application.'
          c.flag 'code', desc: 'The code param returned via the OAuth callback.'
          c.flag 'grant_type', desc: 'The grant_type param as described in the OAuth spec.'
          c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
          c.flag 'refresh_token', desc: 'The refresh_token param as described in the OAuth spec.'
          c.action do |_global_options, options, _args|
            puts JSON.dump(@client.openid_connect_token(options))
          end
        end

        g.desc 'Get the identity of a user who has authorized Sign in with Slack.'
        g.long_desc %( Get the identity of a user who has authorized Sign in with Slack. )
        g.command 'userInfo' do |c|
          c.action do |_global_options, options, _args|
            puts JSON.dump(@client.openid_connect_userInfo(options))
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
slack-ruby-client-2.4.0 bin/commands/openid_connect.rb
slack-ruby-client-2.3.0 bin/commands/openid_connect.rb
slack-ruby-client-2.2.0 bin/commands/openid_connect.rb
slack-ruby-client-2.1.0 bin/commands/openid_connect.rb