Commit Graph

24 Commits (master)

Author SHA1 Message Date
Devin Lin 818ed69022 app: lowercase dbus name 2021-07-20 12:11:29 +05:30
Tobias Fella db6d4742e3 feat: do not use QtWidgets on android and set platform style 2021-06-08 10:43:24 +05:30
Johan Ouwerkerk fb953ed677 feat!: respond to D-Bus activation
Minimal support for requesting window activation in response to
activation requests from D-Bus.

This provides minimal support for xdg D-Bus activation in Keysmith:
only the activation signal itself is handled; the DBus API for opening
URLs is not implemented.

Issues: #18
2021-05-03 04:03:24 +00:00
Johan Ouwerkerk 287cbcd480 feat!: register Keysmith with D-Bus
This change provides the most basic D-Bus support in Keysmith.
At start up, Keysmith will now register itself and abort if another
instance is already running. Full support for the xdg D-Bus activation
specification (such as URI opening) is not yet implemented.

By default this feature is disabled on Android, but enabled on 'all'
other platforms. Explicit control may be exercised by running CMake
with -DBUILD_DBUS_INTERFACE=<ON|OFF>.

Issues: #18
2021-05-03 04:03:24 +00:00
Johan Ouwerkerk 75a167665b refactor: switch to page navigation from C++
Rework QML to use the ViewModel classes and use the C++ flow classes to
drive QML page navigation.
2021-05-03 04:03:24 +00:00
Johan Ouwerkerk ea19844300 refactor: proxy commandline arguments
Add a 'proxy' to forward external API calls into the main application
control flow. Right now it only supports forwarding commandline
arguments, but this construct is already useful as a starting point for
future D-Bus API support.
2021-05-03 04:03:24 +00:00
Johan Ouwerkerk 12e060923e refactor: UI (page) navigation from C++ code
An app::Navigation class is introduced with an API very similar to the
Kirigami.PageRouter in QML. This new class is responsible for pusing
populated view model classes from C++ into QML ownership and triggering
appropriate navigation events. On the QML side a signal handler
forwards these calls to the Kirigami.PageRouter to perform the actual
navigation in the UI.

This construct paves the way for moving state transition and related
logic out of QML and towards C++, since this logic is currently mostly
concerned with page navigation in Keysmith. Ultimately that transition
should make the QML (page) views more easily re-usable.
2021-05-03 04:03:24 +00:00
Johan Ouwerkerk d7c8eb4be4 feat: support Qt application version attribute
Automatically pick up on the CMake project version and forward it to the applicationVersion attribute of Qt.
2020-11-04 16:54:29 +01:00
Johan Ouwerkerk cb9032d1c3 feat: pick up on commandline options passed to Keysmith during start up.
This change provides minimal plumbing to pick up on commandline options, it does not yet provide the UI to take appropriate action(s).

Issues: #7, #14
2020-10-27 18:08:31 +01:00
Johan Ouwerkerk 98f73c57a5 chore: implement fixes suggested by static analysis
These are potentially blocking the basic QR parsing and versioning features from landing.

See-Also: https://invent.kde.org/utilities/keysmith/-/merge_requests/57
See-Also: https://invent.kde.org/utilities/keysmith/-/merge_requests/58
2020-10-26 18:02:20 +01:00
Johan Ouwerkerk 46da8be7b3 feat: add support for QML debugging/profiling 2020-08-14 20:02:43 +02:00
Johan Ouwerkerk 63033b568d refactor: introduce model class to collate validated input from add account forms (flow)
This change prepares the UI for supporting alternative and more complex flows for adding accounts.
All parameters are now collated into a single "validated input" object which is more convenient to pass around between views
This makes it possible to support back- and forth navigation between "basic" and "advanced/details" forms for adding accounts.

Additionally it provides a fundamental building block for adding alternative ways to add accounts (e.g. via OTP token URI/QR code).

Issues: #7
2020-08-08 09:17:55 +02:00
Johan Ouwerkerk 170d7f1811 refactor: introduce custom datetime validator
This change is a preparation for allowing the user to configure custom epochs for TOTP tokens

Issues: #7
2020-08-08 09:17:55 +02:00
Johan Ouwerkerk d358d8abcc feat: Support configuring the issuer when adding a new account in Keysmith.
With this change, issuers are now fully supported.

Resolves: #13
2020-07-23 18:24:13 +02:00
Johan Ouwerkerk 532f606142 Make sure to sort entries by account (name) in the overview list. 2020-05-31 16:44:04 +02:00
Johan Ouwerkerk f16eba4505 Plumbing for asking for passwords from QML
This change introduces a model to signal the UI what password "scenario" is
applicable and provides the necessary plumbing to expose it QML.
2020-04-23 18:59:17 +02:00
Johan Ouwerkerk b451bd2556 Fix up licensing for REUSE compliance.
This adds licensing and copyright information where missing and normalises
existing licensing/copyright statements to SPDX metadata tags.
2020-04-10 13:34:31 +02:00
Johan Ouwerkerk 768ccdba97 Refactor and update input validation
This change fixes input validation for the following cases:

 - Check that entered account names are still available
 - Working validation for time steps (input mask was completely broken)
 - Allow longer tokens: liboath is no longer used, Keysmith can handle it

Additionally the QML code is refactored significantly:

 - Extracted the main accounts overview page
 - Extracted the add an account page
 - Completed the internal renaming of "Oath" to "Keysmith" for QML types
2020-04-04 11:22:15 +02:00
Johan Ouwerkerk a0caf83da2 Use the new Account models.
Drop the AccountDetailsPage instead of trying to update it: see issue #7

With this change issue #2 should be fixed
2020-01-28 06:49:06 +00:00
Bhushan Shah f4264b9c8c app: add i18n support 2019-12-31 19:34:33 +05:30
Johan Ouwerkerk e6a53b6f3b Rebrand otpclient as Keysmith 2019-10-21 19:16:51 +02:00
Johan Ouwerkerk b791bbad45 Add QML bindings for custom validators
- Add convenience function to set up QML bindings under the Oath.Validators namespace
 - Wire up the validator library in the otpclient application
2019-09-29 12:53:49 +02:00
Johan Ouwerkerk c37bf03b8e Fix typo: OAth -> Oath (the name is oath or OATH). 2019-09-29 12:40:22 +02:00
Bhushan Shah 8819d205f9 Initial code for OTP client
It uses the oath-toolkit[1] provided library liboath to generate the 2FA
codes, both TOTP and HOTP based. Currently it is largely untested. From
initial rough testing it seems that auto-refreshing of code is not
working. Also button to refresh token for HOTP is also dummy at moment.

Some todo items include,

- Verify the generated oath code is correct
- Make refreshing token work
- QR code scanning
- Backup and Restore of accounts
- Clipboard support to automatically copy code.
- Encrypted storage of the secret token

This code is largely based on the authenticator-ng[2] application by the
Rodney Dawes and Michael Zanetti for the Ubuntu Touch.

[1] https://www.nongnu.org/oath-toolkit/
[2] https://github.com/dobey/authenticator-ng
2019-03-25 02:58:56 +05:30