-
-
Notifications
You must be signed in to change notification settings - Fork 223
Expand file tree
/
Copy pathoauth_v2_user.rb
More file actions
26 lines (25 loc) · 1.57 KB
/
oauth_v2_user.rb
File metadata and controls
26 lines (25 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake
module Slack
module Cli
class App
desc 'OauthV2User methods.'
command 'oauth_v2_user' do |g|
g.desc 'Exchanges a temporary OAuth verifier code for a user access token.'
g.long_desc %( Exchanges a temporary OAuth verifier code for a user 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 'code_verifier', desc: 'The code_verifier param used to generate the code_challenge originally. Used for PKCE.'
c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
c.flag 'grant_type', desc: 'The grant_type param as described in the OAuth spec.'
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.oauth_v2_user_access(options))
end
end
end
end
end
end