Working with schemas

libsecret is far more focused on schemas, and encourages users to define a SecretSchema for their password storage. The schema defines which attributes are allowed an item. Each schema has a name which is usually a dotted string (eg: org.gnome.MyProject.Password). This name is stored in the item attributes. The schema name is also used when looking up an item, to make sure that the stored schema matches that used during the lookup. If you wish to lookup items that were stored by libgnome-keyring, you should specify the SECRET_SCHEMA_DONT_MATCH_NAME flag in the schema so that the schema name is not matched, since it was not stored by libgnome-keyring.

Schemas define whether an attribute should look like an integer, a boolean, or a free-form string. These types are used when validating the attribute values stored, even though the attribute values are stored and matched as strings.

Replacements for related libgnome-keyring functions and types are described below:

Table 2.