-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #365: Unable to retry presence check init #385
Conversation
banterCZ
commented
Sep 22, 2022
- Allow to send event PRESENCE_CHECK_INIT during PRESENCE_CHECK_IN_PROGRESS
- Remove IProovConst
- Add another initPresenceCheck to repeatPresenceCheckStartTest
- Improve logging of IdentityVerification phase changes
@@ -130,6 +132,7 @@ public void checkDocumentUploadLimit(OwnerId ownerId, IdentityVerificationEntity | |||
identityVerification.setTimestampLastUpdated(ownerId.getTimestamp()); | |||
identityVerification.setTimestampFailed(ownerId.getTimestamp()); | |||
identityVerificationRepository.save(identityVerification); | |||
logger.info("Switched to {}/FAILED; process ID: {}", identityVerification.getPhase(), identityVerification.getProcessId()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without extensive logging, it was difficult to debug this issue.
/** | ||
* Session parameter name of the verification token | ||
*/ | ||
public static final String VERIFICATION_TOKEN = "iproov-verification-token"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplify namespace, there is no need to have this constant public.
@@ -317,6 +317,15 @@ private void configurePresenceCheckTransitions(StateMachineTransitionConfigurer< | |||
.action(presenceCheckInitAction) | |||
.target(OnboardingState.PRESENCE_CHECK_IN_PROGRESS) | |||
|
|||
.and() | |||
.withExternal() | |||
.source(OnboardingState.PRESENCE_CHECK_IN_PROGRESS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main change! Allow to send PRESENCE_CHECK_INIT
event during PRESENCE_CHECK_IN_PROGRESS
, respectively to call /api/identity/presence-check/init
to get iProov token. cc @kober32
"Missing presence check verification token in session 1" | ||
); | ||
|
||
SessionInfo sessionInfo2 = provider.startPresenceCheck(ownerId); | ||
initPresenceCheck(ownerId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be sure to call init at iProov twice, but works anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, let's deploy this change and test it.
- Allow to send event PRESENCE_CHECK_INIT during PRESENCE_CHECK_IN_PROGRESS - Remove IProovConst - Add another initPresenceCheck to repeatPresenceCheckStartTest - Improve logging of IdentityVerification phase changes
8e920db
to
d56f093
Compare