-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathPasskeyExceptions.swift
More file actions
97 lines (80 loc) · 2.6 KB
/
PasskeyExceptions.swift
File metadata and controls
97 lines (80 loc) · 2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import ExpoModulesCore
internal class NotConfiguredException: Exception {
override var reason: String {
"Your Apple app site association is not properly configured."
}
}
internal class PendingPasskeyRequestException: Exception {
override var reason: String {
"There is already a pending passkey request"
}
}
internal class NotSupportedException: Exception {
override var reason: String {
"Passkeys are not supported on this iOS version. Please use iOS 15 or above"
}
}
internal class BiometricException: Exception {
override var reason: String {
"Biometrics must be enabled"
}
}
internal class UserCancelledException: Exception {
// Don't override reason - use the description passed to the initializer
// Maps to WebAuthn NotAllowedError
}
internal class InvalidChallengeException: Exception {
override var reason: String {
"The provided challenge was invalid"
}
}
internal class MissingUserIdException: Exception {
override var reason: String {
"`userId` is required"
}
}
internal class InvalidUserIdException: Exception {
override var reason: String {
"The provided userId was invalid"
}
}
internal class PasskeyRequestFailedException: Exception {
override var reason: String {
"The passkey request request failed"
}
}
internal class PasskeyAuthorizationFailedException: Exception {
override var reason: String {
"The passkey authorization failed"
}
}
internal class InvalidPRFInputException: Exception {
override var reason: String {
"The provided PRF input was invalid"
}
}
internal class UnknownException: Exception {
// Don't override reason - use the description passed to the initializer
// This allows propagating the actual error message from ASAuthorizationError
}
internal class InvalidLargeBlobWriteInputException: Exception {
override var reason: String {
"The provided large blob write input was invalid"
}
}
internal class MatchedExcludedCredentialException: Exception {
// Don't override reason - use the description passed to the initializer
// This will contain the localized message from iOS about the matched credential
}
internal class InvalidResponseException: Exception {
// Don't override reason - use the description passed to the initializer
// Maps to WebAuthn EncodingError
}
internal class NotHandledException: Exception {
// Don't override reason - use the description passed to the initializer
// Maps to WebAuthn NotSupportedError
}
internal class NotInteractiveException: Exception {
// Don't override reason - use the description passed to the initializer
// Maps to WebAuthn InvalidStateError
}