auth

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApiKeyOrJWTMiddleware

func ApiKeyOrJWTMiddleware() gin.HandlerFunc

ApiKeyOrJWTMiddleware checks for either valid API key or valid JWT

func CheckAuthHandler

func CheckAuthHandler(c *gin.Context)

func GetUISecret

func GetUISecret() string

GetUISecret returns the UI authentication secret for embedding in frontend

func LoginHandler

func LoginHandler(c *gin.Context)

func LogoutHandler

func LogoutHandler(c *gin.Context)

Types

type LoginRequest

type LoginRequest struct {
	Username string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
}

Jump to

Keyboard shortcuts

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