-
Notifications
You must be signed in to change notification settings - Fork 393
@W-19461869: [M1][MSDK13.1] Enable Flexible Server Matching for QR Code Login (Android) #2762
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
Changes from 1 commit
a92e929
250fe94
f4ba7a9
de898b2
aa5ea4d
6717f3a
2577239
d9a6f19
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 |
|---|---|---|
|
|
@@ -67,7 +67,7 @@ internal data class FrontdoorBridgeUrlAppLoginServerMatch( | |
| } | ||
|
|
||
| if (frontdoorBridgeUrl.isMyDomain()) { | ||
| val frontdoorBridgeUrlMyDomainSuffix = frontdoorBridgeUrlHost.split("\\.my\\.").last() | ||
| val frontdoorBridgeUrlMyDomainSuffix = "my.${frontdoorBridgeUrlHost.split(".my.").last()}" | ||
brandonpage marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| if (frontdoorBridgeUrlMyDomainSuffix.isNotEmpty()) { | ||
|
||
| for (eligibleAppLoginServer in eligibleAppLoginServers) { | ||
| if (eligibleAppLoginServer.endsWith(frontdoorBridgeUrlMyDomainSuffix)) { | ||
|
||
|
|
@@ -100,7 +100,13 @@ internal data class FrontdoorBridgeUrlAppLoginServerMatch( | |
| } | ||
| } | ||
| } else { | ||
| results.add(selectedAppLoginHost) | ||
| try { | ||
| val url = URL(selectedAppLoginHost) | ||
| results.add(url.host) | ||
| } catch (_: Exception) { | ||
| // If parsing fails, try to use as-is (might already be just a host) | ||
|
||
| results.add(selectedAppLoginHost) | ||
|
||
| } | ||
| } | ||
| return results | ||
| } | ||
|
|
||
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 did not know you could could use the Kotlin style named parameter syntax in a Java file. Must be because it is an annotation?
Uh oh!
There was an error while loading. Please reload this page.
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 recall using named parameters with Java annotations all the way back to Java 5 and Hibernate ORM (2005), which used it a lot. That's an interesting place where named parameters snuck in early and I'd never thought about it 🙂