Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion IdentityCore/src/MSIDOAuth2Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,5 +180,5 @@ extern NSString *const MSID_CCS_REQUEST_ID_RESPONSE;
extern NSString *const MSID_CCS_REQUEST_SEQUENCE_KEY;
extern NSString *const MSID_CCS_REQUEST_SEQUENCE_RESPONSE;
extern NSString *const MSID_BOUND_DEVICE_ID_CACHE_KEY;
extern NSString *const MSID_BOUND_RT_EXCHANGE;
extern NSString *const MSID_MSAL_CLIENT_APV_PREFIX;
extern NSString *const MSID_BOUND_REFRESH_TOKEN_EXCHANGE;
2 changes: 1 addition & 1 deletion IdentityCore/src/MSIDOAuth2Constants.m
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,6 @@
NSString *const MSID_CCS_REQUEST_SEQUENCE_KEY = @"x-ms-srs";
NSString *const MSID_CCS_REQUEST_SEQUENCE_RESPONSE = @"ccs-request-sequence";

NSString *const MSID_BOUND_REFRESH_TOKEN_EXCHANGE = @"bound_rt_exchange";
NSString *const MSID_BOUND_DEVICE_ID_CACHE_KEY = @"bound_device_id";
NSString *const MSID_BOUND_RT_EXCHANGE = @"bound_rt_exchange";
NSString *const MSID_MSAL_CLIENT_APV_PREFIX = @"MsalClient";
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ - (nonnull NSMutableDictionary *)jsonDictionary
{
NSMutableDictionary *jsonDict = [NSMutableDictionary new];
jsonDict[MSID_OAUTH2_GRANT_TYPE] = MSID_OAUTH2_REFRESH_TOKEN;
jsonDict[MSID_BOUND_REFRESH_TOKEN_EXCHANGE] = @1;
jsonDict[MSID_BOUND_RT_EXCHANGE] = @1;
jsonDict[@"aud"] = self.audience;
jsonDict[@"iss"] = self.clientId; // Issuer is the client ID
NSTimeInterval now = [[NSDate date] timeIntervalSince1970];
Expand Down
3 changes: 3 additions & 0 deletions IdentityCore/src/parameters/MSIDRequestParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@

- (NSURL *)tokenEndpoint;

// property that indicates if calling app requested broker for a Bound App Refresh token
@property (nonatomic) BOOL isBoundAppRefreshTokenRequested;

#pragma mark Methods
- (void)setCloudAuthorityWithCloudHostName:(NSString *)cloudHostName;
- (NSString *)allTokenRequestScopes;
Expand Down
6 changes: 3 additions & 3 deletions IdentityCore/tests/MSIDBoundRefreshTokenRedemptionTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ - (void)testJsonDictionary_verifyAllRequiredFields_shouldBePresent
// Verify all expected keys are present
NSArray *expectedKeys = @[
MSID_OAUTH2_GRANT_TYPE,
MSID_BOUND_REFRESH_TOKEN_EXCHANGE,
MSID_BOUND_RT_EXCHANGE,
@"iss",
@"iat",
@"exp",
Expand Down Expand Up @@ -950,7 +950,7 @@ - (void)testJsonDictionary_boundRefreshTokenExchangeValue_shouldBeNumberOne
NSMutableDictionary *jsonDict = [params jsonDictionary];

// Verify the bound_refresh_token_exchange is exactly @1 (NSNumber with value 1)
id boundExchangeValue = jsonDict[MSID_BOUND_REFRESH_TOKEN_EXCHANGE];
id boundExchangeValue = jsonDict[MSID_BOUND_RT_EXCHANGE];
XCTAssertTrue([boundExchangeValue isKindOfClass:[NSNumber class]]);
XCTAssertEqualObjects(boundExchangeValue, @1);
XCTAssertEqual([boundExchangeValue intValue], 1);
Expand Down Expand Up @@ -1098,7 +1098,7 @@ - (void)validateJwtValidity:(NSString *)jwt params:(MSIDBoundRefreshTokenRedempt
XCTAssertFalse([payloadObject[@"scope"] containsString:@"aza"]);
XCTAssertEqualObjects(payloadObject[@"refresh_token"], refreshToken);
XCTAssertEqualObjects(payloadObject[@"grant_type"], @"refresh_token");
XCTAssertEqualObjects(payloadObject[MSID_BOUND_REFRESH_TOKEN_EXCHANGE], @1);
XCTAssertEqualObjects(payloadObject[MSID_BOUND_RT_EXCHANGE], @1);
XCTAssertNotNil(payloadObject[@"iat"]);
XCTAssertNotNil(payloadObject[@"nbf"]);
XCTAssertNotNil(payloadObject[@"exp"]);
Expand Down
Loading