github.com/icyphox/x@v0.0.355-0.20220311094250-029bd783e8b8/configx/stub/nested-array/config.schema.json (about) 1 { 2 "$schema": "http://json-schema.org/draft-07/schema#", 3 "properties": { 4 "providers": { 5 "title": "OpenID Connect and OAuth2 Providers", 6 "description": "A list and configuration of OAuth2 and OpenID Connect providers ORY Kratos should integrate with.", 7 "type": "array", 8 "items": { 9 "type": "object", 10 "properties": { 11 "id": { 12 "type": "string", 13 "examples": [ 14 "google" 15 ] 16 }, 17 "provider": { 18 "title": "Provider", 19 "description": "Can be one of github, gitlab, generic, google, microsoft, discord.", 20 "type": "string", 21 "enum": [ 22 "github", 23 "gitlab", 24 "generic", 25 "google", 26 "microsoft", 27 "discord" 28 ], 29 "examples": [ 30 "google" 31 ] 32 }, 33 "client_id": { 34 "type": "string" 35 }, 36 "client_secret": { 37 "type": "string" 38 }, 39 "issuer_url": { 40 "type": "string", 41 "format": "uri", 42 "examples": [ 43 "https://accounts.google.com" 44 ] 45 }, 46 "auth_url": { 47 "type": "string", 48 "format": "uri", 49 "examples": [ 50 "https://accounts.google.com/o/oauth2/v2/auth" 51 ] 52 }, 53 "token_url": { 54 "type": "string", 55 "format": "uri", 56 "examples": [ 57 "https://www.googleapis.com/oauth2/v4/token" 58 ] 59 }, 60 "mapper_url": { 61 "title": "Jsonnet Mapper URL", 62 "description": "The URL where the jsonnet source is located for mapping the provider's data to ORY Kratos data.", 63 "type": "string", 64 "format": "uri", 65 "examples": [ 66 "file://path/to/oidc.jsonnet", 67 "https://foo.bar.com/path/to/oidc.jsonnet", 68 "base64://bG9jYWwgc3ViamVjdCA9I..." 69 ] 70 }, 71 "scope": { 72 "type": "array", 73 "items": { 74 "type": "string", 75 "examples": [ 76 "offline_access", 77 "profile" 78 ] 79 } 80 }, 81 "tenant": { 82 "title": "Azure AD Tenant", 83 "description": "The Azure AD Tenant to use for authentication.", 84 "type": "string", 85 "examples": [ 86 "common", 87 "organizations", 88 "consumers", 89 "8eaef023-2b34-4da1-9baa-8bc8c9d6a490", 90 "contoso.onmicrosoft.com" 91 ] 92 } 93 }, 94 "additionalProperties": false, 95 "required": [], 96 "if": { 97 "properties": { 98 "provider": { 99 "const": "microsoft" 100 } 101 }, 102 "required": [ 103 "provider" 104 ] 105 }, 106 "then": { 107 "required": [ 108 "tenant" 109 ] 110 }, 111 "else": { 112 "not": { 113 "properties": { 114 "tenant": {} 115 }, 116 "required": [ 117 "tenant" 118 ] 119 } 120 } 121 } 122 } 123 } 124 }