-
Notifications
You must be signed in to change notification settings - Fork 35
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 InvalidError for NativeAuth #2297
Conversation
@@ -72,4 +72,15 @@ interface INativeAuthCommandResult { | |||
open val correlationId: String = DiagnosticContext.INSTANCE.threadCorrelationId, | |||
open val errorCodes: List<Int>? = null | |||
) | |||
|
|||
data class InvalidUsername( |
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.
Where is this class returned? I'm not seeing updates to the Controller or anywhere else.
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.
Updated
@@ -72,4 +72,15 @@ interface INativeAuthCommandResult { | |||
open val correlationId: String = DiagnosticContext.INSTANCE.threadCorrelationId, | |||
open val errorCodes: List<Int>? = null | |||
) | |||
|
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.
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?
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.
Done
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
Corresponding PR in MSAL Repo : AzureAD/microsoft-authentication-library-for-android#2020