mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00: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:
38
docs/api/enterprise.md
generated
38
docs/api/enterprise.md
generated
@ -454,6 +454,11 @@ curl -X GET http://coder-server:8080/api/v2/oauth2-provider/apps \
|
||||
[
|
||||
{
|
||||
"callback_url": "string",
|
||||
"endpoints": {
|
||||
"authorization": "string",
|
||||
"device_authorization": "string",
|
||||
"token": "string"
|
||||
},
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"name": "string"
|
||||
@ -471,13 +476,17 @@ curl -X GET http://coder-server:8080/api/v2/oauth2-provider/apps \
|
||||
|
||||
Status Code **200**
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ---------------- | ------------ | -------- | ------------ | ----------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» callback_url` | string | false | | |
|
||||
| `» icon` | string | false | | |
|
||||
| `» id` | string(uuid) | false | | |
|
||||
| `» name` | string | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------------------- | -------------------------------------------------------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» callback_url` | string | false | | |
|
||||
| `» endpoints` | [codersdk.OAuth2AppEndpoints](schemas.md#codersdkoauth2appendpoints) | false | | 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). |
|
||||
| `»» authorization` | string | false | | |
|
||||
| `»» device_authorization` | string | false | | Device authorization is optional. |
|
||||
| `»» token` | string | false | | |
|
||||
| `» icon` | string | false | | |
|
||||
| `» id` | string(uuid) | false | | |
|
||||
| `» name` | string | false | | |
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
|
||||
@ -518,6 +527,11 @@ curl -X POST http://coder-server:8080/api/v2/oauth2-provider/apps \
|
||||
```json
|
||||
{
|
||||
"callback_url": "string",
|
||||
"endpoints": {
|
||||
"authorization": "string",
|
||||
"device_authorization": "string",
|
||||
"token": "string"
|
||||
},
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"name": "string"
|
||||
@ -558,6 +572,11 @@ curl -X GET http://coder-server:8080/api/v2/oauth2-provider/apps/{app} \
|
||||
```json
|
||||
{
|
||||
"callback_url": "string",
|
||||
"endpoints": {
|
||||
"authorization": "string",
|
||||
"device_authorization": "string",
|
||||
"token": "string"
|
||||
},
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"name": "string"
|
||||
@ -610,6 +629,11 @@ curl -X PUT http://coder-server:8080/api/v2/oauth2-provider/apps/{app} \
|
||||
```json
|
||||
{
|
||||
"callback_url": "string",
|
||||
"endpoints": {
|
||||
"authorization": "string",
|
||||
"device_authorization": "string",
|
||||
"token": "string"
|
||||
},
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"name": "string"
|
||||
|
36
docs/api/schemas.md
generated
36
docs/api/schemas.md
generated
@ -3519,6 +3519,24 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
| `id` | string | true | | |
|
||||
| `username` | string | true | | |
|
||||
|
||||
## codersdk.OAuth2AppEndpoints
|
||||
|
||||
```json
|
||||
{
|
||||
"authorization": "string",
|
||||
"device_authorization": "string",
|
||||
"token": "string"
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ---------------------- | ------ | -------- | ------------ | --------------------------------- |
|
||||
| `authorization` | string | false | | |
|
||||
| `device_authorization` | string | false | | Device authorization is optional. |
|
||||
| `token` | string | false | | |
|
||||
|
||||
## codersdk.OAuth2Config
|
||||
|
||||
```json
|
||||
@ -3572,6 +3590,11 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
```json
|
||||
{
|
||||
"callback_url": "string",
|
||||
"endpoints": {
|
||||
"authorization": "string",
|
||||
"device_authorization": "string",
|
||||
"token": "string"
|
||||
},
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"name": "string"
|
||||
@ -3580,12 +3603,13 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| -------------- | ------ | -------- | ------------ | ----------- |
|
||||
| `callback_url` | string | false | | |
|
||||
| `icon` | string | false | | |
|
||||
| `id` | string | false | | |
|
||||
| `name` | string | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| -------------- | ---------------------------------------------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `callback_url` | string | false | | |
|
||||
| `endpoints` | [codersdk.OAuth2AppEndpoints](#codersdkoauth2appendpoints) | false | | 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). |
|
||||
| `icon` | string | false | | |
|
||||
| `id` | string | false | | |
|
||||
| `name` | string | false | | |
|
||||
|
||||
## codersdk.OAuth2ProviderAppSecret
|
||||
|
||||
|
Reference in New Issue
Block a user