middleware

package
v1.26.1 Latest Latest
Warning

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

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

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.

Jump to

Keyboard shortcuts

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