package usecase

import (
	"context"
	"time"

	"gateway/internal/model/member/domain/enum"
)

// IssueStepUpRequest creates a step-up token after TOTP verification.
type IssueStepUpRequest struct {
	TenantID string
	UID      string
	Purpose  enum.StepUpPurpose
	TTL      time.Duration
}

// StepUpView is returned to the client after successful step-up verify.
type StepUpView struct {
	StepUpToken string
	ExpiresIn   int
}

// ConsumeStepUpRequest validates and burns a one-time step-up token.
type ConsumeStepUpRequest struct {
	TokenID  string
	TenantID string
	UID      string
	Purpose  enum.StepUpPurpose
}

// StepUpUseCase issues and consumes short-lived step-up sessions.
type StepUpUseCase interface {
	Issue(ctx context.Context, req *IssueStepUpRequest) (*StepUpView, error)
	Consume(ctx context.Context, req *ConsumeStepUpRequest) error
}
