Skip to content

Commit

Permalink
refactor(trust): rename SDK method from deleteTrustedJwtGrantIssuer
Browse files Browse the repository at this point in the history
… to `adminDeleteTrustedOAuth2JwtGrantIssuer`

BREAKING CHANGE: Rename SDK method from `deleteTrustedJwtGrantIssuer` to `adminDeleteTrustedOAuth2JwtGrantIssuer`.
  • Loading branch information
aeneasr committed Sep 7, 2022
1 parent 210116e commit e0be7cf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
8 changes: 0 additions & 8 deletions oauth2/trust/doc.go
Expand Up @@ -45,14 +45,6 @@ type listTrustedJwtGrantIssuers struct {
Offset int `json:"offset"`
}

// swagger:parameters getTrustedJwtGrantIssuer deleteTrustedJwtGrantIssuer
type getTrustedJwtGrantIssuer struct {
// The id of the desired grant
// in: path
// required: true
ID string `json:"id"`
}

// swagger:model trustedJwtGrantIssuers
type trustedJwtGrantIssuers []trustedJwtGrantIssuer

Expand Down
14 changes: 11 additions & 3 deletions oauth2/trust/handler.go
Expand Up @@ -32,7 +32,7 @@ func (h *Handler) SetRoutes(admin *httprouterx.RouterAdmin) {
admin.GET(grantJWTBearerPath+"/:id", h.adminGetTrustedOAuth2JwtGrantIssuer)
admin.GET(grantJWTBearerPath, h.List)
admin.POST(grantJWTBearerPath, h.adminTrustOAuth2JwtGrantIssuer)
admin.DELETE(grantJWTBearerPath+"/:id", h.Delete)
admin.DELETE(grantJWTBearerPath+"/:id", h.adminDeleteTrustedOAuth2JwtGrantIssuer)
}

// swagger:model adminTrustOAuth2JwtGrantIssuerBody
Expand Down Expand Up @@ -167,7 +167,15 @@ func (h *Handler) adminGetTrustedOAuth2JwtGrantIssuer(w http.ResponseWriter, r *
h.registry.Writer().Write(w, r, grant)
}

// swagger:route DELETE /trust/grants/jwt-bearer/issuers/{id} admin deleteTrustedJwtGrantIssuer
// swagger:parameters adminDeleteTrustedOAuth2JwtGrantIssuer
type adminDeleteTrustedOAuth2JwtGrantIssuer struct {
// The id of the desired grant
// in: path
// required: true
ID string `json:"id"`
}

// swagger:route DELETE /admin/trust/grants/jwt-bearer/issuers/{id} v1 adminDeleteTrustedOAuth2JwtGrantIssuer
//
// Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer
//
Expand All @@ -189,7 +197,7 @@ func (h *Handler) adminGetTrustedOAuth2JwtGrantIssuer(w http.ResponseWriter, r *
// 204: emptyResponse
// 404: genericError
// 500: genericError
func (h *Handler) Delete(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
func (h *Handler) adminDeleteTrustedOAuth2JwtGrantIssuer(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
var id = ps.ByName("id")

if err := h.registry.GrantManager().DeleteGrant(r.Context(), id); err != nil {
Expand Down

0 comments on commit e0be7cf

Please sign in to comment.