security

package
v0.0.0-...-f191575 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	Sub         string
	Permissions string
	Buckets     []string
}

type JWTValidator

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

func NewJWTValidator

func NewJWTValidator(enabled bool, secrets []string, issuer, audience string, leewaySec int64) *JWTValidator

func (*JWTValidator) Enabled

func (v *JWTValidator) Enabled() bool

func (*JWTValidator) Parse

func (v *JWTValidator) Parse(token string) (*Claims, error)

type Presigner

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

func NewPresigner

func NewPresigner(enabled bool, secret string) *Presigner

func (*Presigner) BuildSignedURL

func (p *Presigner) BuildSignedURL(basePath, method string, expiresAt time.Time) string

func (*Presigner) Enabled

func (p *Presigner) Enabled() bool

func (*Presigner) Sign

func (p *Presigner) Sign(method, reqPath string, expiresAt time.Time) string

func (*Presigner) VerifyRequest

func (p *Presigner) VerifyRequest(r *http.Request) bool

Jump to

Keyboard shortcuts

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