aboutsummaryrefslogtreecommitdiff
path: root/internal/authz/middleware.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/authz/middleware.go')
-rw-r--r--internal/authz/middleware.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/authz/middleware.go b/internal/authz/middleware.go
index 441240f..3c029b0 100644
--- a/internal/authz/middleware.go
+++ b/internal/authz/middleware.go
@@ -3,7 +3,7 @@ package authz
import (
"context"
- "encoding/base64"
+ "encoding/hex"
"fmt"
"log"
"net/http"
@@ -33,7 +33,7 @@ func Authentication(authMap TokenMap, next http.Handler) http.Handler {
http.Error(rw, "Bad Request", http.StatusForbidden)
return
}
- token, err := base64.URLEncoding.DecodeString(p)
+ token, err := hex.DecodeString(p)
if err != nil {
http.Error(rw, "Bad Request", http.StatusBadRequest)
return