auth

package
v0.0.0-...-918f796 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blacklist

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

Blacklist struct

func NewBlacklist

func NewBlacklist(db *sql.DB) *Blacklist

NewBlacklist creates a new blacklist

func (*Blacklist) Add

func (b *Blacklist) Add(ctx context.Context, token string, expiresAt time.Time) (bool, error)

Add adds a token to the blacklist

func (*Blacklist) IsBlacklisted

func (b *Blacklist) IsBlacklisted(ctx context.Context, token string) (bool, error)

IsBlacklisted checks if a token is blacklisted

func (*Blacklist) Remove

func (b *Blacklist) Remove(ctx context.Context) error

Remove removes a token from the blacklist

Jump to

Keyboard shortcuts

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