Documentation ¶
Index ¶
- Constants
- Variables
- func NewPaseto(cfg *config.Container) (auth.TokenMaker, error)
- type PasetoToken
- func (pt *PasetoToken) CreateRefreshToken(payload *valueobject.Payload) (string, string, *valueobject.Payload, error)
- func (pt *PasetoToken) CreateToken(id uuid.UUID, email, role string, isBlocked bool) (string, string, *valueobject.Payload, error)
- func (pt *PasetoToken) DecodeToken(pasetoToken, publicKeyHex string) (*valueobject.Payload, error)
Constants ¶
View Source
const (
SymmetricKeySize = 128
)
Variables ¶
View Source
var (
PasetoSet = wire.NewSet(NewPaseto)
)
Functions ¶
Types ¶
type PasetoToken ¶
type PasetoToken struct {
// contains filtered or unexported fields
}
func (*PasetoToken) CreateRefreshToken ¶
func (pt *PasetoToken) CreateRefreshToken(payload *valueobject.Payload) (string, string, *valueobject.Payload, error)
func (*PasetoToken) CreateToken ¶
func (pt *PasetoToken) CreateToken(id uuid.UUID, email, role string, isBlocked bool) (string, string, *valueobject.Payload, error)
func (*PasetoToken) DecodeToken ¶
func (pt *PasetoToken) DecodeToken(pasetoToken, publicKeyHex string) (*valueobject.Payload, error)
Click to show internal directories.
Click to hide internal directories.