MCPcopy Create free account
hub / github.com/chanify/chanify / getToken

Function getToken

core/utils.go:84–96  ·  view source on GitHub ↗
(ctx *gin.Context)

Source from the content-addressed store, hash-verified

82}
83
84func getToken(ctx *gin.Context) string {
85 token := ctx.GetHeader("token")
86 if len(token) <= 0 {
87 token = ctx.Query("token")
88 if len(token) <= 0 {
89 token = ctx.Param("token")
90 if len(token) > 0 && token[0] == '/' {
91 token = token[1:]
92 }
93 }
94 }
95 return token
96}
97
98func parsePriority(priority string) int {
99 if len(priority) > 0 {

Callers 8

TestGetTokenFunction · 0.85
handleImageDownloadMethod · 0.85
handleAudioDownloadMethod · 0.85
handleFileDownloadMethod · 0.85
handleSenderMethod · 0.85
handlePostSenderMethod · 0.85
luaContextSendFunction · 0.85
luaContextGetTokenFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestGetTokenFunction · 0.68