aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2018-09-11 11:46:32 +0200
committerMichael Albinus2018-09-11 11:46:32 +0200
commit94297848332f01a18b5a6a7d29f46d03dcd881ec (patch)
tree2b539b29e77ef2f88ec931d48b05d22c28b34a5b
parentef93983344e748124ac9bc218700cee14a0df947 (diff)
downloademacs-94297848332f01a18b5a6a7d29f46d03dcd881ec.tar.gz
emacs-94297848332f01a18b5a6a7d29f46d03dcd881ec.zip
Precise Secret Service API in auth.texi (Bug#29575)
* doc/misc/auth.texi (Secret Service API): Item labels are not unique. Document this. (Bug#29575)
-rw-r--r--doc/misc/auth.texi39
1 files changed, 26 insertions, 13 deletions
diff --git a/doc/misc/auth.texi b/doc/misc/auth.texi
index 9cf16d8ed4f..fcbc83ead5b 100644
--- a/doc/misc/auth.texi
+++ b/doc/misc/auth.texi
@@ -348,25 +348,36 @@ Returns all the item labels of @var{collection} as a list.
348 348
349@defun secrets-create-item collection item password &rest attributes 349@defun secrets-create-item collection item password &rest attributes
350This function creates a new item in @var{collection} with label 350This function creates a new item in @var{collection} with label
351@var{item} and password @var{password}. @var{attributes} are 351@var{item} and password @var{password}. The label @var{item} does not
352key-value pairs set for the created item. The keys are keyword 352have to be unique in @var{collection}. @var{attributes} are key-value
353symbols, starting with a colon. Example: 353pairs set for the created item. The keys are keyword symbols,
354starting with a colon. Example:
354 355
355@example 356@example
356;;; The session "session", the label is "my item" 357;;; The session is "session", the label is "my item"
357;;; and the secret (password) is "geheim" 358;;; and the secret (password) is "geheim".
358(secrets-create-item "session" "my item" "geheim" 359(secrets-create-item "session" "my item" "geheim"
359 :method "sudo" :user "joe" :host "remote-host") 360 :method "sudo" :user "joe" :host "remote-host")
360@end example 361@end example
362
363The key @code{:xdg:schema} determines the scope of the item to be
364generated, i.e.@: for which applications the item is intended for.
365This is just a string like "org.freedesktop.NetworkManager.Mobile" or
366"org.gnome.OnlineAccounts", the other required keys are determined by
367this. If no @code{:xdg:schema} is given,
368"org.freedesktop.Secret.Generic" is used by default.
361@end defun 369@end defun
362 370
363@defun secrets-get-secret collection item 371@defun secrets-get-secret collection item
364Return the secret of item labeled @var{item} in @var{collection}. 372Return the secret of item labeled @var{item} in @var{collection}. If
365If there is no such item, return @code{nil}. 373there are several items labeled @var{item}, it is undefined which one
374is returned. If there is no such item, return @code{nil}.
366@end defun 375@end defun
367 376
368@defun secrets-delete-item collection item 377@defun secrets-delete-item collection item
369This function deletes item @var{item} in @var{collection}. 378This function deletes item @var{item} in @var{collection}. If there
379are several items labeled @var{item}, it is undefined which one is
380deleted.
370@end defun 381@end defun
371 382
372The lookup attributes, which are specified during creation of a 383The lookup attributes, which are specified during creation of a
@@ -376,18 +387,20 @@ from a given secret item and they can be used for searching of items.
376 387
377@defun secrets-get-attribute collection item attribute 388@defun secrets-get-attribute collection item attribute
378Returns the value of key @var{attribute} of item labeled @var{item} in 389Returns the value of key @var{attribute} of item labeled @var{item} in
379@var{collection}. If there is no such item, or the item doesn't own 390@var{collection}. If there are several items labeled @var{item}, it
380this key, the function returns @code{nil}. 391is undefined which one is returned. If there is no such item, or the
392item doesn't own this key, the function returns @code{nil}.
381@end defun 393@end defun
382 394
383@defun secrets-get-attributes collection item 395@defun secrets-get-attributes collection item
384Return the lookup attributes of item labeled @var{item} in 396Return the lookup attributes of item labeled @var{item} in
385@var{collection}. If there is no such item, or the item has no 397@var{collection}. If there are several items labeled @var{item}, it
386attributes, it returns @code{nil}. Example: 398is undefined which one is returned. If there is no such item, or the
399item has no attributes, it returns @code{nil}. Example:
387 400
388@example 401@example
389(secrets-get-attributes "session" "my item") 402(secrets-get-attributes "session" "my item")
390 @result{} ((:user . "joe") (:host ."remote-host")) 403 @result{} ((:user . "joe") (:host . "remote-host"))
391@end example 404@end example
392@end defun 405@end defun
393 406