Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall committed Apr 15, 2024
1 parent 8fe8c66 commit 1e51845
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ func Rollout(w http.ResponseWriter, r *http.Request) {
ccStr := os.Getenv("CUSTOM_CLAIMS")
log.Println(ccStr)
var cc map[string]string
json.Unmarshal([]byte(ccStr), &cc)
err = json.Unmarshal([]byte(ccStr), &cc)
if err != nil {
log.Println("Unable to read token claims for", realIp, ",", lastIP)
http.Error(w, "Invalid token", http.StatusUnauthorized)
return
}
for k, v := range cc {
if claims[k] != v {
log.Println("Claim for", k, "doesn't match", realIp, ",", lastIP)
Expand Down

0 comments on commit 1e51845

Please sign in to comment.