Skip to content

Commit

Permalink
chore: add missing security annotations to admin handlers (#2937)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-jonas committed Dec 18, 2022
1 parent ae8ad7b commit 2f9b001
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 4 deletions.
42 changes: 42 additions & 0 deletions internal/client-go/api_identity.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 42 additions & 0 deletions internal/httpclient/api_identity.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions selfservice/strategy/code/strategy_recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ type recoveryCodeForIdentity struct {
//
// Schemes: http, https
//
// Security:
// oryAccessToken:
//
// Responses:
// 201: recoveryCodeForIdentity
// 400: errorGeneric
Expand Down
3 changes: 3 additions & 0 deletions selfservice/strategy/link/strategy_recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ type recoveryLinkForIdentity struct {
//
// Schemes: http, https
//
// Security:
// oryAccessToken:
//
// Responses:
// 200: recoveryLinkForIdentity
// 400: errorGeneric
Expand Down
11 changes: 7 additions & 4 deletions session/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -465,11 +465,14 @@ type disableSession struct {
//
// Schemes: http, https
//
// Security:
// oryAccessToken:
//
// Responses:
// 204: emptyResponse
// 400: errorGeneric
// 401: errorGeneric
// default: errorGeneric
// 204: emptyResponse
// 400: errorGeneric
// 401: errorGeneric
// default: errorGeneric
func (h *Handler) disableSession(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
sID, err := uuid.FromString(ps.ByName("id"))
if err != nil {
Expand Down
15 changes: 15 additions & 0 deletions spec/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -3841,6 +3841,11 @@
"description": "errorGeneric"
}
},
"security": [
{
"oryAccessToken": []
}
],
"summary": "Create a Recovery Code",
"tags": [
"identity"
Expand Down Expand Up @@ -3903,6 +3908,11 @@
"description": "errorGeneric"
}
},
"security": [
{
"oryAccessToken": []
}
],
"summary": "Create a Recovery Link",
"tags": [
"identity"
Expand Down Expand Up @@ -4044,6 +4054,11 @@
"description": "errorGeneric"
}
},
"security": [
{
"oryAccessToken": []
}
],
"summary": "Deactivate a Session",
"tags": [
"identity"
Expand Down
15 changes: 15 additions & 0 deletions spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,11 @@
},
"/admin/recovery/code": {
"post": {
"security": [
{
"oryAccessToken": []
}
],
"description": "This endpoint creates a recovery code which should be given to the user in order for them to recover\n(or activate) their account.",
"consumes": [
"application/json"
Expand Down Expand Up @@ -715,6 +720,11 @@
},
"/admin/recovery/link": {
"post": {
"security": [
{
"oryAccessToken": []
}
],
"description": "This endpoint creates a recovery link which should be given to the user in order for them to recover\n(or activate) their account.",
"consumes": [
"application/json"
Expand Down Expand Up @@ -902,6 +912,11 @@
}
},
"delete": {
"security": [
{
"oryAccessToken": []
}
],
"description": "Calling this endpoint deactivates the specified session. Session data is not deleted.",
"schemes": [
"http",
Expand Down

0 comments on commit 2f9b001

Please sign in to comment.