@@ -133,8 +133,8 @@ func handleReceive[S Session](ctx context.Context, session S, jreq *jsonrpc.Requ
133133 }
134134
135135 mh := session .receivingMethodHandler ().(MethodHandler )
136- ti , _ := jreq .Extra .(* RequestExtra )
137- req := info .newRequest (session , params , ti )
136+ re , _ := jreq .Extra .(* RequestExtra )
137+ req := info .newRequest (session , params , re )
138138 // mh might be user code, so ensure that it returns the right values for the jsonrpc2 protocol.
139139 res , err := mh (ctx , jreq .Method , req )
140140 if err != nil {
@@ -181,7 +181,7 @@ type methodInfo struct {
181181 // Unmarshal params from the wire into a Params struct.
182182 // Used on the receive side.
183183 unmarshalParams func (json.RawMessage ) (Params , error )
184- newRequest func (Session , Params , * auth. TokenInfo ) Request
184+ newRequest func (Session , Params , * RequestExtra ) Request
185185 // Run the code when a call to the method is received.
186186 // Used on the receive side.
187187 handleMethod methodHandler
@@ -216,7 +216,7 @@ const (
216216
217217func newClientMethodInfo [P paramsPtr [T ], R Result , T any ](d typedClientMethodHandler [P , R ], flags methodFlags ) methodInfo {
218218 mi := newMethodInfo [P , R ](flags )
219- mi .newRequest = func (s Session , p Params , _ * auth. TokenInfo ) Request {
219+ mi .newRequest = func (s Session , p Params , _ * RequestExtra ) Request {
220220 r := & ClientRequest [P ]{Session : s .(* ClientSession )}
221221 if p != nil {
222222 r .Params = p .(P )
@@ -231,8 +231,8 @@ func newClientMethodInfo[P paramsPtr[T], R Result, T any](d typedClientMethodHan
231231
232232func newServerMethodInfo [P paramsPtr [T ], R Result , T any ](d typedServerMethodHandler [P , R ], flags methodFlags ) methodInfo {
233233 mi := newMethodInfo [P , R ](flags )
234- mi .newRequest = func (s Session , p Params , ti * auth. TokenInfo ) Request {
235- r := & ServerRequest [P ]{Session : s .(* ServerSession ), Extra : RequestExtra { TokenInfo : ti } }
234+ mi .newRequest = func (s Session , p Params , re * RequestExtra ) Request {
235+ r := & ServerRequest [P ]{Session : s .(* ServerSession ), Extra : re }
236236 if p != nil {
237237 r .Params = p .(P )
238238 }
@@ -395,7 +395,7 @@ type ClientRequest[P Params] struct {
395395type ServerRequest [P Params ] struct {
396396 Session * ServerSession
397397 Params P
398- Extra RequestExtra
398+ Extra * RequestExtra
399399}
400400
401401// RequestExtra is extra information included in requests, typically from
0 commit comments