Documentation
¶
Index ¶
- func AdminAuthenticatedMiddleware(sessionStore *sessions.CookieStore, jwtKey []byte, next http.HandlerFunc) http.HandlerFunc
- func GzipMiddleware(next http.Handler) http.Handler
- func HTTPSMiddleware(next http.Handler, env string) http.Handler
- func HeadersMiddleware(next http.Handler, env string) http.Handler
- func IsSignedOn(r *http.Request, sessionStore *sessions.CookieStore, jwtKey []byte) bool
- func LoggingMiddleware(next http.Handler) http.Handler
- func MachineAuthenticatedMiddleware(machineToken string, next http.HandlerFunc) http.HandlerFunc
- func UserAuthenticatedMiddleware(sessionStore *sessions.CookieStore, jwtKey []byte, next http.HandlerFunc) http.HandlerFunc
- type UserJWT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminAuthenticatedMiddleware ¶
func AdminAuthenticatedMiddleware(sessionStore *sessions.CookieStore, jwtKey []byte, next http.HandlerFunc) http.HandlerFunc
func IsSignedOn ¶
func MachineAuthenticatedMiddleware ¶
func MachineAuthenticatedMiddleware(machineToken string, next http.HandlerFunc) http.HandlerFunc
func UserAuthenticatedMiddleware ¶
func UserAuthenticatedMiddleware(sessionStore *sessions.CookieStore, jwtKey []byte, next http.HandlerFunc) http.HandlerFunc
Types ¶
type UserJWT ¶
type UserJWT struct { IsAdmin bool `json:"is_admin"` IsRecruiter bool `json:"is_recruiter"` IsDeveloper bool `json:"is_developer"` UserID string `json:"user_id"` Email string `json:"email"` Type string `json:"type"` CreatedAt time.Time `json:"created_at"` jwt.StandardClaims }
func GetUserFromJWT ¶
Click to show internal directories.
Click to hide internal directories.