package services

// TODO: Implement auth service

import (
	"errors"

	"github.com/golang-jwt/jwt"
)

var (
	ErrTokenExpired     = errors.New("token has expired")
	ErrInvalidToken     = errors.New("token is invalid")
	ErrTokenBlacklisted = errors.New("token has been revoked")
)

type JwtService struct {
	PrivateKey []byte
	TokenTTL   int
}

type Claims struct {
	jwt.StandardClaims
	ClientId string `json:"client_id"`
	Role     string `json:"role"`
}

func NewJwtService() *JwtService {
	return &JwtService{}
}

func (s *JwtService) GenerateToken(clientId string) (string, error) {
	//TODO: Implement token generation logic

	return "", nil
}

func (s *JwtService) ValidateToken(token string) (string, error) {
	// TODO: Implement token validation logic

	return "", nil
}

func (s *JwtService) RefreshToken(token string) (string, error) {
	// TODO: Implement token refresh logic

	return "", nil
}

func (s *JwtService) Logout(token string) error {
	// TODO: Implement logout logic

	return nil
}
