mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
fix: Passkey workflow
This commit is contained in:
@@ -44,12 +44,19 @@ data class AppOrigin(
|
||||
this.webOrigins.add(webOrigin)
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether at least one signature is present in the Android origins
|
||||
*/
|
||||
fun containsAndroidOriginSignature(): Boolean {
|
||||
return androidOrigins.any { !it.fingerprint.isNullOrEmpty() }
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify the app origin by comparing it to the list of android origins,
|
||||
* return the first verified origin or throw an exception if none is found
|
||||
*/
|
||||
fun checkAppOrigin(compare: AppOrigin): String {
|
||||
if (compare.androidOrigins.isNotEmpty()) {
|
||||
if (compare.containsAndroidOriginSignature().not()) {
|
||||
throw SignatureNotFoundException(this, "Android origin not found")
|
||||
}
|
||||
return androidOrigins.firstOrNull { androidOrigin ->
|
||||
|
||||
Reference in New Issue
Block a user