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:
@@ -12,13 +12,12 @@ opt_in_rules:
|
||||
- trailing_closure
|
||||
|
||||
included:
|
||||
- ElementX
|
||||
- UnitTests
|
||||
- UITests
|
||||
- "*/Sources/*"
|
||||
- Tools/Scripts/Templates
|
||||
excluded:
|
||||
- IntegrationTests
|
||||
- ElementX/Sources/Generated
|
||||
- "*/Sources/Generated/*"
|
||||
- IntegrationTests # prints to stdout for performance tests.
|
||||
- Tools/Sources # Our command-line tools use a lot of print commands.
|
||||
|
||||
line_length:
|
||||
warning: 250
|
||||
|
||||
@@ -3066,7 +3066,6 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
01C4C7DB37597D7D8379511A /* Assets.xcassets */,
|
||||
D174C6E7DCA00AAFC0169925 /* ElementCall */,
|
||||
A0C06C0F6A8621B22BFAEB56 /* Localizations */,
|
||||
8AEA6A91159FA0D3EAFCCB0D /* Sounds */,
|
||||
);
|
||||
@@ -5504,13 +5503,6 @@
|
||||
path = ShareExtension;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D174C6E7DCA00AAFC0169925 /* ElementCall */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
path = ElementCall;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D382E465AF067C1BF888BF8E /* View */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
version = "1.7">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
buildImplicitDependencies = "YES"
|
||||
runPostActionsOnFailure = "NO">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
@@ -29,6 +30,12 @@
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
codeCoverageEnabled = "YES"
|
||||
onlyGenerateCoverageForSpecifiedTargets = "YES">
|
||||
<TestPlans>
|
||||
<TestPlanReference
|
||||
default = "YES"
|
||||
reference = "container:PreviewTests/SupportingFiles/PreviewTests.xctestplan">
|
||||
</TestPlanReference>
|
||||
</TestPlans>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
@@ -38,6 +45,10 @@
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
</Testables>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<CodeCoverageTargets>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
@@ -47,12 +58,6 @@
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</CodeCoverageTargets>
|
||||
<TestPlans>
|
||||
<TestPlanReference
|
||||
reference = "container:PreviewTests/SupportingFiles/PreviewTests.xctestplan"
|
||||
default = "YES">
|
||||
</TestPlanReference>
|
||||
</TestPlans>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
@@ -73,6 +78,8 @@
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
@@ -80,6 +87,8 @@
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
|
||||
@@ -81,10 +81,22 @@ final class AppSettings {
|
||||
|
||||
// MARK: - Hooks
|
||||
|
||||
func override(defaultHomeserverAddress: String? = nil) {
|
||||
if let defaultHomeserverAddress {
|
||||
self.defaultHomeserverAddress = defaultHomeserverAddress
|
||||
}
|
||||
func override(defaultHomeserverAddress: String,
|
||||
oidcRedirectURL: URL,
|
||||
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
|
||||
@@ -118,17 +130,17 @@ final class AppSettings {
|
||||
let backgroundAppRefreshTaskIdentifier = "io.element.elementx.background.refresh"
|
||||
|
||||
/// 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.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
let supportEmailAddress = "support@element.io"
|
||||
private(set) var supportEmailAddress = "support@element.io"
|
||||
/// A URL where users can go read more about encryption in general.
|
||||
let encryptionURL: URL = "https://element.io/help#encryption"
|
||||
/// 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.
|
||||
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.
|
||||
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,
|
||||
redirectURI: oidcRedirectURL,
|
||||
|
||||
Submodule Enterprise updated: 4b4116313f...34a88e7284
@@ -145,12 +145,12 @@ GEM
|
||||
google-apis-core (>= 0.11.0, < 2.a)
|
||||
google-apis-storage_v1 (0.31.0)
|
||||
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-errors (~> 1.0)
|
||||
google-cloud-env (1.6.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)
|
||||
addressable (~> 2.8)
|
||||
digest-crc (~> 0.4)
|
||||
|
||||
Reference in New Issue
Block a user