Skip to content

Commit 4d799e4

Browse files
Kai SongKai Song
authored andcommitted
Merge branch 'dev' into kasong/2914053-common-interface
2 parents 7312a98 + 1f9fdcc commit 4d799e4

17 files changed

+113
-37
lines changed

IdentityCore/IdentityCore.xcodeproj/project.pbxproj

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@
106106
230847A82082C5830024CE7C /* MSIDHttpRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 230847A52082C5830024CE7C /* MSIDHttpRequest.m */; };
107107
2309391B2189301600EAC95D /* MSIDJsonSerializing.h in Headers */ = {isa = PBXBuildFile; fileRef = 2309391A2189301600EAC95D /* MSIDJsonSerializing.h */; };
108108
230C2C412CF7D6F100E767B6 /* MSIDSwitchBrowserResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 230C2C402CF7D6F100E767B6 /* MSIDSwitchBrowserResponse.m */; };
109-
230C2C442CF94C4000E767B6 /* MSIDSwitchBrowserOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 230C2C432CF94C4000E767B6 /* MSIDSwitchBrowserOperation.m */; };
110109
230C2C472CF95DBC00E767B6 /* MSIDSwitchBrowserResumeResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 230C2C462CF95DBC00E767B6 /* MSIDSwitchBrowserResumeResponse.m */; };
111110
230FF0D624BE93BE00A4DC6B /* MSIDLoggerConnecting.h in Headers */ = {isa = PBXBuildFile; fileRef = 230FF0D524BE93BE00A4DC6B /* MSIDLoggerConnecting.h */; };
112111
2317FFBD2A43988900E3DAA2 /* MSIDBrokerOperationBrowserNativeMessageRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 23C548042A2A5DBF00633DC0 /* MSIDBrokerOperationBrowserNativeMessageRequest.m */; };
@@ -224,6 +223,8 @@
224223
235480D420DDF88200246F72 /* MSIDAADAuthority.h in Headers */ = {isa = PBXBuildFile; fileRef = 235480D220DDF88000246F72 /* MSIDAADAuthority.h */; };
225224
235480D520DDF88200246F72 /* MSIDAADAuthority.m in Sources */ = {isa = PBXBuildFile; fileRef = 235480D320DDF88100246F72 /* MSIDAADAuthority.m */; };
226225
235480D620DDF88200246F72 /* MSIDAADAuthority.m in Sources */ = {isa = PBXBuildFile; fileRef = 235480D320DDF88100246F72 /* MSIDAADAuthority.m */; };
226+
235C2B022D6FAF7900DEFEFB /* MSIDSwitchBrowserResumeOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 235C2B002D6FAF7900DEFEFB /* MSIDSwitchBrowserResumeOperation.m */; };
227+
235C2B032D6FAF7900DEFEFB /* MSIDSwitchBrowserOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 235C2AFE2D6FAF7900DEFEFB /* MSIDSwitchBrowserOperation.m */; };
227228
2361DE8C2048B6F8005FD48A /* MSIDAccountTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2361DE8A2048B6F8005FD48A /* MSIDAccountTests.m */; };
228229
23642AB62187D88C00F97009 /* MSIDAuthorityMock.m in Sources */ = {isa = PBXBuildFile; fileRef = 23642AB42187D88C00F97009 /* MSIDAuthorityMock.m */; };
229230
23642AB72187D88C00F97009 /* MSIDAuthorityMock.m in Sources */ = {isa = PBXBuildFile; fileRef = 23642AB42187D88C00F97009 /* MSIDAuthorityMock.m */; };
@@ -315,8 +316,6 @@
315316
239222B4243D3791009736C4 /* MSIDLastRequestTelemetry.m in Sources */ = {isa = PBXBuildFile; fileRef = 239222AF243D3791009736C4 /* MSIDLastRequestTelemetry.m */; };
316317
239222B5243D3791009736C4 /* MSIDCurrentRequestTelemetry.m in Sources */ = {isa = PBXBuildFile; fileRef = 239222B0243D3791009736C4 /* MSIDCurrentRequestTelemetry.m */; };
317318
239222B6243D3791009736C4 /* MSIDCurrentRequestTelemetry.m in Sources */ = {isa = PBXBuildFile; fileRef = 239222B0243D3791009736C4 /* MSIDCurrentRequestTelemetry.m */; };
318-
2394F1572D162B8500E44F6E /* MSIDSwitchBrowserResumeOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 2394F1562D162B8500E44F6E /* MSIDSwitchBrowserResumeOperation.m */; };
319-
2394F1582D162B8500E44F6E /* MSIDSwitchBrowserResumeOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 2394F1552D162B8500E44F6E /* MSIDSwitchBrowserResumeOperation.h */; };
320319
2394F1A02D2866F700E44F6E /* MSIDCertAuthManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 2394F19F2D2866F700E44F6E /* MSIDCertAuthManager.m */; };
321320
2394F1A12D2866F700E44F6E /* MSIDCertAuthManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 2394F19E2D2866F700E44F6E /* MSIDCertAuthManager.h */; };
322321
2394F1F92D4890BD00E44F6E /* MSIDWebOAuth2AuthCodeOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 2394F1F82D4890BD00E44F6E /* MSIDWebOAuth2AuthCodeOperation.m */; };
@@ -2071,8 +2070,6 @@
20712070
2309391A2189301600EAC95D /* MSIDJsonSerializing.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDJsonSerializing.h; sourceTree = "<group>"; };
20722071
230C2C3F2CF7D6F100E767B6 /* MSIDSwitchBrowserResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDSwitchBrowserResponse.h; sourceTree = "<group>"; };
20732072
230C2C402CF7D6F100E767B6 /* MSIDSwitchBrowserResponse.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDSwitchBrowserResponse.m; sourceTree = "<group>"; };
2074-
230C2C422CF94C4000E767B6 /* MSIDSwitchBrowserOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDSwitchBrowserOperation.h; sourceTree = "<group>"; };
2075-
230C2C432CF94C4000E767B6 /* MSIDSwitchBrowserOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDSwitchBrowserOperation.m; sourceTree = "<group>"; };
20762073
230C2C452CF95DBC00E767B6 /* MSIDSwitchBrowserResumeResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDSwitchBrowserResumeResponse.h; sourceTree = "<group>"; };
20772074
230C2C462CF95DBC00E767B6 /* MSIDSwitchBrowserResumeResponse.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDSwitchBrowserResumeResponse.m; sourceTree = "<group>"; };
20782075
230FF0D524BE93BE00A4DC6B /* MSIDLoggerConnecting.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDLoggerConnecting.h; sourceTree = "<group>"; };
@@ -2165,6 +2162,10 @@
21652162
235480C520DDF81000246F72 /* MSIDADFSAuthority.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MSIDADFSAuthority.m; sourceTree = "<group>"; };
21662163
235480D220DDF88000246F72 /* MSIDAADAuthority.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MSIDAADAuthority.h; sourceTree = "<group>"; };
21672164
235480D320DDF88100246F72 /* MSIDAADAuthority.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MSIDAADAuthority.m; sourceTree = "<group>"; };
2165+
235C2AFD2D6FAF7900DEFEFB /* MSIDSwitchBrowserOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDSwitchBrowserOperation.h; sourceTree = "<group>"; };
2166+
235C2AFE2D6FAF7900DEFEFB /* MSIDSwitchBrowserOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDSwitchBrowserOperation.m; sourceTree = "<group>"; };
2167+
235C2AFF2D6FAF7900DEFEFB /* MSIDSwitchBrowserResumeOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDSwitchBrowserResumeOperation.h; sourceTree = "<group>"; };
2168+
235C2B002D6FAF7900DEFEFB /* MSIDSwitchBrowserResumeOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDSwitchBrowserResumeOperation.m; sourceTree = "<group>"; };
21682169
235D13E120EEE81100F5C50D /* MSIDAuthority+Internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MSIDAuthority+Internal.h"; sourceTree = "<group>"; };
21692170
2361DE8A2048B6F8005FD48A /* MSIDAccountTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDAccountTests.m; sourceTree = "<group>"; };
21702171
23642AB42187D88C00F97009 /* MSIDAuthorityMock.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MSIDAuthorityMock.m; sourceTree = "<group>"; };
@@ -2234,8 +2235,6 @@
22342235
239222AE243D3791009736C4 /* MSIDCurrentRequestTelemetry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MSIDCurrentRequestTelemetry.h; sourceTree = "<group>"; };
22352236
239222AF243D3791009736C4 /* MSIDLastRequestTelemetry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MSIDLastRequestTelemetry.m; sourceTree = "<group>"; };
22362237
239222B0243D3791009736C4 /* MSIDCurrentRequestTelemetry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MSIDCurrentRequestTelemetry.m; sourceTree = "<group>"; };
2237-
2394F1552D162B8500E44F6E /* MSIDSwitchBrowserResumeOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDSwitchBrowserResumeOperation.h; sourceTree = "<group>"; };
2238-
2394F1562D162B8500E44F6E /* MSIDSwitchBrowserResumeOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDSwitchBrowserResumeOperation.m; sourceTree = "<group>"; };
22392238
2394F19E2D2866F700E44F6E /* MSIDCertAuthManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDCertAuthManager.h; sourceTree = "<group>"; };
22402239
2394F19F2D2866F700E44F6E /* MSIDCertAuthManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDCertAuthManager.m; sourceTree = "<group>"; };
22412240
2394F1F72D4890BD00E44F6E /* MSIDWebOAuth2AuthCodeOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDWebOAuth2AuthCodeOperation.h; sourceTree = "<group>"; };
@@ -3677,6 +3676,17 @@
36773676
path = error_handler;
36783677
sourceTree = "<group>";
36793678
};
3679+
235C2B012D6FAF7900DEFEFB /* ios */ = {
3680+
isa = PBXGroup;
3681+
children = (
3682+
235C2AFD2D6FAF7900DEFEFB /* MSIDSwitchBrowserOperation.h */,
3683+
235C2AFE2D6FAF7900DEFEFB /* MSIDSwitchBrowserOperation.m */,
3684+
235C2AFF2D6FAF7900DEFEFB /* MSIDSwitchBrowserResumeOperation.h */,
3685+
235C2B002D6FAF7900DEFEFB /* MSIDSwitchBrowserResumeOperation.m */,
3686+
);
3687+
path = ios;
3688+
sourceTree = "<group>";
3689+
};
36803690
23642AB32187D88C00F97009 /* mocks */ = {
36813691
isa = PBXGroup;
36823692
children = (
@@ -4065,16 +4075,13 @@
40654075
58B81F7F24AD0F7700E8799E /* operations */ = {
40664076
isa = PBXGroup;
40674077
children = (
4078+
235C2B012D6FAF7900DEFEFB /* ios */,
40684079
58B81F7A24AD0E7A00E8799E /* MSIDWebResponseOperationFactory.h */,
40694080
58B81F7B24AD0E7A00E8799E /* MSIDWebResponseOperationFactory.m */,
40704081
58B81F8024AD0F8B00E8799E /* MSIDWebResponseBaseOperation.h */,
40714082
58B81F8124AD0F8B00E8799E /* MSIDWebResponseBaseOperation.m */,
40724083
58E2A1F524E47D560027A28A /* MSIDWebOpenBrowserResponseOperation.h */,
40734084
58E2A1F624E47D560027A28A /* MSIDWebOpenBrowserResponseOperation.m */,
4074-
230C2C422CF94C4000E767B6 /* MSIDSwitchBrowserOperation.h */,
4075-
230C2C432CF94C4000E767B6 /* MSIDSwitchBrowserOperation.m */,
4076-
2394F1552D162B8500E44F6E /* MSIDSwitchBrowserResumeOperation.h */,
4077-
2394F1562D162B8500E44F6E /* MSIDSwitchBrowserResumeOperation.m */,
40784085
2394F1F72D4890BD00E44F6E /* MSIDWebOAuth2AuthCodeOperation.h */,
40794086
2394F1F82D4890BD00E44F6E /* MSIDWebOAuth2AuthCodeOperation.m */,
40804087
2394F1FC2D4893DA00E44F6E /* MSIDWebWPJOperation.h */,
@@ -6112,7 +6119,6 @@
61126119
B2C707F32192524700D917B8 /* MSIDDefaultTokenRequestProvider.h in Headers */,
61136120
B286B9772389CE67007833AD /* MSIDWebOAuth2Response.h in Headers */,
61146121
2392229D2432A65F009736C4 /* NSError+MSIDServerTelemetryError.h in Headers */,
6115-
2394F1582D162B8500E44F6E /* MSIDSwitchBrowserResumeOperation.h in Headers */,
61166122
B251CC3E2041058D005E0179 /* MSIDAccessToken.h in Headers */,
61176123
B286B9922389DC4A007833AD /* MSIDIndividualClaimRequestAdditionalInfo.h in Headers */,
61186124
23AE9DB72148529A00B285F3 /* NSError+MSIDExtensions.h in Headers */,
@@ -7778,7 +7784,6 @@
77787784
B2C7B3BB213C69C8009FFCC1 /* MSIDDefaultErrorConverter.m in Sources */,
77797785
B2000C9F20EC65610092790A /* MSIDURLFormObject.m in Sources */,
77807786
B210F44B1FDDF5A6005A8F76 /* MSIDClientInfo.m in Sources */,
7781-
230C2C442CF94C4000E767B6 /* MSIDSwitchBrowserOperation.m in Sources */,
77827787
B2FF0830245E4C89001C7F3B /* MSIDWorkplaceJoinChallenge.m in Sources */,
77837788
96235F9C207D72CE007EAB36 /* MSIDWebWPJResponse.m in Sources */,
77847789
239E8F89233D951D00251373 /* MSIDBrokerOperationResponse.m in Sources */,
@@ -7953,6 +7958,8 @@
79537958
B2C17AED1FC796FE0070A514 /* MSIDOAuth2Constants.m in Sources */,
79547959
2392229E2432A65F009736C4 /* NSError+MSIDServerTelemetryError.m in Sources */,
79557960
600D199E20963B020004CD43 /* MSIDNTLMUIPrompt.m in Sources */,
7961+
235C2B022D6FAF7900DEFEFB /* MSIDSwitchBrowserResumeOperation.m in Sources */,
7962+
235C2B032D6FAF7900DEFEFB /* MSIDSwitchBrowserOperation.m in Sources */,
79567963
B2C708732198C42200D917B8 /* MSIDLegacyBrokerResponseHandler.m in Sources */,
79577964
886F517029CCA84200F09471 /* MSIDCIAMAuthorityResolver.m in Sources */,
79587965
238E19D82086FE28004DF483 /* MSIDAADRefreshTokenGrantRequest.m in Sources */,
@@ -8083,7 +8090,6 @@
80838090
B297E1E220A1272600F370EC /* MSIDLegacyTokenCacheQuery.m in Sources */,
80848091
60F7BE8B21DA4E2900F1BBA1 /* MSIDPrimaryRefreshToken.m in Sources */,
80858092
B214C39F1FE854FE0070C4F2 /* MSIDLegacyTokenCacheAccessor.m in Sources */,
8086-
2394F1572D162B8500E44F6E /* MSIDSwitchBrowserResumeOperation.m in Sources */,
80878093
D62600161FBD380500EE4487 /* NSDictionary+MSIDExtensions.m in Sources */,
80888094
B2B1D579204369D600DD81F0 /* MSIDAccountType.m in Sources */,
80898095
B2C707EE21924C8300D917B8 /* MSIDTokenResponseValidator.m in Sources */,

IdentityCore/src/MSIDBrokerConstants.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ extern NSString * _Nonnull const MSID_BROKER_DEVICE_MODE_KEY;
6969
extern NSString * _Nonnull const MSID_BROKER_SSO_EXTENSION_MODE_KEY;
7070
extern NSString * _Nonnull const MSID_BROKER_WPJ_STATUS_KEY;
7171
extern NSString * _Nonnull const MSID_BROKER_BROKER_VERSION_KEY;
72+
extern NSString * _Nonnull const MSID_SSO_PROVIDER_TYPE_KEY;
7273
extern NSString * _Nonnull const MSID_BROKER_IS_PERFORMING_CBA;
7374
extern NSString * _Nonnull const MSID_ADAL_BROKER_MESSAGE_VERSION;
7475
extern NSString * _Nonnull const MSID_MSAL_BROKER_MESSAGE_VERSION;

IdentityCore/src/MSIDBrokerConstants.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
NSString *const MSID_BROKER_SSO_EXTENSION_MODE_KEY = @"sso_extension_mode";
6767
NSString *const MSID_BROKER_WPJ_STATUS_KEY = @"wpj_status";
6868
NSString *const MSID_BROKER_BROKER_VERSION_KEY = @"broker_version";
69+
NSString *const MSID_SSO_PROVIDER_TYPE_KEY = @"sso_provider_type";
6970
NSString *const MSID_BROKER_IS_PERFORMING_CBA = @"broker_is_performing_cba";
7071
NSString *const MSID_ADAL_BROKER_MESSAGE_VERSION = @"2";
7172
NSString *const MSID_MSAL_BROKER_MESSAGE_VERSION = @"3";

IdentityCore/src/broker_operation/response/MSIDDeviceInfo.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ typedef NS_ENUM(NSInteger, MSIDPreferredAuthMethod)
5555
MSIDPreferredAuthMethodQRPIN
5656
};
5757

58+
typedef NS_ENUM(NSInteger, MSIDSsoProviderType)
59+
{
60+
MSIDUnknownSsoProvider = 0,
61+
MSIDMacBrokerSsoProvider,
62+
MSIDCompanyPortalSsoProvider
63+
};
5864

5965
NS_ASSUME_NONNULL_BEGIN
6066

@@ -64,6 +70,7 @@ NS_ASSUME_NONNULL_BEGIN
6470
@property (nonatomic) MSIDSSOExtensionMode ssoExtensionMode;
6571
@property (nonatomic) MSIDWorkPlaceJoinStatus wpjStatus;
6672
@property (nonatomic, nullable) NSString *brokerVersion;
73+
@property (nonatomic) MSIDSsoProviderType ssoProviderType;
6774
@property (nonatomic) NSDictionary *additionalExtensionData;
6875
@property (nonatomic) MSIDPreferredAuthMethod preferredAuthConfig;
6976

@@ -77,7 +84,8 @@ NS_ASSUME_NONNULL_BEGIN
7784
- (instancetype)initWithDeviceMode:(MSIDDeviceMode)deviceMode
7885
ssoExtensionMode:(MSIDSSOExtensionMode)ssoExtensionMode
7986
isWorkPlaceJoined:(BOOL)isWorkPlaceJoined
80-
brokerVersion:(NSString *)brokerVersion;
87+
brokerVersion:(NSString *)brokerVersion
88+
ssoProviderType:(MSIDSsoProviderType)ssoProviderType;
8189

8290
@end
8391

IdentityCore/src/broker_operation/response/MSIDDeviceInfo.m

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131

3232
@implementation MSIDDeviceInfo
3333

34-
3534
- (instancetype)initWithDeviceMode:(MSIDDeviceMode)deviceMode
3635
ssoExtensionMode:(MSIDSSOExtensionMode)ssoExtensionMode
3736
isWorkPlaceJoined:(BOOL)isWorkPlaceJoined
3837
brokerVersion:(NSString *)brokerVersion
38+
ssoProviderType:(MSIDSsoProviderType)ssoProviderType
3939
{
4040
self = [super init];
4141

@@ -45,6 +45,7 @@ - (instancetype)initWithDeviceMode:(MSIDDeviceMode)deviceMode
4545
_ssoExtensionMode = ssoExtensionMode;
4646
_wpjStatus = isWorkPlaceJoined ? MSIDWorkPlaceJoinStatusJoined : MSIDWorkPlaceJoinStatusNotJoined;
4747
_brokerVersion = brokerVersion;
48+
_ssoProviderType = ssoProviderType;
4849
}
4950

5051
return self;
@@ -66,6 +67,7 @@ - (instancetype)initWithJSONDictionary:(NSDictionary *)json error:(__unused NSEr
6667

6768
#if TARGET_OS_OSX
6869
_platformSSOStatus = [self platformSSOStatusEnumFromString:[json msidStringObjectForKey:MSID_PLATFORM_SSO_STATUS_KEY]];
70+
_ssoProviderType = [self ssoProviderTypeEnumFromString:[json msidStringObjectForKey:MSID_SSO_PROVIDER_TYPE_KEY]];
6971
#endif
7072

7173
NSString *jsonDataString = [json msidStringObjectForKey:MSID_ADDITIONAL_EXTENSION_DATA_KEY];
@@ -97,6 +99,7 @@ - (NSDictionary *)jsonDictionary
9799
json[MSID_BROKER_PREFERRED_AUTH_CONFIGURATION_KEY] = [self preferredAuthConfigurationStringFromEnum:self.preferredAuthConfig];
98100
#if TARGET_OS_OSX
99101
json[MSID_PLATFORM_SSO_STATUS_KEY] = [self platformSSOStatusStringFromEnum:self.platformSSOStatus];
102+
json[MSID_SSO_PROVIDER_TYPE_KEY] = [self ssoProviderTypeStringFromEnum:self.ssoProviderType];
100103
#endif
101104
json[MSID_ADDITIONAL_EXTENSION_DATA_KEY] = [self.additionalExtensionData msidJSONSerializeWithContext:nil];
102105
if (self.extraDeviceInfo)
@@ -215,4 +218,25 @@ - (MSIDPreferredAuthMethod)preferredAuthConfigurationEnumFromString:(NSString *)
215218
return MSIDPreferredAuthMethodNotConfigured;
216219
}
217220

221+
- (NSString *)ssoProviderTypeStringFromEnum:(MSIDSsoProviderType)deviceMode
222+
{
223+
switch (deviceMode)
224+
{
225+
case MSIDCompanyPortalSsoProvider:
226+
return @"companyPortal";
227+
case MSIDMacBrokerSsoProvider:
228+
return @"macBroker";
229+
default:
230+
return @"unknown";
231+
}
232+
}
233+
234+
- (MSIDSsoProviderType)ssoProviderTypeEnumFromString:(NSString *)deviceModeString
235+
{
236+
if ([deviceModeString isEqualToString:@"companyPortal"]) return MSIDCompanyPortalSsoProvider;
237+
if ([deviceModeString isEqualToString:@"macBroker"]) return MSIDMacBrokerSsoProvider;
238+
239+
return MSIDUnknownSsoProvider;
240+
}
241+
218242
@end

IdentityCore/src/webview/MSIDCertAuthManager.m

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ + (instancetype)sharedInstance
5050
return sharedInstance;
5151
}
5252

53+
#if TARGET_OS_IPHONE && !MSID_EXCLUDE_SYSTEMWV
54+
5355
- (void)setRedirectUriPrefix:(NSString *)prefix
5456
forScheme:(NSString *)scheme
5557
{
@@ -75,20 +77,16 @@ - (BOOL)completeWithCallbackURL:(NSURL *)url
7577
}
7678

7779
- (void)startWithURL:(NSURL *)startURL
78-
parentController:(UIViewController *)parentViewController
80+
parentController:(MSIDViewController *)parentViewController
7981
context:(id<MSIDRequestContext>)context
8082
completionBlock:(MSIDWebUICompletionHandler)completionBlock
8183
{
82-
#if MSID_EXCLUDE_SYSTEMWV
83-
NSError *msidError = MSIDCreateError(MSIDErrorDomain, MSIDErrorInternal, @"Cannot handle cba request: system webview is not available.", nil, nil, nil, nil, nil, YES);
84-
if (completionBlock) completionBlock(nil, msidError);
85-
#else
8684
[MSIDMainThreadUtil executeOnMainThreadIfNeeded:^{
8785
self.isCertAuthInProgress = YES;
8886

8987
NSURLComponents *requestURLComponents = [NSURLComponents componentsWithURL:startURL resolvingAgainstBaseURL:NO];
9088
NSArray<NSURLQueryItem *> *queryItems = [requestURLComponents queryItems];
91-
89+
9290
NSMutableDictionary *newQueryItems = [NSMutableDictionary new];
9391
newQueryItems[MSID_BROKER_IS_PERFORMING_CBA] = @"true";
9492

@@ -122,7 +120,7 @@ - (void)startWithURL:(NSURL *)startURL
122120

123121
[self.systemWebViewController startWithCompletionHandler:completionBlock];
124122
}];
125-
#endif
126123
}
127124

125+
#endif
128126
@end

IdentityCore/src/webview/operations/MSIDSwitchBrowserOperation.h renamed to IdentityCore/src/webview/operations/ios/MSIDSwitchBrowserOperation.h

File renamed without changes.

IdentityCore/src/webview/operations/MSIDSwitchBrowserOperation.m renamed to IdentityCore/src/webview/operations/ios/MSIDSwitchBrowserOperation.m

File renamed without changes.

IdentityCore/src/webview/operations/MSIDSwitchBrowserResumeOperation.h renamed to IdentityCore/src/webview/operations/ios/MSIDSwitchBrowserResumeOperation.h

File renamed without changes.

IdentityCore/src/webview/operations/MSIDSwitchBrowserResumeOperation.m renamed to IdentityCore/src/webview/operations/ios/MSIDSwitchBrowserResumeOperation.m

File renamed without changes.

0 commit comments

Comments
 (0)