[WIP] Switch the Attica KDE plugin to use KAccounts
Needs ReviewPublic

Authored by leinir on Dec 13 2019, 5:44 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Don't require KWallet, and require KAccounts and libaccounts-Qt5

Link and use includes from new requirements

Remove KWallet bits, and use KAccounts/libaccounts-qt instead

This removes the custom KWallet integration in favour of an approach
based on the more generic KAccounts framework. It is a work in progress
which currently does not allow for creating new accounts (which would
be done through saveCredentials), but which does load and use the data
from any accounts which already exist.

Diff Detail

Repository
R119 Plasma Desktop
Branch
switch-attica-plugin-to-kaccounts (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 22713
Build 22731: arc lint + arc unit
leinir created this revision.Dec 13 2019, 5:44 PM
Restricted Application added a project: Plasma. · View Herald TranscriptDec 13 2019, 5:44 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
leinir requested review of this revision.Dec 13 2019, 5:44 PM
bshah awarded a token.Dec 14 2019, 7:05 AM
leinir updated this revision to Diff 71495.Dec 14 2019, 9:56 AM
  • Add the provider and service files (these use temp client data for now)
  • Actually install the service and provider files
leinir updated this revision to Diff 71607.Dec 15 2019, 3:52 PM
  • Add functionality to open the accounts kcm on saveCredentials calls
zachus added a subscriber: zachus.Dec 16 2019, 10:50 AM

is there a server out there to run it against?

is there a server out there to run it against?

The provider file points it at the opendesktop.org server (that is to say, the KDE Store), so testing can be done against the live servers that already provide all our content :)

Note also that the current client id and secret means you will be told that Bhushan Shah is asking for access to your things during sign-in - this is because that's who asked for test access in order to build this, so don't worry, that's currently expected. Before merging, it'll want to be swapped out for a more proper id, though we'll probably want to give this some thought - do we want one default for all of KDE's software, do we want one that can be replaced by distributions, or do we want distributions to have to do this? i'm currently unsure, but leaning towards option two (meaning, ship with a default id and secret set, but offer the ability for distributions and app developers to swap this out with one of their own).

leinir updated this revision to Diff 73756.Jan 17 2020, 11:25 AM

Rebase on master

  • Add the provider and service files (these use temp client data for now)
  • Actually install the service and provider files
  • Add functionality to open the accounts kcm on saveCredentials calls
leinir updated this revision to Diff 74208.Thu, Jan 23, 10:55 AM
  • Actually make the service locator work (need to query for the right thing)
leinir updated this revision to Diff 76049.Thu, Feb 20, 1:48 PM

Fair bit of work gone on here, but in short, given a patch which handles the
OpenID ID token in the OAuth2 requests in signon-plugin-oauth2, we are now
able to construct a bearer-authenticated request and whatnot. There is more
work to be done, but it seems like things are happening now! Progress.

The merge request for the signon-plugin-oauth2 patch can be found at:
https://gitlab.com/accounts-sso/signon-plugin-oauth2/-/merge_requests/25

  • Add the provider and service files (these use temp client data for now)
  • Actually install the service and provider files
  • Add functionality to open the accounts kcm on saveCredentials calls
  • Actually make the service locator work (need to query for the right thing)
  • Add the SignOn OAuth plugin as a runtime dependency
  • Minor cleanup for attica_kde cmakelists
  • The opendesktop provider file is... not google
  • Fetch the access token (actually ID token) from AccountsManager via KAccounts