diff --git a/CHANGELOG.md b/CHANGELOG.md index d3a4701ac5649bd8530010f85c07333d2a0b9fe9..82dd1b01dd6f1a0d5d4a15b0459cc0520f19ff09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ ### Bugfixes - Fixed a bug where mytokens could not be used with x-www-form-urlencoding +- Fixed a bug where `x-www-form-urlencoding` was not accepted on token revocation endpoint ### Dependencies diff --git a/internal/endpoints/revocation/revocationEndpoint.go b/internal/endpoints/revocation/revocationEndpoint.go index a99725d50b52699b260327cb3958fe72150f4d65..da5de7f06703ba1dd7227f290d12cdc59c4a4832 100644 --- a/internal/endpoints/revocation/revocationEndpoint.go +++ b/internal/endpoints/revocation/revocationEndpoint.go @@ -1,7 +1,6 @@ package revocation import ( - "encoding/json" "time" "github.com/gofiber/fiber/v2" @@ -28,7 +27,7 @@ func HandleRevoke(ctx *fiber.Ctx) error { rlog := logger.GetRequestLogger(ctx) rlog.Debug("Handle revocation request") req := api.RevocationRequest{} - if err := json.Unmarshal(ctx.Body(), &req); err != nil { + if err := ctx.BodyParser(&req); err != nil { return model.ErrorToBadRequestErrorResponse(err).Send(ctx) } rlog.Trace("Parsed mytoken request")