Skip to content

Commit 6f8cb46

Browse files
authored
Merge pull request #1482 from AzureAD/kasong/2914053-common-interface
[SigninSilent only] CommonCore interface for XPC silent request.
2 parents ef1bda1 + f1fca84 commit 6f8cb46

19 files changed

+1380
-167
lines changed

IdentityCore/IdentityCore.xcodeproj/project.pbxproj

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,15 @@
527527
23FB5C452255A11D002BF1EB /* MSIDClaimsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 23FB5C24225517AA002BF1EB /* MSIDClaimsRequest.m */; };
528528
23FB5C462255A135002BF1EB /* MSIDIndividualClaimRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 23FB5C29225517AA002BF1EB /* MSIDIndividualClaimRequest.m */; };
529529
23FB5C472255A13A002BF1EB /* MSIDIndividualClaimRequestAdditionalInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 23FB5C27225517AA002BF1EB /* MSIDIndividualClaimRequestAdditionalInfo.m */; };
530+
2A24814D2CB06A1A006FCB34 /* MSIDSSORemoteSilentTokenRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A24814C2CB06A1A006FCB34 /* MSIDSSORemoteSilentTokenRequest.m */; };
531+
2A24814E2CB06A1A006FCB34 /* MSIDSSORemoteSilentTokenRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A24814B2CB06A1A006FCB34 /* MSIDSSORemoteSilentTokenRequest.h */; };
532+
2A24814F2CB06A1A006FCB34 /* MSIDSSORemoteSilentTokenRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A24814C2CB06A1A006FCB34 /* MSIDSSORemoteSilentTokenRequest.m */; };
533+
2A2481532CB07BCC006FCB34 /* MSIDSSOXpcSilentTokenRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A2481512CB07BCC006FCB34 /* MSIDSSOXpcSilentTokenRequest.m */; };
534+
2A2481542CB07BCC006FCB34 /* MSIDSSOXpcSilentTokenRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A2481502CB07BCC006FCB34 /* MSIDSSOXpcSilentTokenRequest.h */; };
535+
2A2481582CB08050006FCB34 /* MSIDXpcSingleSignOnProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A2481562CB08050006FCB34 /* MSIDXpcSingleSignOnProvider.m */; };
536+
2A2481592CB08050006FCB34 /* MSIDXpcSingleSignOnProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A2481552CB08050006FCB34 /* MSIDXpcSingleSignOnProvider.h */; };
537+
2A24815F2CB08344006FCB34 /* MSIDXpcSilentTokenRequestController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A24815D2CB08344006FCB34 /* MSIDXpcSilentTokenRequestController.m */; };
538+
2A2481602CB08344006FCB34 /* MSIDXpcSilentTokenRequestController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A24815C2CB08344006FCB34 /* MSIDXpcSilentTokenRequestController.h */; };
530539
2A0278912D6E3216005655B4 /* MSIDAADTokenRequestServerTelemetryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A0278902D6E3216005655B4 /* MSIDAADTokenRequestServerTelemetryTests.m */; };
531540
2A0278922D6E3216005655B4 /* MSIDAADTokenRequestServerTelemetryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A0278902D6E3216005655B4 /* MSIDAADTokenRequestServerTelemetryTests.m */; };
532541
2A0278A32D6E3787005655B4 /* MSIDLastRequestTelemetry+Tests.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A0278A22D6E3787005655B4 /* MSIDLastRequestTelemetry+Tests.h */; };
@@ -2406,6 +2415,14 @@
24062415
23FB5C2E22551866002BF1EB /* MSIDClaimsRequest+ClientCapabilities.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "MSIDClaimsRequest+ClientCapabilities.m"; sourceTree = "<group>"; };
24072416
23FB5C32225585E6002BF1EB /* MSIDClaimsRequestMock.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDClaimsRequestMock.h; sourceTree = "<group>"; };
24082417
23FB5C33225585E6002BF1EB /* MSIDClaimsRequestMock.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDClaimsRequestMock.m; sourceTree = "<group>"; };
2418+
2A24814B2CB06A1A006FCB34 /* MSIDSSORemoteSilentTokenRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDSSORemoteSilentTokenRequest.h; sourceTree = "<group>"; };
2419+
2A24814C2CB06A1A006FCB34 /* MSIDSSORemoteSilentTokenRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDSSORemoteSilentTokenRequest.m; sourceTree = "<group>"; };
2420+
2A2481502CB07BCC006FCB34 /* MSIDSSOXpcSilentTokenRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDSSOXpcSilentTokenRequest.h; sourceTree = "<group>"; };
2421+
2A2481512CB07BCC006FCB34 /* MSIDSSOXpcSilentTokenRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDSSOXpcSilentTokenRequest.m; sourceTree = "<group>"; };
2422+
2A2481552CB08050006FCB34 /* MSIDXpcSingleSignOnProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDXpcSingleSignOnProvider.h; sourceTree = "<group>"; };
2423+
2A2481562CB08050006FCB34 /* MSIDXpcSingleSignOnProvider.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDXpcSingleSignOnProvider.m; sourceTree = "<group>"; };
2424+
2A24815C2CB08344006FCB34 /* MSIDXpcSilentTokenRequestController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDXpcSilentTokenRequestController.h; sourceTree = "<group>"; };
2425+
2A24815D2CB08344006FCB34 /* MSIDXpcSilentTokenRequestController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDXpcSilentTokenRequestController.m; sourceTree = "<group>"; };
24092426
2A0278902D6E3216005655B4 /* MSIDAADTokenRequestServerTelemetryTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDAADTokenRequestServerTelemetryTests.m; sourceTree = "<group>"; };
24102427
2A0278A22D6E3787005655B4 /* MSIDLastRequestTelemetry+Tests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MSIDLastRequestTelemetry+Tests.h"; sourceTree = "<group>"; };
24112428
51E364572863C0F300A97F82 /* MSIDTelemetryConditionalCompile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MSIDTelemetryConditionalCompile.h; sourceTree = "<group>"; };
@@ -5127,6 +5144,10 @@
51275144
B49323A02AD4DB2700E0CBC0 /* MSIDSSOExtensionPasskeyAssertionRequest.m */,
51285145
B443EFF02AD6299300782168 /* MSIDSSOExtensionPasskeyCredentialRequest.h */,
51295146
B443EFF12AD629A300782168 /* MSIDSSOExtensionPasskeyCredentialRequest.m */,
5147+
2A24814B2CB06A1A006FCB34 /* MSIDSSORemoteSilentTokenRequest.h */,
5148+
2A24814C2CB06A1A006FCB34 /* MSIDSSORemoteSilentTokenRequest.m */,
5149+
2A2481502CB07BCC006FCB34 /* MSIDSSOXpcSilentTokenRequest.h */,
5150+
2A2481512CB07BCC006FCB34 /* MSIDSSOXpcSilentTokenRequest.m */,
51305151
);
51315152
path = broker;
51325153
sourceTree = "<group>";
@@ -5141,6 +5162,8 @@
51415162
23B5DF7B234031ED002C530F /* MSIDSSOExtensionSilentTokenRequestController.m */,
51425163
B217863623A5994300839CE8 /* MSIDSSOExtensionSignoutController.h */,
51435164
B217863723A5994300839CE8 /* MSIDSSOExtensionSignoutController.m */,
5165+
2A24815C2CB08344006FCB34 /* MSIDXpcSilentTokenRequestController.h */,
5166+
2A24815D2CB08344006FCB34 /* MSIDXpcSilentTokenRequestController.m */,
51445167
);
51455168
path = broker;
51465169
sourceTree = "<group>";
@@ -5322,6 +5345,8 @@
53225345
728209CF26FEA0F600B5F018 /* MSIDKeyOperationUtil.m */,
53235346
237777C82853FF9400DDEAFC /* ASAuthorizationController+MSIDExtensions.h */,
53245347
237777C92853FF9400DDEAFC /* ASAuthorizationController+MSIDExtensions.m */,
5348+
2A2481552CB08050006FCB34 /* MSIDXpcSingleSignOnProvider.h */,
5349+
2A2481562CB08050006FCB34 /* MSIDXpcSingleSignOnProvider.m */,
53255350
);
53265351
path = util;
53275352
sourceTree = "<group>";
@@ -5881,6 +5906,7 @@
58815906
232C65882138BDC5002A41FE /* MSIDAADAuthorityMetadataResponse.h in Headers */,
58825907
23C548052A2A5DBF00633DC0 /* MSIDBrokerOperationBrowserNativeMessageRequest.h in Headers */,
58835908
B2C7089C219926C200D917B8 /* MSIDBrokerResponse+Internal.h in Headers */,
5909+
2A2481602CB08344006FCB34 /* MSIDXpcSilentTokenRequestController.h in Headers */,
58845910
B286B9C72389DE7F007833AD /* MSIDAccountMetadataCacheAccessor.h in Headers */,
58855911
B286B9B12389DD6C007833AD /* MSIDPKeyAuthHandler.h in Headers */,
58865912
E733EDD525C0A47600ACB79A /* MSIDThumbprintCalculatable.h in Headers */,
@@ -5897,6 +5923,7 @@
58975923
74D926C324B3EFC300AA4270 /* MSIDLastRequestTelemetry+Internal.h in Headers */,
58985924
235480CA20DDF81000246F72 /* MSIDAuthorityFactory.h in Headers */,
58995925
58BC2392271E0D94008A77BE /* MSIDSSOExtensionGetSsoCookiesRequest.h in Headers */,
5926+
2A24814E2CB06A1A006FCB34 /* MSIDSSORemoteSilentTokenRequest.h in Headers */,
59005927
B217863823A5994300839CE8 /* MSIDSSOExtensionSignoutController.h in Headers */,
59015928
A0C7DE4425D4522300F5B5B6 /* MSIDThrottlingModelFactory.h in Headers */,
59025929
B286B9942389DC76007833AD /* MSIDDefaultTokenRequestProvider+Internal.h in Headers */,
@@ -6069,6 +6096,7 @@
60696096
58E2A1FC24E497400027A28A /* MSIDWebResponseOperationConstants.h in Headers */,
60706097
5887EBF12BBF6490005F9634 /* MSIDAuthenticationSchemeSshCert.h in Headers */,
60716098
B2AF1D2E218BCEDE0080C1A0 /* MSIDInteractiveTokenRequest.h in Headers */,
6099+
2A2481592CB08050006FCB34 /* MSIDXpcSingleSignOnProvider.h in Headers */,
60726100
1E707FE22407337300716148 /* MSIDBrokerOperationResponse.h in Headers */,
60736101
B251CC48204105A7005E0179 /* MSIDBaseToken.h in Headers */,
60746102
1E62D0E6228B760A000E2BBC /* MSIDKeychainUtil.h in Headers */,
@@ -6196,6 +6224,7 @@
61966224
74F04D4D246CB5B100094017 /* MSIDCurrentRequestTelemetrySerializedItem+Internal.h in Headers */,
61976225
238E19DD2086FE28004DF483 /* MSIDAADAuthorizationCodeRequest.h in Headers */,
61986226
B227037622A4C29800030ADC /* MSIDExtendedTokenCacheDataSource.h in Headers */,
6227+
2A2481542CB07BCC006FCB34 /* MSIDSSOXpcSilentTokenRequest.h in Headers */,
61996228
B251CC49204105A7005E0179 /* MSIDIdToken.h in Headers */,
62006229
B2F671EC2467AB4500649855 /* MSIDInteractiveRequestControlling.h in Headers */,
62016230
B443F0002AD6327700782168 /* MSIDBrokerOperationPasskeyCredentialRequest.h in Headers */,
@@ -7100,12 +7129,14 @@
71007129
580E2547271A014F003D1795 /* MSIDDeviceHeader.m in Sources */,
71017130
583BFCAB24D88CED0035B901 /* MSIDRedirectUriVerifier.m in Sources */,
71027131
B253152723DD61FB00432133 /* MSIDSSOExtensionGetDeviceInfoRequest.m in Sources */,
7132+
2A24815F2CB08344006FCB34 /* MSIDXpcSilentTokenRequestController.m in Sources */,
71037133
23C548062A2A5DBF00633DC0 /* MSIDBrokerOperationBrowserNativeMessageRequest.m in Sources */,
71047134
238D5D8C22B353830091A135 /* MSIDAADV2TokenResponseForV1Request.m in Sources */,
71057135
2352AF342AA7C7B700FA2253 /* MSIDBrowserNativeMessageGetTokenResponse.m in Sources */,
71067136
589BDB292718F18800BF3799 /* MSIDCredentialHeader.m in Sources */,
71077137
B25A356F1FC4D70300C7FD43 /* MSIDLogger.m in Sources */,
71087138
5887EBF32BBF6490005F9634 /* MSIDAuthenticationSchemeSshCert.m in Sources */,
7139+
2A2481532CB07BCC006FCB34 /* MSIDSSOXpcSilentTokenRequest.m in Sources */,
71097140
B2C7088F2198E48E00D917B8 /* NSData+AES.m in Sources */,
71107141
96F21B3320A65896002B87C3 /* MSIDWebviewAuthorization.m in Sources */,
71117142
B27893832470CFE700627C28 /* MSIDAssymetricKeyGeneratorFactory.m in Sources */,
@@ -7128,6 +7159,7 @@
71287159
23FB5C3122551866002BF1EB /* MSIDClaimsRequest+ClientCapabilities.m in Sources */,
71297160
23B39ACD209CF317000AA905 /* MSIDAADNetworkConfiguration.m in Sources */,
71307161
23FB5C462255A135002BF1EB /* MSIDIndividualClaimRequest.m in Sources */,
7162+
2A2481582CB08050006FCB34 /* MSIDXpcSingleSignOnProvider.m in Sources */,
71317163
238F80A222C2BE1600437CB1 /* MSIDGetV1IdTokenHttpEvent.m in Sources */,
71327164
60BE060D23A1A3ED00CDA662 /* MSIDDeviceInfo.m in Sources */,
71337165
23071657229F56AE00FDD044 /* MSIDAADV2Oauth2FactoryForV1Request.m in Sources */,
@@ -7343,6 +7375,7 @@
73437375
B28D90A7218FD1E800E230D6 /* MSIDLegacyTokenResponseValidator.m in Sources */,
73447376
1E5319AA24A425B7007BCF30 /* MSIDAuthenticationScheme.m in Sources */,
73457377
B286B99F2389DCBA007833AD /* MSIDRequestParameters+Broker.m in Sources */,
7378+
2A24814D2CB06A1A006FCB34 /* MSIDSSORemoteSilentTokenRequest.m in Sources */,
73467379
B26A0B7F2071ADCE006BD95A /* MSIDOauth2Factory.m in Sources */,
73477380
B217863A23A5994300839CE8 /* MSIDSSOExtensionSignoutController.m in Sources */,
73487381
B2C707FF2192530E00D917B8 /* MSIDDefaultSilentTokenRequest.m in Sources */,
@@ -7878,6 +7911,7 @@
78787911
609E74CB228DE23B005E3FED /* MSIDAccountMetadataCacheKey.m in Sources */,
78797912
B2807FF8204CAFDF00944D89 /* MSIDHelpers.m in Sources */,
78807913
2317FFBD2A43988900E3DAA2 /* MSIDBrokerOperationBrowserNativeMessageRequest.m in Sources */,
7914+
2A24814F2CB06A1A006FCB34 /* MSIDSSORemoteSilentTokenRequest.m in Sources */,
78817915
23B018C32356D51200207FEC /* NSDictionary+MSIDQueryItems.m in Sources */,
78827916
580E2546271A014F003D1795 /* MSIDDeviceHeader.m in Sources */,
78837917
234DE5842A9456F600E244B3 /* MSIDBrowserNativeMessageRequest.m in Sources */,

IdentityCore/src/MSIDConstants.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,14 @@ typedef NS_ENUM(NSInteger, MSIDHeaderType)
9393
MSIDHeaderTypeDeviceRegistration
9494
};
9595

96+
typedef NS_ENUM(NSUInteger, MSIDXpcMode)
97+
{
98+
MSIDXpcModeDisable = 0, // Broker Xpc service call is disabled
99+
MSIDXpcModeBackup,// Broker Xpc service call is only used as a backup service when SsoExtension service failed. If SsoExtenion is not available on the device (canPerformRequest returns false), Broker Xpc service call will be disabled
100+
MSIDXpcModeFull, // Broker Xpc service call is used as a backup call when SsoExtension service failed. If SsoExtenion is not available on the device, Xpc service call will be the primary auth service
101+
MSIDXpcModeOverride // Development only: Broker Xpc service is used as main Sso service, and ignored SsoExtension service completely. This option will be ignored in production and will be treated same as MSIDXpcModeDisable
102+
};
103+
96104
typedef void (^MSIDRequestCompletionBlock)(MSIDTokenResult * _Nullable result, NSError * _Nullable error);
97105
typedef void (^MSIDSignoutRequestCompletionBlock)(BOOL success, NSError * _Nullable error);
98106
typedef void (^MSIDGetAccountsRequestCompletionBlock)(NSArray<MSIDAccount *> * _Nullable accounts, BOOL returnBrokerAccountsOnly, NSError * _Nullable error);

0 commit comments

Comments
 (0)