Skip to content

Conversation

@SaurabhMSFT
Copy link
Contributor

@SaurabhMSFT SaurabhMSFT commented Jan 25, 2024

@SaurabhMSFT SaurabhMSFT changed the title Return invalid username error instead of unknown error Add InvalidError for NativeAuth Jan 25, 2024
@SaurabhMSFT SaurabhMSFT added the No-Changelog This Pull-Request has no associated changelog entry. label Jan 25, 2024
@SaurabhMSFT SaurabhMSFT added the Skip-Consumers-Check Only include this if making a breaking change purposefully, and there is an MSAL/ADAL/Broker PR label Jan 25, 2024
@SaurabhMSFT SaurabhMSFT marked this pull request as ready for review January 25, 2024 12:52
@SaurabhMSFT SaurabhMSFT requested a review from a team as a code owner January 25, 2024 12:52
open val errorCodes: List<Int>? = null
)

data class InvalidUsername(
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is this class returned? I'm not seeing updates to the Controller or anywhere else.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

open val correlationId: String = DiagnosticContext.INSTANCE.threadCorrelationId,
open val errorCodes: List<Int>? = null
)

Copy link
Contributor

Choose a reason for hiding this comment

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

If we're checking for blank usernames in the SDK interface, then we can remove the ArgUtils.validateNonNullArg(username, "username") from the respective request classes right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@SaurabhMSFT SaurabhMSFT requested a review from a team as a code owner January 26, 2024 14:21
@SaurabhMSFT SaurabhMSFT merged commit 14fc4ac into dev Jan 28, 2024
@SaurabhMSFT SaurabhMSFT deleted the saugautam/2768595 branch January 28, 2024 23:42
SaurabhMSFT added a commit to AzureAD/microsoft-authentication-library-for-android that referenced this pull request Jan 29, 2024
If the username is empty or malformed then a InvalidUsername error is returned instead of UnknownError

Corresponding PR in common repo:
AzureAD/microsoft-authentication-library-common-for-android#2297
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

No-Changelog This Pull-Request has no associated changelog entry. Skip-Consumers-Check Only include this if making a breaking change purposefully, and there is an MSAL/ADAL/Broker PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants