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:
@@ -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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user