Top Inners Methods
org.freedesktop.secret.interfaces

public Interface Service

extends DBusInterface
Known Direct Implementers
org.freedesktop.secret.Service
Annotations
@DBusInterfaceName:org.freedesktop.Secret.Service
Imports
org.freedesktop.dbus.DBusPath, .ObjectPath, org.freedesktop.dbus.annotations.DBusInterfaceName, org.freedesktop.dbus.exceptions.DBusException, org.freedesktop.dbus.interfaces.DBusInterface, org.freedesktop.dbus.messages.DBusSignal, org.freedesktop.dbus.types.Variant, org.freedesktop.secret.Pair, .Secret, .Static, java.util.List, .Map

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
public static class

Method Summary

Modifier and TypeMethod and Description
public ObjectPath
changeLock(ObjectPath
Path of the collection.
collection
)
References Deprecated ObjectPath is deprecated or references (maybe indirectly) at least one deprecated element.

Toggle the lock for a collection with a prompt.

public Pair<A, B>

Returns:

Pair<collection, prompt>

collection — The new collection object, or '/' if prompting is necessary.

prompt — A prompt object if prompting is necessary, or '/' if no prompt was needed.
createCollection
(Map<String, Variant<T>>
Properties for the new collection. This allows setting the new collection's properties upon its creation. All READWRITE properties are usable. Specify the property names in full interface.Property form.

Example for properties:

properties = { "org.freedesktop.Secret.Collection.Label": "MyCollection" }

properties
,
String
If creating this connection for a well known alias then a string like "default". If an collection with this well-known alias already exists, then that collection will be returned instead of creating a new collection. Any readwrite properties provided to this function will be set on the collection.

Set this to an empty string if the new collection should not be associated with a well known alias.
alias
)

Create a new collection with the specified properties.

public Pair<A, B>

Returns:

Pair<collection, prompt>

collection — The new collection object, or '/' if prompting is necessary.

prompt — A prompt object if prompting is necessary, or '/' if no prompt was needed.
createCollection
(Map<String, Variant<T>>
Properties for the new collection. This allows setting the new collection's properties upon its creation. All READWRITE properties are usable. Specify the property names in full interface.Property form.

Example for properties:

properties = { "org.freedesktop.Secret.Collection.Label": "MyCollection" }

properties
)

Create a new collection with the specified properties.

public List<ObjectPath>

Returns:

A list of present collections.
getCollections
()

public Map<ObjectPath, Secret>

Returns:

secrets — Secrets for the items.
getSecrets
(List<ObjectPath>
Items to get secrets for.
items
,
ObjectPath
The session to use to encode the secrets.
session
)
References Deprecated ObjectPath is deprecated or references (maybe indirectly) at least one deprecated element.

Retrieve multiple secrets from different items.

public Pair<List<ObjectPath>, ObjectPath>

Returns:

Pair<locked, prompt>

locked — Objects that were locked without a prompt.

prompt — A prompt to lock the objects, or the special value '/' when no prompt is necessary.
lock
(List<ObjectPath>
Objects to lock.
objects
)

Lock the items.

public void
lockService()

Lock the entire Secret Service API.

public Pair<Variant<byte[]>, ObjectPath>

Returns:

Pair<output, result>

output — Output of the session algorithm negotiation.

result — The object path of the session, if session was created.
openSession
(String
The algorithm the caller wishes to use.
algorithm
,
Variant<T>
Input arguments for the algorithm.
input
)

Open a unique session for the caller application.

public ObjectPath

Returns:

collection — The collection or the the path '/' if no such collection exists.
readAlias
(String
An alias, such as 'default'.
name
)
References Deprecated ObjectPath is deprecated or references (maybe indirectly) at least one deprecated element.

Get the collection with the given alias.

public Pair<List<ObjectPath>, List<ObjectPath>>

Returns:

Pair<unlocked, locked>

unlocked — Items found.

locked — Items found that require authentication.
searchItems
(Map<String, String>
Find secrets in any collection.

Example: { "Attribute1": "Value1", "Attribute2": "Value2" }

Note

Please note that there is a distinction between the terms Property, which refers to D-Bus properties of an object, and Attribute, which refers to one of a secret item's string-valued attributes.

attributes
)

Find items in any collection.

public void
setAlias(String
An alias, such as 'default'.
name
,
ObjectPath
The collection to make the alias point to. To remove an alias use the special value '/'.
collection
)
References Deprecated ObjectPath is deprecated or references (maybe indirectly) at least one deprecated element.

Setup a collection alias.

public Pair<List<ObjectPath>, ObjectPath>

Returns:

Pair<unlocked, prompt>

unlocked — Objects that were unlocked without a prompt.

prompt — A prompt object which can be used to unlock the remaining objects, or the special value '/' when no prompt is necessary.
unlock
(List<ObjectPath>
Objects to unlock.
objects
)

Unlock the specified objects.

Inherited from org.freedesktop.dbus.interfaces.DBusInterface:
getObjectPathisRemote

Method Detail

changeLockback to summary
public ObjectPath changeLock(ObjectPath collection)

References Deprecated

ObjectPath is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Toggle the lock for a collection with a prompt.

Parameters
collection:ObjectPath

Path of the collection.

Returns:ObjectPath

Path of the collection
See Also:
org.gnome.keyring.InternalUnsupportedGuiltRiddenInterface#changeWithPrompt(DBusPath collection)

createCollectionback to summary
public Pair<A, B> createCollection(Map<String, Variant<T>> properties, String alias)

Create a new collection with the specified properties.

Parameters
properties:Map<String, Variant<T>>

Properties for the new collection. This allows setting the new collection's properties upon its creation. All READWRITE properties are usable. Specify the property names in full interface.Property form.

Example for properties:

properties = { "org.freedesktop.Secret.Collection.Label": "MyCollection" }

alias:String

If creating this connection for a well known alias then a string like "default". If an collection with this well-known alias already exists, then that collection will be returned instead of creating a new collection. Any readwrite properties provided to this function will be set on the collection.

Set this to an empty string if the new collection should not be associated with a well known alias.

Returns:Pair<A, B>

Pair<collection, prompt>

collection — The new collection object, or '/' if prompting is necessary.

prompt — A prompt object if prompting is necessary, or '/' if no prompt was needed.

See Also
Pair, Variant, ObjectPath
createCollectionback to summary
public Pair<A, B> createCollection(Map<String, Variant<T>> properties)

Create a new collection with the specified properties.

Parameters
properties:Map<String, Variant<T>>

Properties for the new collection. This allows setting the new collection's properties upon its creation. All READWRITE properties are usable. Specify the property names in full interface.Property form.

Example for properties:

properties = { "org.freedesktop.Secret.Collection.Label": "MyCollection" }

Returns:Pair<A, B>

Pair<collection, prompt>

collection — The new collection object, or '/' if prompting is necessary.

prompt — A prompt object if prompting is necessary, or '/' if no prompt was needed.

See Also
Pair, Variant, ObjectPath
getCollectionsback to summary
public List<ObjectPath> getCollections()
Returns:List<ObjectPath>

A list of present collections.

getSecretsback to summary
public Map<ObjectPath, Secret> getSecrets(List<ObjectPath> items, ObjectPath session)

References Deprecated

ObjectPath is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Retrieve multiple secrets from different items.

Parameters
items:List<ObjectPath>

Items to get secrets for.

session:ObjectPath

The session to use to encode the secrets.

Returns:Map<ObjectPath, Secret>

secrets — Secrets for the items.

See Also
Secret, ObjectPath
lockback to summary
public Pair<List<ObjectPath>, ObjectPath> lock(List<ObjectPath> objects)

Lock the items.

Parameters
objects:List<ObjectPath>

Objects to lock.

Returns:Pair<List<ObjectPath>, ObjectPath>

Pair<locked, prompt>

locked — Objects that were locked without a prompt.

prompt — A prompt to lock the objects, or the special value '/' when no prompt is necessary.

See Also
Pair
lockServiceback to summary
public void lockService()

Lock the entire Secret Service API.
See Also:
lock(List objects)
unlock(List objects)
org.gnome.keyring.InternalUnsupportedGuiltRiddenInterface#unlockWithMasterPassword(DBusPath collection, Secret master)

openSessionback to summary
public Pair<Variant<byte[]>, ObjectPath> openSession(String algorithm, Variant<T> input)

Open a unique session for the caller application.

Parameters
algorithm:String

The algorithm the caller wishes to use.

input:Variant<T>

Input arguments for the algorithm.

Returns:Pair<Variant<byte[]>, ObjectPath>

Pair<output, result>

output — Output of the session algorithm negotiation.

result — The object path of the session, if session was created.

See Also
Pair, Variant, ObjectPath
readAliasback to summary
public ObjectPath readAlias(String name)

References Deprecated

ObjectPath is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Get the collection with the given alias.

Parameters
name:String

An alias, such as 'default'.

Returns:ObjectPath

collection — The collection or the the path '/' if no such collection exists.

See Also
Static.ObjectPaths, ObjectPath, Collection
searchItemsback to summary
public Pair<List<ObjectPath>, List<ObjectPath>> searchItems(Map<String, String> attributes)

Find items in any collection.

Parameters
attributes:Map<String, String>

Find secrets in any collection.

Example: { "Attribute1": "Value1", "Attribute2": "Value2" }

Note

Please note that there is a distinction between the terms Property, which refers to D-Bus properties of an object, and Attribute, which refers to one of a secret item's string-valued attributes.

Returns:Pair<List<ObjectPath>, List<ObjectPath>>

Pair<unlocked, locked>

unlocked — Items found.

locked — Items found that require authentication.

See Also
Pair, ObjectPath
setAliasback to summary
public void setAlias(String name, ObjectPath collection)

References Deprecated

ObjectPath is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Setup a collection alias.

Parameters
name:String

An alias, such as 'default'.

collection:ObjectPath

The collection to make the alias point to. To remove an alias use the special value '/'.

See Also
ObjectPath, Collection
unlockback to summary
public Pair<List<ObjectPath>, ObjectPath> unlock(List<ObjectPath> objects)

Unlock the specified objects.

Parameters
objects:List<ObjectPath>

Objects to unlock.

Returns:Pair<List<ObjectPath>, ObjectPath>

Pair<unlocked, prompt>

unlocked — Objects that were unlocked without a prompt.

prompt — A prompt object which can be used to unlock the remaining objects, or the special value '/' when no prompt is necessary.

See Also
Pair, ObjectPath
org.freedesktop.secret.interfaces back to summary

public Class Service.CollectionChanged

extends DBusSignal
Class Inheritance

Field Summary

Modifier and TypeField and Description
public final DBusPath

Constructor Summary

AccessConstructor and Description
public
CollectionChanged(String
The path to the object this is emitted from.
path
,
DBusPath
Collection that was changed.
collection
)

A collection was changed.

Method Summary

Inherited from org.freedesktop.dbus.messages.DBusSignal:
appendbodycreateReal

Field Detail

collectionback to summary
public final DBusPath collection

Constructor Detail

CollectionChangedback to summary
public CollectionChanged(String path, DBusPath collection) throws DBusException

A collection was changed.

Parameters
path:String

The path to the object this is emitted from.

collection:DBusPath

Collection that was changed.

Exceptions
DBusException:
Could not communicate properly with the D-Bus.
org.freedesktop.secret.interfaces back to summary

public Class Service.CollectionCreated

extends DBusSignal
Class Inheritance

Field Summary

Modifier and TypeField and Description
public final DBusPath

Constructor Summary

AccessConstructor and Description
public
CollectionCreated(String
The path to the object this is emitted from.
path
,
DBusPath
Collection that was created.
collection
)

A collection was created.

Method Summary

Inherited from org.freedesktop.dbus.messages.DBusSignal:
appendbodycreateReal

Field Detail

collectionback to summary
public final DBusPath collection

Constructor Detail

CollectionCreatedback to summary
public CollectionCreated(String path, DBusPath collection) throws DBusException

A collection was created.

Parameters
path:String

The path to the object this is emitted from.

collection:DBusPath

Collection that was created.

Exceptions
DBusException:
Could not communicate properly with the D-Bus.
org.freedesktop.secret.interfaces back to summary

public Class Service.CollectionDeleted

extends DBusSignal
Class Inheritance

Field Summary

Modifier and TypeField and Description
public final DBusPath

Constructor Summary

AccessConstructor and Description
public
CollectionDeleted(String
The path to the object this is emitted from.
path
,
DBusPath
Collection that was deleted.
collection
)

A collection was deleted.

Method Summary

Inherited from org.freedesktop.dbus.messages.DBusSignal:
appendbodycreateReal

Field Detail

collectionback to summary
public final DBusPath collection

Constructor Detail

CollectionDeletedback to summary
public CollectionDeleted(String path, DBusPath collection) throws DBusException

A collection was deleted.

Parameters
path:String

The path to the object this is emitted from.

collection:DBusPath

Collection that was deleted.

Exceptions
DBusException:
Could not communicate properly with the D-Bus.