Top Fields Constructors Methods
org.freedesktop.secret

public Class Service

extends Messaging
implements Service
Class Inheritance
All Implemented Interfaces
org.freedesktop.secret.interfaces.Service, org.freedesktop.dbus.interfaces.DBusInterface
Imports
org.freedesktop.dbus.ObjectPath, org.freedesktop.dbus.connections.impl.DBusConnection, org.freedesktop.dbus.messages.DBusSignal, org.freedesktop.dbus.types.Variant, org.freedesktop.secret.handlers.Messaging, java.util.ArrayList, .Arrays, .List, .Map

Field Summary

Modifier and TypeField and Description
private Session
public static final List<Class<? extends DBusSignal>>
Inherited from org.freedesktop.secret.handlers.Messaging:
connectioninterfaceNamemsgobjectPathserviceNamesh

Constructor Summary

AccessConstructor and Description
public
Service(DBusConnection connection)

Method Summary

Modifier and TypeMethod and Description
public ObjectPath
changeLock(ObjectPath
Path of the collection.
collection
)

Implements org.freedesktop.secret.interfaces.Service.changeLock.

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<ObjectPath, ObjectPath>
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
)

Implements org.freedesktop.secret.interfaces.Service.createCollection.

Create a new collection with the specified properties.

public Pair<ObjectPath, ObjectPath>
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
)

Implements org.freedesktop.secret.interfaces.Service.createCollection.

Create a new collection with the specified properties.

public List<ObjectPath>
public String
public Map<ObjectPath, Secret>
getSecrets(List<ObjectPath>
Items to get secrets for.
items
,
ObjectPath
The session to use to encode the secrets.
session
)

Implements org.freedesktop.secret.interfaces.Service.getSecrets.

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

Retrieve multiple secrets from different items.

public Session
public boolean
isRemote()

Overrides default org.freedesktop.dbus.interfaces.DBusInterface.isRemote.

Returns true on remote objects.

public Pair<List<ObjectPath>, ObjectPath>
lock(List<ObjectPath>
Objects to lock.
objects
)

Implements org.freedesktop.secret.interfaces.Service.lock.

Lock the items.

public void
lockService()

Implements org.freedesktop.secret.interfaces.Service.lockService.

Lock the entire Secret Service API.

public Pair<Variant<byte[]>, ObjectPath>
openSession(String
The algorithm the caller wishes to use.
algorithm
,
Variant<T>
Input arguments for the algorithm.
input
)

Implements org.freedesktop.secret.interfaces.Service.openSession.

Open a unique session for the caller application.

public ObjectPath
readAlias(String
An alias, such as 'default'.
name
)

Implements org.freedesktop.secret.interfaces.Service.readAlias.

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>>
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
)

Implements org.freedesktop.secret.interfaces.Service.searchItems.

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
)

Implements org.freedesktop.secret.interfaces.Service.setAlias.

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

Setup a collection alias.

public Pair<List<ObjectPath>, ObjectPath>
unlock(List<ObjectPath>
Objects to unlock.
objects
)

Implements org.freedesktop.secret.interfaces.Service.unlock.

Unlock the specified objects.

Inherited from org.freedesktop.secret.handlers.Messaging:
getAllPropertiesgetConnectiongetInterfaceNamegetMessageHandlergetPathgetPropertygetServiceNamegetSignalHandlersendsendsetProperty

Field Detail

sessionback to summary
private Session session
signalsback to summary
public static final List<Class<? extends DBusSignal>> signals

Constructor Detail

Serviceback to summary
public Service(DBusConnection connection)

Method Detail

changeLockback to summary
public ObjectPath changeLock(ObjectPath collection)

Implements org.freedesktop.secret.interfaces.Service.changeLock.

Doc from org.freedesktop.secret.interfaces.Service.changeLock.

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)

Annotations
@Override
createCollectionback to summary
public Pair<ObjectPath, ObjectPath> createCollection(Map<String, Variant<T>> properties, String alias)

Implements org.freedesktop.secret.interfaces.Service.createCollection.

Doc from org.freedesktop.secret.interfaces.Service.createCollection.

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<ObjectPath, ObjectPath>

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.

Annotations
@Override
createCollectionback to summary
public Pair<ObjectPath, ObjectPath> createCollection(Map<String, Variant<T>> properties)

Implements org.freedesktop.secret.interfaces.Service.createCollection.

Doc from org.freedesktop.secret.interfaces.Service.createCollection.

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<ObjectPath, ObjectPath>

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.

Annotations
@Override
getCollectionsback to summary
public List<ObjectPath> getCollections()

Implements org.freedesktop.secret.interfaces.Service.getCollections.

Returns:List<ObjectPath>

Doc from org.freedesktop.secret.interfaces.Service.getCollections.

A list of present collections.

Annotations
@Override
getObjectPathback to summary
public String getObjectPath()

Overrides org.freedesktop.secret.handlers.Messaging.getObjectPath.

Implements org.freedesktop.dbus.interfaces.DBusInterface.getObjectPath.

Doc from org.freedesktop.dbus.interfaces.DBusInterface.getObjectPath.

Returns the path of this object.

Returns:String

string

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

Implements org.freedesktop.secret.interfaces.Service.getSecrets.

Doc from org.freedesktop.secret.interfaces.Service.getSecrets.

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.

Annotations
@Override
getSessionback to summary
public Session getSession()
isRemoteback to summary
public boolean isRemote()

Overrides default org.freedesktop.dbus.interfaces.DBusInterface.isRemote.

Doc from org.freedesktop.dbus.interfaces.DBusInterface.isRemote.

Returns true on remote objects. Local objects implementing this interface MUST return false.

Returns:boolean

boolean

Annotations
@Override
lockback to summary
public Pair<List<ObjectPath>, ObjectPath> lock(List<ObjectPath> objects)

Implements org.freedesktop.secret.interfaces.Service.lock.

Doc from org.freedesktop.secret.interfaces.Service.lock.

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.

Annotations
@Override
lockServiceback to summary
public void lockService()

Implements org.freedesktop.secret.interfaces.Service.lockService.

Doc from org.freedesktop.secret.interfaces.Service.lockService.

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

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

Implements org.freedesktop.secret.interfaces.Service.openSession.

Doc from org.freedesktop.secret.interfaces.Service.openSession.

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.

Annotations
@Override
readAliasback to summary
public ObjectPath readAlias(String name)

Implements org.freedesktop.secret.interfaces.Service.readAlias.

Doc from org.freedesktop.secret.interfaces.Service.readAlias.

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.

Annotations
@Override
searchItemsback to summary
public Pair<List<ObjectPath>, List<ObjectPath>> searchItems(Map<String, String> attributes)

Implements org.freedesktop.secret.interfaces.Service.searchItems.

Doc from org.freedesktop.secret.interfaces.Service.searchItems.

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.

Annotations
@Override
setAliasback to summary
public void setAlias(String name, ObjectPath collection)

Implements org.freedesktop.secret.interfaces.Service.setAlias.

Doc from org.freedesktop.secret.interfaces.Service.setAlias.

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 '/'.

Annotations
@Override
unlockback to summary
public Pair<List<ObjectPath>, ObjectPath> unlock(List<ObjectPath> objects)

Implements org.freedesktop.secret.interfaces.Service.unlock.

Doc from org.freedesktop.secret.interfaces.Service.unlock.

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.

Annotations
@Override