Improved the AuthMiddleware type in the library target by adding input validation and by generating the authentication information once.

This commit is contained in:
2025-10-12 21:26:55 +02:00
parent c2ab60a5aa
commit 21f2901337
4 changed files with 323 additions and 69 deletions
@@ -13,7 +13,7 @@
// ===----------------------------------------------------------------------===
/// A representation of the available transport options to send credentials in authenticated requests.
public enum AuthTransport: Sendable {
public enum AuthTransport: CaseIterable, Sendable {
/// Authentication credential are sent in a request as an `Authentication` header.
///
/// This means that the header will be added to any existing header in a request, like this: