MCPcopy Create free account
hub / github.com/OpenCSGs/csghub-server / SetCurrentUser

Function SetCurrentUser

api/httpbase/user.go:27–29  ·  view source on GitHub ↗
(ctx *gin.Context, user string)

Source from the content-addressed store, hash-verified

25}
26
27func SetCurrentUser(ctx *gin.Context, user string) {
28 ctx.Set(CurrentUserCtxVar, user)
29}
30
31func GetAccessToken(ctx *gin.Context) string {
32 return ctx.GetString(AccessTokenCtxVar)

Callers 5

GetCurrentUserFromHeaderFunction · 0.92
AuthSessionFunction · 0.92
AuthenticatorFunction · 0.92
OnlyAPIKeyAuthenticatorFunction · 0.92
GetUserFromAccessTokenFunction · 0.92

Calls 1

SetMethod · 0.65

Tested by

no test coverage detected