diff options
| author | Michael Albinus | 2018-09-11 11:46:32 +0200 |
|---|---|---|
| committer | Michael Albinus | 2018-09-11 11:46:32 +0200 |
| commit | 94297848332f01a18b5a6a7d29f46d03dcd881ec (patch) | |
| tree | 2b539b29e77ef2f88ec931d48b05d22c28b34a5b | |
| parent | ef93983344e748124ac9bc218700cee14a0df947 (diff) | |
| download | emacs-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.texi | 39 |
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 |
| 350 | This function creates a new item in @var{collection} with label | 350 | This 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 |
| 352 | key-value pairs set for the created item. The keys are keyword | 352 | have to be unique in @var{collection}. @var{attributes} are key-value |
| 353 | symbols, starting with a colon. Example: | 353 | pairs set for the created item. The keys are keyword symbols, |
| 354 | starting 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 | |||
| 363 | The key @code{:xdg:schema} determines the scope of the item to be | ||
| 364 | generated, i.e.@: for which applications the item is intended for. | ||
| 365 | This is just a string like "org.freedesktop.NetworkManager.Mobile" or | ||
| 366 | "org.gnome.OnlineAccounts", the other required keys are determined by | ||
| 367 | this. 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 |
| 364 | Return the secret of item labeled @var{item} in @var{collection}. | 372 | Return the secret of item labeled @var{item} in @var{collection}. If |
| 365 | If there is no such item, return @code{nil}. | 373 | there are several items labeled @var{item}, it is undefined which one |
| 374 | is 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 |
| 369 | This function deletes item @var{item} in @var{collection}. | 378 | This function deletes item @var{item} in @var{collection}. If there |
| 379 | are several items labeled @var{item}, it is undefined which one is | ||
| 380 | deleted. | ||
| 370 | @end defun | 381 | @end defun |
| 371 | 382 | ||
| 372 | The lookup attributes, which are specified during creation of a | 383 | The 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 |
| 378 | Returns the value of key @var{attribute} of item labeled @var{item} in | 389 | Returns 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 |
| 380 | this key, the function returns @code{nil}. | 391 | is undefined which one is returned. If there is no such item, or the |
| 392 | item 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 |
| 384 | Return the lookup attributes of item labeled @var{item} in | 396 | Return 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 |
| 386 | attributes, it returns @code{nil}. Example: | 398 | is undefined which one is returned. If there is no such item, or the |
| 399 | item 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 | ||