Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateAuthentication ¶
func ValidateAuthentication() gin.HandlerFunc
ValidateAuthentication validates `req.Cookies.id_token` if id_token, which is a JWT, is invalid, and then return 401 status code
func ValidateAuthorization ¶
func ValidateAuthorization() gin.HandlerFunc
ValidateAuthorization checks the jwt token in the Authorization header is valid or not
func ValidateUserID ¶
func ValidateUserID() gin.HandlerFunc
ValidateUserID checks claim userID in the jwt with :userID param in the request url. if the two values are not the same, return the 401 response
func ValidateUserIDInReqBody ¶
func ValidateUserIDInReqBody() gin.HandlerFunc
Types ¶
type JWTMiddleware ¶
type JWTMiddleware interface {
ValidateAuthorization() gin.HandlerFunc
}
func GetMailServiceMiddleware ¶
func GetMailServiceMiddleware() JWTMiddleware
Click to show internal directories.
Click to hide internal directories.