Skip to content

Commit 0f01e79

Browse files
committed
daemon: append portal handler-specific parameters to request
1 parent 504b2b0 commit 0f01e79

3 files changed

Lines changed: 23 additions & 23 deletions

File tree

credentialsd/src/gateway/dbus.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,11 @@ impl CredentialPortalGateway {
197197
#[zbus(connection)] connection: &Connection,
198198
#[zbus(header)] header: Header<'_>,
199199
parent_window: Optional<WindowHandle>,
200-
claimed_app_id: String,
201-
claimed_app_display_name: Optional<String>,
202200
origin: String,
203201
cred_type: CredentialType,
204202
options: CreateCredentialPortalOptions,
203+
claimed_app_id: String,
204+
claimed_app_display_name: Optional<String>,
205205
) -> PortalResult<CreateCredentialResponse, Error> {
206206
let CreateCredentialPortalOptions {
207207
top_origin,
@@ -261,10 +261,10 @@ impl CredentialPortalGateway {
261261
#[zbus(connection)] connection: &Connection,
262262
#[zbus(header)] header: Header<'_>,
263263
parent_window: Optional<WindowHandle>,
264-
claimed_app_id: String,
265-
claimed_app_display_name: Optional<String>,
266264
origin: String,
267265
options: GetCredentialPortalOptions,
266+
claimed_app_id: String,
267+
claimed_app_display_name: Optional<String>,
268268
) -> PortalResult<GetCredentialResponse, Error> {
269269
let GetCredentialPortalOptions {
270270
top_origin,

doc/api.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ this API takes:
109109
```
110110
[a{sv}] {
111111
IN origin s = "https://example.com",
112-
IN type = "password"
112+
IN type = "password",
113113
options a{sv} = {
114114
top_origin: Variant("https://example.com"), // topOrigin is changed to top_origin
115115
password: Variant(true),
@@ -199,15 +199,15 @@ for what kind of credential the client would like to create.
199199
```
200200
CreateCredentialRequest(
201201
IN parent_window s,
202-
IN app_id s,
203-
IN app_display_name s,
204202
IN origin s,
205203
IN type CredentialType,
206204
IN options a{sv} {
207205
handle_token: s
208206
top_origin: s
209207
<type_specific_fields>
210-
}
208+
},
209+
IN app_id s,
210+
IN app_display_name s
211211
)
212212
```
213213

@@ -253,15 +253,15 @@ WebAuthn
253253
type.
254254

255255
CreatePublicKeyCredentialRequest: CreateCredentialRequest (
256-
IN parent_window s
257-
IN app_id s,
258-
IN app_display_name s,
259-
IN origin s
260-
IN type s = "publicKey"
256+
IN parent_window s,
257+
IN origin s,
258+
IN type s = "publicKey",
261259
options a{sv} {
262260
<other optional fields>,
263261
public_key: s // WebAuthn credential attestation JSON
264-
}
262+
},
263+
IN app_id s,
264+
IN app_display_name s
265265
)
266266

267267
### Response
@@ -319,15 +319,15 @@ credentials the client will accept.
319319

320320
```
321321
GetCredentialRequest (
322-
IN parent_window s
323-
IN app_id s,
324-
IN app_display_name s,
325-
IN origin s
322+
IN parent_window s,
323+
IN origin s,
326324
IN options a{sv} {
327325
top_origin: s
328326
<type_specific_fields>
329327
public_key: s
330-
}
328+
},
329+
IN app_id s,
330+
IN app_display_name s
331331
)
332332
```
333333

doc/xyz.iinuwa.credentialsd.Credentials.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@
2323
<interface name="org.freedesktop.handler.portal.experimental.Credential">
2424
<method name="CreateCredential">
2525
<arg name="parent_window" type="s" direction="in"/>
26-
<arg name="claimed_app_id" type="s" direction="in"/>
27-
<arg name="claimed_app_display_name" type="s" direction="in"/>
2826
<arg name="origin" type="a{sv}" direction="in"/>
2927
<arg name="type" type="a{sv}" direction="in"/>
3028
<arg name="options" type="a{sv}" direction="in"/>
29+
<arg name="claimed_app_id" type="s" direction="in"/>
30+
<arg name="claimed_app_display_name" type="s" direction="in"/>
3131
<arg name="response" type="u" direction="out"/>
3232
<arg name="results" type="a{sv}" direction="out"/>
3333
</method>
3434
<method name="GetCredential">
3535
<arg name="parent_window" type="s" direction="in"/>
36-
<arg name="claimed_app_id" type="s" direction="in"/>
37-
<arg name="claimed_app_display_name" type="s" direction="in"/>
3836
<arg name="origin" type="a{sv}" direction="in"/>
3937
<arg name="options" type="a{sv}" direction="in"/>
38+
<arg name="claimed_app_id" type="s" direction="in"/>
39+
<arg name="claimed_app_display_name" type="s" direction="in"/>
4040
<arg name="response" type="u" direction="out"/>
4141
<arg name="results" type="a{sv}" direction="out"/>
4242
</method>

0 commit comments

Comments
 (0)