File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 1111//
1212//===----------------------------------------------------------------------===//
1313
14- package struct ChallengeGenerator : Sendable {
15- var generate : @Sendable ( ) -> [ UInt8 ]
14+ public struct ChallengeGenerator : Sendable {
15+ public var generate : @Sendable ( ) -> [ UInt8 ]
1616
17- package static var live : Self {
17+ public init ( generate: @Sendable @escaping ( ) -> [ UInt8 ] ) {
18+ self . generate = generate
19+ }
20+
21+ public static var live : Self {
1822 . init( generate: { [ UInt8 ] . random ( count: 32 ) } )
1923 }
2024}
Original file line number Diff line number Diff line change @@ -35,11 +35,8 @@ public struct WebAuthnManager: Sendable {
3535 ///
3636 /// - Parameters:
3737 /// - configuration: The configuration to use for this manager.
38- public init ( configuration: Configuration ) {
39- self . init ( configuration: configuration, challengeGenerator: . live)
40- }
41-
42- package init ( configuration: Configuration , challengeGenerator: ChallengeGenerator ) {
38+ /// - challengeGenerator: The generator of challenge.
39+ public init ( configuration: Configuration , challengeGenerator: ChallengeGenerator = . live) {
4340 self . configuration = configuration
4441 self . challengeGenerator = challengeGenerator
4542 }
You can’t perform that action at this time.
0 commit comments