Documentation ¶
Overview ¶
Package middleware provides authentication middleware for the APIs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Chain ¶
func Chain(server exposedserver.BindPlane) (handlers []gin.HandlerFunc)
Chain returns the ordered slice of authentication middleware.
func CheckSession ¶
func CheckSession(server exposedserver.BindPlane) gin.HandlerFunc
CheckSession checks to see if the attached cookie session is authenticated and if so sets authenticated to true on the context. If not authenticated it goes to the next handler.
func RequireLogin ¶
func RequireLogin() gin.HandlerFunc
RequireLogin should be the last middleware in the middleware chain. It checks to see that authenticator.AuthenticatedKey has been set true by previous middleware.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.