-
Notifications
You must be signed in to change notification settings - Fork 927
[PM-26112] Handle Credential Exchange export requests #5928
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 all commits
Commits
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 |
|---|---|---|
|
|
@@ -20,6 +20,18 @@ | |
| <data android:host="*.bitwarden.pw" /> | ||
| <data android:pathPattern="/redirect-connector.*" /> | ||
| </intent-filter> | ||
|
|
||
| <!-- Handle Credential Exchange transfer requests --> | ||
| <intent-filter | ||
| android:autoVerify="true" | ||
| tools:ignore="AppLinkUrlError"> | ||
| <action android:name="androidx.identitycredentials.action.IMPORT_CREDENTIALS" /> | ||
| <category android:name="android.intent.category.DEFAULT" /> | ||
| <data | ||
| android:mimeType="application/octet-stream" | ||
| android:scheme="content" | ||
| tools:ignore="AppLinkUriRelativeFilterGroupError" /> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one too? |
||
| </intent-filter> | ||
| </activity> | ||
| </application> | ||
|
|
||
|
|
||
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
43 changes: 43 additions & 0 deletions
43
...src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/exportitems/ExportItemsNavigation.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,43 @@ | ||
| @file:OmitFromCoverage | ||
|
|
||
| package com.x8bit.bitwarden.ui.vault.feature.exportitems | ||
|
|
||
| import androidx.navigation.NavController | ||
| import androidx.navigation.NavGraphBuilder | ||
| import androidx.navigation.NavOptions | ||
| import androidx.navigation.navigation | ||
| import com.bitwarden.annotation.OmitFromCoverage | ||
| import com.x8bit.bitwarden.ui.vault.feature.exportitems.selectaccount.SelectAccountRoute | ||
| import com.x8bit.bitwarden.ui.vault.feature.exportitems.selectaccount.selectAccountDestination | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
| /** | ||
| * The type-safe route for the export items graph. | ||
| */ | ||
| @OmitFromCoverage | ||
| @Serializable | ||
| data object ExportItemsRoute | ||
|
|
||
| /** | ||
| * Add export items destinations to the nav graph. | ||
| */ | ||
| fun NavGraphBuilder.exportItemsGraph() { | ||
| navigation<ExportItemsRoute>( | ||
| startDestination = SelectAccountRoute, | ||
| ) { | ||
| selectAccountDestination( | ||
| onAccountSelected = { | ||
| // TODO: [PM-26110] Navigate to verify password screen. | ||
| }, | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * Navigate to the export items graph. | ||
| */ | ||
| fun NavController.navigateToExportItemsGraph( | ||
| navOptions: NavOptions? = null, | ||
| ) { | ||
| navigate(route = ExportItemsRoute, navOptions = navOptions) | ||
| } |
42 changes: 42 additions & 0 deletions
42
...com/x8bit/bitwarden/ui/vault/feature/exportitems/selectaccount/SelectAccountNavigation.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,42 @@ | ||
| @file:OmitFromCoverage | ||
|
|
||
| package com.x8bit.bitwarden.ui.vault.feature.exportitems.selectaccount | ||
|
|
||
| import androidx.navigation.NavController | ||
| import androidx.navigation.NavGraphBuilder | ||
| import androidx.navigation.NavOptions | ||
| import com.bitwarden.annotation.OmitFromCoverage | ||
| import com.bitwarden.ui.platform.base.util.composableWithRootPushTransitions | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
| /** | ||
| * The type-safe route for the select account screen. | ||
| */ | ||
| @OmitFromCoverage | ||
| @Serializable | ||
| data object SelectAccountRoute | ||
|
|
||
| /** | ||
| * Add the [SelectAccountScreen] to the nav graph. | ||
| */ | ||
| fun NavGraphBuilder.selectAccountDestination( | ||
| onAccountSelected: (id: String) -> Unit, | ||
| ) { | ||
| composableWithRootPushTransitions<SelectAccountRoute> { | ||
| SelectAccountScreen( | ||
| onAccountSelected = onAccountSelected, | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * Navigate to the [SelectAccountScreen]. | ||
| */ | ||
| fun NavController.navigateToSelectAccountScreen( | ||
| navOptions: NavOptions? = null, | ||
| ) { | ||
| navigate( | ||
| route = SelectAccountRoute, | ||
| navOptions = navOptions, | ||
| ) | ||
| } |
15 changes: 15 additions & 0 deletions
15
...lin/com/x8bit/bitwarden/ui/vault/feature/exportitems/selectaccount/SelectAccountScreen.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,15 @@ | ||
| package com.x8bit.bitwarden.ui.vault.feature.exportitems.selectaccount | ||
|
|
||
| import androidx.compose.material3.ExperimentalMaterial3Api | ||
| import androidx.compose.runtime.Composable | ||
|
|
||
| /** | ||
| * Top level screen for selecting an account to export items from. | ||
| */ | ||
| @OptIn(ExperimentalMaterial3Api::class) | ||
| @Composable | ||
| fun SelectAccountScreen( | ||
| onAccountSelected: (id: String) -> Unit, | ||
| ) { | ||
| // TODO: [PM-26095] Implement select account screen. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since there is no screen yet, should we block support for these deeplinks? |
||
| } | ||
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.
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.
What's up with this error?
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'm not really sure. This is the first time I've seen both of these. I have an pending request for more details about them. According to the integration guide this is how the
intent-filtermust be declared. It's possible this will change when the API is stable.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 see, that is pretty odd