auth

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceClaims

type ServiceClaims struct {
	ServiceType string `json:"typ"`
	ServiceID   string `json:"id"`
	jwt.RegisteredClaims
}

type TokenManager

type TokenManager struct {
	// contains filtered or unexported fields
}

func NewTokenManager

func NewTokenManager(secret string) *TokenManager

func (*TokenManager) Validate

func (t *TokenManager) Validate(expectedType, expectedID, token string) bool

Validate verifies the JWT signature and claims: typ must match, id must match when expectedID is non-empty. No expiration is enforced; tokens may omit exp based on current requirements.

Jump to

Keyboard shortcuts

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