certificatechoice
session
This method returns the signing certificate of the user and if needed queries the user which device they intend to use in the following signature
session.
Having a correct certificate is needed for giving signatures under *AdES
schemes. The method should not be used if the signature scheme does not mandate presence of the certificate in the document structure that is to be signed.
A Smart-ID user can have multiple active accounts and document number is the unique identifier for a specific Smart-ID account.
If an RP has previously done authentication flow for a user, the next signature request should use certificatechoice
with the obtained document number, so that the RP can immediately get user’s correct certificate without interaction from the user.
In case the certificatechoice
with the identifier
is used, e.g. in case of a signature request with no prior authentication, the RP must immediately use the notification based signature
session after receiving the certificate. This is because when the Smart-ID app receives a certificatechoice
session, it will service the request and then stay in the foreground and wait for the notification based signature
session for a seamless user experience.
A quick guide to choosing which
|
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.
certificatechoice
session endpoints
Method | URL |
---|---|
|
|
|
|
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 |
Random string, up to 30 characters. If present, must have at least 1 character. |
|
|
array |
Used only when agreed with Smart-ID provider. When omitted request capabilities are derived from |
|
|
object |
A request properties object. Currently, only one property is supported:
|
certificatechoice
session request example{
"relyingPartyUUID": "1f1bfa89-4f8b-420a-a98e-fb3a161a30bc",
"relyingPartyName": "DEMO",
"certificateLevel": "QUALIFIED",
"nonce": "d8XkbEnA0WsE0PvBZZoxGnPI4ml9qk",
"requestProperties": {
"shareMdClientIpAddress": true
}
}
Response on successful session creation
Parameter | Type | Mandatory | Description |
---|---|---|---|
|
string |
+ |
A string that can be used to request the operation result. |
{
"sessionID": "de305d54-75b4-431b-adb2-eb6b9e546014"
}