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