5
5
<interface name="com.ubuntu.OnlineAccounts.Manager">
8
GetAccounts: returns a list containing account information for
9
accounts that provide one of a list of service IDs.
10
Clients are identified by their "applicationId", which is the
11
"<package>_<app>" of the client.
13
The "serviceId" is an application-specific name for an account provider.
14
That is, the "serviceId" contains the information about the application
15
which will use it, and the account provider (e.g. "google", "facebook").
16
"serviceId"s are backed by files shipped with the application, which can
17
contain application/account-provider specific information, such as the
18
ClientId and ClientSecret to be used when authentication with OAuth 2.0.
19
An application can ship more than one "serviceId", if they refer to
20
different account providers; that is, one application can have a
21
serviceId for Google and one for Facebook, but the same application
22
cannot have one for GMail and another for Picasa.
26
GetAccounts: returns a list of account IDs that satisfy the given
29
Allowed keys for the "filters" parameter (any combination is allowed,
30
though not all combinations might make sense):
32
- "applicationId" ("s"): the "<package>_<app>" of the client. An
33
unconfined application can specify this in order to restrict the set
34
of results to only those accounts that the application has been
35
authorized to use. For confined apps, OA will deduce the
36
applicationId from the apparmor label of the caller.
38
- "serviceId" ("s"): if the application wants to list only those
39
accounts coming from a specific provider (e.g., "Facebook").
41
- "accountId" ("u"): the ID of an account.
43
In any case, an application will receive only those accounts which the
44
user has authorized the application to use. See
45
http://wiki.ubuntu.com/OnlineAccounts
46
for an overview of the UI experience.
48
Disabled accounts will not be returned.
11
50
<method name="GetAccounts">
12
<arg name="service_ids" type="as" direction="in" />
51
<arg name="filters" type="a{sv}" direction="in" />
53
The return value is a list of account IDs paired with a dictionary of account data.
54
This will always include:
57
Other settings stored on the account will also be included, such as the
58
server address and port of an owncloud or IMAP account, but we haven't
59
defined exactly how. Possibly, all account-specific keys will be
60
prefixed by "settings/", in order not to clash with the keys defined at
13
63
<arg name="accounts" type="a(ua{sv})" direction="out" />
64
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
14
65
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0"
15
66
value="QList<AccountInfo>"/>
19
GetAccountInfo: return information about a given account ID
21
<method name="GetAccountInfo">
22
<arg name="service_id" type="s" direction="in" />
23
<arg name="account_id" type="u" direction="in" />
24
<arg name="details" type="(ua{sv})" direction="out" />
25
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="AccountInfo"/>
29
Authenticate: request authentication credentials for the given
30
account ID in the context of a particualr service.
32
If "interactive" is false, an error will be returned if
33
user interaction would be required to retrieve the
36
If "invalidate" is true, any stored credentials will be
37
ignored and new credentials will be requested from the account
70
Authenticate: request authentication credentials for the given
71
account ID in the context of a particular service.
73
If "interactive" is false, an error will be returned if
74
user interaction would be required to retrieve the
77
If "invalidate" is true, any stored credentials will be
78
ignored and new credentials will be requested from the account
40
81
<method name="Authenticate">
41
<arg name="service_id" type="s" direction="in" />
42
<arg name="account_id" type="u" direction="in" />
82
<arg name="accountId" type="u" direction="in" />
83
<arg name="serviceId" type="s" direction="in" />
43
84
<arg name="interactive" type="b" direction="in" />
44
85
<arg name="invalidate" type="b" direction="in" />
45
<!-- <arg name="reply_socket" type="h" direction="in" /> -->
87
This dictionary can be used to specify OAuth client keys or permission
88
scopes. While it's possible to statically define them a the "serviceId"
89
level, some apps might want to change this information at runtime.
91
1) OAuth keys are retrieved from a server (so that they can be updated
92
when the old ones are revoked).
93
2) An app might want to use different keys when talking to GMail and
95
3) The scope list can also be dynamic, and depending on how the user is
97
4) SASL: the parameters would contain the latest challenge got from the
100
<arg name="parameters" type="a{sv}" direction="in" />
46
101
<arg name="credentials" type="a{sv}" direction="out" />
102
<annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
47
103
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
51
Register: register a new account for use with the given
107
RequestAccess: register a new account for use with the given
109
This method also performs the authentication, since that's what apps
110
would do as soon as they get the account.
54
<method name="Register">
55
<arg name="service_id" type="s" direction="in" />
56
<!-- <arg name="reply_socket" type="h" direction="in" /> -->
112
<method name="RequestAccess">
113
<arg name="serviceId" type="s" direction="in" />
114
<arg name="parameters" type="a{sv}" direction="in" />
57
115
<arg name="account" type="(ua{sv})" direction="out" />
116
<arg name="credentials" type="a{sv}" direction="out" />
117
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
58
118
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="AccountInfo"/>
59
<arg name="credentials" type="a{sv}" direction="out" />
60
119
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
64
AccountChanged: emitted when account details are changed.
66
This signal will be emitted when new accounts are enabled, and
67
when existing accounts are disabled. Clients can detect these
68
cases by checking the "enabled" flag and comparing the account
69
ID with the list of accounts they currently know about.
71
The actual changed account details can be retrieved with
123
AccountChanged: emitted when account details are changed.
125
The apparmor policy will NOT ALLOW confined applications to receive
126
this signal on the account manager object path (which might be
127
/com/ubuntu/OnlineAccounts/Manager). Only unconfined applications will
128
be able to listen to this signal from that object path.
130
Confined apps will have to catch this signal from a different object path:
131
/com/ubuntu/OnlineAccounts/Manager/@{APP_PKGNAME_DBUS}, which will
132
deliver the signal only for those accounts which the app has been
74
135
<signal name="AccountChanged">
75
<arg name="service_id" type="s" />
76
<arg name="account_id" type="u" />
77
<arg name="enabled" type="b" />
81
CredentialsChanged: emitted when the credentials for the given
82
service ID on the given account change.
84
The new credentials can be retrieved with Authenticate().
86
<signal name="CredentialsChanged">
87
<arg name="service_id" type="s" />
88
<arg name="account_id" type="u" />
137
The serviceId will also be included in the "account" dictionary. The
138
reason for having it also here is to allow clients to filter D-Bus
139
messages by arg0. This can be important for unconfined clients, which
140
would otherwise be woken up by any account change, even those not
143
<arg name="serviceId" type="s" />
145
The dictionary contains a changeType key, type "u", whose value is
146
enum { enabled, disabled, changed }
148
<arg name="account" type="(ua{sv})" />
149
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="AccountInfo"/>