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