mirror of
https://github.com/coder/coder.git
synced 2025-07-18 14:17:22 +00:00
docs: applications and authorization (#5477)
* docs: Applications * WIP * WIP * WIP * Fix: consume * Fix: @Description * Fix * Fix: s/none//g * Fix: godoc nice * Fix: description * Fix: It * Fix: code sample trim empty line * More fixes * Fix: br
This commit is contained in:
@ -106,6 +106,16 @@ func (h *HTTPAuthorizer) AuthorizeSQLFilter(r *http.Request, action rbac.Action,
|
||||
|
||||
// checkAuthorization returns if the current API key can use the given
|
||||
// permissions, factoring in the current user's roles and the API key scopes.
|
||||
//
|
||||
// @Summary Check authorization
|
||||
// @ID check-authorization
|
||||
// @Security CoderSessionToken
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Tags Authorization
|
||||
// @Param request body codersdk.AuthorizationRequest true "Authorization request"
|
||||
// @Success 200 {object} codersdk.AuthorizationResponse
|
||||
// @Router /authcheck [post]
|
||||
func (api *API) checkAuthorization(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
auth := httpmw.UserAuthorization(r)
|
||||
|
Reference in New Issue
Block a user