-
Notifications
You must be signed in to change notification settings - Fork 36
Read BART from ests response when refresh_token_type & set deviceID #1604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read BART from ests response when refresh_token_type & set deviceID #1604
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for reading Bound App Refresh Tokens (BART) from ESTS responses. When the server response contains refresh_token_type = bound_app_rt, the code now initializes a MSIDBoundRefreshToken object instead of a standard refresh token and associates it with the device ID.
Key Changes
- Introduced new constants for BART detection (
MSID_REFRESH_TOKEN_TYPE,MSID_REFRESH_TOKEN_TYPE_BOUND_APP_RT,MSID_BART_DEVICE_ID_KEY) - Added
boundAppRefreshTokenDeviceIdproperty toMSIDTokenResponseto capture device ID from server responses - Modified token creation logic in both
MSIDOauth2FactoryandMSIDTokenResponseValidatorto createMSIDBoundRefreshTokeninstances when BART is detected
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| MSIDTokenResponseValidator.m | Adds logic to convert standard refresh tokens to bound refresh tokens when BART is detected in token validation |
| MSIDOauth2Factory.m | Implements BART detection and conversion during refresh token creation from server response |
| MSIDTokenResponse.h/.m | Adds property to store bound app refresh token device ID from server response |
| MSIDOAuth2Constants.h/.m | Defines constants for refresh token type detection |
| MSIDBrokerConstants.h/.m | Adds constant for BART device ID key used in broker communication |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ts-response * release/1.17.1: (33 commits) Update changelog.txt Resolve error Reset flag in teardown Address comments Remove flight and test Update changelog Check boolValue but not presence of value. Add more unit tests Mocking flight and cache value Add Feature flag and cache to control enablement trigger pipeline Clean up changes fix a typo fix deprecation compiling issue Update test and number in time based claims Fix UT Add long casting Updating error to interaction required remove extra ; Address comment Support domain_hint param. ... # Conflicts: # IdentityCore/src/MSIDOAuth2Constants.m
kaisong1990
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor questions
Proposed changes
When ESTS response contains refresh_token_type = bound_app_rt, it indicates Bound app refresh token (BART). This PR aims to read that and initialize BoundRefreshToken and set it as so in broker response.
Type of change
Risk
Additional information