Skip to content

Commit 29e2877

Browse files
committed
add copyright comments
1 parent 793be78 commit 29e2877

18 files changed

+238
-4
lines changed

Package.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,24 @@ let package = Package(
2121
.macOS(.v12)
2222
],
2323
products: [
24-
.library(name: "WebAuthn", targets: ["WebAuthn"]),
24+
.library(name: "WebAuthn", targets: ["WebAuthn"])
2525
],
2626
dependencies: [
2727
.package(url: "https://github.com/unrelentingtech/SwiftCBOR.git", from: "0.4.5"),
2828
.package(url: "https://github.com/apple/swift-crypto.git", from: "2.0.0"),
29-
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),
29+
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0")
3030
],
3131
targets: [
3232
.target(
3333
name: "WebAuthn",
3434
dependencies: [
3535
"SwiftCBOR",
3636
.product(name: "Crypto", package: "swift-crypto"),
37-
.product(name: "Logging", package: "swift-log"),
37+
.product(name: "Logging", package: "swift-log")
3838
]
3939
),
4040
.testTarget(name: "WebAuthnTests", dependencies: [
41-
.target(name: "WebAuthn"),
41+
.target(name: "WebAuthn")
4242
])
4343
]
4444
)

Sources/WebAuthn/Authenticator.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the WebAuthn Swift open source project
4+
//
5+
// Copyright (c) 2022 the WebAuthn Swift project authors
6+
// Licensed under Apache License v2.0
7+
//
8+
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of WebAuthn Swift project authors
10+
//
11+
// SPDX-License-Identifier: Apache-2.0
12+
//
13+
//===----------------------------------------------------------------------===//
14+
115
public struct Authenticator {
216
let aaguid: [UInt8]
317
let signCount: UInt32

Sources/WebAuthn/Authenticator/AttestationObject/AttestationFormat.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the WebAuthn Swift open source project
4+
//
5+
// Copyright (c) 2022 the WebAuthn Swift project authors
6+
// Licensed under Apache License v2.0
7+
//
8+
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of WebAuthn Swift project authors
10+
//
11+
// SPDX-License-Identifier: Apache-2.0
12+
//
13+
//===----------------------------------------------------------------------===//
14+
115
public enum AttestationFormat: String, RawRepresentable {
216
case packed
317
case tpm

Sources/WebAuthn/Authenticator/AttestationObject/AttestationObject.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the WebAuthn Swift open source project
4+
//
5+
// Copyright (c) 2022 the WebAuthn Swift project authors
6+
// Licensed under Apache License v2.0
7+
//
8+
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of WebAuthn Swift project authors
10+
//
11+
// SPDX-License-Identifier: Apache-2.0
12+
//
13+
//===----------------------------------------------------------------------===//
14+
115
import Crypto
216

317
struct AttestationObject {

Sources/WebAuthn/Authenticator/AttestationObject/AuthenticatorData.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the WebAuthn Swift open source project
4+
//
5+
// Copyright (c) 2022 the WebAuthn Swift project authors
6+
// Licensed under Apache License v2.0
7+
//
8+
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of WebAuthn Swift project authors
10+
//
11+
// SPDX-License-Identifier: Apache-2.0
12+
//
13+
//===----------------------------------------------------------------------===//
14+
115
import Crypto
216

317
/// AuthenticatorData From §6.1 of the spec.

Sources/WebAuthn/Authenticator/AuthenticatorAttestationResponse.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the WebAuthn Swift open source project
4+
//
5+
// Copyright (c) 2022 the WebAuthn Swift project authors
6+
// Licensed under Apache License v2.0
7+
//
8+
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of WebAuthn Swift project authors
10+
//
11+
// SPDX-License-Identifier: Apache-2.0
12+
//
13+
//===----------------------------------------------------------------------===//
14+
115
import Foundation
216
import SwiftCBOR
317

Sources/WebAuthn/Authenticator/CollectedClientData.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the WebAuthn Swift open source project
4+
//
5+
// Copyright (c) 2022 the WebAuthn Swift project authors
6+
// Licensed under Apache License v2.0
7+
//
8+
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of WebAuthn Swift project authors
10+
//
11+
// SPDX-License-Identifier: Apache-2.0
12+
//
13+
//===----------------------------------------------------------------------===//
14+
115
import Foundation
216

317
/// https://www.w3.org/TR/webauthn/#dictionary-client-data

Sources/WebAuthn/COSE/COSEAlgorithmIdentifier.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the WebAuthn Swift open source project
4+
//
5+
// Copyright (c) 2022 the WebAuthn Swift project authors
6+
// Licensed under Apache License v2.0
7+
//
8+
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of WebAuthn Swift project authors
10+
//
11+
// SPDX-License-Identifier: Apache-2.0
12+
//
13+
//===----------------------------------------------------------------------===//
14+
115
/// COSEAlgorithmIdentifier From §5.10.5. A number identifying a cryptographic algorithm. The algorithm
216
/// identifiers SHOULD be values registered in the IANA COSE Algorithms registry
317
/// [https://www.w3.org/TR/webauthn/#biblio-iana-cose-algs-reg], for instance, -7 for "ES256"

Sources/WebAuthn/COSE/COSEKeyType.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the WebAuthn Swift open source project
4+
//
5+
// Copyright (c) 2022 the WebAuthn Swift project authors
6+
// Licensed under Apache License v2.0
7+
//
8+
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of WebAuthn Swift project authors
10+
//
11+
// SPDX-License-Identifier: Apache-2.0
12+
//
13+
//===----------------------------------------------------------------------===//
14+
115
import Foundation
216

317
/// The Key Type derived from the IANA COSE AuthData

Sources/WebAuthn/Ceremonies/Registration/CredentialCreationResponse.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,14 @@ public struct CredentialCreationResponse: Codable {
3131
case clientExtensionResults
3232
case attestationResponse = "response"
3333
}
34+
}
35+
36+
public struct ClientExtensionResults: Codable {
37+
let wrapped: [String: Any]
38+
39+
public init(from decoder: Decoder) throws {
40+
var container = try decoder.unkeyedContainer()
41+
42+
container.decode([String: Decodable].self)
43+
}
3444
}

0 commit comments

Comments
 (0)