Files
mtusi2026lab2/backend/internal/domain/port/auth.go
T
rey 62d7c2023c
Skeleton contracts / contracts (pull_request) Canceled after 0s
Prepare verified laboratory 2 implementation and evidence
2026-11-17 17:31:17 +03:00

19 lines
431 B
Go

package port
import (
"context"
"github.com/google/uuid"
"time"
)
type Passwords interface {
Hash(string) (string, error)
Verify(string, string) bool
}
type Sessions interface {
Credentials(context.Context, string) (uuid.UUID, string, error)
CreateSession(context.Context, string, uuid.UUID, time.Time) error
AuthenticateSession(context.Context, string) (uuid.UUID, error)
RevokeSession(context.Context, string) error
}