auth

package
v0.0.0-...-1f23d19 Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BCRYPT_COST = 14
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginDTO

type LoginDTO struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type LoginResultDTO

type LoginResultDTO struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
}

type Loginer

type Loginer interface {
	Login(context.Context, LoginDTO) (LoginResultDTO, error)
}

type RepoUserGetter

type RepoUserGetter interface {
	Get(ctx context.Context, username string) (User, error)
}

type Service

type Service interface {
	Loginer
}

func New

func New(jwtSignatureKey []byte) Service

type User

type User struct {
	Username string
	Password string
}

type UserRepository

type UserRepository interface {
	RepoUserGetter
}

Jump to

Keyboard shortcuts

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