mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
* docs: Applications * WIP * WIP * WIP * Fix: consume * Fix: @Description * Fix * docs: apiroot, buildinfo, csp * Fix: buildinfo * docs: updatecheck * docs: apiroot * Fix: s/none//g * Fix: godoc nice * Fix: description * Fix: It * Fix: code sample trim empty line * More fixes * Fix: br * Merge * Fix: no-security on updatecheck * Fix: code tags * Fix: enumerated values in code tags * Rephrased * Address PR comments * Fix: URL, id * Fix: array items * Fix: any property * Fix: array item singular
1.9 KiB
1.9 KiB
Authorization
This page is incomplete, stay tuned.
Check authorization
Code samples
# Example request using curl
curl -X POST http://coder-server:8080/api/v2/authcheck \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Coder-Session-Token: API_KEY'
POST /authcheck
Body parameter
{
"checks": {
"property1": {
"action": "create",
"object": {
"organization_id": "string",
"owner_id": "string",
"resource_id": "string",
"resource_type": "string"
}
},
"property2": {
"action": "create",
"object": {
"organization_id": "string",
"owner_id": "string",
"resource_id": "string",
"resource_type": "string"
}
}
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body |
body | codersdk.AuthorizationRequest | true | Authorization request |
Example responses
200 Response
{
"property1": true,
"property2": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | codersdk.AuthorizationResponse |
To perform this operation, you must be authenticated by means of one of the following methods: CoderSessionToken.