Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Chain ¶
func Chain(server server.BindPlane) []gin.HandlerFunc
Chain returns the ordered slice of authentication middleware.
func CheckBasic ¶
func CheckBasic(server server.BindPlane) gin.HandlerFunc
CheckBasic checks the basic authentication for a request and sets authenticated to true if it satisfies the basic auth. If basic auth is not set or is incorrect it goes to the next handler.
func CheckSession ¶
func CheckSession(server server.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 "authenticated" has been set true by previous middleware.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.