Skip to content

ref #111: fixing auth config#112

Merged
arthurgregorio merged 2 commits into
mainfrom
111-http-basic-auth-error
Apr 21, 2026
Merged

ref #111: fixing auth config#112
arthurgregorio merged 2 commits into
mainfrom
111-http-basic-auth-error

Conversation

@arthurgregorio

Copy link
Copy Markdown
Member

Objective
Fix the wrong auth basic popup shown in the browser

What's changed?
Set the proper entrypoint to the authentication

How can I test it?
Run app tests

Additional context
Issue #111

@arthurgregorio arthurgregorio self-assigned this Apr 20, 2026
Copilot AI review requested due to automatic review settings April 20, 2026 02:41
@arthurgregorio arthurgregorio linked an issue Apr 20, 2026 that may be closed by this pull request
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Fixes the incorrect HTTP Basic authentication challenge behavior that triggers the browser’s Basic login popup by aligning unauthorized responses with the intended Bearer/JWT flow (Issue #111).

Changes:

  • Configure Spring Security’s httpBasic entry point to use BearerTokenAuthenticationEntryPoint.
  • Update /auth/me to return 401 Unauthorized (instead of 403 Forbidden) when no authentication is present.

Reviewed changes

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

File Description
src/main/kotlin/br/com/webbudget/infrastructure/config/security/SecurityConfiguration.kt Adjusts the Basic auth entry point to avoid emitting a Basic challenge that can trigger the browser popup.
src/main/kotlin/br/com/webbudget/application/controllers/AuthenticationController.kt Changes unauthenticated /auth/me behavior to return 401 Unauthorized.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@arthurgregorio arthurgregorio merged commit db5842b into main Apr 21, 2026
3 checks passed
@arthurgregorio arthurgregorio deleted the 111-http-basic-auth-error branch April 21, 2026 21:53
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.

Http basic auth error

2 participants