auth

package
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Handler         handler.IHandler
	TokenMiddleware middleware.ITokenMiddleware
}

func (Auth) GetHandler

func (a Auth) GetHandler() handler.IHandler

func (Auth) GetTokenMiddleware

func (a Auth) GetTokenMiddleware() middleware.ITokenMiddleware

type Config

type Config struct {
	DB            *gorm.DB
	Rdb           redis.UniversalClient
	Transaction   transaction.ITransaction
	Hasher        secret.Hasher
	AccessExpire  time.Duration
	RefreshExpire time.Duration
	AccessSecret  string
}

type IAuth

type IAuth interface {
	GetHandler() handler.IHandler
	GetTokenMiddleware() middleware.ITokenMiddleware
}

func New

func New(cfg Config) IAuth

Directories

Path Synopsis
transport

Jump to

Keyboard shortcuts

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