Skip to content

Conversation

@System-Glitch
Copy link
Member

@System-Glitch System-Glitch commented Oct 28, 2025

References

Issue(s): #278

Description

  • Added SchemeAuthenticator interface that authenticators can implement to indicate the scheme they are using.
  • On authentication failure, the auth middleware adds the WWW-Authenticate header to the response if the authenticator implements SchemeAuthenticator.
  • Added auth.MiddlewareWithRealm to provide custom realm description.
  • Using this approach instead of implementing OnAunthorizer on existing authenticator implementations avoids breaking custom implementations that use composition with the built-in ones.

Resources:

Possible drawbacks

None.

@System-Glitch System-Glitch requested a review from YoSev October 28, 2025 10:19
@System-Glitch System-Glitch self-assigned this Oct 28, 2025
@System-Glitch System-Glitch added the enhancement Enhancement of existing feature label Oct 28, 2025
@coveralls
Copy link

Pull Request Test Coverage Report for Build 18871375303

Details

  • 25 of 25 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.009%) to 97.545%

Totals Coverage Status
Change from base Build 18378152916: 0.009%
Covered Lines: 6675
Relevant Lines: 6843

💛 - Coveralls

@System-Glitch System-Glitch merged commit a0667a3 into master Oct 29, 2025
19 of 22 checks passed
@System-Glitch System-Glitch deleted the feat/www-authenticate-header branch October 29, 2025 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancement of existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants