Compare commits

..

No commits in common. "29dd3bb2bbb7cc5f6ad58b847309585815840d6e" and "f0bbfa9bb28200765b377f102ed118d740fbbe80" have entirely different histories.

1 changed files with 2 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package cauth
import (
"context"
"fmt"
"github.com/lestrrat-go/jwx/jwk"
"log"
"net/http"
@ -39,6 +40,7 @@ func (m *Middleware) AddUserInfo(next http.Handler) http.Handler {
return
}
userInfo := session.Values["user_info"]
fmt.Println(userInfo)
ctx := context.WithValue(r.Context(), userContextKey, userInfo)
next.ServeHTTP(w, r.WithContext(ctx))