You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MIGRATION_GUIDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ It is recommended to start using device-link authentication flows from Smart-ID
28
28
3. Replace showing verification code with showing device link or QR-code. Recommended to use device link for same device and QR-code for cross-device authentication.
29
29
-[Create device link or QR-code](README.md#generating-qr-code-or-device-link) from values in session response and display it to the user. QR-code should be recreated after every second.
30
30
4. Querying session status can be done in parallel while displaying device content. Check out [session status poller](README.md#example-of-using-session-status-poller-to-query-final-sessions-status). `ee.sk.smartid.SmartIdClient` provides method `getSessionsStatusPoller()` to get version specific session status poller.
31
-
5. When session status state is `COMPLETE` polling will be stopped and [response should be checked](README.md#example-of-validating-the-authentication-sessions-response) with `AuthenticationResponseValidator`. It will validate required fields, certificate and signature value in sessions status, and it will also handler errors.
31
+
5. When session status state is `COMPLETE` polling will be stopped and [response should be checked](README.md#example-of-validating-the-authentication-sessions-response) with `DeviceLinkAuthenticationResponseValidator` or `NotificationAuthenticationResponseValidator` (depending on the flow). They will validate required fields, certificate and signature value in sessions status, and they will also handle errors.
32
32
6. If everything is ok `AuthenticationIdentity` will be returned. AuthenticationIdentity is same as used for V2.
DeviceLinkInteraction.displayTextAndPin("Logging into <app-name>") // Display text should be concise and specific.
245
245
));
@@ -794,15 +794,16 @@ if ("RUNNING".equalsIgnoreCase(sessionStatus.getState())) {
794
794
### Validating session status response
795
795
796
796
It's important to validate the session status response to ensure that the returned signature or authentication result is valid.
797
-
For validating authentication session status response, use the `AuthenticationResponseValidator`.
797
+
For validating authentication session status response, use `DeviceLinkAuthenticationResponseValidator` for device link flows
798
+
and `NotificationAuthenticationResponseValidator` for notification-based flows.
798
799
For validating signature session status response, use the `SignatureResponseValidator`.
799
800
NB! Integrators must validate signature value against expected signature value.
800
801
801
802
#### Set up CertificateValidator
802
803
803
804
CertificateValidator will check if the certificate is not expired and is trusted
804
805
by constructing certificate chain with trust anchors and intermediate CA certificates provided in the TrustedCACertStore.
805
-
Will be used by AuthenticationResponseValidator and SignatureResponseValidator.
806
+
Will be used by DeviceLinkAuthenticationResponseValidator, NotificationAuthenticationResponseValidator, CertificateChoiceResponseValidator and SignatureResponseValidator.
806
807
807
808
```java
808
809
// Set up TrustedCACertStore
@@ -837,11 +838,12 @@ CertificateValidator certificateValidator = new CertificateValidatorImpl(trusted
837
838
DeviceLinkAuthenticationResponseValidator depends on CertificateValidator. Checkout [setting up CertificateValidator](#set-up-certificatevalidator)
838
839
839
840
```java
840
-
// Set up AuthenticationResponseValidator with the CertificateValidator
0 commit comments