df/bff/token/maker.go
2023-10-02 09:59:45 +02:00

15 lines
353 B
Go

package token
import (
"time"
)
// Maker is an interface for managing tokens
type Maker interface {
// CreateToken creates a new token for a specific username and duration
CreateToken(email string, duration time.Duration) (string, *Payload, error)
// VerifyToken checks if the token is valid or not
VerifyToken(token string) (*Payload, error)
}