-
Notifications
You must be signed in to change notification settings - Fork 126
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
Remove the unnecessary code line because of fix in common #2135
base: dev
Are you sure you want to change the base?
Changes from 12 commits
87e051c
44e0f07
5d8f15c
304ba3b
2780cc6
e6614e3
a4ae188
11605bb
b07663c
862c126
f87a447
f799c82
73c241c
2a024b5
c10ec23
0ce6946
74d3658
1262d2c
b392bda
0b1cd98
2050eb2
319bd43
c6f864a
856c013
d2f0162
43be7bf
f056483
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -262,7 +262,7 @@ class NativeAuthPublicClientApplication( | |
GetAccountResult.AccountFound( | ||
resultValue = AccountState.createFromAccountResult( | ||
account = account, | ||
correlationId = DiagnosticContext.INSTANCE.threadCorrelationId, | ||
correlationId = "", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you check what MSAL does here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, what was your thinking behind changing this from the thread ID to an empty string? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This path generate AccountState from the SDK cache (authClient.getCurrentAccount()) The default value of DiagnosticContext.INSTANCE.threadCorrelationId is UNSET. And currently, SDK won't transform “UNSET" into UUID. If use DiagnosticContext.INSTANCE.threadCorrelationId,
I am not sure if the difference between the two correlation ids before and after is what we want |
||
config = nativeAuthConfig | ||
) | ||
) | ||
|
@@ -274,7 +274,7 @@ class NativeAuthPublicClientApplication( | |
errorType = ErrorTypes.CLIENT_EXCEPTION, | ||
errorMessage = "MSAL client exception occurred in getCurrentAccount.", | ||
exception = e, | ||
correlationId = DiagnosticContext.INSTANCE.threadCorrelationId | ||
correlationId = "" | ||
) | ||
} | ||
} | ||
|
@@ -341,7 +341,7 @@ class NativeAuthPublicClientApplication( | |
return@withContext SignInError( | ||
errorType = ErrorTypes.INVALID_USERNAME, | ||
errorMessage = "Empty or blank username", | ||
correlationId = "UNSET" | ||
correlationId = "" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not set it at all, meaning the value will be null? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The correlationId parameter is mandatory. Setting it to “” would be much easier than dealing with if null. |
||
) | ||
} | ||
|
||
|
@@ -582,7 +582,7 @@ class NativeAuthPublicClientApplication( | |
return@withContext SignUpError( | ||
errorType = ErrorTypes.INVALID_USERNAME, | ||
errorMessage = "Empty or blank username", | ||
correlationId = "UNSET" | ||
correlationId = "" | ||
) | ||
} | ||
|
||
|
@@ -810,7 +810,7 @@ class NativeAuthPublicClientApplication( | |
return@withContext ResetPasswordError( | ||
errorType = ErrorTypes.INVALID_USERNAME, | ||
errorMessage = "Empty or blank username", | ||
correlationId = "UNSET" | ||
correlationId = "" | ||
) | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,7 +77,7 @@ class AccountState private constructor( | |
|
||
constructor (parcel: Parcel) : this ( | ||
account = parcel.serializable<IAccount>() as IAccount, | ||
correlationId = parcel.readString() ?: "UNSET", | ||
correlationId = parcel.readString() ?: "", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a good point. How about generating random UUID here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Keep the original "UNSET" string. |
||
config = parcel.serializable<NativeAuthPublicClientApplicationConfiguration>() as NativeAuthPublicClientApplicationConfiguration | ||
) | ||
|
||
|
@@ -309,12 +309,11 @@ class AccountState private constructor( | |
correlationId = correlationId | ||
) | ||
|
||
val privateCorrelationId = if (correlationId == "UNSET") { UUID.randomUUID().toString() } else { correlationId } | ||
|
||
val acquireTokenSilentParameters = AcquireTokenSilentParameters.Builder() | ||
.forAccount(currentAccount) | ||
.fromAuthority(currentAccount.authority) | ||
.withCorrelationId(UUID.fromString(privateCorrelationId)) | ||
.withCorrelationId(UUID.fromString(correlationId)) | ||
.forceRefresh(forceRefresh) | ||
.withScopes(scopes) | ||
.build() | ||
|
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.
Revert it back before the merge.
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.
Why do we have this here?
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.
I cannot change the targe branch in the DevOps portal thus change the command here.