feat: make authorization cookie default expiration time customizable (#389)

This commit is contained in:
Jareth Gomes 2025-05-01 03:05:33 -07:00 committed by GitHub
parent feb3dd2bcb
commit 91275c489f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 120 additions and 6 deletions

View file

@ -1,6 +1,8 @@
// Package anubis contains the version number of Anubis.
package anubis
import "time"
// Version is the current version of Anubis.
//
// This variable is set at build time using the -X linker flag. If not set,
@ -11,6 +13,9 @@ var Version = "devel"
// access.
const CookieName = "within.website-x-cmd-anubis-auth"
// CookieDefaultExpirationTime is the amount of time before the cookie/JWT expires.
const CookieDefaultExpirationTime = 7 * 24 * time.Hour
// BasePrefix is a global prefix for all Anubis endpoints. Can be emptied to remove the prefix entirely.
var BasePrefix = ""