add user info to context request
This commit is contained in:
parent
b49b2235db
commit
930911d7a9
1 changed files with 2 additions and 2 deletions
|
|
@ -116,9 +116,9 @@ func (s *Server) createHandler() {
|
|||
var tokenInfo map[string]interface{}
|
||||
json.NewDecoder(res.Body).Decode(&tokenInfo)
|
||||
|
||||
log.Println(tokenInfo)
|
||||
context := context.WithValue(r.Context(), "user", tokenInfo)
|
||||
|
||||
next.ServeHTTP(w, r)
|
||||
next.ServeHTTP(w, r.WithContext(context))
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue