From d19a6a8247883df9d6fa2f3494a79fc2edd04373 Mon Sep 17 00:00:00 2001 From: Worthing ~ <115107835+w-goog@users.noreply.github.com> Date: Fri, 30 Oct 2026 15:33:19 -0700 Subject: [PATCH 1/3] g-orchestrated: add the AppAuthTestHelpers product with a fake session --- Package.swift | 13 +++- .../AppAuthTestHelpers/AppAuthTestHelpers.h | 20 ++++++ .../OIDFakeExternalUserAgentSession.h | 44 ++++++++++++ .../OIDFakeExternalUserAgentSession.m | 71 +++++++++++++++++++ 4 files changed, 146 insertions(+), 2 deletions(-) create mode 100644 Sources/AppAuthTestHelpers/AppAuthTestHelpers.h create mode 100644 Sources/AppAuthTestHelpers/OIDFakeExternalUserAgentSession.h create mode 100644 Sources/AppAuthTestHelpers/OIDFakeExternalUserAgentSession.m diff --git a/Package.swift b/Package.swift index ad338b44e..a04ffee9e 100644 --- a/Package.swift +++ b/Package.swift @@ -37,7 +37,10 @@ let package = Package( targets: ["AppAuth"]), .library( name: "AppAuthTV", - targets: ["AppAuthTV"]) + targets: ["AppAuthTV"]), + .library( + name: "AppAuthTestHelpers", + targets: ["AppAuthTestHelpers"]) ], dependencies: [], targets: [ @@ -67,9 +70,15 @@ let package = Package( resources: [.copy("Resources/PrivacyInfo.xcprivacy")], publicHeadersPath: "" ), + .target( + name: "AppAuthTestHelpers", + dependencies: ["AppAuthCore"], + path: "Sources/AppAuthTestHelpers", + publicHeadersPath: "" + ), .testTarget( name: "AppAuthCoreTests", - dependencies: ["AppAuthCore"], + dependencies: ["AppAuthCore", "AppAuthTestHelpers"], path: "UnitTests", exclude: ["OIDSwiftTests.swift", "AppAuthTV"] ), diff --git a/Sources/AppAuthTestHelpers/AppAuthTestHelpers.h b/Sources/AppAuthTestHelpers/AppAuthTestHelpers.h new file mode 100644 index 000000000..aa6954c63 --- /dev/null +++ b/Sources/AppAuthTestHelpers/AppAuthTestHelpers.h @@ -0,0 +1,20 @@ +/*! @file AppAuthTestHelpers.h + @brief Fakes for testing code that depends on AppAuth. + @copyright + Copyright 2026 The AppAuth Authors. All Rights Reserved. + @copydetails + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "OIDFakeAuthorizationService.h" +#import "OIDFakeExternalUserAgentSession.h" diff --git a/Sources/AppAuthTestHelpers/OIDFakeExternalUserAgentSession.h b/Sources/AppAuthTestHelpers/OIDFakeExternalUserAgentSession.h new file mode 100644 index 000000000..e8b6258a0 --- /dev/null +++ b/Sources/AppAuthTestHelpers/OIDFakeExternalUserAgentSession.h @@ -0,0 +1,44 @@ +/*! @file OIDFakeExternalUserAgentSession.h + @brief AppAuth iOS SDK + @copyright + Copyright 2026 The AppAuth Authors. All Rights Reserved. + @copydetails + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +#import "OIDExternalUserAgentSession.h" + +NS_ASSUME_NONNULL_BEGIN + +/*! @brief An @c OIDExternalUserAgentSession that records the messages it receives instead of + driving a user agent. Returned by @c OIDFakeAuthorizationService. + */ +@interface OIDFakeExternalUserAgentSession : NSObject + +/*! @brief How many times @c -cancel or @c -cancelWithCompletion: was called. */ +@property(nonatomic, readonly) NSUInteger cancelCount; + +/*! @brief The URL passed to the most recent @c -resumeExternalUserAgentFlowWithURL:error:, if any. */ +@property(nonatomic, readonly, nullable) NSURL *lastResumedURL; + +/*! @brief What @c -resumeExternalUserAgentFlowWithURL:error: returns. Defaults to YES. */ +@property(nonatomic) BOOL resumeResult; + +/*! @brief The error passed to the most recent @c -failExternalUserAgentFlowWithError:, if any. */ +@property(nonatomic, readonly, nullable) NSError *lastFailureError; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Sources/AppAuthTestHelpers/OIDFakeExternalUserAgentSession.m b/Sources/AppAuthTestHelpers/OIDFakeExternalUserAgentSession.m new file mode 100644 index 000000000..2e64f98fa --- /dev/null +++ b/Sources/AppAuthTestHelpers/OIDFakeExternalUserAgentSession.m @@ -0,0 +1,71 @@ +/*! @file OIDFakeExternalUserAgentSession.m + @brief AppAuth iOS SDK + @copyright + Copyright 2026 The AppAuth Authors. All Rights Reserved. + @copydetails + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import "OIDFakeExternalUserAgentSession.h" + +#import "OIDError.h" +#import "OIDErrorUtilities.h" + +NS_ASSUME_NONNULL_BEGIN + +@implementation OIDFakeExternalUserAgentSession + +- (instancetype)init { + self = [super init]; + if (self) { + _resumeResult = YES; + } + return self; +} + +- (void)cancel { + _cancelCount++; +} + +- (void)cancelWithCompletion:(nullable void (^)(void))completion { + _cancelCount++; + if (completion) { + completion(); + } +} + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" +- (BOOL)resumeExternalUserAgentFlowWithURL:(NSURL *)URL { + return [self resumeExternalUserAgentFlowWithURL:URL error:nil]; +} +#pragma clang diagnostic pop + +- (BOOL)resumeExternalUserAgentFlowWithURL:(NSURL *)URL + error:(NSError *_Nullable *_Nullable)error { + _lastResumedURL = URL; + if (!_resumeResult && error) { + *error = [OIDErrorUtilities errorWithCode:OIDErrorCodeURLMismatch + underlyingError:nil + description:@"Fake session was told not to handle the URL."]; + } + return _resumeResult; +} + +- (void)failExternalUserAgentFlowWithError:(NSError *)error { + _lastFailureError = error; +} + +@end + +NS_ASSUME_NONNULL_END From baea0bd3b6460c95721f2f39af703e67a6be81f6 Mon Sep 17 00:00:00 2001 From: Worthing ~ <115107835+w-goog@users.noreply.github.com> Date: Fri, 30 Oct 2026 15:38:41 -0700 Subject: [PATCH 2/3] g-orchestrated: trim the helpers to the fake session and test it --- CHANGELOG.md | 1 + .../AppAuthTestHelpers/AppAuthTestHelpers.h | 1 - .../OIDFakeExternalUserAgentSession.h | 15 ++-- .../OIDFakeExternalUserAgentSessionTests.m | 81 +++++++++++++++++++ 4 files changed, 92 insertions(+), 6 deletions(-) create mode 100644 UnitTests/OIDFakeExternalUserAgentSessionTests.m diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fd6bb026..d6a7deaad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Added instance-method counterparts of the `OIDAuthorizationService` class methods, and made `-init` public, so the service can be injected and faked in tests. - Deprecated `OIDAuthorizationService.configuration`. It is never set and is always `nil`; use the request's `configuration` instead. It will be removed in 4.0. - Added instance-method counterparts of the iOS and macOS `OIDAuthorizationService` convenience methods, and read-only `presentingViewController` / `presentingWindow` properties on the external user agents. +- Added the `AppAuthTestHelpers` Swift package product, with `OIDFakeExternalUserAgentSession`, for testing code that depends on AppAuth. # 3.0.0 - BREAKING: Updates made to support Xcode 27. ([#972](https://github.com/openid/AppAuth-iOS/pull/972), [#973](https://github.com/openid/AppAuth-iOS/pull/973)) diff --git a/Sources/AppAuthTestHelpers/AppAuthTestHelpers.h b/Sources/AppAuthTestHelpers/AppAuthTestHelpers.h index aa6954c63..ec07d2698 100644 --- a/Sources/AppAuthTestHelpers/AppAuthTestHelpers.h +++ b/Sources/AppAuthTestHelpers/AppAuthTestHelpers.h @@ -16,5 +16,4 @@ limitations under the License. */ -#import "OIDFakeAuthorizationService.h" #import "OIDFakeExternalUserAgentSession.h" diff --git a/Sources/AppAuthTestHelpers/OIDFakeExternalUserAgentSession.h b/Sources/AppAuthTestHelpers/OIDFakeExternalUserAgentSession.h index e8b6258a0..4bd55c739 100644 --- a/Sources/AppAuthTestHelpers/OIDFakeExternalUserAgentSession.h +++ b/Sources/AppAuthTestHelpers/OIDFakeExternalUserAgentSession.h @@ -23,20 +23,25 @@ NS_ASSUME_NONNULL_BEGIN /*! @brief An @c OIDExternalUserAgentSession that records the messages it receives instead of - driving a user agent. Returned by @c OIDFakeAuthorizationService. + driving a user agent. */ @interface OIDFakeExternalUserAgentSession : NSObject -/*! @brief How many times @c -cancel or @c -cancelWithCompletion: was called. */ +/*! @brief How many times @c -cancel or @c -cancelWithCompletion: was called. + */ @property(nonatomic, readonly) NSUInteger cancelCount; -/*! @brief The URL passed to the most recent @c -resumeExternalUserAgentFlowWithURL:error:, if any. */ +/*! @brief The URL passed to the most recent @c -resumeExternalUserAgentFlowWithURL:error:, if + any. + */ @property(nonatomic, readonly, nullable) NSURL *lastResumedURL; -/*! @brief What @c -resumeExternalUserAgentFlowWithURL:error: returns. Defaults to YES. */ +/*! @brief What @c -resumeExternalUserAgentFlowWithURL:error: returns. Defaults to YES. + */ @property(nonatomic) BOOL resumeResult; -/*! @brief The error passed to the most recent @c -failExternalUserAgentFlowWithError:, if any. */ +/*! @brief The error passed to the most recent @c -failExternalUserAgentFlowWithError:, if any. + */ @property(nonatomic, readonly, nullable) NSError *lastFailureError; @end diff --git a/UnitTests/OIDFakeExternalUserAgentSessionTests.m b/UnitTests/OIDFakeExternalUserAgentSessionTests.m new file mode 100644 index 000000000..1203fd4cc --- /dev/null +++ b/UnitTests/OIDFakeExternalUserAgentSessionTests.m @@ -0,0 +1,81 @@ +/*! @file OIDFakeExternalUserAgentSessionTests.m + @brief AppAuth iOS SDK + @copyright + Copyright 2026 The AppAuth Authors. All Rights Reserved. + @copydetails + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + +#import + +#if SWIFT_PACKAGE +@import AppAuthCore; +@import AppAuthTestHelpers; +#else +#import "Sources/AppAuthCore/OIDError.h" +#import "Sources/AppAuthTestHelpers/AppAuthTestHelpers.h" +#endif + +/*! @brief Unit tests for @c OIDFakeExternalUserAgentSession. + */ +@interface OIDFakeExternalUserAgentSessionTests : XCTestCase +@end + +@implementation OIDFakeExternalUserAgentSessionTests + +/*! @brief Resuming records the URL and returns @c resumeResult, with an error when it is NO. */ +- (void)testResumeRecordsURLAndReturnsResumeResult { + OIDFakeExternalUserAgentSession *session = [[OIDFakeExternalUserAgentSession alloc] init]; + session.resumeResult = NO; + NSURL *firstURL = [NSURL URLWithString:@"https://example.com/callback?code=1"]; + NSError *error = nil; + XCTAssertFalse([session resumeExternalUserAgentFlowWithURL:firstURL error:&error]); + XCTAssertEqualObjects(session.lastResumedURL, firstURL); + XCTAssertEqualObjects(error.domain, OIDGeneralErrorDomain); + XCTAssertEqual(error.code, OIDErrorCodeURLMismatch); + + session.resumeResult = YES; + error = nil; + NSURL *secondURL = [NSURL URLWithString:@"https://example.com/callback?code=2"]; + XCTAssertTrue([session resumeExternalUserAgentFlowWithURL:secondURL error:&error]); + XCTAssertEqualObjects(session.lastResumedURL, secondURL); + XCTAssertNil(error); +} + +/*! @brief A new session handles every URL. */ +- (void)testResumeResultDefaultsToYES { + OIDFakeExternalUserAgentSession *session = [[OIDFakeExternalUserAgentSession alloc] init]; + XCTAssertTrue(session.resumeResult); +} + +/*! @brief Both cancel methods are counted, and the completion runs. */ +- (void)testCancelIsCounted { + OIDFakeExternalUserAgentSession *session = [[OIDFakeExternalUserAgentSession alloc] init]; + [session cancel]; + __block BOOL completionCalled = NO; + [session cancelWithCompletion:^{ + completionCalled = YES; + }]; + XCTAssertEqual(session.cancelCount, 2u); + XCTAssertTrue(completionCalled); +} + +/*! @brief Failing the flow records the error. */ +- (void)testFailRecordsError { + OIDFakeExternalUserAgentSession *session = [[OIDFakeExternalUserAgentSession alloc] init]; + NSError *error = [NSError errorWithDomain:@"com.example" code:42 userInfo:nil]; + [session failExternalUserAgentFlowWithError:error]; + XCTAssertEqualObjects(session.lastFailureError, error); +} + +@end From e245308bb17e09bfb4e729db58306686e7e98036 Mon Sep 17 00:00:00 2001 From: Worthing ~ <115107835+w-goog@users.noreply.github.com> Date: Wed, 11 Nov 2026 13:22:07 -0800 Subject: [PATCH 3/3] g-orchestrated: add the fake session and its tests to the Xcode test targets --- AppAuth.xcodeproj/project.pbxproj | 40 +++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/AppAuth.xcodeproj/project.pbxproj b/AppAuth.xcodeproj/project.pbxproj index 02a940914..0c1afb824 100644 --- a/AppAuth.xcodeproj/project.pbxproj +++ b/AppAuth.xcodeproj/project.pbxproj @@ -13,7 +13,9 @@ 06C19E9B22B474A200C19CE1 /* OIDEndSessionResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = CF6431F31F228A980075B6B5 /* OIDEndSessionResponse.m */; }; 06C19E9C22B474A600C19CE1 /* OIDEndSessionRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = CF37C06B1F1FC21A00662E41 /* OIDEndSessionRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; 06C19E9D22B474AD00C19CE1 /* OIDEndSessionRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = CF37C06C1F1FC21A00662E41 /* OIDEndSessionRequest.m */; }; + 0C2B4674EA8DD9B5FFCD7FD0 /* OIDFakeExternalUserAgentSessionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 006AFE509B9AA12E7203154D /* OIDFakeExternalUserAgentSessionTests.m */; }; 1AB85393A09567E7CBB687AE /* OIDAuthorizationServiceInstanceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 459EB273F7CD3FCE6BEA1EA9 /* OIDAuthorizationServiceInstanceTests.m */; }; + 1F3A45649A64B5C1937E5920 /* OIDFakeExternalUserAgentSessionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 006AFE509B9AA12E7203154D /* OIDFakeExternalUserAgentSessionTests.m */; }; 2D47AAE1249A87020059B5A4 /* OIDTVAuthorizationResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D47AAD8249A87010059B5A4 /* OIDTVAuthorizationResponse.m */; }; 2D47AAE4249A87020059B5A4 /* OIDTVServiceConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D47AADA249A87010059B5A4 /* OIDTVServiceConfiguration.m */; }; 2D47AAE8249A87020059B5A4 /* OIDTVAuthorizationRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D47AADD249A87010059B5A4 /* OIDTVAuthorizationRequest.m */; }; @@ -560,13 +562,18 @@ 60140F801DE4344200DA0DC3 /* OIDRegistrationResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 60140F7F1DE4344200DA0DC3 /* OIDRegistrationResponse.m */; }; 60140F831DE43BAF00DA0DC3 /* OIDRegistrationRequestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 60140F821DE43BAF00DA0DC3 /* OIDRegistrationRequestTests.m */; }; 60140F861DE43CC700DA0DC3 /* OIDRegistrationResponseTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 60140F851DE43CC700DA0DC3 /* OIDRegistrationResponseTests.m */; }; + 6BAAE1371FA75D57506027DB /* OIDFakeExternalUserAgentSession.m in Sources */ = {isa = PBXBuildFile; fileRef = B5FB594568F5DAA341E261F5 /* OIDFakeExternalUserAgentSession.m */; }; + 6C9154FEA8F907C759672BD2 /* OIDFakeExternalUserAgentSession.m in Sources */ = {isa = PBXBuildFile; fileRef = B5FB594568F5DAA341E261F5 /* OIDFakeExternalUserAgentSession.m */; }; 73F574342B7C42690023FFF0 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 73F574332B7C42690023FFF0 /* PrivacyInfo.xcprivacy */; }; 73F574352B7C42690023FFF0 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 73F574332B7C42690023FFF0 /* PrivacyInfo.xcprivacy */; }; 73F574362B7C42690023FFF0 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 73F574332B7C42690023FFF0 /* PrivacyInfo.xcprivacy */; }; 73F574372B7C42690023FFF0 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 73F574332B7C42690023FFF0 /* PrivacyInfo.xcprivacy */; }; 73F574382B7C42690023FFF0 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 73F574332B7C42690023FFF0 /* PrivacyInfo.xcprivacy */; }; 73F574392B7C42690023FFF0 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 73F574332B7C42690023FFF0 /* PrivacyInfo.xcprivacy */; }; + 7C8FC04BF7D3FA45950EEDC3 /* OIDFakeExternalUserAgentSessionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 006AFE509B9AA12E7203154D /* OIDFakeExternalUserAgentSessionTests.m */; }; + 7F1EA0AC51A93928019E09BF /* OIDFakeExternalUserAgentSession.m in Sources */ = {isa = PBXBuildFile; fileRef = B5FB594568F5DAA341E261F5 /* OIDFakeExternalUserAgentSession.m */; }; 9BE107A4CCBF0579E2354D3B /* OIDAuthorizationServiceInstanceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 459EB273F7CD3FCE6BEA1EA9 /* OIDAuthorizationServiceInstanceTests.m */; }; + A592292659F68909AE332653 /* OIDFakeExternalUserAgentSessionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 006AFE509B9AA12E7203154D /* OIDFakeExternalUserAgentSessionTests.m */; }; A5EEF29720D821120044F470 /* OIDTokenUtilitiesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = A5EEF1FD20CF07760044F470 /* OIDTokenUtilitiesTests.m */; }; A5EEF29820D8211A0044F470 /* OIDTokenUtilitiesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = A5EEF1FD20CF07760044F470 /* OIDTokenUtilitiesTests.m */; }; A5EEF29920D8211B0044F470 /* OIDTokenUtilitiesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = A5EEF1FD20CF07760044F470 /* OIDTokenUtilitiesTests.m */; }; @@ -613,18 +620,23 @@ A6DEABB52018ECF30022AC32 /* OIDEndSessionResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = CF6431F21F228A980075B6B5 /* OIDEndSessionResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; A6DEABB62018ECF30022AC32 /* OIDEndSessionResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = CF6431F21F228A980075B6B5 /* OIDEndSessionResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; A6DEABB72018ECF40022AC32 /* OIDEndSessionResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = CF6431F21F228A980075B6B5 /* OIDEndSessionResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; + ABC445C387A0FBA5E0F2ED72 /* OIDFakeExternalUserAgentSession.m in Sources */ = {isa = PBXBuildFile; fileRef = B5FB594568F5DAA341E261F5 /* OIDFakeExternalUserAgentSession.m */; }; + B794C1C6F75082B099F84438 /* OIDFakeExternalUserAgentSessionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 006AFE509B9AA12E7203154D /* OIDFakeExternalUserAgentSessionTests.m */; }; C14E3B6827E3BEFB00CF05A9 /* OIDExternalUserAgentIOSCustomBrowser.h in Headers */ = {isa = PBXBuildFile; fileRef = C14E3B6627E3BEFB00CF05A9 /* OIDExternalUserAgentIOSCustomBrowser.h */; settings = {ATTRIBUTES = (Public, ); }; }; C14E3B6927E3BEFB00CF05A9 /* OIDExternalUserAgentIOSCustomBrowser.m in Sources */ = {isa = PBXBuildFile; fileRef = C14E3B6727E3BEFB00CF05A9 /* OIDExternalUserAgentIOSCustomBrowser.m */; }; C14E3B6A27E3BFB800CF05A9 /* OIDExternalUserAgentIOSCustomBrowser.m in Sources */ = {isa = PBXBuildFile; fileRef = C14E3B6727E3BEFB00CF05A9 /* OIDExternalUserAgentIOSCustomBrowser.m */; }; + C278E4687E3AD74270EF88DA /* OIDFakeExternalUserAgentSessionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 006AFE509B9AA12E7203154D /* OIDFakeExternalUserAgentSessionTests.m */; }; CF37C06E1F1FC21A00662E41 /* OIDEndSessionRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = CF37C06C1F1FC21A00662E41 /* OIDEndSessionRequest.m */; }; CF37C06F1F1FC21A00662E41 /* OIDEndSessionRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = CF37C06C1F1FC21A00662E41 /* OIDEndSessionRequest.m */; }; CF37C0701F1FC21A00662E41 /* OIDEndSessionRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = CF37C06C1F1FC21A00662E41 /* OIDEndSessionRequest.m */; }; CF37C0711F1FC21A00662E41 /* OIDEndSessionRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = CF37C06C1F1FC21A00662E41 /* OIDEndSessionRequest.m */; }; CF6431F41F228A980075B6B5 /* OIDEndSessionResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = CF6431F31F228A980075B6B5 /* OIDEndSessionResponse.m */; }; + D07958F60AC2A47A79500914 /* OIDFakeExternalUserAgentSession.m in Sources */ = {isa = PBXBuildFile; fileRef = B5FB594568F5DAA341E261F5 /* OIDFakeExternalUserAgentSession.m */; }; DD05E93BBBA3AB6BF88CAB8D /* OIDAuthorizationServiceInstanceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 459EB273F7CD3FCE6BEA1EA9 /* OIDAuthorizationServiceInstanceTests.m */; }; E56963F03064815800AC4DFE /* OIDExternalUserAgentIOSTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E56963EF3064815800AC4DFE /* OIDExternalUserAgentIOSTests.m */; }; E56963F13064815800AC4DFE /* OIDExternalUserAgentIOSTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E56963EF3064815800AC4DFE /* OIDExternalUserAgentIOSTests.m */; }; F1A717E418CCA5400B300540 /* OIDAuthorizationServiceInstanceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 459EB273F7CD3FCE6BEA1EA9 /* OIDAuthorizationServiceInstanceTests.m */; }; + F7DA76425730ACDA2D3107BF /* OIDFakeExternalUserAgentSession.m in Sources */ = {isa = PBXBuildFile; fileRef = B5FB594568F5DAA341E261F5 /* OIDFakeExternalUserAgentSession.m */; }; F9A7082E2355ED74004B3E6D /* OIDExternalUserAgentCatalyst.h in Headers */ = {isa = PBXBuildFile; fileRef = F9A7082C2355ED74004B3E6D /* OIDExternalUserAgentCatalyst.h */; settings = {ATTRIBUTES = (Public, ); }; }; F9A7082F2355ED74004B3E6D /* OIDExternalUserAgentCatalyst.m in Sources */ = {isa = PBXBuildFile; fileRef = F9A7082D2355ED74004B3E6D /* OIDExternalUserAgentCatalyst.m */; }; /* End PBXBuildFile section */ @@ -719,6 +731,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 006AFE509B9AA12E7203154D /* OIDFakeExternalUserAgentSessionTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OIDFakeExternalUserAgentSessionTests.m; sourceTree = ""; }; 039697441FA8258D003D1FB2 /* OIDURLSessionProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OIDURLSessionProvider.h; sourceTree = ""; }; 039697451FA8258D003D1FB2 /* OIDURLSessionProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OIDURLSessionProvider.m; sourceTree = ""; }; 0396974C1FA827AD003D1FB2 /* OIDURLSessionProviderTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OIDURLSessionProviderTests.m; sourceTree = ""; }; @@ -857,6 +870,7 @@ 60140F841DE43C8C00DA0DC3 /* OIDRegistrationResponseTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OIDRegistrationResponseTests.h; sourceTree = ""; }; 60140F851DE43CC700DA0DC3 /* OIDRegistrationResponseTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OIDRegistrationResponseTests.m; sourceTree = ""; }; 73F574332B7C42690023FFF0 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; + 988AF8BA66200AFC0A60FB14 /* AppAuthTestHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppAuthTestHelpers.h; sourceTree = ""; }; A5EEF1FD20CF07760044F470 /* OIDTokenUtilitiesTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OIDTokenUtilitiesTests.m; sourceTree = ""; }; A6CEB1172007E384009D492A /* OIDEndSessionRequestTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OIDEndSessionRequestTests.h; sourceTree = ""; }; A6CEB1182007E384009D492A /* OIDEndSessionRequestTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OIDEndSessionRequestTests.m; sourceTree = ""; }; @@ -865,6 +879,7 @@ A6DEAB9A2018E4A20022AC32 /* OIDExternalUserAgentRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OIDExternalUserAgentRequest.h; sourceTree = ""; }; A6DEABA82018E5B50022AC32 /* OIDExternalUserAgentIOS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OIDExternalUserAgentIOS.m; sourceTree = ""; }; A6DEABA92018E5B50022AC32 /* OIDExternalUserAgentIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OIDExternalUserAgentIOS.h; sourceTree = ""; }; + B5FB594568F5DAA341E261F5 /* OIDFakeExternalUserAgentSession.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OIDFakeExternalUserAgentSession.m; sourceTree = ""; }; C14E3B6627E3BEFB00CF05A9 /* OIDExternalUserAgentIOSCustomBrowser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OIDExternalUserAgentIOSCustomBrowser.h; sourceTree = ""; }; C14E3B6727E3BEFB00CF05A9 /* OIDExternalUserAgentIOSCustomBrowser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OIDExternalUserAgentIOSCustomBrowser.m; sourceTree = ""; }; CF37C06B1F1FC21A00662E41 /* OIDEndSessionRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OIDEndSessionRequest.h; sourceTree = ""; }; @@ -872,6 +887,7 @@ CF6431F21F228A980075B6B5 /* OIDEndSessionResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OIDEndSessionResponse.h; sourceTree = ""; }; CF6431F31F228A980075B6B5 /* OIDEndSessionResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OIDEndSessionResponse.m; sourceTree = ""; }; E56963EF3064815800AC4DFE /* OIDExternalUserAgentIOSTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OIDExternalUserAgentIOSTests.m; sourceTree = ""; }; + EAB1B3CDF2B7C7405D39FD8F /* OIDFakeExternalUserAgentSession.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OIDFakeExternalUserAgentSession.h; sourceTree = ""; }; F6F60FB01D2BFEFE00325CB3 /* OIDAuthState+IOS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "OIDAuthState+IOS.m"; sourceTree = ""; }; F6F60FB11D2BFEFE00325CB3 /* OIDAuthorizationService+IOS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "OIDAuthorizationService+IOS.m"; sourceTree = ""; }; F6F60FB31D2BFEFE00325CB3 /* OIDAuthorizationService+IOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "OIDAuthorizationService+IOS.h"; sourceTree = ""; }; @@ -1124,6 +1140,7 @@ 8A9B9D5E24561EC40055353E /* AppAuthCore */, 8A9B9D632456227D0055353E /* AppAuth */, 2D47AAD7249A86E30059B5A4 /* AppAuthTV */, + AB64649FA051866BC430F86E /* AppAuthTestHelpers */, 341741AF1C5D8243000EF209 /* AppAuth.h */, 3489709E21791B0C00ABEED4 /* AppAuthCore.h */, 2D47AADB249A87010059B5A4 /* AppAuthTV.h */, @@ -1155,6 +1172,7 @@ 3417420C1C5D82D3000EF209 /* OIDServiceDiscoveryTests.m */, 0A987C0100000001000A0987 /* OIDAuthorizationServiceTests.m */, 459EB273F7CD3FCE6BEA1EA9 /* OIDAuthorizationServiceInstanceTests.m */, + 006AFE509B9AA12E7203154D /* OIDFakeExternalUserAgentSessionTests.m */, 3417420D1C5D82D3000EF209 /* OIDTokenRequestTests.h */, 3417420E1C5D82D3000EF209 /* OIDTokenRequestTests.m */, 3417420F1C5D82D3000EF209 /* OIDTokenResponseTests.h */, @@ -1307,6 +1325,16 @@ path = AppAuth; sourceTree = ""; }; + AB64649FA051866BC430F86E /* AppAuthTestHelpers */ = { + isa = PBXGroup; + children = ( + 988AF8BA66200AFC0A60FB14 /* AppAuthTestHelpers.h */, + EAB1B3CDF2B7C7405D39FD8F /* OIDFakeExternalUserAgentSession.h */, + B5FB594568F5DAA341E261F5 /* OIDFakeExternalUserAgentSession.m */, + ); + path = AppAuthTestHelpers; + sourceTree = ""; + }; F6F60FAF1D2BFEF000325CB3 /* iOS */ = { isa = PBXGroup; children = ( @@ -2242,6 +2270,8 @@ 3417421E1C5D82D3000EF209 /* OIDServiceDiscoveryTests.m in Sources */, 0A987C0100000003000A0987 /* OIDAuthorizationServiceTests.m in Sources */, F1A717E418CCA5400B300540 /* OIDAuthorizationServiceInstanceTests.m in Sources */, + 7F1EA0AC51A93928019E09BF /* OIDFakeExternalUserAgentSession.m in Sources */, + B794C1C6F75082B099F84438 /* OIDFakeExternalUserAgentSessionTests.m in Sources */, 3417421F1C5D82D3000EF209 /* OIDTokenRequestTests.m in Sources */, 341742181C5D82D3000EF209 /* OIDAuthorizationResponseTests.m in Sources */, 34A6638B1E8865090060B664 /* OIDRPProfileCode.m in Sources */, @@ -2271,6 +2301,8 @@ 341AA50C1E7F3A9B00FCA5C6 /* OIDServiceDiscoveryTests.m in Sources */, 0A987C0100000005000A0987 /* OIDAuthorizationServiceTests.m in Sources */, DD05E93BBBA3AB6BF88CAB8D /* OIDAuthorizationServiceInstanceTests.m in Sources */, + F7DA76425730ACDA2D3107BF /* OIDFakeExternalUserAgentSession.m in Sources */, + C278E4687E3AD74270EF88DA /* OIDFakeExternalUserAgentSessionTests.m in Sources */, 341AA5071E7F3A9B00FCA5C6 /* OIDAuthStateTests.m in Sources */, 341AA50E1E7F3A9B00FCA5C6 /* OIDTokenResponseTests.m in Sources */, 341AA50D1E7F3A9B00FCA5C6 /* OIDTokenRequestTests.m in Sources */, @@ -2296,6 +2328,8 @@ 341AA4FF1E7F3A9400FCA5C6 /* OIDServiceDiscoveryTests.m in Sources */, 0A987C0100000004000A0987 /* OIDAuthorizationServiceTests.m in Sources */, 5DEEE663EDB0D4A1C1118284 /* OIDAuthorizationServiceInstanceTests.m in Sources */, + D07958F60AC2A47A79500914 /* OIDFakeExternalUserAgentSession.m in Sources */, + 7C8FC04BF7D3FA45950EEDC3 /* OIDFakeExternalUserAgentSessionTests.m in Sources */, 341AA4FA1E7F3A9400FCA5C6 /* OIDAuthStateTests.m in Sources */, 341AA5011E7F3A9400FCA5C6 /* OIDTokenResponseTests.m in Sources */, 341AA5001E7F3A9400FCA5C6 /* OIDTokenRequestTests.m in Sources */, @@ -2424,6 +2458,8 @@ 343AAA7A1E8346B400F9D36E /* OIDServiceDiscoveryTests.m in Sources */, 0A987C0100000006000A0987 /* OIDAuthorizationServiceTests.m in Sources */, 4042060AFEB6D5DE8A86B483 /* OIDAuthorizationServiceInstanceTests.m in Sources */, + ABC445C387A0FBA5E0F2ED72 /* OIDFakeExternalUserAgentSession.m in Sources */, + 1F3A45649A64B5C1937E5920 /* OIDFakeExternalUserAgentSessionTests.m in Sources */, 343AAA751E8346B400F9D36E /* OIDAuthStateTests.m in Sources */, 343AAA7C1E8346B400F9D36E /* OIDTokenResponseTests.m in Sources */, 343AAA7B1E8346B400F9D36E /* OIDTokenRequestTests.m in Sources */, @@ -2513,6 +2549,8 @@ 343AAB861E8349CE00F9D36E /* OIDServiceDiscoveryTests.m in Sources */, 0A987C0100000007000A0987 /* OIDAuthorizationServiceTests.m in Sources */, 1AB85393A09567E7CBB687AE /* OIDAuthorizationServiceInstanceTests.m in Sources */, + 6BAAE1371FA75D57506027DB /* OIDFakeExternalUserAgentSession.m in Sources */, + 0C2B4674EA8DD9B5FFCD7FD0 /* OIDFakeExternalUserAgentSessionTests.m in Sources */, 343AAB811E8349CE00F9D36E /* OIDAuthStateTests.m in Sources */, 343AAB881E8349CE00F9D36E /* OIDTokenResponseTests.m in Sources */, 343AAB871E8349CE00F9D36E /* OIDTokenRequestTests.m in Sources */, @@ -2575,6 +2613,8 @@ 343AAB941E8349CF00F9D36E /* OIDServiceDiscoveryTests.m in Sources */, 0A987C0100000008000A0987 /* OIDAuthorizationServiceTests.m in Sources */, 9BE107A4CCBF0579E2354D3B /* OIDAuthorizationServiceInstanceTests.m in Sources */, + 6C9154FEA8F907C759672BD2 /* OIDFakeExternalUserAgentSession.m in Sources */, + A592292659F68909AE332653 /* OIDFakeExternalUserAgentSessionTests.m in Sources */, 343AAB8F1E8349CF00F9D36E /* OIDAuthStateTests.m in Sources */, 343AAB961E8349CF00F9D36E /* OIDTokenResponseTests.m in Sources */, 343AAB951E8349CF00F9D36E /* OIDTokenRequestTests.m in Sources */,