mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 19:44:05 +00:00
Add overrides for OIDC configuration. (#3910)
* Add overrides for OIDC configuration. * Make sure we're linting more than just the main app. * Fix the bundle command.
This commit is contained in:
+4
-5
@@ -12,13 +12,12 @@ opt_in_rules:
|
|||||||
- trailing_closure
|
- trailing_closure
|
||||||
|
|
||||||
included:
|
included:
|
||||||
- ElementX
|
- "*/Sources/*"
|
||||||
- UnitTests
|
|
||||||
- UITests
|
|
||||||
- Tools/Scripts/Templates
|
- Tools/Scripts/Templates
|
||||||
excluded:
|
excluded:
|
||||||
- IntegrationTests
|
- "*/Sources/Generated/*"
|
||||||
- ElementX/Sources/Generated
|
- IntegrationTests # prints to stdout for performance tests.
|
||||||
|
- Tools/Sources # Our command-line tools use a lot of print commands.
|
||||||
|
|
||||||
line_length:
|
line_length:
|
||||||
warning: 250
|
warning: 250
|
||||||
|
|||||||
@@ -3066,7 +3066,6 @@
|
|||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
01C4C7DB37597D7D8379511A /* Assets.xcassets */,
|
01C4C7DB37597D7D8379511A /* Assets.xcassets */,
|
||||||
D174C6E7DCA00AAFC0169925 /* ElementCall */,
|
|
||||||
A0C06C0F6A8621B22BFAEB56 /* Localizations */,
|
A0C06C0F6A8621B22BFAEB56 /* Localizations */,
|
||||||
8AEA6A91159FA0D3EAFCCB0D /* Sounds */,
|
8AEA6A91159FA0D3EAFCCB0D /* Sounds */,
|
||||||
);
|
);
|
||||||
@@ -5504,13 +5503,6 @@
|
|||||||
path = ShareExtension;
|
path = ShareExtension;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
D174C6E7DCA00AAFC0169925 /* ElementCall */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
);
|
|
||||||
path = ElementCall;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
D382E465AF067C1BF888BF8E /* View */ = {
|
D382E465AF067C1BF888BF8E /* View */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
version = "1.7">
|
version = "1.7">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
buildImplicitDependencies = "YES">
|
buildImplicitDependencies = "YES"
|
||||||
|
runPostActionsOnFailure = "NO">
|
||||||
<BuildActionEntries>
|
<BuildActionEntries>
|
||||||
<BuildActionEntry
|
<BuildActionEntry
|
||||||
buildForTesting = "YES"
|
buildForTesting = "YES"
|
||||||
@@ -29,6 +30,12 @@
|
|||||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
codeCoverageEnabled = "YES"
|
codeCoverageEnabled = "YES"
|
||||||
onlyGenerateCoverageForSpecifiedTargets = "YES">
|
onlyGenerateCoverageForSpecifiedTargets = "YES">
|
||||||
|
<TestPlans>
|
||||||
|
<TestPlanReference
|
||||||
|
default = "YES"
|
||||||
|
reference = "container:PreviewTests/SupportingFiles/PreviewTests.xctestplan">
|
||||||
|
</TestPlanReference>
|
||||||
|
</TestPlans>
|
||||||
<MacroExpansion>
|
<MacroExpansion>
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
@@ -38,6 +45,10 @@
|
|||||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</MacroExpansion>
|
</MacroExpansion>
|
||||||
|
<Testables>
|
||||||
|
</Testables>
|
||||||
|
<CommandLineArguments>
|
||||||
|
</CommandLineArguments>
|
||||||
<CodeCoverageTargets>
|
<CodeCoverageTargets>
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
@@ -47,12 +58,6 @@
|
|||||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</CodeCoverageTargets>
|
</CodeCoverageTargets>
|
||||||
<TestPlans>
|
|
||||||
<TestPlanReference
|
|
||||||
reference = "container:PreviewTests/SupportingFiles/PreviewTests.xctestplan"
|
|
||||||
default = "YES">
|
|
||||||
</TestPlanReference>
|
|
||||||
</TestPlans>
|
|
||||||
</TestAction>
|
</TestAction>
|
||||||
<LaunchAction
|
<LaunchAction
|
||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Debug"
|
||||||
@@ -73,6 +78,8 @@
|
|||||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</MacroExpansion>
|
</MacroExpansion>
|
||||||
|
<CommandLineArguments>
|
||||||
|
</CommandLineArguments>
|
||||||
</LaunchAction>
|
</LaunchAction>
|
||||||
<ProfileAction
|
<ProfileAction
|
||||||
buildConfiguration = "Release"
|
buildConfiguration = "Release"
|
||||||
@@ -80,6 +87,8 @@
|
|||||||
savedToolIdentifier = ""
|
savedToolIdentifier = ""
|
||||||
useCustomWorkingDirectory = "NO"
|
useCustomWorkingDirectory = "NO"
|
||||||
debugDocumentVersioning = "YES">
|
debugDocumentVersioning = "YES">
|
||||||
|
<CommandLineArguments>
|
||||||
|
</CommandLineArguments>
|
||||||
<MacroExpansion>
|
<MacroExpansion>
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
|
|||||||
@@ -81,10 +81,22 @@ final class AppSettings {
|
|||||||
|
|
||||||
// MARK: - Hooks
|
// MARK: - Hooks
|
||||||
|
|
||||||
func override(defaultHomeserverAddress: String? = nil) {
|
func override(defaultHomeserverAddress: String,
|
||||||
if let defaultHomeserverAddress {
|
oidcRedirectURL: URL,
|
||||||
self.defaultHomeserverAddress = defaultHomeserverAddress
|
websiteURL: URL,
|
||||||
}
|
logoURL: URL,
|
||||||
|
copyrightURL: URL,
|
||||||
|
acceptableUseURL: URL,
|
||||||
|
privacyURL: URL,
|
||||||
|
supportEmailAddress: String) {
|
||||||
|
self.defaultHomeserverAddress = defaultHomeserverAddress
|
||||||
|
self.oidcRedirectURL = oidcRedirectURL
|
||||||
|
self.websiteURL = websiteURL
|
||||||
|
self.logoURL = logoURL
|
||||||
|
self.copyrightURL = copyrightURL
|
||||||
|
self.acceptableUseURL = acceptableUseURL
|
||||||
|
self.privacyURL = privacyURL
|
||||||
|
self.supportEmailAddress = supportEmailAddress
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Application
|
// MARK: - Application
|
||||||
@@ -118,17 +130,17 @@ final class AppSettings {
|
|||||||
let backgroundAppRefreshTaskIdentifier = "io.element.elementx.background.refresh"
|
let backgroundAppRefreshTaskIdentifier = "io.element.elementx.background.refresh"
|
||||||
|
|
||||||
/// A URL where users can go read more about the app.
|
/// A URL where users can go read more about the app.
|
||||||
let websiteURL: URL = "https://element.io"
|
private(set) var websiteURL: URL = "https://element.io"
|
||||||
/// A URL that contains the app's logo that may be used when showing content in a web view.
|
/// A URL that contains the app's logo that may be used when showing content in a web view.
|
||||||
let logoURL: URL = "https://element.io/mobile-icon.png"
|
private(set) var logoURL: URL = "https://element.io/mobile-icon.png"
|
||||||
/// A URL that contains that app's copyright notice.
|
/// A URL that contains that app's copyright notice.
|
||||||
let copyrightURL: URL = "https://element.io/copyright"
|
private(set) var copyrightURL: URL = "https://element.io/copyright"
|
||||||
/// A URL that contains the app's Terms of use.
|
/// A URL that contains the app's Terms of use.
|
||||||
let acceptableUseURL: URL = "https://element.io/acceptable-use-policy-terms"
|
private(set) var acceptableUseURL: URL = "https://element.io/acceptable-use-policy-terms"
|
||||||
/// A URL that contains the app's Privacy Policy.
|
/// A URL that contains the app's Privacy Policy.
|
||||||
let privacyURL: URL = "https://element.io/privacy"
|
private(set) var privacyURL: URL = "https://element.io/privacy"
|
||||||
/// An email address that should be used for support requests.
|
/// An email address that should be used for support requests.
|
||||||
let supportEmailAddress = "support@element.io"
|
private(set) var supportEmailAddress = "support@element.io"
|
||||||
/// A URL where users can go read more about encryption in general.
|
/// A URL where users can go read more about encryption in general.
|
||||||
let encryptionURL: URL = "https://element.io/help#encryption"
|
let encryptionURL: URL = "https://element.io/help#encryption"
|
||||||
/// A URL where users can go read more about the chat backup.
|
/// A URL where users can go read more about the chat backup.
|
||||||
@@ -161,7 +173,7 @@ final class AppSettings {
|
|||||||
/// Any pre-defined static client registrations for OIDC issuers.
|
/// Any pre-defined static client registrations for OIDC issuers.
|
||||||
let oidcStaticRegistrations: [URL: String] = ["https://id.thirdroom.io/realms/thirdroom": "elementx"]
|
let oidcStaticRegistrations: [URL: String] = ["https://id.thirdroom.io/realms/thirdroom": "elementx"]
|
||||||
/// The redirect URL used for OIDC. This no longer uses universal links so we don't need the bundle ID to avoid conflicts between Element X, Nightly and PR builds.
|
/// The redirect URL used for OIDC. This no longer uses universal links so we don't need the bundle ID to avoid conflicts between Element X, Nightly and PR builds.
|
||||||
let oidcRedirectURL: URL = "https://element.io/oidc/login"
|
private(set) var oidcRedirectURL: URL = "https://element.io/oidc/login"
|
||||||
|
|
||||||
private(set) lazy var oidcConfiguration = OIDCConfigurationProxy(clientName: InfoPlistReader.main.bundleDisplayName,
|
private(set) lazy var oidcConfiguration = OIDCConfigurationProxy(clientName: InfoPlistReader.main.bundleDisplayName,
|
||||||
redirectURI: oidcRedirectURL,
|
redirectURI: oidcRedirectURL,
|
||||||
|
|||||||
+1
-1
Submodule Enterprise updated: 4b4116313f...34a88e7284
+2
-2
@@ -145,12 +145,12 @@ GEM
|
|||||||
google-apis-core (>= 0.11.0, < 2.a)
|
google-apis-core (>= 0.11.0, < 2.a)
|
||||||
google-apis-storage_v1 (0.31.0)
|
google-apis-storage_v1 (0.31.0)
|
||||||
google-apis-core (>= 0.11.0, < 2.a)
|
google-apis-core (>= 0.11.0, < 2.a)
|
||||||
google-cloud-core (1.8.0)
|
google-cloud-core (1.7.1)
|
||||||
google-cloud-env (>= 1.0, < 3.a)
|
google-cloud-env (>= 1.0, < 3.a)
|
||||||
google-cloud-errors (~> 1.0)
|
google-cloud-errors (~> 1.0)
|
||||||
google-cloud-env (1.6.0)
|
google-cloud-env (1.6.0)
|
||||||
faraday (>= 0.17.3, < 3.0)
|
faraday (>= 0.17.3, < 3.0)
|
||||||
google-cloud-errors (1.5.0)
|
google-cloud-errors (1.4.0)
|
||||||
google-cloud-storage (1.47.0)
|
google-cloud-storage (1.47.0)
|
||||||
addressable (~> 2.8)
|
addressable (~> 2.8)
|
||||||
digest-crc (~> 0.4)
|
digest-crc (~> 0.4)
|
||||||
|
|||||||
Reference in New Issue
Block a user