withAuthedUser stores the authenticated UserRecord in the request context.
(ctx context.Context, u *users.UserRecord)
| 41 | |
| 42 | // withAuthedUser stores the authenticated UserRecord in the request context. |
| 43 | func withAuthedUser(ctx context.Context, u *users.UserRecord) context.Context { |
| 44 | return context.WithValue(ctx, authedUserKey, u) |
| 45 | } |
| 46 | |
| 47 | // GetAuthedUser retrieves the authenticated UserRecord from the request context. |
| 48 | // Returns nil when no user is stored (e.g. internal requests). |
no outgoing calls