Add flatUsername attribute to UserAttributes builder Fixes AB#3607103#2513
Open
spetrescu84 wants to merge 4 commits into
Open
Add flatUsername attribute to UserAttributes builder Fixes AB#3607103#2513spetrescu84 wants to merge 4 commits into
spetrescu84 wants to merge 4 commits into
Conversation
Add a new 'flatusername' attribute to the UserAttributes builder class, following the existing pattern for built-in attributes. Updated SignUpEmailPasswordAttributesTest to exercise the new attribute. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
❌ Work item link check failed. Description does not contain AB#{ID}. Click here to Learn more. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a flatUsername convenience method to the Native Auth UserAttributes.Builder, allowing callers to submit the built-in flatusername signup attribute through the public builder API.
Changes:
- Added a
FLAT_USERNAMEkey andflatUsername()builder method. - Updated an existing Native Auth signup attributes E2E test to include the new builder method.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
msal/src/main/java/com/microsoft/identity/nativeauth/UserAttributes.kt |
Adds the new built-in user attribute builder method. |
msal/src/test/java/com/microsoft/identity/client/e2e/tests/network/nativeauth/SignUpEmailPasswordAttributesTest.kt |
Adds flatUsername() usage to an existing signup attributes test. |
| runBlocking { | ||
| val user = tempEmailApi.generateRandomEmailAddressLocally() | ||
| val attributes = UserAttributes.Builder().country("Ireland").city("Dublin").build() | ||
| val attributes = UserAttributes.Builder().country("Ireland").city("Dublin").flatUsername("flatusername").build() |
Adds enabled unit tests verifying the flatUsername builder method produces the correct map key and works alongside other attributes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
antrix1989
approved these changes
May 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
flatusernamebuilt-in attribute to theUserAttributes.Builderclass, following the existing pattern for other attributes (city, country, surname, etc.).Changes
FLAT_USERNAMEconstant andflatUsername()builder method with KDoc.flatUsernameattribute alongside existing attributes.AB#3607103