services

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSignedToken

func GetSignedToken(privateKey *rsa.PrivateKey, claims jwt.Claims) (string, error)

func NewCustomClaims

func NewCustomClaims(userId, sessionId string) jwt.Claims

Types

type AccountService

type AccountService interface {
	RegisterUser(user *entities.Account) (*entities.Account, error)
	LoginUserSession(user *entities.Account) (*entities.Session, error)
	LoginUserSessionToken(user *entities.Account) (string, error)
	GetUserBySessionId(sessionId string) (*entities.Account, error)
	GetUserBySessionToken(sessionToken string) (*entities.AccountWithToken, error)
	LogoutUserBySessionId(sessionId string) error
	LogoutUserBySessionToken(sessionToken string) error
}

func NewAccountService

func NewAccountService(storage storage.AccountStore) AccountService

Jump to

Keyboard shortcuts

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