local

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AuthToken = ""

AuthToken is the token used for local auth

View Source
var SessionID = ""

SessionID is the session ID for local auth; generated after token is validated

Functions

func Auth added in v0.8.0

func Auth(w http.ResponseWriter, r *http.Request) bool

Auth validates tokens and session cookies for local authentication

func GenerateSessionID added in v0.8.0

func GenerateSessionID(w http.ResponseWriter) string

GenerateSessionID is a util function to generate a random session ID

func ValidateSessionCookie

func ValidateSessionCookie(w http.ResponseWriter, r *http.Request) bool

ValidateSessionCookie validates the session cookie in the request

Types

This section is empty.

Jump to

Keyboard shortcuts

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