Skip to content

Commit 77e7e4b

Browse files
authored
Merge branch 'main' into main
2 parents fd874e7 + 3d4ad62 commit 77e7e4b

7 files changed

+10
-10
lines changed

Sources/WebAuthn/Ceremonies/Registration/AttestationConveyancePreference.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/// Options to specify the Relying Party's preference regarding attestation conveyance during credential generation.
1616
///
1717
/// Currently only supports `none`.
18-
public enum AttestationConveyancePreference: String, Encodable {
18+
public enum AttestationConveyancePreference: String, Encodable, Sendable {
1919
/// Indicates the Relying Party is not interested in authenticator attestation.
2020
case none
2121
// case indirect

Sources/WebAuthn/Ceremonies/Registration/AttestationFormat.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
public enum AttestationFormat: String, RawRepresentable, Equatable {
15+
public enum AttestationFormat: String, RawRepresentable, Equatable, Sendable {
1616
case packed
1717
case tpm
1818
case androidKey = "android-key"

Sources/WebAuthn/Ceremonies/Registration/AttestationObject.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414

1515
import Foundation
1616
import Crypto
17-
import SwiftCBOR
17+
@preconcurrency import SwiftCBOR
1818

1919
/// Contains the cryptographic attestation that a new key pair was created by that authenticator.
20-
public struct AttestationObject {
20+
public struct AttestationObject: Sendable {
2121
let authenticatorData: AuthenticatorData
2222
let rawAuthenticatorData: [UInt8]
2323
let format: AttestationFormat

Sources/WebAuthn/Ceremonies/Registration/AuthenticatorAttestationResponse.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import SwiftCBOR
1818
/// The response from the authenticator device for the creation of a new public key credential.
1919
///
2020
/// When decoding using `Decodable`, `clientDataJSON` and `attestationObject` are decoded from base64url to bytes.
21-
public struct AuthenticatorAttestationResponse {
21+
public struct AuthenticatorAttestationResponse: Sendable {
2222
/// The client data that was passed to the authenticator during the creation ceremony.
2323
///
2424
/// When decoding using `Decodable`, this is decoded from base64url to bytes.

Sources/WebAuthn/Ceremonies/Registration/Credential.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import Foundation
1616

1717
/// After a successful registration ceremony we pass this data back to the relying party. It contains all needed
1818
/// information about a WebAuthn credential for storage in e.g. a database.
19-
public struct Credential {
19+
public struct Credential: Sendable {
2020
/// Value will always be ``CredentialType/publicKey`` (for now)
2121
public let type: CredentialType
2222

Sources/WebAuthn/Ceremonies/Registration/PublicKeyCredentialCreationOptions.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import Foundation
2020
/// `Encodable` byte arrays are base64url encoded.
2121
///
2222
/// - SeeAlso: https://www.w3.org/TR/webauthn-2/#dictionary-makecredentialoptions
23-
public struct PublicKeyCredentialCreationOptions: Encodable {
23+
public struct PublicKeyCredentialCreationOptions: Encodable, Sendable {
2424
/// A byte array randomly generated by the Relying Party. Should be at least 16 bytes long to ensure sufficient
2525
/// entropy.
2626
///
@@ -71,7 +71,7 @@ public struct PublicKeyCredentialCreationOptions: Encodable {
7171

7272
// MARK: - Credential parameters
7373
/// From §5.3 (https://w3c.github.io/TR/webauthn/#dictionary-credential-params)
74-
public struct PublicKeyCredentialParameters: Equatable, Encodable {
74+
public struct PublicKeyCredentialParameters: Equatable, Encodable, Sendable {
7575
/// The type of credential to be created. At the time of writing always ``CredentialType/publicKey``.
7676
public let type: CredentialType
7777
/// The cryptographic signature algorithm with which the newly generated credential will be used, and thus also
@@ -104,7 +104,7 @@ extension Array where Element == PublicKeyCredentialParameters {
104104
/// From §5.4.2 (https://www.w3.org/TR/webauthn/#sctn-rp-credential-params).
105105
/// The PublicKeyCredentialRelyingPartyEntity dictionary is used to supply additional Relying Party attributes when
106106
/// creating a new credential.
107-
public struct PublicKeyCredentialRelyingPartyEntity: Encodable {
107+
public struct PublicKeyCredentialRelyingPartyEntity: Encodable, Sendable {
108108
/// A unique identifier for the Relying Party entity.
109109
public let id: String
110110

Sources/WebAuthn/Ceremonies/Registration/RegistrationCredential.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import Crypto
1818
/// The unprocessed response received from `navigator.credentials.create()`.
1919
///
2020
/// When decoding using `Decodable`, the `rawID` is decoded from base64url to bytes.
21-
public struct RegistrationCredential {
21+
public struct RegistrationCredential: Sendable {
2222
/// The credential ID of the newly created credential.
2323
public let id: URLEncodedBase64
2424

0 commit comments

Comments
 (0)