package port import ( "context" "github.com/google/uuid" "time" ) type Passwords interface { Hash(string) (string, error) Verify(string, string) bool NeedsRehash(string) bool } type Sessions interface { AllowLogin(context.Context, string) (bool, error) RehashPassword(context.Context, uuid.UUID, string, string) (bool, error) 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 }