auth

package
v1.12.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package auth provides authentication middleware for the BindPlane server

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL