@@ -51,9 +51,9 @@ @implementation MSIDCredentialCacheItem
5151
5252- (NSString *)description
5353{
54- return [NSString stringWithFormat: @" MSIDCredentialCacheItem: clientId: %@ , credentialType: %@ , target: %@ , realm: %@ , environment: %@ , expiresOn: %@ , extendedExpiresOn: %@ , refreshOn: %@ , cachedAt: %@ , last recovery attempted at: %@ , familyId: %@ , homeAccountId: %@ , enrollmentId: %@ , speInfo: %@ , secret: %@ " ,
54+ return [NSString stringWithFormat: @" MSIDCredentialCacheItem: clientId: %@ , credentialType: %@ , target: %@ , realm: %@ , environment: %@ , expiresOn: %@ , extendedExpiresOn: %@ , refreshOn: %@ , cachedAt: %@ , last recovery attempted at: %@ , familyId: %@ , homeAccountId: %@ , enrollmentId: %@ , speInfo: %@ , secret: %@ , redirectUri: %@ " ,
5555 self .clientId, [MSIDCredentialTypeHelpers credentialTypeAsString: self .credentialType], self .target, self .realm, self .environment, self .expiresOn,
56- self .extendedExpiresOn, self .refreshOn, self .cachedAt, self .lastRecoveryAttempt, self .familyId, self .homeAccountId, self .enrollmentId, self .speInfo, [self .secret msidSecretLoggingHash ]];
56+ self .extendedExpiresOn, self .refreshOn, self .cachedAt, self .lastRecoveryAttempt, self .familyId, self .homeAccountId, self .enrollmentId, self .speInfo, [self .secret msidSecretLoggingHash ], MSID_PII_LOG_TRACKABLE ( self .redirectUri) ];
5757}
5858
5959#pragma mark - MSIDCacheItem
@@ -93,6 +93,7 @@ - (BOOL)isEqualToItem:(MSIDCredentialCacheItem *)item
9393 result &= (!self.tokenType && !item.tokenType ) || [self .tokenType isEqual: item.tokenType];
9494 result &= (!self.kid && !item.kid ) || [self .kid isEqual: item.kid];
9595 result &= (!self.requestedClaims && !item.requestedClaims ) || [self .requestedClaims isEqual: item.requestedClaims];
96+ result &= (!self.redirectUri && !item.redirectUri ) || [self .redirectUri isEqual: item.redirectUri];
9697 // Ignore the lastMod properties (two otherwise-identical items with different
9798 // last modification informational values should be considered equal)
9899 return result;
@@ -121,6 +122,7 @@ - (NSUInteger)hash
121122 hash = hash * 31 + self.tokenType .hash ;
122123 hash = hash * 31 + self.kid .hash ;
123124 hash = hash * 31 + self.requestedClaims .hash ;
125+ hash = hash * 31 + self.redirectUri .hash ;
124126 return hash;
125127}
126128
@@ -151,6 +153,7 @@ - (id)copyWithZone:(NSZone *)zone
151153 item.tokenType = [self .tokenType copyWithZone: zone];
152154 item.kid = [self .kid copyWithZone: zone];
153155 item.requestedClaims = [self .requestedClaims copyWithZone: zone];
156+ item.redirectUri = [self .redirectUri copyWithZone: zone];
154157 return item;
155158}
156159
@@ -205,6 +208,7 @@ - (instancetype)initWithJSONDictionary:(NSDictionary *)json error:(__unused NSEr
205208 _tokenType = [json msidStringObjectForKey: MSID_OAUTH2_TOKEN_TYPE];
206209 _expiryInterval = [json msidStringObjectForKey: MSID_EXPIRES_IN_CACHE_KEY];
207210 _requestedClaims = [json msidStringObjectForKey: MSID_REQUESTED_CLAIMS_CACHE_KEY];
211+ _redirectUri = [json msidStringObjectForKey: MSID_OAUTH2_REDIRECT_URI];
208212 return self;
209213}
210214
@@ -242,6 +246,7 @@ - (NSDictionary *)jsonDictionary
242246 dictionary[MSID_KID_CACHE_KEY] = _kid;
243247 dictionary[MSID_OAUTH2_TOKEN_TYPE] = _tokenType;
244248 dictionary[MSID_REQUESTED_CLAIMS_CACHE_KEY] = _requestedClaims;
249+ dictionary[MSID_OAUTH2_REDIRECT_URI] = _redirectUri;
245250 return dictionary;
246251}
247252
0 commit comments