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.
27 static const SecretSchema note_schema = {
28 "org.gnome.keyring.Note",
29 SECRET_SCHEMA_DONT_MATCH_NAME,
35 const SecretSchema * SECRET_SCHEMA_NOTE = ¬e_schema;
38 * SECRET_SCHEMA_COMPAT_NETWORK:
40 * A predefined schema that is compatible with items stored via the
41 * libgnome-keyring 'network password' functions. This is meant to be used by
42 * applications migrating from libgnome-keyring which stored their secrets as
43 * 'network passwords'. It is not recommended that new code use this schema.
45 * The following attributes exist in the schema:
46 * <variablelist><title>Attributes:</title>
47 * <varlistentry><term><literal>user</literal>:</term>
48 * <listitem><para>The user name (string).</para></listitem></varlistentry>
49 * <varlistentry><term><literal>domain</literal>:</term>
50 * <listitem><para>The login domain or realm (string).</para></listitem></varlistentry>
51 * <varlistentry><term><literal>object</literal>:</term>
52 * <listitem><para>The object or path (string).</para></listitem></varlistentry>
53 * <varlistentry><term><literal>protocol</literal>:</term>
54 * <listitem><para>The protocol (a string like 'http').</para></listitem></varlistentry>
55 * <varlistentry><term><literal>port</literal>:</term>
56 * <listitem><para>The network port (integer).</para></listitem></varlistentry>
57 * <varlistentry><term><literal>server</literal>:</term>
58 * <listitem><para>The hostname or server (string).</para></listitem></varlistentry>
59 * <varlistentry><term><literal>authtype</literal>:</term>
60 * <listitem><para>The authentication type (string).</para></listitem></varlistentry>
64 static const SecretSchema network_schema = {
65 "org.gnome.keyring.NetworkPassword",
66 SECRET_SCHEMA_DONT_MATCH_NAME,
68 { "user", SECRET_SCHEMA_ATTRIBUTE_STRING },
69 { "domain", SECRET_SCHEMA_ATTRIBUTE_STRING },
70 { "object", SECRET_SCHEMA_ATTRIBUTE_STRING },
71 { "protocol", SECRET_SCHEMA_ATTRIBUTE_STRING },
72 { "port", SECRET_SCHEMA_ATTRIBUTE_INTEGER },
73 { "server", SECRET_SCHEMA_ATTRIBUTE_STRING },
74 { "authtype", SECRET_SCHEMA_ATTRIBUTE_STRING },
79 const SecretSchema * SECRET_SCHEMA_COMPAT_NETWORK = &network_schema;