Skip to content

Commit bcbbefb

Browse files
Renamed setUnsafeChallenge to unsafeSetChallenge, and removed the warning related to using it
1 parent bf2308c commit bcbbefb

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

Sources/WebAuthn/Ceremonies/Authentication/PublicKeyCredentialRequestOptions.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@ public struct PublicKeyCredentialRequestOptions: Sendable {
2323
///
2424
/// The Relying Party should store the challenge temporarily until the authentication flow is complete. When encoding using `Encodable` this is encoded as base64url.
2525
///
26-
/// - Warning: Although the challenge can be changed, doing so is not recommended and can lead to an insecure implementation of the WebAuthn protocol. See ``setUnsafeChallenge(_:)``.
26+
/// - SeeAlso: See ``unsafeSetChallenge(_:)`` for updating the challenge.
2727
public private(set) var challenge: [UInt8]
2828

2929
/// Unsafely change the challenge that will be delivered to the client.
30-
///
31-
/// - Warning: Although the challenge can be changed, doing so is not recommended and can lead to an insecure implementation of the WebAuthn protocol.
32-
public mutating func setUnsafeChallenge(_ newValue: [UInt8]) {
30+
public mutating func unsafeSetChallenge(_ newValue: [UInt8]) {
3331
challenge = newValue
3432
}
3533

Sources/WebAuthn/Ceremonies/Registration/PublicKeyCredentialCreationOptions.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@ public struct PublicKeyCredentialCreationOptions: Sendable {
2626
/// The Relying Party should store the challenge temporarily until the registration flow is complete. When
2727
/// encoding using `Encodable`, the challenge is base64url encoded.
2828
///
29-
/// - Warning: Although the challenge can be changed, dooing so is not recommended and can lead to an insecure implementation of the WebAuthn protocol. See ``setUnsafeChallenge(_:)``.
29+
/// - SeeAlso: See ``unsafeSetChallenge(_:)`` for updating the challenge.
3030
public private(set) var challenge: [UInt8]
3131

3232
/// Unsafely change the challenge that will be delivered to the client.
33-
///
34-
/// - Warning: Although the challenge can be changed, doing so is not recommended and can lead to an insecure implementation of the WebAuthn protocol.
35-
public mutating func setUnsafeChallenge(_ newValue: [UInt8]) {
33+
public mutating func unsafeSetChallenge(_ newValue: [UInt8]) {
3634
challenge = newValue
3735
}
3836

0 commit comments

Comments
 (0)