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

replace magic http status code with constant

parent 26a8c0ae
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@ import (
"strings"
"github.com/gofiber/fiber/v2"
"github.com/oidc-mytoken/server/internal/server/httpStatus"
log "github.com/sirupsen/logrus"
"github.com/oidc-mytoken/api/v0"
......@@ -85,7 +86,7 @@ func handleConsentDecline(ctx *fiber.Ctx, authInfo *authcodeinforepo.AuthFlowInf
}
}
return model.Response{
Status: 278,
Status: httpStatus.StatusOKForward,
Response: map[string]string{
"url": url,
},
......@@ -135,7 +136,7 @@ func HandleConsentPost(ctx *fiber.Ctx) error {
}
authURL := authcode.GetAuthorizationURL(provider, oState.State(), req.Restrictions)
return model.Response{
Status: 278,
Status: httpStatus.StatusOKForward,
Response: map[string]string{
"authorization_url": authURL,
},
......
......@@ -2,5 +2,6 @@ package httpStatus
// Proprietary defined status codes
const (
StatusOKForward = 278
StatusOIDPError = 555
)
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