Added an OpenAPI validation target and license headers.
This commit is contained in:
1 parent
2d86dff608
commit
2cfacd0e14
8 files changed
+79
-9
No files matched your search
@@ -1,3 +1,17 @@
|
||||
// ===----------------------------------------------------------------------===
|
||||
//
|
||||
// This source file is part of the ASConnectService open source project
|
||||
//
|
||||
// Copyright (c) 2026 Röck+Cöde VoF. and the ASConnectService project authors
|
||||
// Licensed under Apache license v2.0
|
||||
//
|
||||
// See LICENSE for license information
|
||||
// See CONTRIBUTORS for the list of ASConnectService project authors
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// ===----------------------------------------------------------------------===
|
||||
|
||||
#if canImport(CryptoKit)
|
||||
import CryptoKit
|
||||
import Foundation
|
||||
@@ -96,9 +110,8 @@ private extension APIKeyTokenProviderTests {
|
||||
try #require(parts.count == 3)
|
||||
|
||||
let header = try JSONDecoder().decode([String: String].self, from: try #require(Data(base64URL: parts[0])))
|
||||
let payload = try #require(
|
||||
try JSONSerialization.jsonObject(with: try #require(Data(base64URL: parts[1]))) as? [String: Any]
|
||||
)
|
||||
let payloadData = try #require(Data(base64URL: parts[1]))
|
||||
let payload = try #require(try JSONSerialization.jsonObject(with: payloadData) as? [String: Any])
|
||||
|
||||
return (header, payload)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user