File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
network/response_serializer/preprocessor Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 2626#import " MSIDJweResponse.h"
2727#import " MSIDJweResponse+EcdhAesGcm.h"
2828#import " MSIDJsonResponsePreprocessor.h"
29+ #import " MSIDBrokerConstants.h"
2930
3031@implementation MSIDJweResponseDecryptPreProcessor
3132
@@ -75,6 +76,12 @@ - (nullable NSDictionary *)decryptJweResponseData:(NSData *)data
7576 {
7677 NSMutableDictionary *mutableDecryptedResponse = [decryptedResponse mutableCopy ];
7778 [mutableDecryptedResponse addEntriesFromDictionary: self .additionalResponseClaims];
79+ // bart_device_id should be present in response only when refresh_token_type=bound_app_rt is present in token response from server.
80+ if (![decryptedResponse[MSID_REFRESH_TOKEN_TYPE] isEqualToString: MSID_REFRESH_TOKEN_TYPE_BOUND_APP_RT])
81+ {
82+ [mutableDecryptedResponse removeObjectForKey: MSID_BART_DEVICE_ID_KEY];
83+ }
84+
7885 decryptedResponse = [mutableDecryptedResponse copy ];
7986 }
8087 return decryptedResponse;
Original file line number Diff line number Diff line change @@ -418,9 +418,8 @@ - (BOOL)fillAppMetadata:(MSIDAppMetadataCacheItem *)metadata
418418
419419- (BOOL )doesResponseHaveBoundAppRefreshToken : (MSIDTokenResponse *)response
420420{
421- return ![NSString msidIsStringNilOrBlank: response.boundAppRefreshTokenDeviceId] &&
422- ([MSID_REFRESH_TOKEN_TYPE_BOUND_APP_RT isEqualToString: response.additionalServerInfo[MSID_REFRESH_TOKEN_TYPE]] ||
423- [response.additionalServerInfo[MSID_BART_DEVICE_ID_KEY] length ] > 0 );
421+ return ![NSString msidIsStringNilOrBlank: response.boundAppRefreshTokenDeviceId] ||
422+ [response.additionalServerInfo[MSID_BART_DEVICE_ID_KEY] length ] > 0 ;
424423}
425424
426425#pragma mark - Webview
Original file line number Diff line number Diff line change 1+ TBD
2+ * Add logic to save bound app RT only when token response has refresh_token_type=bound_app_rt
3+
14Version 1.18.0
25* Silent token request should use FRT first when single FRT is enabled #1624
36* Use autolayout for loading indicator #1628
You can’t perform that action at this time.
0 commit comments