Skip to content
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

Add SsoExt identifier into MSIDDeviceInfo #1488

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

kaisong1990
Copy link
Contributor

Proposed changes

This is to add a new filed to return SsoExtension type

Type of change

  • Feature work
  • Bug fix
  • Documentation
  • Engineering change
  • Test
  • Logging/Telemetry

Risk

  • High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
  • Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
  • Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

Additional information

@kaisong1990 kaisong1990 requested a review from a team as a code owner February 27, 2025 17:15
@@ -69,6 +69,7 @@ extern NSString * _Nonnull const MSID_BROKER_DEVICE_MODE_KEY;
extern NSString * _Nonnull const MSID_BROKER_SSO_EXTENSION_MODE_KEY;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request does not update changelog.txt.

Please consider if this change would be noticeable to a partner or user and either update changelog.txt or resolve this conversation.

@@ -55,6 +55,12 @@ typedef NS_ENUM(NSInteger, MSIDPreferredAuthMethod)
MSIDPreferredAuthMethodQRPIN
};

typedef NS_ENUM(NSInteger, MSIDSsoProviderType)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be beneficial to make this enum available in a separate header file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are other enums in this file as of today, we can move out when more enums coming for better management


- (MSIDSsoProviderType)ssoProviderTypeEnumFromString:(NSString *)deviceModeString
{
if ([deviceModeString isEqualToString:@"companyPortal"]) return MSIDCompanyPortalSsoProvider;
Copy link
Contributor

@ameyapat ameyapat Feb 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create a static dictionary <string, MSIDSsoProviderType> instead of if statements and return value for key. Return unknown by default in no matching key

Copy link
Contributor Author

@kaisong1990 kaisong1990 Feb 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ameyapat, cannot put MSIDSsoProviderType into dictionary as NSInteger is not supported neither as a key or value. I can convert MSIDSsoProviderType value to an NSNumber and save it into a dict, let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants