package handlers

const (
	Authorization                = "Authorization"
	UnauthorizedAccess           = "Unauthorized access"
	ErrorExtractingMailFromToken = "Error extracting email from token"
	HTTPS                        = "https://"

	// Time format constants
	timeFormatDateTime = "2006-01-02 15:04:05"

	// Redis key format constants
	redisKeyJWTSession       = "jwt_session:%s"
	redisKeyJWTSessionID     = "jwt_session_id:%s"
	redisKeyUserEmail        = "user_email:%s"
	redisKeySessionBlacklist = "session_blacklist:%s"
	redisKeyRefreshRateLimit = "refresh_rate_limit:%s"

	// Error message constants
	errMsgFailedToGenerateAccessToken   = "failed to generate access token"
	errMsgFailedToGetUserSessions       = "failed to get user sessions"
	errMsgSessionNotFoundInCache        = "session not found in cache"
	errMsgSessionHasBeenRevoked         = "session has been revoked"
	errMsgFailedToUpdateSessionActivity = "Failed to update session activity in Redis cache"

	// Format string constants
	errFormatWithContext = "%s: %w"
	errorFormat          = "%s?error=%s"

	// SQL query constants
	sqlUpdateRevokeSession = "UPDATE jwt_sessions SET is_revoked = true WHERE id = ?"

	// Google OAuth constants
	dbConnNilError    = "database connection is nil"
	errorInvalidState = "invalid state" // #nosec G101
	bearerPrefix      = "Bearer "
)
