diff --git a/consent-service-impl/src/main/java/io/mosip/esignet/mapper/converter/ClaimsToStringConverter.java b/consent-service-impl/src/main/java/io/mosip/esignet/mapper/converter/ClaimsToStringConverter.java index 961768890..a50fff605 100644 --- a/consent-service-impl/src/main/java/io/mosip/esignet/mapper/converter/ClaimsToStringConverter.java +++ b/consent-service-impl/src/main/java/io/mosip/esignet/mapper/converter/ClaimsToStringConverter.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import io.mosip.esignet.api.dto.Claims; +import io.mosip.esignet.api.dto.claim.Claims; import io.mosip.esignet.core.exception.EsignetException; import lombok.extern.slf4j.Slf4j; import org.modelmapper.Converter; diff --git a/consent-service-impl/src/main/java/io/mosip/esignet/mapper/converter/StringToClaimsConverter.java b/consent-service-impl/src/main/java/io/mosip/esignet/mapper/converter/StringToClaimsConverter.java index 921ac5d18..c6c5ed6aa 100644 --- a/consent-service-impl/src/main/java/io/mosip/esignet/mapper/converter/StringToClaimsConverter.java +++ b/consent-service-impl/src/main/java/io/mosip/esignet/mapper/converter/StringToClaimsConverter.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import io.mosip.esignet.api.dto.Claims; +import io.mosip.esignet.api.dto.claim.Claims; import io.mosip.esignet.core.exception.EsignetException; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; diff --git a/consent-service-impl/src/test/java/io/mosip/esignet/ConsentServiceImplTest.java b/consent-service-impl/src/test/java/io/mosip/esignet/ConsentServiceImplTest.java index c030c5cd3..d5d54c060 100644 --- a/consent-service-impl/src/test/java/io/mosip/esignet/ConsentServiceImplTest.java +++ b/consent-service-impl/src/test/java/io/mosip/esignet/ConsentServiceImplTest.java @@ -5,8 +5,8 @@ */ package io.mosip.esignet; -import io.mosip.esignet.api.dto.ClaimDetail; -import io.mosip.esignet.api.dto.Claims; +import io.mosip.esignet.api.dto.claim.ClaimDetail; +import io.mosip.esignet.api.dto.claim.Claims; import io.mosip.esignet.api.spi.AuditPlugin; import io.mosip.esignet.core.dto.UserConsent; import io.mosip.esignet.core.dto.UserConsentRequest; diff --git a/esignet-core/src/main/java/io/mosip/esignet/core/dto/ConsentDetail.java b/esignet-core/src/main/java/io/mosip/esignet/core/dto/ConsentDetail.java index 4752b0b51..ab147d21c 100644 --- a/esignet-core/src/main/java/io/mosip/esignet/core/dto/ConsentDetail.java +++ b/esignet-core/src/main/java/io/mosip/esignet/core/dto/ConsentDetail.java @@ -5,7 +5,7 @@ */ package io.mosip.esignet.core.dto; -import io.mosip.esignet.api.dto.Claims; +import io.mosip.esignet.api.dto.claim.Claims; import lombok.Data; import java.time.LocalDateTime; diff --git a/esignet-core/src/main/java/io/mosip/esignet/core/dto/OAuthDetailRequest.java b/esignet-core/src/main/java/io/mosip/esignet/core/dto/OAuthDetailRequest.java index 44504052a..65fd38517 100644 --- a/esignet-core/src/main/java/io/mosip/esignet/core/dto/OAuthDetailRequest.java +++ b/esignet-core/src/main/java/io/mosip/esignet/core/dto/OAuthDetailRequest.java @@ -5,7 +5,7 @@ */ package io.mosip.esignet.core.dto; -import io.mosip.esignet.api.dto.Claims; +import io.mosip.esignet.api.dto.claim.Claims; import io.mosip.esignet.core.validator.OIDCDisplay; import io.mosip.esignet.core.validator.OIDCPrompt; import io.mosip.esignet.core.validator.OIDCResponseType; diff --git a/esignet-core/src/main/java/io/mosip/esignet/core/dto/OIDCTransaction.java b/esignet-core/src/main/java/io/mosip/esignet/core/dto/OIDCTransaction.java index 5a94b32d5..1fbbe9dcd 100644 --- a/esignet-core/src/main/java/io/mosip/esignet/core/dto/OIDCTransaction.java +++ b/esignet-core/src/main/java/io/mosip/esignet/core/dto/OIDCTransaction.java @@ -5,7 +5,7 @@ */ package io.mosip.esignet.core.dto; -import io.mosip.esignet.api.dto.Claims; +import io.mosip.esignet.api.dto.claim.Claims; import io.mosip.esignet.api.util.ConsentAction; import io.mosip.esignet.core.util.LinkCodeQueue; import lombok.Data; diff --git a/esignet-core/src/main/java/io/mosip/esignet/core/dto/UserConsent.java b/esignet-core/src/main/java/io/mosip/esignet/core/dto/UserConsent.java index 558051b84..3372911a2 100644 --- a/esignet-core/src/main/java/io/mosip/esignet/core/dto/UserConsent.java +++ b/esignet-core/src/main/java/io/mosip/esignet/core/dto/UserConsent.java @@ -1,6 +1,11 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ package io.mosip.esignet.core.dto; -import io.mosip.esignet.api.dto.Claims; +import io.mosip.esignet.api.dto.claim.Claims; import lombok.Data; import java.time.LocalDateTime; diff --git a/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/AuditDTO.java b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/AuditDTO.java index b4f046af9..5468f5c1a 100644 --- a/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/AuditDTO.java +++ b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/AuditDTO.java @@ -5,6 +5,7 @@ */ package io.mosip.esignet.api.dto; +import io.mosip.esignet.api.dto.claim.Claims; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/KycAuthResult.java b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/KycAuthResult.java index 20158ef15..bd6cf1219 100644 --- a/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/KycAuthResult.java +++ b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/KycAuthResult.java @@ -5,6 +5,7 @@ */ package io.mosip.esignet.api.dto; +import io.mosip.esignet.api.dto.claim.ClaimMetadata; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/VerifiedKycExchangeDto.java b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/VerifiedKycExchangeDto.java index 34a19e1fc..22af9a5e5 100644 --- a/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/VerifiedKycExchangeDto.java +++ b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/VerifiedKycExchangeDto.java @@ -5,9 +5,9 @@ */ package io.mosip.esignet.api.dto; +import io.mosip.esignet.api.dto.claim.ClaimMetadata; import lombok.Data; -import java.util.List; import java.util.Map; @Data diff --git a/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/ClaimDetail.java b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/ClaimDetail.java new file mode 100644 index 000000000..aa96ffe08 --- /dev/null +++ b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/ClaimDetail.java @@ -0,0 +1,35 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ +package io.mosip.esignet.api.dto.claim; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import io.mosip.esignet.api.util.ErrorConstants; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.Size; +import java.io.Serializable; + +@Data +@AllArgsConstructor +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class ClaimDetail implements Serializable { + + private String value; + private String[] values; + private boolean essential; + + private String purpose; + + public ClaimDetail(String value, String[] values, boolean essential) { + this.value = value; + this.values = values; + this.essential = essential; + } + +} diff --git a/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/ClaimMetadata.java b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/ClaimMetadata.java similarity index 84% rename from esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/ClaimMetadata.java rename to esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/ClaimMetadata.java index 6c77a102e..ea773d63b 100644 --- a/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/ClaimMetadata.java +++ b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/ClaimMetadata.java @@ -1,4 +1,4 @@ -package io.mosip.esignet.api.dto; +package io.mosip.esignet.api.dto.claim; import lombok.Data; diff --git a/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/Claims.java b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/Claims.java similarity index 91% rename from esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/Claims.java rename to esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/Claims.java index 9c12bf42f..f0cc496d9 100644 --- a/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/Claims.java +++ b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/Claims.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -package io.mosip.esignet.api.dto; +package io.mosip.esignet.api.dto.claim; import lombok.Data; diff --git a/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/DocumentDetail.java b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/DocumentDetail.java new file mode 100644 index 000000000..68a5fbe0e --- /dev/null +++ b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/DocumentDetail.java @@ -0,0 +1,20 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ +package io.mosip.esignet.api.dto.claim; + +import lombok.Data; + +@Data +public class DocumentDetail { + + private FilterCriteria type; + private String documentNumber; + private FilterTime dateOfIssuance; + private FilterTime dateOfExpiry; + private EvidenceIssuer issuer; + + +} \ No newline at end of file diff --git a/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/ElectronicRecord.java b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/ElectronicRecord.java new file mode 100644 index 000000000..0095d0fb6 --- /dev/null +++ b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/ElectronicRecord.java @@ -0,0 +1,19 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ +package io.mosip.esignet.api.dto.claim; + +import lombok.Data; + +@Data +public class ElectronicRecord extends Evidence{ + + private FilterCriteria type; + private String personalNumber; + private FilterTime createdAt; + private FilterTime dateOfExpiry; + private EvidenceIssuer source; + +} diff --git a/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/ElectronicSignature.java b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/ElectronicSignature.java new file mode 100644 index 000000000..44a2b4e77 --- /dev/null +++ b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/ElectronicSignature.java @@ -0,0 +1,16 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ +package io.mosip.esignet.api.dto.claim; + +import lombok.Data; + +@Data +public class ElectronicSignature{ + private FilterCriteria signatureType; + private FilterCriteria issuer; + private String serialNumber; + private FilterTime createdAt; +} diff --git a/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/Evidence.java b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/Evidence.java new file mode 100644 index 000000000..2b2a267b4 --- /dev/null +++ b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/Evidence.java @@ -0,0 +1,25 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ +package io.mosip.esignet.api.dto.claim; + +import io.mosip.esignet.api.util.EvidenceType; +import lombok.Data; + +import java.util.List; + +@Data +public class Evidence extends ElectronicSignature{ + + private EvidenceType evidenceType; + private FilterCriteria method; + private FilterTime time; + private VerificationMethod verificationMethod; + private List checkDetails; + private DocumentDetail documentDetail; + private String attestation; + private ElectronicRecord record; + +} diff --git a/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/EvidenceCheckDetail.java b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/EvidenceCheckDetail.java new file mode 100644 index 000000000..0eebec3e7 --- /dev/null +++ b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/EvidenceCheckDetail.java @@ -0,0 +1,18 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ +package io.mosip.esignet.api.dto.claim; + +import lombok.Data; + +@Data +public class EvidenceCheckDetail { + + private String checkMethod; + private String organisation; + private String txn; + private FilterTime time; + +} diff --git a/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/EvidenceIssuer.java b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/EvidenceIssuer.java new file mode 100644 index 000000000..afd0e7eeb --- /dev/null +++ b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/EvidenceIssuer.java @@ -0,0 +1,18 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ +package io.mosip.esignet.api.dto.claim; + +import lombok.Data; + +@Data +public class EvidenceIssuer { + + private String name; + private String country; + private String countryCode; + private String jurisdiction; + +} diff --git a/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/ClaimDetail.java b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/FilterCriteria.java similarity index 82% rename from esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/ClaimDetail.java rename to esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/FilterCriteria.java index 24c1ed7e5..e3848df87 100644 --- a/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/ClaimDetail.java +++ b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/FilterCriteria.java @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -package io.mosip.esignet.api.dto; +package io.mosip.esignet.api.dto.claim; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import lombok.AllArgsConstructor; @@ -16,9 +16,7 @@ @AllArgsConstructor @NoArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) -public class ClaimDetail implements Serializable { - +public class FilterCriteria implements Serializable { private String value; private String[] values; - private boolean essential; } diff --git a/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/FilterTime.java b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/FilterTime.java new file mode 100644 index 000000000..f6aab4231 --- /dev/null +++ b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/FilterTime.java @@ -0,0 +1,23 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ +package io.mosip.esignet.api.dto.claim; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +@Data +@AllArgsConstructor +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class FilterTime implements Serializable { + + private int maxAge; + +} diff --git a/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/Verification.java b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/Verification.java new file mode 100644 index 000000000..4d221e159 --- /dev/null +++ b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/Verification.java @@ -0,0 +1,30 @@ +package io.mosip.esignet.api.dto.claim; + +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import io.mosip.esignet.api.util.ErrorConstants; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +@Data +@AllArgsConstructor +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class Verification implements Serializable { + + @NotBlank(message=ErrorConstants.INVALID_TRUST_FRAMEWORK) + private FilterCriteria trustFramework; + private FilterTime time; + private FilterCriteria assuranceLevel; + private List evidence; + +} diff --git a/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/VerificationMethod.java b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/VerificationMethod.java new file mode 100644 index 000000000..48bfaac21 --- /dev/null +++ b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/VerificationMethod.java @@ -0,0 +1,14 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ +package io.mosip.esignet.api.dto.claim; + +import lombok.Data; + +@Data +public class VerificationMethod { + private FilterCriteria type; + +} diff --git a/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/VerifiedClaimDetail.java b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/VerifiedClaimDetail.java new file mode 100644 index 000000000..4d9d0490a --- /dev/null +++ b/esignet-integration-api/src/main/java/io/mosip/esignet/api/dto/claim/VerifiedClaimDetail.java @@ -0,0 +1,25 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ +package io.mosip.esignet.api.dto.claim; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.Map; + +@Data +@AllArgsConstructor +@NoArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) +public class VerifiedClaimDetail extends ClaimDetail implements Serializable { + + private Verification verification; + + private Map claims; +} diff --git a/esignet-integration-api/src/main/java/io/mosip/esignet/api/util/ErrorConstants.java b/esignet-integration-api/src/main/java/io/mosip/esignet/api/util/ErrorConstants.java index cec0a0ce6..a574b30f6 100644 --- a/esignet-integration-api/src/main/java/io/mosip/esignet/api/util/ErrorConstants.java +++ b/esignet-integration-api/src/main/java/io/mosip/esignet/api/util/ErrorConstants.java @@ -20,4 +20,8 @@ public class ErrorConstants { public static final String VCI_EXCHANGE_FAILED = "vci_exchange_failed"; public static final String NOT_IMPLEMENTED = "not_implemented"; public static final String INVALID_CHALLENGE_LENGTH = "invalid_challenge_length"; + public static final String INVALID_CLAIMS = "invalid_claims"; + public static final String INVALID_TRUST_FRAMEWORK = "invalid_trust_framework"; + public static final String INVALID_EVIDENCE_TYPE = "invalid_evidence_type"; + public static final String INVALID_PURPOSE= "invalid_purpose"; } diff --git a/esignet-integration-api/src/main/java/io/mosip/esignet/api/util/EvidenceType.java b/esignet-integration-api/src/main/java/io/mosip/esignet/api/util/EvidenceType.java new file mode 100644 index 000000000..b858b30bd --- /dev/null +++ b/esignet-integration-api/src/main/java/io/mosip/esignet/api/util/EvidenceType.java @@ -0,0 +1,18 @@ +package io.mosip.esignet.api.util; + +public enum EvidenceType { + DOCUMENT("document"), + ELECTRONIC_RECORD("electronic_record"), + VOUCH("vouch"), + ELECTRONIC_SIGNATURE("electronic_signature"); + String value; + + EvidenceType(String value) { + this.value = value; + } + + public String getValue() { + return this.value; + } + +} diff --git a/esignet-service/src/test/java/io/mosip/esignet/flows/AuthCodeFlowTest.java b/esignet-service/src/test/java/io/mosip/esignet/flows/AuthCodeFlowTest.java index f275bd77b..9b2d4a880 100644 --- a/esignet-service/src/test/java/io/mosip/esignet/flows/AuthCodeFlowTest.java +++ b/esignet-service/src/test/java/io/mosip/esignet/flows/AuthCodeFlowTest.java @@ -18,8 +18,8 @@ import com.nimbusds.jwt.SignedJWT; import io.mosip.esignet.TestUtil; import io.mosip.esignet.api.dto.AuthChallenge; -import io.mosip.esignet.api.dto.ClaimDetail; -import io.mosip.esignet.api.dto.Claims; +import io.mosip.esignet.api.dto.claim.ClaimDetail; +import io.mosip.esignet.api.dto.claim.Claims; import io.mosip.esignet.api.dto.KycAuthDto; import io.mosip.esignet.api.spi.AuditPlugin; import io.mosip.esignet.api.spi.Authenticator; diff --git a/esignet-service/src/test/java/io/mosip/esignet/flows/AuthorizationAPIFlowTest.java b/esignet-service/src/test/java/io/mosip/esignet/flows/AuthorizationAPIFlowTest.java index 56f0f0c17..55bc38e74 100644 --- a/esignet-service/src/test/java/io/mosip/esignet/flows/AuthorizationAPIFlowTest.java +++ b/esignet-service/src/test/java/io/mosip/esignet/flows/AuthorizationAPIFlowTest.java @@ -18,8 +18,8 @@ import com.nimbusds.jwt.JWTClaimsSet; import com.nimbusds.jwt.SignedJWT; import io.mosip.esignet.api.dto.AuthChallenge; -import io.mosip.esignet.api.dto.ClaimDetail; -import io.mosip.esignet.api.dto.Claims; +import io.mosip.esignet.api.dto.claim.ClaimDetail; +import io.mosip.esignet.api.dto.claim.Claims; import io.mosip.esignet.api.dto.KycAuthDto; import io.mosip.esignet.api.spi.AuditPlugin; import io.mosip.esignet.api.spi.Authenticator; diff --git a/oidc-service-impl/src/main/java/io/mosip/esignet/services/AuthorizationHelperService.java b/oidc-service-impl/src/main/java/io/mosip/esignet/services/AuthorizationHelperService.java index 18270d1cb..98087ee40 100644 --- a/oidc-service-impl/src/main/java/io/mosip/esignet/services/AuthorizationHelperService.java +++ b/oidc-service-impl/src/main/java/io/mosip/esignet/services/AuthorizationHelperService.java @@ -6,6 +6,8 @@ package io.mosip.esignet.services; import io.mosip.esignet.api.dto.*; +import io.mosip.esignet.api.dto.claim.ClaimDetail; +import io.mosip.esignet.api.dto.claim.Claims; import io.mosip.esignet.api.exception.KycAuthException; import io.mosip.esignet.api.exception.SendOtpException; import io.mosip.esignet.api.spi.AuditPlugin; diff --git a/oidc-service-impl/src/main/java/io/mosip/esignet/services/AuthorizationServiceImpl.java b/oidc-service-impl/src/main/java/io/mosip/esignet/services/AuthorizationServiceImpl.java index 4e740bb16..f494ec846 100644 --- a/oidc-service-impl/src/main/java/io/mosip/esignet/services/AuthorizationServiceImpl.java +++ b/oidc-service-impl/src/main/java/io/mosip/esignet/services/AuthorizationServiceImpl.java @@ -6,8 +6,8 @@ package io.mosip.esignet.services; import com.fasterxml.jackson.databind.ObjectMapper; -import io.mosip.esignet.api.dto.ClaimDetail; -import io.mosip.esignet.api.dto.Claims; +import io.mosip.esignet.api.dto.claim.ClaimDetail; +import io.mosip.esignet.api.dto.claim.Claims; import io.mosip.esignet.api.dto.KycAuthResult; import io.mosip.esignet.api.dto.SendOtpResult; import io.mosip.esignet.api.spi.AuditPlugin; diff --git a/oidc-service-impl/src/main/java/io/mosip/esignet/services/ConsentHelperService.java b/oidc-service-impl/src/main/java/io/mosip/esignet/services/ConsentHelperService.java index 224adc26d..1e675f6e3 100644 --- a/oidc-service-impl/src/main/java/io/mosip/esignet/services/ConsentHelperService.java +++ b/oidc-service-impl/src/main/java/io/mosip/esignet/services/ConsentHelperService.java @@ -9,8 +9,8 @@ import com.nimbusds.jose.*; import com.nimbusds.jose.crypto.RSASSAVerifier; import com.nimbusds.jwt.SignedJWT; -import io.mosip.esignet.api.dto.ClaimDetail; -import io.mosip.esignet.api.dto.Claims; +import io.mosip.esignet.api.dto.claim.ClaimDetail; +import io.mosip.esignet.api.dto.claim.Claims; import io.mosip.esignet.api.spi.AuditPlugin; import io.mosip.esignet.api.util.Action; import io.mosip.esignet.api.util.ActionStatus; diff --git a/oidc-service-impl/src/test/java/io/mosip/esignet/services/AuthorizationHelperServiceTest.java b/oidc-service-impl/src/test/java/io/mosip/esignet/services/AuthorizationHelperServiceTest.java index 1af07c79b..e3222cd9e 100644 --- a/oidc-service-impl/src/test/java/io/mosip/esignet/services/AuthorizationHelperServiceTest.java +++ b/oidc-service-impl/src/test/java/io/mosip/esignet/services/AuthorizationHelperServiceTest.java @@ -7,6 +7,8 @@ import io.mosip.esignet.api.dto.*; +import io.mosip.esignet.api.dto.claim.ClaimDetail; +import io.mosip.esignet.api.dto.claim.Claims; import io.mosip.esignet.api.exception.KycAuthException; import io.mosip.esignet.api.exception.SendOtpException; import io.mosip.esignet.api.spi.AuditPlugin; diff --git a/oidc-service-impl/src/test/java/io/mosip/esignet/services/AuthorizationServiceTest.java b/oidc-service-impl/src/test/java/io/mosip/esignet/services/AuthorizationServiceTest.java index 35c708d83..f77631342 100644 --- a/oidc-service-impl/src/test/java/io/mosip/esignet/services/AuthorizationServiceTest.java +++ b/oidc-service-impl/src/test/java/io/mosip/esignet/services/AuthorizationServiceTest.java @@ -7,8 +7,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; import io.mosip.esignet.api.dto.AuthChallenge; -import io.mosip.esignet.api.dto.ClaimDetail; -import io.mosip.esignet.api.dto.Claims; +import io.mosip.esignet.api.dto.claim.ClaimDetail; +import io.mosip.esignet.api.dto.claim.Claims; import io.mosip.esignet.api.dto.KycAuthResult; import io.mosip.esignet.api.exception.KycAuthException; import io.mosip.esignet.api.spi.AuditPlugin; diff --git a/oidc-service-impl/src/test/java/io/mosip/esignet/services/ConsentHelperServiceTest.java b/oidc-service-impl/src/test/java/io/mosip/esignet/services/ConsentHelperServiceTest.java index 4f0784c9c..57d25e22f 100644 --- a/oidc-service-impl/src/test/java/io/mosip/esignet/services/ConsentHelperServiceTest.java +++ b/oidc-service-impl/src/test/java/io/mosip/esignet/services/ConsentHelperServiceTest.java @@ -10,8 +10,8 @@ import com.nimbusds.jose.jwk.JWK; import com.nimbusds.jose.jwk.JWKSet; import com.nimbusds.jose.util.Base64URL; -import io.mosip.esignet.api.dto.ClaimDetail; -import io.mosip.esignet.api.dto.Claims; +import io.mosip.esignet.api.dto.claim.ClaimDetail; +import io.mosip.esignet.api.dto.claim.Claims; import io.mosip.esignet.api.spi.AuditPlugin; import io.mosip.esignet.api.util.ConsentAction; import io.mosip.esignet.core.constants.ErrorConstants; @@ -142,7 +142,7 @@ public void addUserConsent_withValidLinkedTransaction_thenPass() throws Exceptio consentHelperService.updateUserConsent(oidcTransaction, signature); UserConsent userConsent = new UserConsent(); userConsent.setAuthorizationScopes(Map.of("openid",false,"profile",false,"email",false)); - userConsent.setHash("UrgNGrbWUB5v_oSvupBCqp7V31MJdE3nNqfGv9eazBc"); + userConsent.setHash("uDMR7oP9Gnh0mzhmB8C44rwVpPz_vVwO_lWyfaGMius"); userConsent.setClaims(claims); userConsent.setAcceptedClaims(List.of("email","gender","name")); @@ -182,7 +182,7 @@ public void addUserConsent_withValidWebTransaction_thenPass() consentHelperService.updateUserConsent(oidcTransaction, ""); UserConsent userConsent = new UserConsent(); - userConsent.setHash("Cgh8oWpNM84WPYQVvluGj616_kd4z60elVXtc7R_lXw"); + userConsent.setHash("9zZ7-MRGzfit5Xr0Qlnsh9hTquqUTeerUo7P3TDE7hI"); userConsent.setClaims(claims); userConsent.setAuthorizationScopes(Map.of()); userConsent.setAcceptedClaims(List.of("name","email")); diff --git a/oidc-service-impl/src/test/java/io/mosip/esignet/services/LinkedAuthorizationServiceTest.java b/oidc-service-impl/src/test/java/io/mosip/esignet/services/LinkedAuthorizationServiceTest.java index 597f908ae..1562b38de 100644 --- a/oidc-service-impl/src/test/java/io/mosip/esignet/services/LinkedAuthorizationServiceTest.java +++ b/oidc-service-impl/src/test/java/io/mosip/esignet/services/LinkedAuthorizationServiceTest.java @@ -7,6 +7,8 @@ import io.mosip.esignet.api.dto.*; +import io.mosip.esignet.api.dto.claim.ClaimDetail; +import io.mosip.esignet.api.dto.claim.Claims; import io.mosip.esignet.api.exception.KycAuthException; import io.mosip.esignet.api.exception.SendOtpException; import io.mosip.esignet.api.spi.AuditPlugin;