1 /* libsecret - GLib wrapper for Secret Service
3 * Copyright 2012 Stef Walter
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published
7 * by the Free Software Foundation; either version 2.1 of the licence or (at
8 * your option) any later version.
10 * See the included COPYING file for more information.
12 * Author: Stef Walter <stefw@gnome.org>
17 #include "secret-schema.h"
22 * A predefined schema for personal passwords stored by the user in the
23 * password manager. This schema has no attributes, and the items are not
24 * meant to be used automatically by applications.
26 * When used to search for items using this schema, it will only match
27 * items that have the same schema. Items stored via libgnome-keyring with the
28 * <literal>GNOME_KEYRING_ITEM_NOTE</literal> item type will match.
31 static const SecretSchema note_schema = {
32 "org.gnome.keyring.Note",
39 const SecretSchema * SECRET_SCHEMA_NOTE = ¬e_schema;
42 * SECRET_SCHEMA_COMPAT_NETWORK:
44 * A predefined schema that is compatible with items stored via the
45 * libgnome-keyring 'network password' functions. This is meant to be used by
46 * applications migrating from libgnome-keyring which stored their secrets as
47 * 'network passwords'. It is not recommended that new code use this schema.
49 * When used to search for items using this schema, it will only match
50 * items that have the same schema. Items stored via libgnome-keyring with the
51 * <literal>GNOME_KEYRING_ITEM_NETWORK_PASSWORD</literal> item type will match.
53 * The following attributes exist in the schema:
54 * <variablelist><title>Attributes:</title>
55 * <varlistentry><term><literal>user</literal>:</term>
56 * <listitem><para>The user name (string).</para></listitem></varlistentry>
57 * <varlistentry><term><literal>domain</literal>:</term>
58 * <listitem><para>The login domain or realm (string).</para></listitem></varlistentry>
59 * <varlistentry><term><literal>object</literal>:</term>
60 * <listitem><para>The object or path (string).</para></listitem></varlistentry>
61 * <varlistentry><term><literal>protocol</literal>:</term>
62 * <listitem><para>The protocol (a string like 'http').</para></listitem></varlistentry>
63 * <varlistentry><term><literal>port</literal>:</term>
64 * <listitem><para>The network port (integer).</para></listitem></varlistentry>
65 * <varlistentry><term><literal>server</literal>:</term>
66 * <listitem><para>The hostname or server (string).</para></listitem></varlistentry>
67 * <varlistentry><term><literal>authtype</literal>:</term>
68 * <listitem><para>The authentication type (string).</para></listitem></varlistentry>
72 static const SecretSchema network_schema = {
73 "org.gnome.keyring.NetworkPassword",
76 { "user", SECRET_SCHEMA_ATTRIBUTE_STRING },
77 { "domain", SECRET_SCHEMA_ATTRIBUTE_STRING },
78 { "object", SECRET_SCHEMA_ATTRIBUTE_STRING },
79 { "protocol", SECRET_SCHEMA_ATTRIBUTE_STRING },
80 { "port", SECRET_SCHEMA_ATTRIBUTE_INTEGER },
81 { "server", SECRET_SCHEMA_ATTRIBUTE_STRING },
82 { "authtype", SECRET_SCHEMA_ATTRIBUTE_STRING },
87 const SecretSchema * SECRET_SCHEMA_COMPAT_NETWORK = &network_schema;