Skip to content
Snippets Groups Projects
Verified Commit dfb5c2b3 authored by Gabriel Zachmann's avatar Gabriel Zachmann
Browse files

fix using x-www-from-urlencoding on revocation endpoint

parent 1fbfe32f
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
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")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment