-
Notifications
You must be signed in to change notification settings - Fork 843
Implementation of MSC3824 to make the client OIDC-aware #7920
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
Merged
Merged
Changes from 22 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
c816b8f
Partial implementation of MSC3824
hughns 4ae6365
Use unstable prefix for SSO redirect action param
hughns d1a9df7
Merge branch 'develop' into hughns/msc3824-oidc-aware
hughns d41d636
Merge branch 'develop' into hughns/msc3824-oidc-aware
hughns 11df717
Changelog
hughns c53e365
Lint fixes
hughns efe9832
Add missing action param
hughns ec4ed88
Fix lint errors
hughns 21b41cd
Fix lint errors
hughns d0d75e7
Lint fix
hughns 74146f4
Migrate SSOAction to api package hierachy
hughns f6016d7
Correct copyright on SDK file
hughns f18cc5e
Fix unit tests
hughns bfc58cb
Merge branch 'develop' into hughns/msc3824-oidc-aware
hughns bfed447
Merge remote-tracking branch 'upstream/develop' into hughns/msc3824-o…
hughns 26d71e2
Updated implementation including outbound link for account management
hughns 4d6bbbb
Squashed commit of the following:
hughns 7b3c3d0
Revert "Squashed commit of the following:"
hughns e375fa0
Detekt
hughns e0076c2
Fix test compilation
hughns 53c3e89
Merge branch 'develop' into hughns/msc3824-oidc-aware
hughns f3772cb
Lint
hughns 624e2ff
Fixes from initial review
hughns 51f227a
Test case for OIDC compatibility
hughns 1ac04b0
Merge branch 'develop' into hughns/msc3824-oidc-aware
hughns 3333d86
Merge branch 'develop' into hughns/msc3824-oidc-aware
hughns 5194990
Merge branch 'develop' into hughns/msc3824-oidc-aware
hughns 8cf29f6
Design update
hughns dcf3872
Merge branch 'develop' into hughns/msc3824-oidc-aware
hughns a78f057
Merge branch 'develop' into hughns/msc3824-oidc-aware
hughns b1cacb3
Actually configure migration 50 to be used
hughns 10a1ea0
Merge branch 'develop' into hughns/msc3824-oidc-aware
hughns b1d7831
Session migration 51
hughns File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Adds MSC3824 OIDC-awareness when talking to an OIDC-enabled homeservers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/SSOAction.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| /* | ||
| * Copyright 2022 The Matrix.org Foundation C.I.C. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| package org.matrix.android.sdk.api.auth | ||
|
|
||
| /** | ||
| * See https://github.com/matrix-org/matrix-spec-proposals/pull/3824 | ||
| */ | ||
| enum class SSOAction { | ||
| LOGIN, | ||
| REGISTER; | ||
| } |
40 changes: 40 additions & 0 deletions
40
matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/data/DelegatedAuthConfig.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| /* | ||
| * Copyright 2023 The Matrix.org Foundation C.I.C. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| package org.matrix.android.sdk.api.auth.data | ||
|
|
||
| import com.squareup.moshi.Json | ||
| import com.squareup.moshi.JsonClass | ||
|
|
||
| /** | ||
| * https://github.com/matrix-org/matrix-spec-proposals/pull/2965 | ||
| * <pre> | ||
| * { | ||
| * "issuer": "https://id.server.org", | ||
| * "account": "https://id.server.org/my-account", | ||
| * } | ||
| * </pre> | ||
| * . | ||
| */ | ||
|
|
||
| @JsonClass(generateAdapter = true) | ||
| data class DelegatedAuthConfig( | ||
| @Json(name = "issuer") | ||
| val issuer: String, | ||
|
|
||
| @Json(name = "account") | ||
| val accountManagementUrl: String, | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...d/src/main/java/org/matrix/android/sdk/internal/database/migration/MigrateSessionTo048.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| /* | ||
| * Copyright (c) 2022 The Matrix.org Foundation C.I.C. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| package org.matrix.android.sdk.internal.database.migration | ||
|
|
||
| import io.realm.DynamicRealm | ||
| import org.matrix.android.sdk.internal.database.model.HomeServerCapabilitiesEntityFields | ||
| import org.matrix.android.sdk.internal.extensions.forceRefreshOfHomeServerCapabilities | ||
| import org.matrix.android.sdk.internal.util.database.RealmMigrator | ||
|
|
||
| internal class MigrateSessionTo048(realm: DynamicRealm) : RealmMigrator(realm, 40) { | ||
hughns marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| override fun doMigrate(realm: DynamicRealm) { | ||
| realm.schema.get("HomeServerCapabilitiesEntity") | ||
| ?.addField(HomeServerCapabilitiesEntityFields.EXTERNAL_ACCOUNT_MANAGEMENT_URL, String::class.java) | ||
| ?.forceRefreshOfHomeServerCapabilities() | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.