|
1 | 1 | package dex
|
2 | 2 |
|
| 3 | +// OpenIDConfiguration represents the OpenID Connect discovery document. |
| 4 | +// Every OIDC provider must provide a valid OpenIDConfiguration. |
| 5 | +// This struct contains all the necessary information for a client to interact with an OIDC provider - in this case, Dex. |
3 | 6 | type OpenIDConfiguration struct {
|
4 |
| - Issuer string `json:"issuer,omitzero"` |
5 |
| - AuthorizationEndpoint string `json:"authorization_endpoint,omitzero"` |
6 |
| - TokenEndpoint string `json:"token_endpoint,omitzero"` |
7 |
| - JwksURI string `json:"jwks_uri,omitzero"` |
8 |
| - UserinfoEndpoint string `json:"userinfo_endpoint,omitzero"` |
9 |
| - DeviceAuthorizationEndpoint string `json:"device_authorization_endpoint,omitzero"` |
10 |
| - IntrospectionEndpoint string `json:"introspection_endpoint,omitzero"` |
11 |
| - GrantTypesSupported []string `json:"grant_types_supported,omitempty"` |
12 |
| - ResponseTypesSupported []string `json:"response_types_supported,omitempty"` |
13 |
| - SubjectTypesSupported []string `json:"subject_types_supported,omitempty"` |
14 |
| - IDTokenSigningAlgValues []string `json:"id_token_signing_alg_values_supported,omitempty"` |
15 |
| - CodeChallengeMethods []string `json:"code_challenge_methods_supported,omitempty"` |
16 |
| - ScopesSupported []string `json:"scopes_supported,omitempty"` |
17 |
| - TokenEndpointAuthMethods []string `json:"token_endpoint_auth_methods_supported,omitempty"` |
18 |
| - ClaimsSupported []string `json:"claims_supported,omitempty"` |
| 7 | + // Issuer - name of the issuer, typically http://localhost:5556 |
| 8 | + Issuer string `json:"issuer,omitzero"` |
| 9 | + // AuthorizationEndpoint - endpoint for authorization requests |
| 10 | + AuthorizationEndpoint string `json:"authorization_endpoint,omitzero"` |
| 11 | + // TokenEndpoint - endpoint for token requests (e.g. when using client credentials) |
| 12 | + TokenEndpoint string `json:"token_endpoint,omitzero"` |
| 13 | + // JWKSURI - endpoint for JSON Web Key Set (JWKS) requests |
| 14 | + JWKSURI string `json:"jwks_uri,omitzero"` |
| 15 | + // UserInfoEndpoint - endpoint for user info requests |
| 16 | + UserinfoEndpoint string `json:"userinfo_endpoint,omitzero"` |
| 17 | + // DeviceAuthorizationEndpoint - endpoint for device authorization requests |
| 18 | + DeviceAuthorizationEndpoint string `json:"device_authorization_endpoint,omitzero"` |
| 19 | + // IntrospectionEndpoint - endpoint for token introspection requests |
| 20 | + IntrospectionEndpoint string `json:"introspection_endpoint,omitzero"` |
| 21 | + // GrantTypesSupported - list of grant types this provider supports |
| 22 | + GrantTypesSupported []string `json:"grant_types_supported,omitempty"` |
| 23 | + // ResponseTypesSupported - list of response types this provider supports |
| 24 | + ResponseTypesSupported []string `json:"response_types_supported,omitempty"` |
| 25 | + // SubjectTypesSupported - list of subject types this provider supports |
| 26 | + SubjectTypesSupported []string `json:"subject_types_supported,omitempty"` |
| 27 | + // IDTokenSigningAlgValues - list of signing algorithms this provider supports for ID tokens |
| 28 | + IDTokenSigningAlgValues []string `json:"id_token_signing_alg_values_supported,omitempty"` |
| 29 | + // CodeChallengeMethods - list of code challenge methods this provider supports |
| 30 | + CodeChallengeMethods []string `json:"code_challenge_methods_supported,omitempty"` |
| 31 | + // ScopesSupported - list of scopes this provider supports |
| 32 | + ScopesSupported []string `json:"scopes_supported,omitempty"` |
| 33 | + // TokenEndpointAuthMethods - list of token endpoint authentication methods this provider supports |
| 34 | + TokenEndpointAuthMethods []string `json:"token_endpoint_auth_methods_supported,omitempty"` |
| 35 | + // ClaimsSupported - list of claims this provider supports |
| 36 | + ClaimsSupported []string `json:"claims_supported,omitempty"` |
19 | 37 | }
|
0 commit comments