Added support for an API key to the AuthMiddleware middleware in the library target. (#4)

This PR contains the work done to extend the implementation of the `AuthMiddleware` middleware to handle an API key as well as private and public keys.

Reviewed-on: #4
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
This commit was merged in pull request #4.
This commit is contained in:
2025-10-04 17:10:17 +00:00
committed by Javier Cicchelli
parent ce0ec02c03
commit f4065e62e4
5 changed files with 163 additions and 51 deletions
@@ -0,0 +1,23 @@
//===----------------------------------------------------------------------===
//
// This source file is part of the MarvelService open source project
//
// Copyright (c) -2025 Röck+Cöde VoF. and the MarvelService project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of MarvelService project authors
//
//===----------------------------------------------------------------------===
extension String {
/// A namespace assigned for parameter keys of URI paths.
enum Parameter {
/// A Marvel API key parameter.
static let apiKey = "apikey"
/// A MD5 hash parameter.
static let hash = "hash"
/// A timestamp parameter.
static let timestamp = "ts"
}
}