mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add endpoints to oauth2 provider applications (#11718)
These will show up when configuring the application along with the client ID and everything else. Should make it easier to configure the application, otherwise you will have to go look up the URLs in the docs (which are not yet written). Co-authored-by: Steven Masley <stevenmasley@gmail.com>
This commit is contained in:
@@ -14,6 +14,18 @@ type OAuth2ProviderApp struct {
|
||||
Name string `json:"name"`
|
||||
CallbackURL string `json:"callback_url"`
|
||||
Icon string `json:"icon"`
|
||||
|
||||
// Endpoints are included in the app response for easier discovery. The OAuth2
|
||||
// spec does not have a defined place to find these (for comparison, OIDC has
|
||||
// a '/.well-known/openid-configuration' endpoint).
|
||||
Endpoints OAuth2AppEndpoints `json:"endpoints"`
|
||||
}
|
||||
|
||||
type OAuth2AppEndpoints struct {
|
||||
Authorization string `json:"authorization"`
|
||||
Token string `json:"token"`
|
||||
// DeviceAuth is optional.
|
||||
DeviceAuth string `json:"device_authorization"`
|
||||
}
|
||||
|
||||
// OAuth2ProviderApps returns the applications configured to authenticate using
|
||||
|
||||
Reference in New Issue
Block a user