Files
kalzu-value-store/auth/storage.go
ryyst c273b836be refactor: extract authentication system to auth package
- Create auth/jwt.go with JWT token management
- Create auth/permissions.go with permission checking logic
- Create auth/storage.go with storage key utilities
- Create auth/auth.go with main authentication service
- Create auth/middleware.go with auth and rate limit middleware
- Update main.go to import auth package and use auth.* functions
- Add authService to Server struct

Major auth functionality now separated into dedicated package.
Build tested and verified working.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-18 18:49:27 +03:00

19 lines
400 B
Go

package auth
// Storage key generation utilities for authentication data
func UserStorageKey(userUUID string) string {
return "user:" + userUUID
}
func GroupStorageKey(groupUUID string) string {
return "group:" + groupUUID
}
func TokenStorageKey(tokenHash string) string {
return "token:" + tokenHash
}
func ResourceMetadataKey(resourceKey string) string {
return resourceKey + ":metadata"
}