Ubuntu.OnlineAccounts.Credentials

Holds the account's credentials More...

Import Statement: import Ubuntu.OnlineAccounts 0.1

Properties

Signals

Methods

Detailed Description

The Credentials element contains the information about an account's credentials. Informations like user name and password are stored into the account's secret storage via this object. If the credentialsId property is set to a valid credentials ID (which can be obtained via the AccountService's authData.credentialsId property) the Credentials element will load the informations stored in the secrets database, with the notable exception of the secret field, which cannot be read back via this interface (but only via the AccountService::authenticate method); if the credentialsId field is not set, then this interface can be used to create a new record in the secrets storage, by calling the sync() method once all the desired fields have been set.

Property Documentation

acl : list<string>

The ACL (Access Control List) for the credentials. The string "*" should be used when no access control needs to be performed.


caption : string

A description of the credentials. This could be set to the name of the account provider, for instance.


credentialsId : quint32

Numeric identifier of the credentials record in the secret storage database. A value of 0 means that this object has not been stored into the database yet.

See also sync.


methods : jsobject

A dictionary describing the authentication methods and mechanisms which are allowed on the credentials. The keys of the dictionary should be the authentication methods, and the values should be lists of mechanisms.

Credentials {
methods: { "oauth2": [ "web_server", "user_agent"], "password": [ "password" ] }
}

secret : string

The secret information for this credentials; usually this is the user's password. Note that when retrieving a Credentials object from the secrets database, this field will not be retrieved. See the detailed description of the Credentials element for a full explanation of this.

See also credentialsId.


storeSecret : bool

Whether the secret should be stored in the secrets storage.


userName : string

The user name.


Signal Documentation

removed()

Emitted when the credentials have been deleted from the secrets storage.


synced()

Emitted when the changes have been stored into the permanent secrets storage.


Method Documentation

void remove()

Deletes the credentials from the secrets storage.

See also removed.


void sync()

Writes the changes to the secrets storage.

See also synced.