mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 08:32:53 +02:00
feat: use the homeserver url from the wellknown file for JWT check (MESSENGER-6777)
This commit is contained in:
+14
@@ -205,6 +205,20 @@ class AuthenticationService: NSObject {
|
||||
delegate?.authenticationService(self, didReceive: token, with: transactionID) ?? false
|
||||
}
|
||||
|
||||
/// BWI: #6777 use baseURL for JWT handling
|
||||
func getBaseURL(_ homeserverAddress: String) async -> String? {
|
||||
guard let homeserverURL = URL(string: homeserverAddress) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
guard let wellKnown = try? await wellKnown(for: homeserverURL) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
return wellKnown.homeServer.baseUrl
|
||||
}
|
||||
/// BWI END
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
/// Query the supported login flows for the supplied homeserver.
|
||||
|
||||
Reference in New Issue
Block a user