Documentation
¶
Index ¶
- Constants
- func CheckOTP(otpConf []OTPConfig, tokenSignKey string, ...) gin.HandlerFunc
- func GetAndValidateManagementUserJWT(tokenSignKey string) gin.HandlerFunc
- func GetAndValidateParticipantUserJWT(tokenSignKey string, globalInfosDBService *globalinfosDB.GlobalInfosDBService) gin.HandlerFunc
- func GetAndValidateParticipantUserJWTWithIgnoringExpiration(tokenSignKey string, globalInfosDBService *globalinfosDB.GlobalInfosDBService) gin.HandlerFunc
- func HasValidAPIKey(validKeys []string) gin.HandlerFunc
- func IsAdminUser() gin.HandlerFunc
- func ManagementAuthMiddleware(tokenSignKey string, allowedInstanceIds []string, ...) gin.HandlerFunc
- func RequirePayload() gin.HandlerFunc
- type OTPConfig
Constants ¶
View Source
const ( HeaderAuthorization = "Authorization" HeaderAPIKey = "X-API-Key" HeaderInstanceID = "X-Instance-ID" )
Variables ¶
This section is empty.
Functions ¶
func CheckOTP ¶
func CheckOTP(otpConf []OTPConfig, tokenSignKey string, globalInfosDBService *globalinfosDB.GlobalInfosDBService) gin.HandlerFunc
func GetAndValidateManagementUserJWT ¶
func GetAndValidateManagementUserJWT(tokenSignKey string) gin.HandlerFunc
Can be used by other services to validate the JWT token of the management users
func GetAndValidateParticipantUserJWT ¶
func GetAndValidateParticipantUserJWT(tokenSignKey string, globalInfosDBService *globalinfosDB.GlobalInfosDBService) gin.HandlerFunc
func GetAndValidateParticipantUserJWTWithIgnoringExpiration ¶
func GetAndValidateParticipantUserJWTWithIgnoringExpiration(tokenSignKey string, globalInfosDBService *globalinfosDB.GlobalInfosDBService) gin.HandlerFunc
func HasValidAPIKey ¶
func HasValidAPIKey(validKeys []string) gin.HandlerFunc
func IsAdminUser ¶
func IsAdminUser() gin.HandlerFunc
func ManagementAuthMiddleware ¶
func ManagementAuthMiddleware(tokenSignKey string, allowedInstanceIds []string, muDB *mudb.ManagementUserDBService) gin.HandlerFunc
func RequirePayload ¶
func RequirePayload() gin.HandlerFunc
RequirePayload blocks post requests that have no payload attached
Types ¶
Click to show internal directories.
Click to hide internal directories.