-
Notifications
You must be signed in to change notification settings - Fork 1
/
changes.diff
2268 lines (2167 loc) · 81.3 KB
/
changes.diff
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
diff --git a/tmp/auth0_diff_spm/A0ChallengeGenerator.h b/tmp/auth0_diff_spm/A0ChallengeGenerator.h
new file mode 100644
index 0000000..ddb17a7
--- /dev/null
+++ b/tmp/auth0_diff_spm/A0ChallengeGenerator.h
@@ -0,0 +1,35 @@
+// A0ChallengeGenerator.h
+//
+// Copyright (c) 2016 Auth0 (http://auth0.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+@interface A0SHA256ChallengeGenerator : NSObject
+@property (readonly, strong, nonatomic) NSString *verifier;
+@property (readonly, strong, nonatomic) NSString *challenge;
+@property (readonly, strong, nonatomic) NSString *method;
+
+- (instancetype)init;
+- (instancetype)initWithVerifier:(NSData *)verifier;
+
+@end
+NS_ASSUME_NONNULL_END
diff --git a/tmp/auth0_diff_spm/A0ChallengeGenerator.m b/tmp/auth0_diff_spm/A0ChallengeGenerator.m
new file mode 100644
index 0000000..5b095be
--- /dev/null
+++ b/tmp/auth0_diff_spm/A0ChallengeGenerator.m
@@ -0,0 +1,71 @@
+// A0ChallengeGenerator.m
+//
+// Copyright (c) 2016 Auth0 (http://auth0.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import "A0ChallengeGenerator.h"
+#import <CommonCrypto/CommonCrypto.h>
+
+const NSUInteger kVerifierSize = 32;
+
+@implementation A0SHA256ChallengeGenerator
+
+- (instancetype)init {
+ NSMutableData *data = [NSMutableData dataWithLength:kVerifierSize];
+ int result __attribute__((unused)) = SecRandomCopyBytes(kSecRandomDefault, kVerifierSize, data.mutableBytes);
+ return [self initWithVerifier:data];
+}
+
+- (instancetype)initWithVerifier:(NSData *)verifier {
+ self = [super init];
+ if (self) {
+ _verifier = [[[[verifier base64EncodedStringWithOptions:0]
+ stringByReplacingOccurrencesOfString:@"+" withString:@"-"]
+ stringByReplacingOccurrencesOfString:@"/" withString:@"_"]
+ stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"="]];
+ _method = @"S256";
+ }
+ return self;
+}
+
+- (NSString *)challenge {
+ CC_SHA256_CTX ctx;
+
+ uint8_t * hashBytes = malloc(CC_SHA256_DIGEST_LENGTH * sizeof(uint8_t));
+ memset(hashBytes, 0x0, CC_SHA256_DIGEST_LENGTH);
+
+ NSData *valueData = [self.verifier dataUsingEncoding:NSUTF8StringEncoding];
+
+ CC_SHA256_Init(&ctx);
+ CC_SHA256_Update(&ctx, [valueData bytes], (CC_LONG)[valueData length]);
+ CC_SHA256_Final(hashBytes, &ctx);
+
+ NSData *hash = [NSData dataWithBytes:hashBytes length:CC_SHA256_DIGEST_LENGTH];
+
+ if (hashBytes) {
+ free(hashBytes);
+ }
+
+ return [[[[hash base64EncodedStringWithOptions:0]
+ stringByReplacingOccurrencesOfString:@"+" withString:@"-"]
+ stringByReplacingOccurrencesOfString:@"/" withString:@"_"]
+ stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"="]];
+}
+@end
diff --git a/tmp/auth0_diff_original/Auth0.h b/tmp/auth0_diff_spm/A0RSA.h
similarity index 72%
rename from /tmp/auth0_diff_original/Auth0.h
rename to /tmp/auth0_diff_spm/A0RSA.h
index f3004ac..a04d8dc 100644
--- a/tmp/auth0_diff_original/Auth0.h
+++ b/tmp/auth0_diff_spm/A0RSA.h
@@ -1,4 +1,4 @@
-// Auth0.h
+// A0RSA.h
//
// Copyright (c) 2016 Auth0 (http://auth0.com)
//
@@ -22,16 +22,14 @@
#import <Foundation/Foundation.h>
-//! Project version number for Auth0.
-FOUNDATION_EXPORT double Auth0VersionNumber;
+NS_ASSUME_NONNULL_BEGIN
+@interface A0RSA: NSObject
-//! Project version string for Auth0.
-FOUNDATION_EXPORT const unsigned char Auth0VersionString[];
+- (nullable instancetype)initWithKey: (SecKeyRef)key;
-// In this header, you should import all the public headers of your framework using statements like #import <Auth0/PublicHeader.h>
+- (NSData *)sign: (NSData *)data;
-#if WEB_AUTH_PLATFORM
-#import <Auth0/A0ChallengeGenerator.h>
-#import <Auth0/A0SHA.h>
-#import <Auth0/A0RSA.h>
-#endif
+- (Boolean)verify: (NSData *)data signature: (NSData *)signature;
+
+@end
+NS_ASSUME_NONNULL_END
diff --git a/tmp/auth0_diff_spm/A0RSA.m b/tmp/auth0_diff_spm/A0RSA.m
new file mode 100644
index 0000000..d334b18
--- /dev/null
+++ b/tmp/auth0_diff_spm/A0RSA.m
@@ -0,0 +1,71 @@
+// A0RSA.m
+//
+// Copyright (c) 2016 Auth0 (http://auth0.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import "A0RSA.h" // Added by Auth0toSPM(original value '#import <A0RSA.h>')
+#import <CommonCrypto/CommonCrypto.h>
+
+@interface A0RSA ()
+@property (readonly, nonatomic) SecKeyRef key;
+@end
+
+@implementation A0RSA
+
+- (nullable instancetype)initWithKey: (SecKeyRef)key {
+ self = [super init];
+ if (self) {
+ _key = key;
+ }
+ return self;
+}
+
+- (NSData *)sign:(NSData *)plainData {
+ size_t signedHashBytesSize = SecKeyGetBlockSize(self.key);
+ uint8_t signedHashBytes[signedHashBytesSize];
+ memset(signedHashBytes, 0x0, signedHashBytesSize);
+
+ OSStatus result = SecKeyRawSign(self.key,
+ kSecPaddingPKCS1SHA256,
+ plainData.bytes,
+ plainData.length,
+ signedHashBytes,
+ &signedHashBytesSize);
+
+ NSData* signedHash = nil;
+ if (result == errSecSuccess) {
+ signedHash = [NSData dataWithBytes:signedHashBytes
+ length:(NSUInteger)signedHashBytesSize];
+ }
+
+ return signedHash;
+}
+
+- (Boolean)verify:(NSData *)plainData signature:(NSData *)signature {
+ OSStatus result = SecKeyRawVerify(self.key,
+ kSecPaddingPKCS1SHA256,
+ plainData.bytes,
+ plainData.length,
+ signature.bytes,
+ signature.length);
+ return result == errSecSuccess;
+}
+
+@end
diff --git a/tmp/auth0_diff_spm/A0SHA.h b/tmp/auth0_diff_spm/A0SHA.h
new file mode 100644
index 0000000..763caf2
--- /dev/null
+++ b/tmp/auth0_diff_spm/A0SHA.h
@@ -0,0 +1,33 @@
+// A0SHA.h
+//
+// Copyright (c) 2016 Auth0 (http://auth0.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+@interface A0SHA: NSObject
+
+- (nullable instancetype)initWithAlgorithm: (NSString *)algorithm;
+
+- (NSData *)hash: (NSData *)data;
+
+@end
+NS_ASSUME_NONNULL_END
diff --git a/tmp/auth0_diff_spm/A0SHA.m b/tmp/auth0_diff_spm/A0SHA.m
new file mode 100644
index 0000000..ff34f36
--- /dev/null
+++ b/tmp/auth0_diff_spm/A0SHA.m
@@ -0,0 +1,61 @@
+// A0SHA.m
+//
+// Copyright (c) 2016 Auth0 (http://auth0.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import "A0SHA.h" // Added by Auth0toSPM(original value '#import <A0SHA.h>')
+#import <CommonCrypto/CommonHMAC.h>
+
+static NSString * const kDefaultSHAAlgorithm = @"sha256";
+
+@interface A0SHA ()
+@property (readonly, nonatomic) NSInteger digestLength;
+@end
+
+@implementation A0SHA
+
+- (instancetype)initWithAlgorithm:(NSString *)algorithm {
+ self = [super init];
+ if (self) {
+ const NSString * alg = algorithm.lowercaseString;
+ if ([kDefaultSHAAlgorithm isEqual: alg]) {
+ _digestLength = CC_SHA256_DIGEST_LENGTH;
+ } else {
+ return nil;
+ }
+ }
+ return self;
+}
+
+- (instancetype)init {
+ return [self initWithAlgorithm: kDefaultSHAAlgorithm];
+}
+
+- (NSData *)hash:(NSData *)data {
+ uint8_t hashBytes[self.digestLength];
+ memset(hashBytes, 0x0, self.digestLength);
+
+ CC_SHA256(data.bytes, (CC_LONG)data.length, hashBytes);
+
+ NSData *hash = [NSData dataWithBytes:hashBytes length:self.digestLength];
+ return hash;
+}
+
+@end
diff --git a/tmp/auth0_diff_original/A0SimpleKeychain+RSAPublicKey.swift b/tmp/auth0_diff_spm/A0SimpleKeychain+RSAPublicKey.swift
index 1208e39..3818cf1 100644
--- a/tmp/auth0_diff_original/A0SimpleKeychain+RSAPublicKey.swift
+++ b/tmp/auth0_diff_spm/A0SimpleKeychain+RSAPublicKey.swift
@@ -1,3 +1,5 @@
+#if os(iOS) || os(macOS) // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// A0SimpleKeychain+RSAPublicKey.swift
//
// Copyright (c) 2020 Auth0 (http://auth0.com)
@@ -20,7 +22,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if WEB_AUTH_PLATFORM
+#if os(iOS) || os(macOS) // Added by Auth0toSPM(original value '#if WEB_AUTH_PLATFORM')
import Foundation
import SimpleKeychain
@@ -40,3 +42,5 @@ extension A0SimpleKeychain {
}
}
#endif
+
+#endif // Added by Auth0toSPM
diff --git a/tmp/auth0_diff_original/Array+Encode.swift b/tmp/auth0_diff_spm/Array+Encode.swift
index 91f630a..aafa281 100644
--- a/tmp/auth0_diff_original/Array+Encode.swift
+++ b/tmp/auth0_diff_spm/Array+Encode.swift
@@ -1,3 +1,5 @@
+#if os(iOS) || os(macOS) // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// Array+Encode.swift
//
// Copyright (c) 2019 Auth0 (http://auth0.com)
@@ -20,7 +22,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if WEB_AUTH_PLATFORM
+#if os(iOS) || os(macOS) // Added by Auth0toSPM(original value '#if WEB_AUTH_PLATFORM')
import Foundation
extension Array where Element == UInt8 {
@@ -40,3 +42,5 @@ extension Array where Element == UInt8 {
}
}
#endif
+
+#endif // Added by Auth0toSPM
diff --git a/tmp/auth0_diff_original/Auth0.swift b/tmp/auth0_diff_spm/Auth0.swift
index 485690d..6e29b29 100644
--- a/tmp/auth0_diff_original/Auth0.swift
+++ b/tmp/auth0_diff_spm/Auth0.swift
@@ -1,3 +1,5 @@
+#if os(tvOS) || os(iOS) || os(macOS) || os(watchOS) // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// Auth0.swift
//
// Copyright (c) 2016 Auth0 (http://auth0.com)
@@ -156,3 +158,5 @@ func plistValues(bundle: Bundle) -> (clientId: String, domain: String)? {
}
return (clientId: clientId, domain: domain)
}
+
+#endif // Added by Auth0toSPM
diff --git a/tmp/auth0_diff_original/Auth0Authentication.swift b/tmp/auth0_diff_spm/Auth0Authentication.swift
index 0fc594b..fa81681 100644
--- a/tmp/auth0_diff_original/Auth0Authentication.swift
+++ b/tmp/auth0_diff_spm/Auth0Authentication.swift
@@ -1,3 +1,5 @@
+#if os(tvOS) || os(iOS) || os(macOS) || os(watchOS) // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// Auth0Authentication.swift
//
// Copyright (c) 2016 Auth0 (http://auth0.com)
@@ -501,3 +503,5 @@ private extension Auth0Authentication {
return self.tokenExchange(withParameters: parameters)
}
}
+
+#endif // Added by Auth0toSPM
diff --git a/tmp/auth0_diff_original/Auth0Error.swift b/tmp/auth0_diff_spm/Auth0Error.swift
index b640d98..4d22d52 100644
--- a/tmp/auth0_diff_original/Auth0Error.swift
+++ b/tmp/auth0_diff_spm/Auth0Error.swift
@@ -1,3 +1,5 @@
+#if os(tvOS) || os(iOS) || os(macOS) || os(watchOS) // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// Auth0Error.swift
//
// Copyright (c) 2016 Auth0 (http://auth0.com)
@@ -38,3 +40,5 @@ public protocol Auth0Error: Error {
/// The code of the error as a String
var code: String { get }
}
+
+#endif // Added by Auth0toSPM
diff --git a/tmp/auth0_diff_original/Auth0Spec.swift b/tmp/auth0_diff_spm/Auth0Spec.swift
index 5dca27f..7f2e535 100644
--- a/tmp/auth0_diff_original/Auth0Spec.swift
+++ b/tmp/auth0_diff_spm/Auth0Spec.swift
@@ -1,3 +1,5 @@
+import Foundation // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// Auth0Spec.swift
//
// Copyright (c) 2016 Auth0 (http://auth0.com)
@@ -23,6 +25,7 @@
import Quick
import Nimble
import OHHTTPStubs
+import OHHTTPStubsSwift // Added by Auth0toSPM(original value 'import OHHTTPStubs')
@testable import Auth0
diff --git a/tmp/auth0_diff_original/AuthCancelable.swift b/tmp/auth0_diff_spm/AuthCancelable.swift
index 0e9f3be..7ac3e54 100644
--- a/tmp/auth0_diff_original/AuthCancelable.swift
+++ b/tmp/auth0_diff_spm/AuthCancelable.swift
@@ -1,3 +1,6 @@
+#if os(iOS) || os(macOS) // Added by Auth0toSPM
+import Foundation // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// AuthCancelable.swift
//
// Copyright (c) 2020 Auth0 (http://auth0.com)
@@ -20,7 +23,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if WEB_AUTH_PLATFORM
+#if os(iOS) || os(macOS) // Added by Auth0toSPM(original value '#if WEB_AUTH_PLATFORM')
/**
Represents a cancelable Auth operation with an Identity Provider (Auth0 or a third party).
*/
@@ -33,3 +36,5 @@ public protocol AuthCancelable {
}
#endif
+
+#endif // Added by Auth0toSPM
diff --git a/tmp/auth0_diff_original/AuthProvider.swift b/tmp/auth0_diff_spm/AuthProvider.swift
index 980c2b8..afea900 100644
--- a/tmp/auth0_diff_original/AuthProvider.swift
+++ b/tmp/auth0_diff_spm/AuthProvider.swift
@@ -1,3 +1,6 @@
+#if os(iOS) || os(macOS) // Added by Auth0toSPM
+import Foundation // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// AuthProvider.swift
//
// Copyright (c) 2017 Auth0 (http://auth0.com)
@@ -20,7 +23,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if WEB_AUTH_PLATFORM
+#if os(iOS) || os(macOS) // Added by Auth0toSPM(original value '#if WEB_AUTH_PLATFORM')
/**
The AuthProvider protocol is adopted by objects that are to be used as Native Authentication
handlers. An object implementing this protocol is intended to supersede the default authentication
@@ -55,3 +58,5 @@ public protocol AuthProvider {
static func isAvailable() -> Bool
}
#endif
+
+#endif // Added by Auth0toSPM
diff --git a/tmp/auth0_diff_original/AuthSession.swift b/tmp/auth0_diff_spm/AuthSession.swift
index 4640b27..ed19562 100644
--- a/tmp/auth0_diff_original/AuthSession.swift
+++ b/tmp/auth0_diff_spm/AuthSession.swift
@@ -1,3 +1,6 @@
+#if os(iOS) || os(macOS) // Added by Auth0toSPM
+import Foundation // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// AuthSession.swift
//
// Copyright (c) 2020 Auth0 (http://auth0.com)
@@ -20,7 +23,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if WEB_AUTH_PLATFORM
+#if os(iOS) || os(macOS) // Added by Auth0toSPM(original value '#if WEB_AUTH_PLATFORM')
protocol AuthSession {
func start() -> Bool
@@ -28,3 +31,5 @@ protocol AuthSession {
}
#endif
+
+#endif // Added by Auth0toSPM
diff --git a/tmp/auth0_diff_original/AuthTransaction.swift b/tmp/auth0_diff_spm/AuthTransaction.swift
index 1a833de..2364339 100644
--- a/tmp/auth0_diff_original/AuthTransaction.swift
+++ b/tmp/auth0_diff_spm/AuthTransaction.swift
@@ -1,3 +1,6 @@
+#if os(iOS) || os(macOS) // Added by Auth0toSPM
+import Foundation // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// AuthTransaction.swift
//
// Copyright (c) 2016 Auth0 (http://auth0.com)
@@ -20,7 +23,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if WEB_AUTH_PLATFORM
+#if os(iOS) || os(macOS) // Added by Auth0toSPM(original value '#if WEB_AUTH_PLATFORM')
/**
Represents an ongoing Auth transaction with an Identity Provider (Auth0 or a third party).
@@ -37,3 +40,5 @@ public protocol AuthTransaction: AuthResumable, AuthCancelable {
}
#endif
+
+#endif // Added by Auth0toSPM
diff --git a/tmp/auth0_diff_original/Authentication.swift b/tmp/auth0_diff_spm/Authentication.swift
index 93a3cb2..70c01e9 100644
--- a/tmp/auth0_diff_original/Authentication.swift
+++ b/tmp/auth0_diff_spm/Authentication.swift
@@ -1,3 +1,5 @@
+#if os(tvOS) || os(iOS) || os(macOS) || os(watchOS) // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// Authentication.swift
//
// Copyright (c) 2016 Auth0 (http://auth0.com)
@@ -729,7 +731,7 @@ public protocol Authentication: Trackable, Loggable {
*/
func jwks() -> Request<JWKS, AuthenticationError>
-#if WEB_AUTH_PLATFORM
+#if os(iOS) || os(macOS) // Added by Auth0toSPM(original value '#if WEB_AUTH_PLATFORM')
/**
Creates a new WebAuth request to authenticate using Safari browser and OAuth authorize flow.
@@ -1319,3 +1321,5 @@ public extension Authentication {
}
}
+
+#endif // Added by Auth0toSPM
diff --git a/tmp/auth0_diff_original/AuthenticationError.swift b/tmp/auth0_diff_spm/AuthenticationError.swift
index 92f437b..efd4e52 100644
--- a/tmp/auth0_diff_original/AuthenticationError.swift
+++ b/tmp/auth0_diff_spm/AuthenticationError.swift
@@ -1,3 +1,5 @@
+#if os(tvOS) || os(iOS) || os(macOS) || os(watchOS) // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// AuthenticationError.swift
//
// Copyright (c) 2016 Auth0 (http://auth0.com)
@@ -169,3 +171,5 @@ extension AuthenticationError: CustomNSError {
]
}
}
+
+#endif // Added by Auth0toSPM
diff --git a/tmp/auth0_diff_original/AuthenticationErrorSpec.swift b/tmp/auth0_diff_spm/AuthenticationErrorSpec.swift
index 49dd1f5..5d55236 100644
--- a/tmp/auth0_diff_original/AuthenticationErrorSpec.swift
+++ b/tmp/auth0_diff_spm/AuthenticationErrorSpec.swift
@@ -1,3 +1,5 @@
+import Foundation // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// AuthenticationErrorSpec.swift
//
// Copyright (c) 2016 Auth0 (http://auth0.com)
diff --git a/tmp/auth0_diff_original/AuthenticationServicesSession.swift b/tmp/auth0_diff_spm/AuthenticationServicesSession.swift
index fbefff9..bece356 100644
--- a/tmp/auth0_diff_original/AuthenticationServicesSession.swift
+++ b/tmp/auth0_diff_spm/AuthenticationServicesSession.swift
@@ -1,3 +1,6 @@
+#if os(iOS) || os(macOS) // Added by Auth0toSPM
+import Foundation // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// AuthenticationServicesSession.swift
//
// Copyright (c) 2020 Auth0 (http://auth0.com)
@@ -20,7 +23,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if WEB_AUTH_PLATFORM && canImport(AuthenticationServices)
+#if os(iOS) || os(macOS) // Added by Auth0toSPM(original value '#if WEB_AUTH_PLATFORM') && canImport(AuthenticationServices)
import AuthenticationServices
@available(iOS 12.0, macOS 10.15, *)
@@ -69,3 +72,5 @@ final class AuthenticationServicesSession: SessionTransaction {
@available(iOS 12.0, macOS 10.15, *)
extension ASWebAuthenticationSession: AuthSession {}
#endif
+
+#endif // Added by Auth0toSPM
diff --git a/tmp/auth0_diff_original/AuthenticationServicesSessionCallback.swift b/tmp/auth0_diff_spm/AuthenticationServicesSessionCallback.swift
index da92e3c..ec20ce8 100644
--- a/tmp/auth0_diff_original/AuthenticationServicesSessionCallback.swift
+++ b/tmp/auth0_diff_spm/AuthenticationServicesSessionCallback.swift
@@ -1,3 +1,6 @@
+#if os(iOS) || os(macOS) // Added by Auth0toSPM
+import Foundation // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// AuthenticationServicesSessionCallback.swift
//
// Copyright (c) 2020 Auth0 (http://auth0.com)
@@ -20,7 +23,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if WEB_AUTH_PLATFORM && canImport(AuthenticationServices)
+#if os(iOS) || os(macOS) // Added by Auth0toSPM(original value '#if WEB_AUTH_PLATFORM') && canImport(AuthenticationServices)
import AuthenticationServices
@available(iOS 12.0, macOS 10.15, *)
@@ -47,3 +50,5 @@ final class AuthenticationServicesSessionCallback: SessionCallbackTransaction {
}
#endif
+
+#endif // Added by Auth0toSPM
diff --git a/tmp/auth0_diff_original/AuthenticationSpec.swift b/tmp/auth0_diff_spm/AuthenticationSpec.swift
index f725d33..f51ced0 100644
--- a/tmp/auth0_diff_original/AuthenticationSpec.swift
+++ b/tmp/auth0_diff_spm/AuthenticationSpec.swift
@@ -1,3 +1,4 @@
+import Auth0ObjC // Added by Auth0toSPM
// AuthenticationSpec.swift
//
// Copyright (c) 2016 Auth0 (http://auth0.com)
@@ -24,8 +25,10 @@ import Foundation
import Quick
import Nimble
import OHHTTPStubs
+import OHHTTPStubsSwift // Added by Auth0toSPM(original value 'import OHHTTPStubs')
#if SWIFT_PACKAGE
-import OHHTTPStubsSwift
+import OHHTTPStubs
+import OHHTTPStubsSwift // Added by Auth0toSPM(original value 'import OHHTTPStubs')Swift
#endif
@testable import Auth0
@@ -1611,7 +1614,7 @@ class AuthenticationSpec: QuickSpec {
}
}
-#if WEB_AUTH_PLATFORM
+#if os(iOS) || os(macOS) // Added by Auth0toSPM(original value '#if WEB_AUTH_PLATFORM')
describe("spawn WebAuth instance") {
it("should return a WebAuth instance with matching credentials") {
diff --git a/tmp/auth0_diff_original/BaseAuthTransaction.swift b/tmp/auth0_diff_spm/BaseAuthTransaction.swift
index de73fe3..98cee49 100644
--- a/tmp/auth0_diff_original/BaseAuthTransaction.swift
+++ b/tmp/auth0_diff_spm/BaseAuthTransaction.swift
@@ -1,3 +1,5 @@
+#if os(iOS) || os(macOS) // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// BaseAuthTransaction.swift
//
// Copyright (c) 2020 Auth0 (http://auth0.com)
@@ -20,7 +22,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if WEB_AUTH_PLATFORM
+#if os(iOS) || os(macOS) // Added by Auth0toSPM(original value '#if WEB_AUTH_PLATFORM')
import Foundation
class BaseAuthTransaction: NSObject, AuthTransaction {
@@ -73,3 +75,5 @@ class BaseAuthTransaction: NSObject, AuthTransaction {
}
#endif
+
+#endif // Added by Auth0toSPM
diff --git a/tmp/auth0_diff_original/BaseAuthTransactionSpec.swift b/tmp/auth0_diff_spm/BaseAuthTransactionSpec.swift
index a00c293..3fb8974 100644
--- a/tmp/auth0_diff_original/BaseAuthTransactionSpec.swift
+++ b/tmp/auth0_diff_spm/BaseAuthTransactionSpec.swift
@@ -1,3 +1,5 @@
+import Foundation // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// BaseAuthTransactionSpec.swift
//
// Copyright (c) 2020 Auth0 (http://auth0.com)
@@ -23,8 +25,10 @@
import Quick
import Nimble
import OHHTTPStubs
+import OHHTTPStubsSwift // Added by Auth0toSPM(original value 'import OHHTTPStubs')
#if SWIFT_PACKAGE
-import OHHTTPStubsSwift
+import OHHTTPStubs
+import OHHTTPStubsSwift // Added by Auth0toSPM(original value 'import OHHTTPStubs')Swift
import Auth0ObjectiveC
#endif
diff --git a/tmp/auth0_diff_original/BaseWebAuth.swift b/tmp/auth0_diff_spm/BaseWebAuth.swift
index e01a860..7c2f165 100644
--- a/tmp/auth0_diff_original/BaseWebAuth.swift
+++ b/tmp/auth0_diff_spm/BaseWebAuth.swift
@@ -1,3 +1,6 @@
+#if os(iOS) || os(macOS) // Added by Auth0toSPM
+import Foundation // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// BaseWebAuth.swift
//
// Copyright (c) 2016 Auth0 (http://auth0.com)
@@ -20,7 +23,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if WEB_AUTH_PLATFORM
+#if os(iOS) || os(macOS) // Added by Auth0toSPM(original value '#if WEB_AUTH_PLATFORM')
#if canImport(AuthenticationServices)
import AuthenticationServices
#endif
@@ -331,3 +334,5 @@ extension Auth0Authentication {
}
#endif
+
+#endif // Added by Auth0toSPM
diff --git a/tmp/auth0_diff_original/BioAuthentication.swift b/tmp/auth0_diff_spm/BioAuthentication.swift
index 9769ea7..6bd29c7 100644
--- a/tmp/auth0_diff_original/BioAuthentication.swift
+++ b/tmp/auth0_diff_spm/BioAuthentication.swift
@@ -1,3 +1,5 @@
+#if os(iOS) || os(macOS) // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// BioAuthentication.swift
//
// Copyright (c) 2017 Auth0 (http://auth0.com)
@@ -20,7 +22,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if WEB_AUTH_PLATFORM
+#if os(iOS) || os(macOS) // Added by Auth0toSPM(original value '#if WEB_AUTH_PLATFORM')
import Foundation
import LocalAuthentication
@@ -62,3 +64,5 @@ struct BioAuthentication {
}
#endif
+
+#endif // Added by Auth0toSPM
diff --git a/tmp/auth0_diff_original/BioAuthenticationSpec.swift b/tmp/auth0_diff_spm/BioAuthenticationSpec.swift
index 74020bf..a43cdc2 100644
--- a/tmp/auth0_diff_original/BioAuthenticationSpec.swift
+++ b/tmp/auth0_diff_spm/BioAuthenticationSpec.swift
@@ -1,3 +1,5 @@
+import Foundation // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// BioAuthenticationSpec.swift
//
// Copyright (c) 2016 Auth0 (http://auth0.com)
@@ -23,6 +25,7 @@
import Quick
import Nimble
import OHHTTPStubs
+import OHHTTPStubsSwift // Added by Auth0toSPM(original value 'import OHHTTPStubs')
import LocalAuthentication
@testable import Auth0
diff --git a/tmp/auth0_diff_original/Challenge.swift b/tmp/auth0_diff_spm/Challenge.swift
index 4d0f212..03bd6f2 100644
--- a/tmp/auth0_diff_original/Challenge.swift
+++ b/tmp/auth0_diff_spm/Challenge.swift
@@ -1,3 +1,6 @@
+#if os(tvOS) || os(iOS) || os(macOS) || os(watchOS) // Added by Auth0toSPM
+import Foundation // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// Challenge.swift
//
// Copyright (c) 2021 Auth0 (http://auth0.com)
@@ -31,3 +34,5 @@ public struct Challenge: Codable {
case bindingMethod = "binding_method"
}
}
+
+#endif // Added by Auth0toSPM
diff --git a/tmp/auth0_diff_original/ChallengeGeneratorSpec.swift b/tmp/auth0_diff_spm/ChallengeGeneratorSpec.swift
index 83b3bea..1b3461b 100644
--- a/tmp/auth0_diff_original/ChallengeGeneratorSpec.swift
+++ b/tmp/auth0_diff_spm/ChallengeGeneratorSpec.swift
@@ -1,3 +1,5 @@
+import Foundation // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// ChallengeGeneratorSpec.swift
//
// Copyright (c) 2016 Auth0 (http://auth0.com)
diff --git a/tmp/auth0_diff_original/ClaimValidators.swift b/tmp/auth0_diff_spm/ClaimValidators.swift
index 4eb0146..8a258c1 100644
--- a/tmp/auth0_diff_original/ClaimValidators.swift
+++ b/tmp/auth0_diff_spm/ClaimValidators.swift
@@ -1,3 +1,5 @@
+#if os(iOS) || os(macOS) // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// ClaimValidators.swift
//
// Copyright (c) 2020 Auth0 (http://auth0.com)
@@ -20,7 +22,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if WEB_AUTH_PLATFORM
+#if os(iOS) || os(macOS) // Added by Auth0toSPM(original value '#if WEB_AUTH_PLATFORM')
import Foundation
import JWTDecode
@@ -299,3 +301,5 @@ struct IDTokenOrgIdValidator: JWTValidator {
}
}
#endif
+
+#endif // Added by Auth0toSPM
diff --git a/tmp/auth0_diff_original/ClaimValidatorsSpec.swift b/tmp/auth0_diff_spm/ClaimValidatorsSpec.swift
index 65f6a50..6b5ea3f 100644
--- a/tmp/auth0_diff_original/ClaimValidatorsSpec.swift
+++ b/tmp/auth0_diff_spm/ClaimValidatorsSpec.swift
@@ -1,3 +1,4 @@
+import Auth0ObjC // Added by Auth0toSPM
// ClaimValidatorsSpec.swift
//
// Copyright (c) 2020 Auth0 (http://auth0.com)
diff --git a/tmp/auth0_diff_original/ControllerModalPresenter.swift b/tmp/auth0_diff_spm/ControllerModalPresenter.swift
index 21988c8..02cb904 100644
--- a/tmp/auth0_diff_original/ControllerModalPresenter.swift
+++ b/tmp/auth0_diff_spm/ControllerModalPresenter.swift
@@ -1,3 +1,6 @@
+#if os(iOS) // Added by Auth0toSPM
+import Foundation // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// ControllerModalPresenter.swift
//
// Copyright (c) 2016 Auth0 (http://auth0.com)
@@ -57,3 +60,5 @@ struct ControllerModalPresenter {
}
#endif
+
+#endif // Added by Auth0toSPM
diff --git a/tmp/auth0_diff_original/ControllerModalPresenterSpec.swift b/tmp/auth0_diff_spm/ControllerModalPresenterSpec.swift
index 39f3f3e..daba6ec 100644
--- a/tmp/auth0_diff_original/ControllerModalPresenterSpec.swift
+++ b/tmp/auth0_diff_spm/ControllerModalPresenterSpec.swift
@@ -1,3 +1,6 @@
+import Foundation // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
+import UIKit // Added by Auth0toSPM
// ControllerModalPresenterSpec.swift
//
// Copyright (c) 2016 Auth0 (http://auth0.com)
diff --git a/tmp/auth0_diff_original/Credentials.swift b/tmp/auth0_diff_spm/Credentials.swift
index c19032c..2586887 100644
--- a/tmp/auth0_diff_original/Credentials.swift
+++ b/tmp/auth0_diff_spm/Credentials.swift
@@ -1,3 +1,5 @@
+#if os(tvOS) || os(iOS) || os(macOS) || os(watchOS) // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// Credentials.swift
//
// Copyright (c) 2016 Auth0 (http://auth0.com)
@@ -89,3 +91,5 @@ public class Credentials: NSObject, JSONObjectPayload, NSSecureCoding {
public static var supportsSecureCoding: Bool = true
}
+
+#endif // Added by Auth0toSPM
diff --git a/tmp/auth0_diff_original/CredentialsManager.swift b/tmp/auth0_diff_spm/CredentialsManager.swift
index 9ae903a..a6c6e0f 100644
--- a/tmp/auth0_diff_original/CredentialsManager.swift
+++ b/tmp/auth0_diff_spm/CredentialsManager.swift
@@ -1,3 +1,5 @@
+#if os(tvOS) || os(iOS) || os(macOS) // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// CredentialsManager.swift
//
// Copyright (c) 2017 Auth0 (http://auth0.com)
@@ -23,7 +25,7 @@
import Foundation
import SimpleKeychain
import JWTDecode
-#if WEB_AUTH_PLATFORM
+#if os(iOS) || os(macOS) // Added by Auth0toSPM(original value '#if WEB_AUTH_PLATFORM')
import LocalAuthentication
#endif
@@ -33,7 +35,7 @@ public struct CredentialsManager {
private let storage: A0SimpleKeychain
private let storeKey: String
private let authentication: Authentication
- #if WEB_AUTH_PLATFORM
+ #if os(iOS) || os(macOS) // Added by Auth0toSPM(original value '#if WEB_AUTH_PLATFORM')
private var bioAuth: BioAuthentication?
#endif
@@ -69,7 +71,7 @@ public struct CredentialsManager {
/// - title: main message to display in TouchID prompt
/// - cancelTitle: cancel message to display in TouchID prompt (iOS 10+)
/// - fallbackTitle: fallback message to display in TouchID prompt after a failed match
- #if WEB_AUTH_PLATFORM
+ #if os(iOS) || os(macOS) // Added by Auth0toSPM(original value '#if WEB_AUTH_PLATFORM')
@available(*, deprecated, message: "see enableBiometrics(withTitle title:, cancelTitle:, fallbackTitle:)")
public mutating func enableTouchAuth(withTitle title: String, cancelTitle: String? = nil, fallbackTitle: String? = nil) {
self.enableBiometrics(withTitle: title, cancelTitle: cancelTitle, fallbackTitle: fallbackTitle)
@@ -82,7 +84,7 @@ public struct CredentialsManager {
/// - title: main message to display when Touch ID is used
/// - cancelTitle: cancel message to display when Touch ID is used (iOS 10+)
/// - fallbackTitle: fallback message to display when Touch ID is used after a failed match
- #if WEB_AUTH_PLATFORM
+ #if os(iOS) || os(macOS) // Added by Auth0toSPM(original value '#if WEB_AUTH_PLATFORM')
public mutating func enableBiometrics(withTitle title: String, cancelTitle: String? = nil, fallbackTitle: String? = nil) {
self.bioAuth = BioAuthentication(authContext: LAContext(), title: title, cancelTitle: cancelTitle, fallbackTitle: fallbackTitle)
}
@@ -164,7 +166,7 @@ public struct CredentialsManager {
/// - callback: callback with the user's credentials or the cause of the error.
/// - Important: This method only works for a refresh token obtained after auth with OAuth 2.0 API Authorization.
/// - Note: [Auth0 Refresh Tokens Docs](https://auth0.com/docs/tokens/concepts/refresh-tokens)
- #if WEB_AUTH_PLATFORM
+ #if os(iOS) || os(macOS) // Added by Auth0toSPM(original value '#if WEB_AUTH_PLATFORM')
public func credentials(withScope scope: String? = nil, minTTL: Int = 0, callback: @escaping (CredentialsManagerError?, Credentials?) -> Void) {
guard self.hasValid(minTTL: minTTL) else { return callback(.noCredentials, nil) }
if #available(iOS 9.0, macOS 10.15, *), let bioAuth = self.bioAuth {
@@ -259,3 +261,5 @@ public struct CredentialsManager {
}
}
+
+#endif // Added by Auth0toSPM
diff --git a/tmp/auth0_diff_original/CredentialsManagerError.swift b/tmp/auth0_diff_spm/CredentialsManagerError.swift
index 8a78fc3..d385e8e 100644
--- a/tmp/auth0_diff_original/CredentialsManagerError.swift
+++ b/tmp/auth0_diff_spm/CredentialsManagerError.swift
@@ -1,3 +1,5 @@
+#if os(tvOS) || os(iOS) || os(macOS) // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// CredentialsManagerError.swift
//
// Copyright (c) 2017 Auth0 (http://auth0.com)
@@ -29,3 +31,5 @@ public enum CredentialsManagerError: Error {
case touchFailed(Error)
case revokeFailed(Error)
}
+
+#endif // Added by Auth0toSPM
diff --git a/tmp/auth0_diff_original/CredentialsManagerSpec.swift b/tmp/auth0_diff_spm/CredentialsManagerSpec.swift
index c8379cf..7e1a982 100644
--- a/tmp/auth0_diff_original/CredentialsManagerSpec.swift
+++ b/tmp/auth0_diff_spm/CredentialsManagerSpec.swift
@@ -1,3 +1,5 @@
+import Foundation // Added by Auth0toSPM
+import Auth0ObjC // Added by Auth0toSPM
// CredentialsManagerSpec.swift
//
// Copyright (c) 2016 Auth0 (http://auth0.com)