-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.schema.json
84 lines (82 loc) · 3.49 KB
/
config.schema.json
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "OAuth 2.0 Provider Configuration",
"type": "object",
"properties": {
"provider_name": {
"description": "Name of the OAuth 2.0 Provider",
"type": "string"
},
"provider_logo_url": {
"description": "URL to a logo of the Provider",
"type": "string"
},
"authorization_endpoint": {
"description": "Details about the Authorization Endpoint",
"type": "object",
"properties": {
"url": {
"description": "URL of the Authroization Endpoint",
"type": "string"
},
"query_parameters": {
"description": "Additional custom/non-spec query parameters",
"type": "object",
"patternProperties": {
".+": {
"description": "Details of a custom query parameter. The name of the property is the name of the query parameter.",
"type": "object",
"properties": {
"allowed_values": {
"description": "Values allowed ot be used for this parameter",
"type": "array",
"items": { "type": "string" }
},
"description": {
"description": "Description of the parameter and its effects",
"type": "string"
}
}
}
},
"additionalProperties": false
}
},
"required": ["url"]
}
},
"required": ["provider_name", "authorization_endpoint"]
}
===== atttibutes to define =====
{
"token_endpoint": {
"url": "https://www.googleapis.com/oauth2/v3/token", // URL to exchange the auth code
"supported_methods": ["POST"], // Supported HTTP methods
"prefered_request_content_type": "application/x-www-form-urlencoded", // Prefered MIME type of the data that can be passed in the body of requests to the token endpoint.
"default_response_content_type": "application/json" // MIME type of the data that is returned by the token endpoint by default.
},
"additional_endpoints": [ // Other endpoints that are related to OAuth
"https://www.googleapis.com/oauth2/v3/token": {"supported_methods": "GET", "description": "Returns the information about the access token. You have to provide an Access Token as a query parameter"}
],
"oauth2_version": ["draft_10", "draft_22", "final"],
"scopes": { // Available scopes with a description
"https://spreadsheets.google.com/feeds/": "Manage your spreadsheets."
...
},
"jwt_support": {
"supported_alg": "RS256",
"headers_parameters": [
"alg": {"mandatory": true, "allowed_values": ["RS256"]},
"typ": {"mandatory": true, "allowed_values": ["JWT"]}
],
"claim_names": [
"iss": {"mandatory": true, "description": "The email address of the service account."}, // For registered/public claim names you may add a description.
"scope" : {"mandatory": true, "description": "A space-delimited list of the permissions that the application requests."}, // For non-spec/private claim names you MUST add a description.
"aud": {"mandatory": true, "allowed_values": ["https://www.googleapis.com/oauth2/v3/token"]},
"exp": {"mandatory": true},
"iat": {"mandatory": true}
]
},
"supported_oauth_flow": ["implicit", "authorization_code", "jwt_bearer_token", "ext_android", "ext_post_message", "ext_installed_apps", "ext_authorization_code_oob"],
"app_registration_url": "https://console.developers.google.com"
}