feat(auth): refactor authentication handling by removing redundant checks and introducing dynamic auth method determination

This commit is contained in:
Avinash Sridhar 2025-04-30 13:00:11 -04:00 • committed by Toby Padilla
commit f843bd4243

View file

@ -39,11 +39,6 @@ func (s *AuthServiceImpl) CheckAuthStatus(ctx context.Context, statusToken strin
// ValidateAuth validates authentication credentials
func (s *AuthServiceImpl) ValidateAuth(ctx context.Context, auth model.Authentication) (bool, error) {
// If authentication is not required, allow access
if !s.config.RequireAuth {
return true, nil
}
// If authentication is required but not provided
if auth.Method == "" || auth.Method == model.AuthMethodNone {
return false, ErrAuthRequired