Skip to content

Commit 8bfd623

Browse files
authored
Merge pull request #1134 from AzureAD/release/1.7.10
Release/1.7.10
2 parents aba3119 + 5ceb2a7 commit 8bfd623

File tree

51 files changed

+1402
-1322
lines changed

Some content is hidden

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

51 files changed

+1402
-1322
lines changed

IdentityCore/IdentityCore.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8333,6 +8333,7 @@
83338333
"$(MSID_WEBKIT)",
83348334
"$(MSID_SYSTEMWV)",
83358335
);
8336+
GCC_WARN_SHADOW = YES;
83368337
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
83378338
MACOSX_DEPLOYMENT_TARGET = 10.12;
83388339
};
@@ -8347,6 +8348,7 @@
83478348
"$(MSID_SYSTEMWV)",
83488349
"$(MSID_WEBKIT)",
83498350
);
8351+
GCC_WARN_SHADOW = YES;
83508352
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
83518353
MACOSX_DEPLOYMENT_TARGET = 10.12;
83528354
};

IdentityCore/src/MSIDConstants.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,9 @@ extern NSString * _Nonnull const MSID_THROTTLING_METADATA_KEYCHAIN;
145145
extern NSString * _Nonnull const MSID_THROTTLING_METADATA_KEYCHAIN_VERSION;
146146

147147
extern NSString * _Nonnull const MSID_SHARED_MODE_CURRENT_ACCOUNT_CHANGED_NOTIFICATION_KEY;
148+
149+
extern NSString * _Nonnull const MSID_CLIENT_SKU_MSAL_IOS;
150+
extern NSString * _Nonnull const MSID_CLIENT_SKU_MSAL_OSX;
151+
extern NSString * _Nonnull const MSID_CLIENT_SKU_CPP_IOS;
152+
extern NSString * _Nonnull const MSID_CLIENT_SKU_CPP_OSX;
153+
extern NSString * _Nonnull const MSID_CLIENT_SKU_ADAL_IOS;

IdentityCore/src/MSIDConstants.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,9 @@
6060
NSString *const MSID_THROTTLING_METADATA_KEYCHAIN_VERSION = @"Ver1";
6161

6262
NSString *const MSID_SHARED_MODE_CURRENT_ACCOUNT_CHANGED_NOTIFICATION_KEY = @"SHARED_MODE_CURRENT_ACCOUNT_CHANGED";
63+
64+
NSString *const MSID_CLIENT_SKU_MSAL_IOS = @"MSAL.iOS";
65+
NSString *const MSID_CLIENT_SKU_MSAL_OSX = @"MSAL.OSX";
66+
NSString *const MSID_CLIENT_SKU_CPP_IOS = @"MSAL.xplat.iOS";
67+
NSString *const MSID_CLIENT_SKU_CPP_OSX = @"MSAL.xplat.macOS";
68+
NSString *const MSID_CLIENT_SKU_ADAL_IOS = @"iOS";

IdentityCore/src/MSIDError.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,30 @@ typedef NS_ENUM(NSInteger, MSIDErrorCode)
248248
// SSO Extension internal error
249249
MSIDErrorSSOExtensionUnexpectedError = -51815,
250250

251+
// JIT - Link - Timeout while waiting for server confirmation
252+
MSIDErrorJITLinkServerConfirmationTimeout = -51816,
253+
254+
// JIT - Link - Error while waiting for server confirmation
255+
MSIDErrorJITLinkServerConfirmationError = -51817,
256+
257+
// JIT - Link - Error while acquiring intune token
258+
MSIDErrorJITLinkAcquireTokenError = -51818,
259+
260+
// JIT - Link - Token acquired for wrong tenant
261+
MSIDErrorJITLinkTokenAcquiredWrongTenant = -51819,
262+
263+
// JIT - Link - Error during linking
264+
MSIDErrorJITLinkError = -51820,
265+
266+
// JIT - Compliance Check - Device not compliant
267+
MSIDErrorJITComplianceCheckResultNotCompliant = -51821,
268+
269+
// JIT - Compliance Check - CP timeout
270+
MSIDErrorJITComplianceCheckResultTimeout = -51822,
271+
272+
// JIT - Compliance Check - Device unknown
273+
MSIDErrorJITComplianceCheckResultUnknown = -51823,
274+
251275
// Throttling errors
252276
MSIDErrorThrottleCacheNoRecord = -51900,
253277
MSIDErrorThrottleCacheInvalidSignature = -51901,

IdentityCore/src/MSIDError.m

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,14 @@ MSIDErrorCode MSIDErrorCodeForOAuthError(NSString *oauthError, MSIDErrorCode def
146146
@(MSIDErrorBrokerUnknown),
147147
@(MSIDErrorBrokerApplicationTokenWriteFailed),
148148
@(MSIDErrorBrokerApplicationTokenReadFailed),
149+
@(MSIDErrorJITLinkServerConfirmationTimeout),
150+
@(MSIDErrorJITLinkServerConfirmationError),
151+
@(MSIDErrorJITLinkAcquireTokenError),
152+
@(MSIDErrorJITLinkTokenAcquiredWrongTenant),
153+
@(MSIDErrorJITLinkError),
154+
@(MSIDErrorJITComplianceCheckResultNotCompliant),
155+
@(MSIDErrorJITComplianceCheckResultTimeout),
156+
@(MSIDErrorJITComplianceCheckResultUnknown),
149157

150158
],
151159
MSIDOAuthErrorDomain : @[// Server Errors

IdentityCore/src/MSIDExternalAADCacheSeeder.m

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,34 +146,34 @@ - (void)seedTokenResponse:(MSIDTokenResponse *)originalTokenResponse
146146

147147
[self.telemetry startEvent:requestParameters.telemetryRequestId eventName:MSID_TELEMETRY_EVENT_HTTP_V1_IDTOKEN_REQUEST];
148148

149-
[tokenRequest sendWithBlock:^(MSIDTokenResponse *tokenResponse, NSError *error)
149+
[tokenRequest sendWithBlock:^(MSIDTokenResponse *tokenResponse, NSError *requestError)
150150
{
151151
__auto_type event = [[MSIDGetV1IdTokenHttpEvent alloc] initWithName:MSID_TELEMETRY_EVENT_HTTP_V1_IDTOKEN_REQUEST
152152
context:requestParameters];
153153
[self.telemetry stopEvent:requestParameters.telemetryRequestId event:event];
154154

155-
if (error)
155+
if (requestError)
156156
{
157-
MSID_LOG_WITH_CTX_PII(MSIDLogLevelError, requestParameters, @"Failed to acquire V1 Id Token token via Refresh token, error: %@", MSID_PII_LOG_MASKABLE(error));
157+
MSID_LOG_WITH_CTX_PII(MSIDLogLevelError, requestParameters, @"Failed to acquire V1 Id Token token via Refresh token, error: %@", MSID_PII_LOG_MASKABLE(requestError));
158158

159159
completionBlockWrapper(false);
160160
return;
161161
}
162162

163-
MSIDIdToken *legacyIdToken = [factory idTokenFromResponse:tokenResponse
163+
MSIDIdToken *v1IdToken = [factory idTokenFromResponse:tokenResponse
164164
configuration:requestParameters.msidConfiguration];
165165

166-
if (!legacyIdToken)
166+
if (!v1IdToken)
167167
{
168-
MSID_LOG_WITH_CTX_PII(MSIDLogLevelError, requestParameters, @"Failed to parse V1 Id Token, error: %@", MSID_PII_LOG_MASKABLE(error));
168+
MSID_LOG_WITH_CTX_PII(MSIDLogLevelError, requestParameters, @"Failed to parse V1 Id Token, error: %@", MSID_PII_LOG_MASKABLE(requestError));
169169

170170
completionBlockWrapper(false);
171171
}
172172

173173
MSID_LOG_WITH_CTX(MSIDLogLevelInfo, requestParameters, @"Saving V1 id token in default cache.");
174174

175175
NSError *localError;
176-
BOOL result = [self.defaultAccessor saveToken:legacyIdToken context:requestParameters error:&localError];
176+
BOOL result = [self.defaultAccessor saveToken:v1IdToken context:requestParameters error:&localError];
177177
if (result)
178178
{
179179
MSID_LOG_WITH_CTX(MSIDLogLevelInfo, requestParameters, @"Saved V1 id token in default cache.");
@@ -183,7 +183,7 @@ - (void)seedTokenResponse:(MSIDTokenResponse *)originalTokenResponse
183183
MSID_LOG_WITH_CTX_PII(MSIDLogLevelError, requestParameters, @"Failed to save V1 id token in default cache, error: %@", MSID_PII_LOG_MASKABLE(error));
184184
}
185185

186-
[self seedExternalCacheWithIdToken:legacyIdToken
186+
[self seedExternalCacheWithIdToken:v1IdToken
187187
tokenResponse:originalTokenResponse
188188
factory:factory
189189
configuration:requestParameters.msidConfiguration

IdentityCore/src/MSIDOAuth2Constants.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ extern NSString *const MSID_EXPIRES_ON_CACHE_KEY;
112112
extern NSString *const MSID_REFRESH_ON_CACHE_KEY;
113113
extern NSString *const MSID_OAUTH_TOKEN_TYPE_CACHE_KEY;
114114
extern NSString *const MSID_CACHED_AT_CACHE_KEY;
115+
extern NSString *const MSID_LAST_RECOVERY_ATTEMPT_CACHE_KEY;
115116
extern NSString *const MSID_EXTENDED_EXPIRES_ON_CACHE_KEY;
116117
extern NSString *const MSID_EXPIRES_IN_CACHE_KEY;
117118
extern NSString *const MSID_SPE_INFO_CACHE_KEY;

IdentityCore/src/MSIDOAuth2Constants.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
NSString *const MSID_REFRESH_ON_CACHE_KEY = @"refresh_on";
115115
NSString *const MSID_OAUTH_TOKEN_TYPE_CACHE_KEY = @"access_token_type";
116116
NSString *const MSID_CACHED_AT_CACHE_KEY = @"cached_at";
117+
NSString *const MSID_LAST_RECOVERY_ATTEMPT_CACHE_KEY = @"recovery_attempted_at";
117118
NSString *const MSID_EXTENDED_EXPIRES_ON_CACHE_KEY = @"extended_expires_on";
118119
NSString *const MSID_EXPIRES_IN_CACHE_KEY = @"expires_in";
119120
NSString *const MSID_SPE_INFO_CACHE_KEY = @"spe_info";

0 commit comments

Comments
 (0)