authentication

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package authentication provides JWT token generation functionality. It implements a simple authentication mechanism using HS256-signed JWTs with configurable issuer, expiration time, and signing secret. The package uses github.com/golang-jwt/jwt/v5 for token creation and signing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

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

func NewAuth

func NewAuth(jwtIssuer string, jwtTTL time.Duration, secret []byte) Auth

func (Auth) GenerateJWT

func (a Auth) GenerateJWT() (string, error)

Jump to

Keyboard shortcuts

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