auth

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashSecret

func HashSecret(secret string) (string, error)

func NewRandomToken

func NewRandomToken(bytes int) (string, error)

func VerifySecret

func VerifySecret(encoded, secret string) bool

Types

type Session

type Session struct {
	ID        string
	ActorID   string
	CSRFToken string
	CreatedAt time.Time
	ExpiresAt time.Time
	Revoked   bool
}

func NewSession

func NewSession(actorID string, ttl time.Duration) (Session, error)

func (Session) Active

func (s Session) Active(now time.Time) bool

Jump to

Keyboard shortcuts

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