MCPcopy
hub / github.com/gotify/server / RegisterAuthentication

Function RegisterAuthentication

auth/util.go:9–13  ·  view source on GitHub ↗

RegisterAuthentication registers the user id, user and or token.

(ctx *gin.Context, user *model.User, userID uint, tokenID string)

Source from the content-addressed store, hash-verified

7
8// RegisterAuthentication registers the user id, user and or token.
9func RegisterAuthentication(ctx *gin.Context, user *model.User, userID uint, tokenID string) {
10 ctx.Set("user", user)
11 ctx.Set("userid", userID)
12 ctx.Set("tokenid", tokenID)
13}
14
15// GetUserID returns the user id which was previously registered by RegisterAuthentication.
16func GetUserID(ctx *gin.Context) uint {

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…