-
Notifications
You must be signed in to change notification settings - Fork 17
Using demo environment for testing
- Configuring the client with demo environment specific parameters
SmartIdClient client = new SmartIdClient();
client.setRelyingPartyUUID("00000000-0000-0000-0000-000000000000");
client.setRelyingPartyName("DEMO");
client.setHostUrl("https://sid.demo.sk.ee/smart-id-rp/v2/");
- Configuring the
AuthenticationResponseValidator
When using demo environment, the certificates originate from test certificate chain. The AuthenticationResponseValidator
verifies if the certificate in the authentication response is issued by one of the configured trusted CA certificates. By default AuthenticationResponseValidator
is configured with live CA certificates, so when using demo environment it should be configured with test CA certificates in order for the authentication validation to succeed.
Currently all Smart-ID test certificates are issued by TEST SK ID Solutions EID-NQ 2021E and TEST SK ID Solutions EID-Q 2024E CA certificates. These certificates should be added to AuthenticationResponseValidator
.
They are obtainable from here.
Example of adding a test CA certificate to AuthenticationResponseValidator
:
Path certificatePath = Paths.get("path/to/certificate");
byte[] certificateBytes = Files.readAllBytes(certificatePath);
AuthenticationResponseValidator validator = new AuthenticationResponseValidator();
validator.clearTrustedCACertificates();
validator.addTrustedCACertificate(certificateBytes);
- There is also possibility to replace trusted_certificates.jks with keystore containing TEST certificates, obtainable from here