Page tree
Skip to end of metadata
Go to start of metadata

getCertificate

Funcion

Prompts the user to select a certificate from the list of available certificates. Connection to a browser plugin/extension that allows certificate data to be read from the user's smart card.

Promise window.eparakstshwcrypto.getCertificate(object options)

Parameters

PropertyTypeMandatoryDescription
options

objectnoConditions for certificate selection.

lang
stringno

Preferred user interface language (ISO-639-1 code).

Supported languages:

  • en - English (default value);
  • lv - Latvian;
  • ru - Russian.

    The user interface language is not fully affected because
    the language used can be determined by the operating system or browser.


operation
stringno

type of operation:

  • sign - document signing (signing certificate will be returned) (default value);
  • auth - user authentication (authentication certificate will be returned)

Result

Returns the Promise object that corresponds to the Certificate data type.

Errors

Expected errors:

  • no_implementation;
  • no_certificates;
  • user_cancel
  • technical_error.

See section JavaScript API  Error Handling.

  • No labels