Skip to content

Commit cc1ba8e

Browse files
authored
Merge pull request #1422 from AzureAD/release/1.7.41
Merge Release 1.7.41 into Main branch
2 parents ec40a88 + 58eb2f4 commit cc1ba8e

File tree

41 files changed

+526
-28
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+526
-28
lines changed

IdentityCore/IdentityCore.xcodeproj/project.pbxproj

+40-2
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,12 @@
431431
23C10AA02B40D9350063D97C /* MSIDBrowserNativeMessageSignOutResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 23C10A9D2B40D9340063D97C /* MSIDBrowserNativeMessageSignOutResponse.m */; };
432432
23C548052A2A5DBF00633DC0 /* MSIDBrokerOperationBrowserNativeMessageRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 23C548032A2A5DBF00633DC0 /* MSIDBrokerOperationBrowserNativeMessageRequest.h */; };
433433
23C548062A2A5DBF00633DC0 /* MSIDBrokerOperationBrowserNativeMessageRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 23C548042A2A5DBF00633DC0 /* MSIDBrokerOperationBrowserNativeMessageRequest.m */; };
434+
23C898142C8928DD00071482 /* MSIDBrowserNativeMessageGetSupportedContractsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 23C898132C8928DD00071482 /* MSIDBrowserNativeMessageGetSupportedContractsRequest.m */; };
435+
23C898152C8928DD00071482 /* MSIDBrowserNativeMessageGetSupportedContractsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 23C898132C8928DD00071482 /* MSIDBrowserNativeMessageGetSupportedContractsRequest.m */; };
436+
23C898162C8928DD00071482 /* MSIDBrowserNativeMessageGetSupportedContractsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 23C898122C8928DD00071482 /* MSIDBrowserNativeMessageGetSupportedContractsRequest.h */; };
437+
23C898192C892A3800071482 /* MSIDBrowserNativeMessageGetSupportedContractsResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 23C898182C892A3800071482 /* MSIDBrowserNativeMessageGetSupportedContractsResponse.m */; };
438+
23C8981A2C892A3800071482 /* MSIDBrowserNativeMessageGetSupportedContractsResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 23C898182C892A3800071482 /* MSIDBrowserNativeMessageGetSupportedContractsResponse.m */; };
439+
23C8981B2C892A3800071482 /* MSIDBrowserNativeMessageGetSupportedContractsResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 23C898172C892A3800071482 /* MSIDBrowserNativeMessageGetSupportedContractsResponse.h */; };
434440
23CA0C4A220A3B6900768729 /* MSIDPKeyAuthHandlerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 23CA0C49220A3B6900768729 /* MSIDPKeyAuthHandlerTests.m */; };
435441
23CA0C4B220A4A5D00768729 /* MSIDPKeyAuthHandlerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 23CA0C49220A3B6900768729 /* MSIDPKeyAuthHandlerTests.m */; };
436442
23CA0C5F220A68D400768729 /* MSIDPkeyAuthHelperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 23CA0C5E220A68D400768729 /* MSIDPkeyAuthHelperTests.m */; };
@@ -2286,6 +2292,10 @@
22862292
23C10A9D2B40D9340063D97C /* MSIDBrowserNativeMessageSignOutResponse.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDBrowserNativeMessageSignOutResponse.m; sourceTree = "<group>"; };
22872293
23C548032A2A5DBF00633DC0 /* MSIDBrokerOperationBrowserNativeMessageRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MSIDBrokerOperationBrowserNativeMessageRequest.h; sourceTree = "<group>"; };
22882294
23C548042A2A5DBF00633DC0 /* MSIDBrokerOperationBrowserNativeMessageRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MSIDBrokerOperationBrowserNativeMessageRequest.m; sourceTree = "<group>"; };
2295+
23C898122C8928DD00071482 /* MSIDBrowserNativeMessageGetSupportedContractsRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDBrowserNativeMessageGetSupportedContractsRequest.h; sourceTree = "<group>"; };
2296+
23C898132C8928DD00071482 /* MSIDBrowserNativeMessageGetSupportedContractsRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDBrowserNativeMessageGetSupportedContractsRequest.m; sourceTree = "<group>"; };
2297+
23C898172C892A3800071482 /* MSIDBrowserNativeMessageGetSupportedContractsResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSIDBrowserNativeMessageGetSupportedContractsResponse.h; sourceTree = "<group>"; };
2298+
23C898182C892A3800071482 /* MSIDBrowserNativeMessageGetSupportedContractsResponse.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDBrowserNativeMessageGetSupportedContractsResponse.m; sourceTree = "<group>"; };
22892299
23CA0C49220A3B6900768729 /* MSIDPKeyAuthHandlerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSIDPKeyAuthHandlerTests.m; sourceTree = "<group>"; };
22902300
23CA0C5B220A540A00768729 /* NSData+MSIDTestUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+MSIDTestUtil.h"; sourceTree = "<group>"; };
22912301
23CA0C5C220A540A00768729 /* NSData+MSIDTestUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+MSIDTestUtil.m"; sourceTree = "<group>"; };
@@ -3689,6 +3699,8 @@
36893699
2352AF312AA7C7B700FA2253 /* MSIDBrowserNativeMessageGetTokenResponse.m */,
36903700
23C10A9C2B40D9340063D97C /* MSIDBrowserNativeMessageSignOutResponse.h */,
36913701
23C10A9D2B40D9340063D97C /* MSIDBrowserNativeMessageSignOutResponse.m */,
3702+
23C898172C892A3800071482 /* MSIDBrowserNativeMessageGetSupportedContractsResponse.h */,
3703+
23C898182C892A3800071482 /* MSIDBrowserNativeMessageGetSupportedContractsResponse.m */,
36923704
);
36933705
path = browser_native_message_response;
36943706
sourceTree = "<group>";
@@ -3921,6 +3933,8 @@
39213933
23642EE12A8AF3500078FF1A /* MSIDBrowserNativeMessageGetTokenRequest.m */,
39223934
23391BD42B17F2FD00EB121B /* MSIDBrowserNativeMessageSignOutRequest.h */,
39233935
23391BD52B17F2FD00EB121B /* MSIDBrowserNativeMessageSignOutRequest.m */,
3936+
23C898122C8928DD00071482 /* MSIDBrowserNativeMessageGetSupportedContractsRequest.h */,
3937+
23C898132C8928DD00071482 /* MSIDBrowserNativeMessageGetSupportedContractsRequest.m */,
39243938
);
39253939
path = browser_native_message_request;
39263940
sourceTree = "<group>";
@@ -5926,6 +5940,7 @@
59265940
23071655229F56AE00FDD044 /* MSIDAADV2Oauth2FactoryForV1Request.h in Headers */,
59275941
B286B9CF2389DF03007833AD /* MSIDLogger+Trace.h in Headers */,
59285942
B286B9AA2389DD43007833AD /* MSIDCertificateChooser.h in Headers */,
5943+
23C898162C8928DD00071482 /* MSIDBrowserNativeMessageGetSupportedContractsRequest.h in Headers */,
59295944
238E19E12086FE28004DF483 /* MSIDAuthorizationCodeGrantRequest.h in Headers */,
59305945
238EF038208FDBA20035ABE6 /* MSIDAADV1RefreshTokenGrantRequest.h in Headers */,
59315946
589BDB272718F18800BF3799 /* MSIDCredentialHeader.h in Headers */,
@@ -6002,6 +6017,7 @@
60026017
238EF042208FE88C0035ABE6 /* MSIDAADAuthorizationCodeGrantRequest.h in Headers */,
60036018
B28686C6240655EF004E83FC /* MSIDLoginKeychainUtil.h in Headers */,
60046019
05566D102204BB8A002DBA40 /* MSIDMacKeychainTokenCache.h in Headers */,
6020+
23C8981B2C892A3800071482 /* MSIDBrowserNativeMessageGetSupportedContractsResponse.h in Headers */,
60056021
B210F4311FDDE7EB005A8F76 /* MSIDTokenResponse.h in Headers */,
60066022
B286B99B2389DCA2007833AD /* MSIDSSOExtensionRequestDelegate+Internal.h in Headers */,
60076023
B2B1D57220425DFD00DD81F0 /* MSIDAccountCacheItem.h in Headers */,
@@ -7066,6 +7082,7 @@
70667082
1E37AAD5252196CC00EBED3B /* NSData+JWT.m in Sources */,
70677083
B286B9872389DC24007833AD /* MSIDBrokerOperationGetAccountsRequest.m in Sources */,
70687084
B297E1F220A25F0C00F370EC /* MSIDLegacyTokenCacheItem.m in Sources */,
7085+
23C8981A2C892A3800071482 /* MSIDBrowserNativeMessageGetSupportedContractsResponse.m in Sources */,
70697086
B286B9992389DC9D007833AD /* MSIDSSOExtensionSilentTokenRequest.m in Sources */,
70707087
B2C7089921991D0000D917B8 /* MSIDAADV2BrokerResponse.m in Sources */,
70717088
B20E3CB61FC4FE400029C097 /* MSIDOAuth2Constants.m in Sources */,
@@ -7212,6 +7229,7 @@
72127229
B8DBEF652395CA6100A16651 /* MSIDKeychainTokenCache.m in Sources */,
72137230
600D19BE20964D9E0004CD43 /* MSIDWorkPlaceJoinUtil.m in Sources */,
72147231
659929AC26296B0200830FD5 /* MSIDRequestTelemetryConstants.m in Sources */,
7232+
23C898152C8928DD00071482 /* MSIDBrowserNativeMessageGetSupportedContractsRequest.m in Sources */,
72157233
58B81F8424AD0F8B00E8799E /* MSIDWebResponseBaseOperation.m in Sources */,
72167234
B214C3A01FE854FE0070C4F2 /* MSIDLegacyTokenCacheAccessor.m in Sources */,
72177235
1E62D0E5228B75E3000E2BBC /* MSIDKeychainUtil.m in Sources */,
@@ -7760,6 +7778,7 @@
77607778
238E19C42086FC38004DF483 /* MSIDHttpResponseSerializer.m in Sources */,
77617779
1E707FDA2406FA7900716148 /* MSIDBrokerNativeAppOperationResponse.m in Sources */,
77627780
232173EC2182B195009852C6 /* MSIDIntuneUserDefaultsCacheDataSource.m in Sources */,
7781+
23C898142C8928DD00071482 /* MSIDBrowserNativeMessageGetSupportedContractsRequest.m in Sources */,
77637782
60DC9FFE2374DF6D00AEA52E /* MSIDDeviceInfo.m in Sources */,
77647783
2317FFC12A44FDD400E3DAA2 /* MSIDBrowserNativeMessageGetCookiesRequest.m in Sources */,
77657784
23B0189C23554B2B00207FEC /* MSIDBrokerOperationInteractiveTokenRequest.m in Sources */,
@@ -7807,6 +7826,7 @@
78077826
238A04902089A3C800989EE0 /* MSIDHttpRequestTelemetry.m in Sources */,
78087827
04D32CB21FD62141000B123E /* MSIDError.m in Sources */,
78097828
728209C926FE94D800B5F018 /* MSIDJwtAlgorithm.m in Sources */,
7829+
23C898192C892A3800071482 /* MSIDBrowserNativeMessageGetSupportedContractsResponse.m in Sources */,
78107830
2352AF332AA7C7B700FA2253 /* MSIDBrowserNativeMessageGetTokenResponse.m in Sources */,
78117831
B443F0022AD6328700782168 /* MSIDBrokerOperationPasskeyCredentialRequest.m in Sources */,
78127832
B20657B01FC91FD100412B7D /* MSIDTelemetryEventStrings.m in Sources */,
@@ -8083,10 +8103,11 @@
80838103
PRODUCT_NAME = "$(TARGET_NAME)";
80848104
SDKROOT = iphoneos;
80858105
SKIP_INSTALL = YES;
8106+
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos xrsimulator xros";
80868107
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
80878108
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
80888109
SWIFT_VERSION = 5.0;
8089-
TARGETED_DEVICE_FAMILY = "1,2";
8110+
TARGETED_DEVICE_FAMILY = "1,2,7";
80908111
};
80918112
name = Debug;
80928113
};
@@ -8143,9 +8164,10 @@
81438164
PRODUCT_NAME = "$(TARGET_NAME)";
81448165
SDKROOT = iphoneos;
81458166
SKIP_INSTALL = YES;
8167+
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos xrsimulator xros";
81468168
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
81478169
SWIFT_VERSION = 5.0;
8148-
TARGETED_DEVICE_FAMILY = "1,2";
8170+
TARGETED_DEVICE_FAMILY = "1,2,7";
81498171
VALIDATE_PRODUCT = YES;
81508172
};
81518173
name = Release;
@@ -8203,6 +8225,8 @@
82038225
PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.MSIDTestsHostApp;
82048226
PRODUCT_NAME = "$(TARGET_NAME)";
82058227
SDKROOT = iphoneos;
8228+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator";
8229+
TARGETED_DEVICE_FAMILY = "1,2,7";
82068230
};
82078231
name = Debug;
82088232
};
@@ -8252,6 +8276,8 @@
82528276
PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.MSIDTestsHostApp;
82538277
PRODUCT_NAME = "$(TARGET_NAME)";
82548278
SDKROOT = iphoneos;
8279+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator";
8280+
TARGETED_DEVICE_FAMILY = "1,2,7";
82558281
VALIDATE_PRODUCT = YES;
82568282
};
82578283
name = Release;
@@ -8776,9 +8802,11 @@
87768802
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
87778803
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
87788804
PROVISIONING_PROFILE_SPECIFIER = "";
8805+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator";
87798806
SWIFT_OBJC_BRIDGING_HEADER = "tests/IdentityCoreTests iOS-Bridging-Header.h";
87808807
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
87818808
SWIFT_VERSION = 5.0;
8809+
TARGETED_DEVICE_FAMILY = "1,2,7";
87828810
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MSIDTestsHostApp.app/MSIDTestsHostApp";
87838811
};
87848812
name = Debug;
@@ -8796,8 +8824,10 @@
87968824
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
87978825
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
87988826
PROVISIONING_PROFILE_SPECIFIER = "";
8827+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator";
87998828
SWIFT_OBJC_BRIDGING_HEADER = "tests/IdentityCoreTests iOS-Bridging-Header.h";
88008829
SWIFT_VERSION = 5.0;
8830+
TARGETED_DEVICE_FAMILY = "1,2,7";
88018831
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MSIDTestsHostApp.app/MSIDTestsHostApp";
88028832
};
88038833
name = Release;
@@ -8866,6 +8896,8 @@
88668896
ENABLE_BITCODE = NO;
88678897
GCC_OPTIMIZATION_LEVEL = 0;
88688898
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
8899+
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos xros xrsimulator";
8900+
TARGETED_DEVICE_FAMILY = "1,2,7";
88698901
};
88708902
name = Debug;
88718903
};
@@ -8875,6 +8907,8 @@
88758907
buildSettings = {
88768908
ENABLE_BITCODE = NO;
88778909
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
8910+
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos xros xrsimulator";
8911+
TARGETED_DEVICE_FAMILY = "1,2,7";
88788912
};
88798913
name = Release;
88808914
};
@@ -8941,6 +8975,8 @@
89418975
"$(MSID_SYSTEMWV)",
89428976
);
89438977
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
8978+
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos xrsimulator xros";
8979+
TARGETED_DEVICE_FAMILY = "1,2,7";
89448980
};
89458981
name = Debug;
89468982
};
@@ -8954,6 +8990,8 @@
89548990
"$(MSID_WEBKIT)",
89558991
);
89568992
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
8993+
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos xrsimulator xros";
8994+
TARGETED_DEVICE_FAMILY = "1,2,7";
89578995
};
89588996
name = Release;
89598997
};

IdentityCore/src/MSIDError.h

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ extern NSString * _Nonnull MSIDUserDisplayableIdkey;
3434
extern NSString * _Nonnull MSIDHomeAccountIdkey;
3535
extern NSString * _Nonnull MSIDTokenProtectionRequired;
3636
extern NSString * _Nonnull MSIDBrokerVersionKey;
37+
extern NSString * _Nonnull MSIDSTSErrorCodesKey;
3738
extern NSString * _Nonnull MSIDThrottlingCacheHitKey;
3839

3940
/*!

IdentityCore/src/MSIDError.m

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
NSString *MSIDHomeAccountIdkey = @"MSIDHomeAccountIdkey";
3737
NSString *MSIDTokenProtectionRequired = @"MSIDTokenProtectionRequired";
3838
NSString *MSIDBrokerVersionKey = @"MSIDBrokerVersionKey";
39+
NSString *MSIDSTSErrorCodesKey = @"MSIDSTSErrorCodesKey";
3940
NSString *MSIDServerUnavailableStatusKey = @"MSIDServerUnavailableStatusKey";
4041
NSString *MSIDThrottlingCacheHitKey = @"MSIDThrottlingCacheHitKey";
4142

IdentityCore/src/MSIDOAuth2Constants.h

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ extern NSString *const MSID_OAUTH2_CODE;
3737
extern NSString *const MSID_OAUTH2_ERROR;
3838
extern NSString *const MSID_OAUTH2_ERROR_DESCRIPTION;
3939
extern NSString *const MSID_OAUTH2_ERROR_SUBCODE;
40+
extern NSString *const MSID_OAUTH2_ERROR_CODES;
4041
extern NSString *const MSID_OAUTH2_EXPIRES_IN;
4142
extern NSString *const MSID_OAUTH2_REFRESH_IN;
4243
extern NSString *const MSID_OAUTH2_REFRESH_ON;

IdentityCore/src/MSIDOAuth2Constants.m

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
NSString *const MSID_OAUTH2_ERROR = @"error";
4040
NSString *const MSID_OAUTH2_ERROR_DESCRIPTION = @"error_description";
4141
NSString *const MSID_OAUTH2_ERROR_SUBCODE = @"error_subcode";
42+
NSString *const MSID_OAUTH2_ERROR_CODES = @"error_codes";
4243
NSString *const MSID_OAUTH2_EXPIRES_IN = @"expires_in";
4344
NSString *const MSID_OAUTH2_GRANT_TYPE = @"grant_type";
4445
NSString *const MSID_OAUTH2_REDIRECT_URI = @"redirect_uri";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
//
2+
// Copyright (c) Microsoft Corporation.
3+
// All rights reserved.
4+
//
5+
// This code is licensed under the MIT License.
6+
//
7+
// Permission is hereby granted, free of charge, to any person obtaining a copy
8+
// of this software and associated documentation files(the "Software"), to deal
9+
// in the Software without restriction, including without limitation the rights
10+
// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
11+
// copies of the Software, and to permit persons to whom the Software is
12+
// furnished to do so, subject to the following conditions :
13+
//
14+
// The above copyright notice and this permission notice shall be included in
15+
// all copies or substantial portions of the Software.
16+
//
17+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23+
// THE SOFTWARE.
24+
25+
26+
#import "MSIDBaseBrokerOperationRequest.h"
27+
#import "MSIDJsonSerializable.h"
28+
29+
NS_ASSUME_NONNULL_BEGIN
30+
31+
@interface MSIDBrowserNativeMessageGetSupportedContractsRequest : MSIDBaseBrokerOperationRequest <MSIDJsonSerializable>
32+
33+
@end
34+
35+
NS_ASSUME_NONNULL_END
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
//
2+
// Copyright (c) Microsoft Corporation.
3+
// All rights reserved.
4+
//
5+
// This code is licensed under the MIT License.
6+
//
7+
// Permission is hereby granted, free of charge, to any person obtaining a copy
8+
// of this software and associated documentation files(the "Software"), to deal
9+
// in the Software without restriction, including without limitation the rights
10+
// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
11+
// copies of the Software, and to permit persons to whom the Software is
12+
// furnished to do so, subject to the following conditions :
13+
//
14+
// The above copyright notice and this permission notice shall be included in
15+
// all copies or substantial portions of the Software.
16+
//
17+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23+
// THE SOFTWARE.
24+
25+
26+
#import "MSIDBrowserNativeMessageGetSupportedContractsRequest.h"
27+
#import "MSIDJsonSerializableFactory.h"
28+
29+
@implementation MSIDBrowserNativeMessageGetSupportedContractsRequest
30+
31+
+ (void)load
32+
{
33+
[MSIDJsonSerializableFactory registerClass:self forClassType:self.operation];
34+
}
35+
36+
+ (NSString *)operation
37+
{
38+
return @"GetSupportedContracts";
39+
}
40+
41+
#pragma mark - MSIDJsonSerializable
42+
43+
- (instancetype)initWithJSONDictionary:(NSDictionary *)json error:(NSError *__autoreleasing *)error
44+
{
45+
return [super init];
46+
}
47+
48+
- (NSDictionary *)jsonDictionary
49+
{
50+
return @{};
51+
}
52+
53+
@end

IdentityCore/src/broker_operation/request/browser_native_message_request/MSIDBrowserNativeMessageGetTokenRequest.h

+3
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ NS_ASSUME_NONNULL_BEGIN
7272
/// Contains info about componenets involved into the flow. Used for telemetry.
7373
@property (nonatomic) NSString *platformSequence;
7474

75+
/// When this flag is 'false', ui is not allowed. If we cannot acquire tokens silently, UI_NOT_ALLOWED status should be returned to the browser. This param is optional and by defrault it is 'true'.
76+
@property (nonatomic) BOOL canShowUI;
77+
7578
@end
7679

7780
NS_ASSUME_NONNULL_END

IdentityCore/src/broker_operation/request/browser_native_message_request/MSIDBrowserNativeMessageGetTokenRequest.m

+5
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
NSString *const MSID_BROWSER_NATIVE_MESSAGE_EXTRA_PARAMETERS_KEY = @"extraParameters";
4545
NSString *const MSID_BROWSER_NATIVE_MESSAGE_REQUEST_KEY = @"request";
4646
NSString *const MSID_BROWSER_NATIVE_MESSAGE_PLATFORM_SEQUENCE_KEY = @"x-client-xtra-sku";
47+
NSString *const MSID_BROWSER_NATIVE_MESSAGE_CAN_SHOW_UI_KEY = @"canShowUI";
4748

4849
@implementation MSIDBrowserNativeMessageGetTokenRequest
4950

@@ -121,6 +122,10 @@ - (instancetype)initWithJSONDictionary:(NSDictionary *)json error:(NSError *__au
121122
_correlationId = uuidString ? [[NSUUID alloc] initWithUUIDString:uuidString] : [NSUUID UUID];
122123
_platformSequence = [requestJson msidStringObjectForKey:MSID_BROWSER_NATIVE_MESSAGE_PLATFORM_SEQUENCE_KEY];
123124

125+
id canShowUIValue = requestJson[MSID_BROWSER_NATIVE_MESSAGE_CAN_SHOW_UI_KEY];
126+
// It is optional param, if nil -- set it to 'true' by default.
127+
_canShowUI = canShowUIValue ? [requestJson msidBoolObjectForKey:MSID_BROWSER_NATIVE_MESSAGE_CAN_SHOW_UI_KEY] : YES;
128+
124129
return self;
125130
}
126131

0 commit comments

Comments
 (0)