You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Guardian](https://auth0.com/docs/multifactor-authentication/guardian) is Auth0's multi-factor
12
12
authentication (MFA) service that provides a simple, safe way for you to implement MFA.
@@ -20,7 +20,7 @@ multi-factor authentication from your app.
20
20
21
21
## Requirements
22
22
23
-
iOS 9.3+ and Swift 3 is required in order to use Guardian.
23
+
iOS 10+ and Swift 4.1 is required in order to use Guardian.
24
24
25
25
## Before getting started
26
26
@@ -36,15 +36,15 @@ Guardian.swift is available through [CocoaPods](http://cocoapods.org).
36
36
To install it, simply add the following line to your Podfile:
37
37
38
38
```ruby
39
-
pod 'Guardian', '~> 0.5.0'
39
+
pod 'Guardian', '~> 1.0.0'
40
40
```
41
41
42
42
#### Carthage
43
43
44
44
In your Cartfile add this line
45
45
46
46
```
47
-
github "auth0/Guardian.swift" ~> 0.5.0
47
+
github "auth0/Guardian.swift" ~> 1.0.0
48
48
```
49
49
50
50
## Usage
@@ -70,7 +70,7 @@ For an enrollment you need the following things, besides your Guardian Domain:
70
70
71
71
- Enrollment Uri: The value encoded in the QR Code scanned from Guardian Web Widget or in your enrollment ticket sent to you, e.g. by email.
72
72
- APNS Token: Apple APNS token for the device and **MUST** be a `String`containing the 64 bytes (expressed in hexadecimal format)
73
-
-Key Pair: A RSA (Private/Public) key pair used to assert your identity with Auth0 Guardian
73
+
-Signing & Verification Key: A RSA (Private/Public) key pair used to assert your identity with Auth0 Guardian
74
74
75
75
> In case your app is not yet using push notifications or you're not familiar with it, you should check their [docs](https://developer.apple.com/go/?id=push-notifications).
76
76
@@ -81,11 +81,13 @@ Guardian
81
81
.enroll(forDomain: "{YOUR_GUARDIAN_DOMAIN}",
82
82
usingUri: "{ENROLLMENT_URI}",
83
83
notificationToken: "{APNS_TOKEN}",
84
-
keyPair: keyPair)
84
+
signingKey: signingKey,
85
+
verificationKey: verificationKey
86
+
)
85
87
.start { result in
86
88
switch result {
87
-
case .success(letenrollment):
88
-
// success, we have the enrollment data available
89
+
case .success(letenrolledDevice):
90
+
// success, we have the enrollment device data available
89
91
case .failure(let cause):
90
92
// something failed, check cause to see what went wrong
91
93
}
@@ -94,20 +96,44 @@ Guardian
94
96
95
97
On success you'll obtain the enrollment information, that should be secured stored in your application. This information includes the enrollment identifier, and the token for Guardian API associated to your device for updating or deleting your enrollment.
96
98
97
-
#### RSA key pair
99
+
#### Signing & Verification Keys
98
100
99
-
Guardian.swift provides a convenience class to generate an RSA key pair and store it in iOS Keychain.
101
+
Guardian.swift provides a convenience class to generate a signing key
0 commit comments