2024-10-13 13:31:58 +04:00

18 lines
416 B
Go

package port
import (
"context"
"github.com/aykhans/oh-my-chat/internal/core/domain"
)
type TokenService interface {
CreateToken(user *domain.User) (string, error)
VerifyToken(token string) (*domain.AuthPayload, error)
}
type AuthService interface {
LoginByEmail(ctx context.Context, email, password string) (string, error)
LoginByUsername(ctx context.Context, username, password string) (string, error)
}