Crate smart_id_rust_client

Source
Expand description

Smart ID Client Library

Provides a REST models for service consumers of Smart ID.

Maintained by Trust1Team partner of SK ID for Smart ID

Re-exports§

pub use utils::verification::generate_verification_number;
pub use utils::verification::sha_digest;

Modules§

client
common
Common models are exposed
config
utils

Structs§

SessionCertificate
SessionResult
SessionSignature
SessionStatus

Functions§

authenticate_by_document_number
Send the authentication request and get the response This method uses automatic session status polling internally An interaction flow is necessary and required (at least one)
authenticate_by_semantic_identifier
get_certificate_by_document_number
Initiates certificate choice between multiple signing certificates the user may hold on his/her different mobile devices. In practice the user confirms which device (and therefore signing certificate) he will use for the upcoming signing operation. Having a correct certificate is needed for giving signatures under *AdES schemes. The method can be ignored if the signature scheme does not mandate presence of certificate in the document structure that is to be signed. This method initiates a certificate (device) choice dialogue on end user’s devices, so it may not be called without explicit need (i.e. it may be called only as the first step in the signing process). The method accepts QSCD as a certificate level parameter. This is a shortcut marking a certificate of QUALIFIED level which is also QSCD-capable. ADVANCED certificates cannot be QSCD-capable.
get_certificate_by_semantic_identifier
Initiates certificate choice between multiple signing certificates the user may hold on his/her different mobile devices. In practice the user confirms which device (and therefore signing certificate) he will use for the upcoming signing operation. Having a correct certificate is needed for giving signatures under *AdES schemes. The method can be ignored if the signature scheme does not mandate presence of certificate in the document structure that is to be signed. This method initiates a certificate (device) choice dialogue on end user’s devices, so it may not be called without explicit need (i.e. it may be called only as the first step in the signing process). The method accepts QSCD as a certificate level parameter. This is a shortcut marking a certificate of QUALIFIED level which is also QSCD-capable. ADVANCED certificates cannot be QSCD-capable.
get_config_from_env
Get configuration based on the environment variables (default config override) Function will panic when the environment variables are not set
get_session_status
Get Session status based on a session id. This is done automatically by the library, the function is exposed for manual polling
sign_by_document_number
This method is the main entry point to signature logic. It accepts QSCD as a certificate level parameter. This is a shortcut marking a certificate of QUALIFIED level which is also QSCD-capable. ADVANCED certificates cannot be QSCD- capable. There are two main modes of signature operation and Relying Party must choose carefully between them. They look like the ones used in case of authentication, but there are important differences.
sign_by_semantic_identifier
This method is the main entry point to signature logic. It accepts QSCD as a certificate level parameter. This is a shortcut marking a certificate of QUALIFIED level which is also QSCD-capable. ADVANCED certificates cannot be QSCD- capable. There are two main modes of signature operation and Relying Party must choose carefully between them. They look like the ones used in case of authentication, but there are important differences.