Skip to content

Conversation

@ebigunso
Copy link
Owner

Reverts #5

Copilot AI review requested due to automatic review settings August 11, 2025 22:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR reverts the authentication, CSRF protection, and security headers feature that was added in PR #5. The changes completely remove the authentication system, returning the API to an unauthenticated state.

  • Removes all authentication and session management functionality
  • Eliminates CSRF protection for mutating requests
  • Removes security headers middleware
  • Simplifies test files by removing authentication setup

Reviewed Changes

Copilot reviewed 18 out of 20 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
sleep-api/tests/trends_bars.rs Removes authentication setup and simplifies server health check
sleep-api/tests/auth_csrf.rs Completely removes the authentication and CSRF test file
sleep-api/tests/api_sleep.rs Removes authentication setup from sleep API tests
sleep-api/src/trends.rs Removes authentication requirement from trends endpoints
sleep-api/src/security/ Removes entire security module including CSRF and headers
sleep-api/src/middleware/ Removes entire middleware module for authentication
sleep-api/src/main.rs Removes imports for auth, middleware, and security modules
sleep-api/src/lib.rs Removes public exports for auth, middleware, and security modules
sleep-api/src/config.rs Removes authentication-related configuration functions
sleep-api/src/auth.rs Completely removes authentication module
sleep-api/src/app.rs Removes authentication extractors and login/logout endpoints
sleep-api/Cargo.toml Updates dependencies removing auth-related features
openapi.yaml Removes authentication and security documentation
README.md Removes all authentication and security documentation
.env.example Removes environment configuration example

fn parse_date_field(s: &str, field: &str) -> Result<NaiveDate, ApiError> {
NaiveDate::parse_from_str(s, "%Y-%m-%d")
.map_err(|_| ApiError::InvalidInput(format!("invalid {field} date")))
.map_err(|_| ApiError::InvalidInput(format!("invalid {} date", field)))
Copy link

Copilot AI Aug 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This format! macro change appears to be an unintended side effect of the revert. The original format! with field variable was cleaner and more maintainable than string interpolation.

Copilot uses AI. Check for mistakes.
@ebigunso ebigunso closed this Aug 11, 2025
@ebigunso ebigunso deleted the revert-5-feature/2025-08-11/security-update branch August 11, 2025 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants