Credentials QML Type | OnlineAccounts QML API
Description: Holds the account's credentials

- SSO.OnlineAccounts
- Credentials

# Credentials QML Type

Holds the account's credentials. More...

Import Statement: | `import SSO.OnlineAccounts 0.1`

- List of all members, including inherited members

## Properties

- acl : list<string>
- caption : string
- credentialsId : quint32
- methods : jsobject
- secret : string
- storeSecret : bool
- userName : string

## Signals

- removed()
- synced()

## Methods

- void remove()
- void sync()

## 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.

Note: The corresponding handler is `onRemoved`.

synced()

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

Note: The corresponding handler is `onSynced`.

## 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.