MCPcopy
hub / github.com/kagent-dev/kagent / AuthSessionFrom

Function AuthSessionFrom

go/core/pkg/auth/auth.go:67–70  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

65)
66
67func AuthSessionFrom(ctx context.Context) (Session, bool) {
68 v, ok := ctx.Value(sessionKey).(Session)
69 return v, ok && v != nil
70}
71
72func AuthSessionTo(ctx context.Context, session Session) context.Context {
73 return context.WithValue(ctx, sessionKey, session)

Callers

nothing calls this directly

Calls 1

ValueMethod · 0.45

Tested by

no test coverage detected