-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgithub-oauth.yaml
More file actions
64 lines (60 loc) · 1.61 KB
/
Copy pathgithub-oauth.yaml
File metadata and controls
64 lines (60 loc) · 1.61 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# GitHub OAuth Example
#
# Setup:
# 1. Create a GitHub OAuth App at https://github.com/settings/developers
# - Set "Authorization callback URL" to http://127.0.0.1 (any port)
# 2. Store your credentials:
# factorly vault set GITHUB_CLIENT_ID "Iv1.xxx"
# factorly vault set GITHUB_CLIENT_SECRET "xxx"
# 3. Login:
# factorly auth login github
# 4. Use:
# factorly call github.repos --per_page 5
# factorly call github.profile
oauth_providers:
github:
client_id: {{vault:GITHUB_CLIENT_ID}}
client_secret: {{vault:GITHUB_CLIENT_SECRET}}
auth_url: https://github.com/login/oauth/authorize
token_url: https://github.com/login/oauth/access_token
scopes: ["repo", "read:user"]
tools:
github.repos:
type: rest
description: "List your repositories"
base_url: https://api.github.com
method: GET
path: /user/repos
auth:
type: oauth
provider: github
parameters:
- name: per_page
in: query
- name: sort
in: query
description: "Sort by: created, updated, pushed, full_name"
github.profile:
type: rest
description: "Get your GitHub profile"
base_url: https://api.github.com
method: GET
path: /user
auth:
type: oauth
provider: github
github.starred:
type: rest
description: "List your starred repositories"
base_url: https://api.github.com
method: GET
path: /user/starred
auth:
type: oauth
provider: github
parameters:
- name: per_page
in: query
- name: sort
in: query
description: "Sort by: created, updated"