authn

package
v0.0.0-...-a95e806 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(hashedPassword, password string) error

func Encrypt

func Encrypt(source string) (string, error)

Types

type Authenticator

type Authenticator interface {
	Sign(ctx context.Context, userId string) (IToken, error)
	Destroy(ctx context.Context, accessToken string) error
	ParseClaims(ctx context.Context, accessToken string) (*jwt.RegisteredClaims, error)
	Release() error
}

type IToken

type IToken interface {
	GetToken() string
	GetTokenType() string
	GetExpiresAt() int64
	EncodeToJSON() ([]byte, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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