MCPcopy Create free account
hub / github.com/devld/go-drive / TokenAuth

Function TokenAuth

server/utils.go:118–122  ·  view source on GitHub ↗
(tokenStore types.TokenStore)

Source from the content-addressed store, hash-verified

116}
117
118func TokenAuth(tokenStore types.TokenStore) gin.HandlerFunc {
119 return tokenAuth(tokenStore, func(c *gin.Context) string {
120 return c.GetHeader(common.HeaderAuth)
121 })
122}
123
124func tokenAuth(tokenStore types.TokenStore, getToken func(*gin.Context) string) gin.HandlerFunc {
125 return func(c *gin.Context) {

Callers 4

InitAdminRoutesFunction · 0.85
InitDriveRoutesFunction · 0.85
InitCommonRoutesFunction · 0.85
InitAuthRoutesFunction · 0.85

Calls 1

tokenAuthFunction · 0.85

Tested by

no test coverage detected