refactor: agentic comment cleanup

This commit is contained in:
talksik
2026-05-18 10:52:37 -07:00
parent 6f476fe773
commit 4421b8e832
45 changed files with 269 additions and 545 deletions
+2 -3
View File
@@ -18,9 +18,8 @@ type sessionReaderImpl struct {
redisClient *redis.Client
}
// newSessionReader returns the concrete reader. Used by NewAuthService to
// embed without going through the SessionReader interface (which would hide
// redisClient from the rest of authServiceImpl).
// Exposes the concrete type so authServiceImpl can embed it without
// hiding redisClient behind the SessionReader interface.
func newSessionReader(redisClient *redis.Client) *sessionReaderImpl {
return &sessionReaderImpl{redisClient: redisClient}
}
+5 -6
View File
@@ -47,17 +47,16 @@ type Session struct {
type AuthService interface {
SessionReader
// RequestSignInCode generates a code and emails it to the provided email.
// To retrieve a session, client must verify with VerifySignInCode.
// RequestSignInCode emails a one-time code; the client redeems it via VerifySignInCode.
RequestSignInCode(ctx context.Context, email string) error
// VerifySignInCode returns ErrInvalidCode if incorrect code, otherwise creates a session.
// humanId is stored in the session alongside the email.
// VerifySignInCode returns ErrInvalidCode on a wrong code, otherwise creates
// a session keyed to (email, humanId).
VerifySignInCode(ctx context.Context, email, code, humanId string) (sessionToken string, err error)
// ExtendSession returns ErrSessionNotFound if no valid session
// ExtendSession returns ErrSessionNotFound if no valid session.
ExtendSession(ctx context.Context, sessionToken string) error
SignOut(ctx context.Context, sessionToken string) error
// MintFirebaseCustomToken returns a Firebase custom token with uid=humanId and no custom claims.
// MintFirebaseCustomToken issues a Firebase custom token with uid=humanId and no claims.
MintFirebaseCustomToken(ctx context.Context, humanId string) (string, error)
IsSystemAdmin(ctx context.Context, email string) bool