Skip to content

Commit 6b2d9fe

Browse files
authored
Merge pull request #1607 from AzureAD/release/1.17.0
Release 1.17.0
2 parents 3f436b5 + 66be262 commit 6b2d9fe

27 files changed

+1870
-10
lines changed

IdentityCore/IdentityCore.xcodeproj/project.pbxproj

Lines changed: 36 additions & 0 deletions
Large diffs are not rendered by default.

IdentityCore/src/MSIDConstants.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ extern NSString * _Nonnull const MSID_FRT_STATUS_DISABLED;
211211
extern NSString * _Nonnull const MSID_BROWSER_RESPONSE_SWITCH_BROWSER;
212212
extern NSString * _Nonnull const MSID_BROWSER_RESPONSE_SWITCH_BROWSER_RESUME;
213213

214+
extern NSString * _Nonnull const MSID_BOUND_RT_REDEEM;
215+
214216
extern NSString * _Nonnull const MSID_FLIGHT_USE_V2_WEB_RESPONSE_FACTORY;
215217
extern NSString * _Nonnull const MSID_FLIGHT_SUPPORT_DUNA_CBA;
216218
extern NSString * _Nonnull const MSID_FLIGHT_DISABLE_JIT_TROUBLESHOOTING_LEGACY_AUTH;
@@ -231,5 +233,8 @@ extern NSString * _Nonnull const MSID_FLIGHT_IGNORE_COOKIES_IN_DUNA_RESUME;
231233
extern NSString * _Nonnull const MSID_FLIGHT_DISABLE_REMOVE_ACCOUNT_ARTIFACTS;
232234

233235
extern NSString * _Nonnull const MSID_FLIGHT_ENABLE_QUERYING_STK;
236+
extern NSString * _Nonnull const MSID_FLIGHT_IS_BART_SUPPORTED;
237+
238+
extern NSString * _Nonnull const MSID_DOMAIN_HINT_KEY;
234239

235240
#define METHODANDLINE [NSString stringWithFormat:@"%s [Line %d]", __PRETTY_FUNCTION__, __LINE__]

IdentityCore/src/MSIDConstants.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@
8383
NSString *const MSID_BROWSER_RESPONSE_SWITCH_BROWSER = @"switch_browser";
8484
NSString *const MSID_BROWSER_RESPONSE_SWITCH_BROWSER_RESUME = @"switch_browser_resume";
8585

86+
// Bound App Refresh token constants
87+
NSString *const MSID_BOUND_RT_REDEEM = @"bound_rt_redeem";
88+
8689
NSString *const MSID_FLIGHT_USE_V2_WEB_RESPONSE_FACTORY = @"use_v2_web_response_factory";
8790
NSString *const MSID_FLIGHT_SUPPORT_DUNA_CBA = @"support_duna_cba_v2";
8891
NSString *const MSID_FLIGHT_DISABLE_JIT_TROUBLESHOOTING_LEGACY_AUTH = @"disable_jit_remediation_legacy_auth";
@@ -95,6 +98,9 @@
9598
NSString *const MSID_FLIGHT_DISABLE_REMOVE_ACCOUNT_ARTIFACTS = @"disable_rm_metadata";
9699

97100
NSString *const MSID_FLIGHT_ENABLE_QUERYING_STK = @"enable_querying_stk";
101+
NSString *const MSID_FLIGHT_IS_BART_SUPPORTED = @"is_msal_bart_supported";
102+
103+
NSString *const MSID_DOMAIN_HINT_KEY = @"domain_hint";
98104

99105

100106
#define METHODANDLINE [NSString stringWithFormat:@"%s [Line %d]", __PRETTY_FUNCTION__, __LINE__]

IdentityCore/src/MSIDOAuth2Constants.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,3 +180,5 @@ extern NSString *const MSID_CCS_REQUEST_ID_RESPONSE;
180180
extern NSString *const MSID_CCS_REQUEST_SEQUENCE_KEY;
181181
extern NSString *const MSID_CCS_REQUEST_SEQUENCE_RESPONSE;
182182
extern NSString *const MSID_BOUND_DEVICE_ID_CACHE_KEY;
183+
extern NSString *const MSID_MSAL_CLIENT_APV_PREFIX;
184+
extern NSString *const MSID_BOUND_REFRESH_TOKEN_EXCHANGE;

IdentityCore/src/MSIDOAuth2Constants.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,4 +180,6 @@
180180
NSString *const MSID_CCS_REQUEST_SEQUENCE_KEY = @"x-ms-srs";
181181
NSString *const MSID_CCS_REQUEST_SEQUENCE_RESPONSE = @"ccs-request-sequence";
182182

183+
NSString *const MSID_BOUND_REFRESH_TOKEN_EXCHANGE = @"bound_rt_exchange";
183184
NSString *const MSID_BOUND_DEVICE_ID_CACHE_KEY = @"bound_device_id";
185+
NSString *const MSID_MSAL_CLIENT_APV_PREFIX = @"MsalClient";

IdentityCore/src/controllers/broker/ios/MSIDBrokerInteractiveController.m

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -432,12 +432,11 @@ - (BOOL)completeAcquireTokenWithResult:(MSIDTokenResult *)tokenResult error:(NSE
432432
else
433433
{
434434
[brokerEvent setResultStatus:MSID_TELEMETRY_VALUE_SUCCEEDED];
435-
436-
if (tokenResult.brokerAppVersion)
435+
id brokerAppVersion = [tokenResult.brokerMetaData objectForKey:MSID_TOKEN_RESULT_BROKER_APP_VERSION];
436+
if (brokerAppVersion && [brokerAppVersion isKindOfClass:NSString.class])
437437
{
438-
[brokerEvent setBrokerAppVersion:tokenResult.brokerAppVersion];
438+
[brokerEvent setBrokerAppVersion:brokerAppVersion];
439439
}
440-
441440
MSIDTelemetryAPIEvent *telemetryEvent = [self telemetryAPIEvent];
442441
[telemetryEvent setUserInformation:tokenResult.account];
443442
[self stopTelemetryEvent:telemetryEvent error:nil];
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+
#import "MSIDBoundRefreshToken.h"
26+
#import "MSIDBoundRefreshTokenRedemptionParameters.h"
27+
28+
NS_ASSUME_NONNULL_BEGIN
29+
@interface MSIDBoundRefreshToken (Redemption)
30+
/*!
31+
@brief For specified tenant ID, get a signed JWT request to redeem this bound refresh token. Tenant ID is used to query registration and match device ID from it to this bound refresh token.
32+
@param tenantId The tenant ID that will be used to query the device registration.
33+
@param jweCrypto Optional dictionary to receive JWE crypto information. It will be also part of the resulting JWT's payload.
34+
@param error Pointer to an NSError object that will be set if an error occurs.
35+
@return A JWT string for token redemption, or nil if an error occurs.
36+
*/
37+
- (NSString *) getTokenRedemptionJwtForTenantId: (nullable NSString *)tenantId
38+
tokenRedemptionParameters: (MSIDBoundRefreshTokenRedemptionParameters *)requestParameters
39+
context:(id<MSIDRequestContext> _Nullable)context
40+
jweCrypto: (NSDictionary *__nonnull *__nonnull)jweCrypto
41+
error: (NSError *__nonnull __autoreleasing *__nonnull)error;
42+
@end
43+
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)