Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ClaimsKey is the context key for storing JWT claims in the request context. ClaimsKey contextKey = "claims" // TokenKey is the context key for storing the JWT token in the request context. TokenKey contextKey = "token" )
Variables ¶
This section is empty.
Functions ¶
func GetSubject ¶
GetSubject extracts the subject (user ID) from a JWT token.
func IsValidJWT ¶
func IsValidJWT(value interface{}) error
IsValidJWT is a custom validator to check if the provided string is a valid JWT token.
Types ¶
Click to show internal directories.
Click to hide internal directories.