-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: LoginScreen biometrics integration using Keychain
Required for #17085
- Loading branch information
Showing
13 changed files
with
232 additions
and
114 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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,39 @@ | ||
pragma Singleton | ||
|
||
import QtQml 2.15 | ||
|
||
import StatusQ 0.1 | ||
|
||
QObject { | ||
function getSecret(keychain, reason, profileId, callback) { | ||
const params = { | ||
target: keychain, | ||
callback, reason, profileId | ||
} | ||
|
||
conntector.createObject(this, params) | ||
} | ||
|
||
Component { | ||
id: conntector | ||
|
||
Connections { | ||
required property var callback | ||
required property string reason | ||
required property string profileId | ||
|
||
function onGetCredentialRequestCompleted(status, password) { | ||
if (status === Keychain.StatusSuccess) | ||
callback(false, "", "") | ||
else if (status === Keychain.StatusCancelled) | ||
callback(true, "", "") | ||
else | ||
callback(false, qsTr("Fetching credentials failed."), "") | ||
|
||
destroy() | ||
} | ||
|
||
Component.onCompleted: keychain.requestGetCredential(reason, profileId) | ||
} | ||
} | ||
} |
This file contains 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 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 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.