Skip to content

Commit

Permalink
Mosip 27701 ida handle lock unlock of authentication channel email mo…
Browse files Browse the repository at this point in the history
…bile (#1036)

* MOSIP-27701 changes made to send otp

* Resolved build failure

* MOSIP-27701 resolved

* Exception handled

---------

Co-authored-by: Neha Farheen <m1092365@mindtree.com>
  • Loading branch information
Neha2365 and Neha Farheen authored Jun 26, 2023
1 parent 213cb6c commit f197d98
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,21 @@ else if (AuthTypeUtil.isBio(authRequestDTO)

else if (AuthTypeUtil.isOtp(authRequestDTO))
if (authTypeStatus.getAuthType().equalsIgnoreCase(MatchType.Category.OTP.getType())
&& (authTypeStatus.getAuthSubType().isEmpty() || authTypeStatus.getAuthSubType() == null)) {
&& (authTypeStatus.getAuthSubType() == null || authTypeStatus.getAuthSubType().isEmpty())) {
throw new IdAuthenticationFilterException(
IdAuthenticationErrorConstants.AUTH_TYPE_LOCKED.getErrorCode(),
String.format(IdAuthenticationErrorConstants.AUTH_TYPE_LOCKED.getErrorMessage(),
MatchType.Category.OTP.getType()));
} else {
if ((authTypeStatus.getAuthSubType().equalsIgnoreCase(IdAuthCommonConstants.PHONE_NUMBER)
|| authTypeStatus.getAuthSubType().equalsIgnoreCase(IdAuthCommonConstants.EMAIL))
if ((authTypeStatus.getAuthSubType() == null || authTypeStatus.getAuthSubType().isEmpty())
&& (authTypeStatus.getAuthSubType().equalsIgnoreCase(IdAuthCommonConstants.PHONE_NUMBER)
|| authTypeStatus.getAuthSubType().equalsIgnoreCase(IdAuthCommonConstants.EMAIL))
&& authTypeStatus.getLocked().equals(true)) {
Optional<AuthtypeStatus> otherSubOtpTypeLocked = authtypeStatusList.stream()
.filter(authTypeStatus1 -> authTypeStatus1.getAuthType()
.equalsIgnoreCase(MatchType.Category.OTP.getType())
.filter(authTypeStatus1 -> authTypeStatus1.getAuthType() != null
&& authTypeStatus1.getAuthType()
.equalsIgnoreCase(MatchType.Category.OTP.getType())
&& authTypeStatus1.getAuthSubType() != null
&& !authTypeStatus1.getAuthSubType()
.equalsIgnoreCase(authTypeStatus.getAuthSubType())
&& authTypeStatus1.getLocked())
Expand Down

0 comments on commit f197d98

Please sign in to comment.