signature
session
There are two main modes of signature
session and Relying Party must choose carefully between them. They look like the ones used in case of the authentication
session, but there are important differences.
-
Signature by document number. This is the main and common usage scenario. Document number can be obtained from result of
certificatechoice
session or previousauthentication
session result. Signatures utilizing any of the *AdES signature schemes that include the certificate as part of signature must use this method. Otherwise, the signature may be given by the person specified, but not using the key pair corresponding to the certificate chosen by Relying Party. -
Signature by person’s identifier. This method should only be used if it is acceptable that the end user gives the signature using any of the Smart-ID devices in their possession.
signature
session creation requests accept QSCD (Qualified Signature Creation Device) 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.
The signature protocol RAW_DIGEST_SIGNATURE
must be used for signing.
Dynamic link based signature
session
Method | URL |
---|---|
|
|
|
|
This method is the main entry point to signature logic for the dynamic link based flows.
Error conditions
-
HTTP error code
403
- Relying Party has no permission to issue the request. This may happen when:-
Relying Party has no permission to invoke operations on accounts with
ADVANCED
certificates. -
Relying Party has no permission to use requested capability.
-
-
HTTP error code
404
- object described in URL was not found, essentially meaning that the user does not have an account in Smart-ID system.
Request parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
|
string |
+ |
UUID of Relying Party. |
|
string |
+ |
RP friendly name, one of those configured for particular RP. Limited to 32 bytes in UTF-8 encoding. |
|
string |
Level of certificate requested. |
|
|
string |
+ |
Signature protocol. Describes the
|
|
object |
+ |
An object describing the parameters for the signature algorithm. Its structure depends on the |
|
array of objects |
+ |
See section available interactions. |
|
string |
Random string, up to 30 characters. If present, must have at least 1 character. |
|
|
object |
A request properties object. Currently, only one property is supported:
|
|
|
array |
Used only when agreed with Smart-ID provider. When omitted request capabilities are derived from |
signature
request example{
"relyingPartyUUID": "1f1bfa89-4f8b-420a-a98e-fb3a161a30bc",
"relyingPartyName": "DEMO",
"certificateLevel": "QUALIFIED",
"signatureProtocol": "RAW_DIGEST_SIGNATURE",
"signatureProtocolParameters": {
"digest": "ZHNmYmhkZmdoZGcgZmRmMTM0NTM...",
"signatureAlgorithm": "sha512WithRSAEncryption"
},
"nonce": "d8XkbEnA0WsE0PvBZZoxGnPI4ml9qk",
"allowedInteractionsOrder": [
{
"type": "confirmationMessage",
"displayText200": "Longer description of the transaction context"
},
{
"type": "displayTextAndPIN",
"displayText60": "Short description of the transaction context"
}
],
"requestProperties": {
"shareMdClientIpAddress": false
}
}
Response structure
Parameter | Type | Mandatory | Description |
---|---|---|---|
|
string |
+ |
A string that can be used to request the operation result. |
|
string |
+ |
Unique random value that will be used to connect this signature attempt between the relevant parties (RP, RP-API, mobile app). |
|
string |
+ |
Base64-encoded random key value that should be kept in secret and should be shared only between the RP backend and RP-API server. |
signature
session creation response{
"sessionID": "de305d54-75b4-431b-adb2-eb6b9e546014",
"sessionToken": "hyBdQYUeQtvXEPqWC7K8a97L",
"sessionSecret": "dztL7Ur49D/YYgUzYl4sMg=="
}
Notification based signature
session
Method | URL |
---|---|
|
|
|
|
This method is the main entry point to signature logic for the notification based flows.
In order to improve security and prevent phishing attacks, it is recommended to only allow notification based flows on devices and browsers that have successfully completed a dynamic link based flow. Setting up a unique device identifier is left to the RP to implement. |
Error conditions
-
HTTP error code
403
- Relying Party has no permission to issue the request. This may happen when:-
Relying Party has no permission to invoke operations on accounts with
ADVANCED
certificates. -
Relying Party has no permission to use requested capability.
-
-
HTTP error code
404
- object described in URL was not found, essentially meaning that the user does not have an account in Smart-ID system.
Request parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
|
string |
+ |
UUID of Relying Party. |
|
string |
+ |
RP friendly name, one of those configured for particular RP. Limited to 32 bytes in UTF-8 encoding. |
|
string |
Level of certificate requested. |
|
|
string |
+ |
Signature protocol. Describes the
|
|
object |
+ |
An object describing the parameters for the signature algorithm. Its structure depends on the |
|
string |
Random string, up to 30 characters. If present, must have at least 1 character. |
|
|
object |
+ |
See section available interactions. |
|
object |
A request properties object. Currently, only one property is supported:
|
|
|
array |
Used only when agreed with Smart-ID provider. When omitted request capabilities are derived from |
signature
request example{
"relyingPartyUUID": "1f1bfa89-4f8b-420a-a98e-fb3a161a30bc",
"relyingPartyName": "DEMO",
"certificateLevel": "QUALIFIED",
"signatureProtocol": "RAW_DIGEST_SIGNATURE",
"signatureProtocolParameters": {
"digest": "ZHNmYmhkZmdoZGcgZmRmMTM0NTM...",
"signatureAlgorithm": "sha512WithRSAEncryption"
},
"nonce": "d8XkbEnA0WsE0PvBZZoxGnPI4ml9qk",
"allowedInteractionsOrder": [
{
"type": "confirmationMessage",
"displayText200": "Longer description of the transaction context"
},
{
"type": "displayTextAndPIN",
"displayText60": "Short description of the transaction context"
}
],
"requestProperties": {
"shareMdClientIpAddress": false
}
}
Response structure
Parameter | Type | Mandatory | Description |
---|---|---|---|
|
string |
+ |
A string that can be used to request the operation result. |
|
string |
+ |
Object describing the VC code to be displayed by RP. See section VC codes. |
|
string |
+ |
Type of the VC code. Currently, the only allowed type is |
|
string |
+ |
Value of the VC code. |
signature
session creation response{
"sessionID": "ce305d54-45b4-a31b-2db2-fb6b9e546015",
"vc": {
"type": "alphaNumeric4",
"value": "4927"
}
}