package
0.0.0-20241123103040-34550093ded7
Repository: https://github.com/zhangpetergo/gin-service.git
Documentation: pkg.go.dev
# Functions
Authenticate 通过 auth 服务验证身份验证.
AuthenticateLocal validates a JWT from the `Authorization` header.
Authorize executes the specified role and does not extract any domain data.
AuthorizeUser executes the specified role and extracts the specified user from the DB if a user id is specified in the call.
Basic processes basic authentication logic.
Bearer processes JWT authentication logic.
No description provided by the author
No description provided by the author
GetClaims returns the claims from the context.
GetUser returns the user from the context.
GetUserID returns the claims from the context.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
ErrInvalidID represents a condition where the id is not a uuid.
# Type aliases
Handler represents the handler function that needs to be called.