Discover Packages
github.com/Quaver/api2
middleware
package
Version:
v0.0.0-...-b901195
Opens a new window with list of versions in this module.
Published: Jun 2, 2025
License: AGPL-3.0
Opens a new window with license information.
Imports: 12
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
AllowAuth Allows user authentication but does not require it. This middleware fails
in the event that the user passes in an invalid token OR some other error
RequireAuth Middleware authentication function
type JWTClaims struct {
UserId int `json:"user_id"`
Username string `json:"username"`
jwt.RegisteredClaims
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.