From af4f45e91c2d7c895916b0385e17b8b3137fd8a9 Mon Sep 17 00:00:00 2001 From: mahammedtaheer <57249563+mahammedtaheer@users.noreply.github.com> Date: Mon, 30 Oct 2023 15:43:12 +0530 Subject: [PATCH] Release 1.2.0.1 (#1120) * Added unit test cases for new classes. Signed-off-by: Mahammed Taheer * Added test cases for kyc service impl class. Signed-off-by: Mahammed Taheer --------- Signed-off-by: Mahammed Taheer --- .../resources/sample-data-test.properties | 2 +- .../service/kyc/impl/KycServiceImplTest.java | 312 +++++++++++++++++- .../util/ExchangeDataAttributesUtilTest.java | 135 ++++++++ .../src/test/resources/application.properties | 2 +- .../src/test/resources/ida-mapping.json | 253 +++++++------- 5 files changed, 578 insertions(+), 126 deletions(-) create mode 100644 authentication/authentication-service/src/test/java/io/mosip/authentication/service/kyc/util/ExchangeDataAttributesUtilTest.java diff --git a/authentication/authentication-common/src/test/resources/sample-data-test.properties b/authentication/authentication-common/src/test/resources/sample-data-test.properties index c5c7f6eb1ba..2462a88af4c 100644 --- a/authentication/authentication-common/src/test/resources/sample-data-test.properties +++ b/authentication/authentication-common/src/test/resources/sample-data-test.properties @@ -1 +1 @@ -sample.demo.entity={ "id": "mosip.id.read", "ver": "1.0", "timestamp": "", "err": "", "status": "SUCCCESSFUL", "errmsg": "", "responseCode": "OK", "uin": "7867780967875678", "response": { "identity": { "fullName": [{ "language": "ara", "label": "\u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u0627\u0648\u0644", "value": "\u0627\u0628\u0631\u0627\u0647\u064A\u0645" }, { "language": "fre", "label": "Prénom", "value": "Ibrahim" }], "middleName": [{ "language": "ara", "label": "\u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u0623\u0648\u0633\u0637", "value": "\u0628\u0646" }, { "language": "fre", "label": "deuxième nom", "value": "Ibn" }], "lastName": [{ "language": "ara", "label": "\u0627\u0644\u0643\u0646\u064A\u0629", "value": "\u0639\u0644\u064A" }, { "language": "fre", "label": "nom de famille", "value": "Ali" }], "dateOfBirth": [{ "label": "\u062A\u0627\u0631\u064A\u062E \u0627\u0644\u0648\u0644\u0627\u062F\u0629", "value": "16/04/1955" }, { "label": "date de naissance", "value": "16/04/1955" }], "gender": [{ "language": "ara", "label": "\u062C\u0646\u0633", "value": "\u0627\u0644\u0630\u0643\u0631" }, { "language": "fre", "label": "le sexe", "value": "mâle" }], "addressLine1": [{ "language": "ara", "label": "\u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0633\u0637\u0631 1", "value": "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0639\u064A\u0646\u0629 \u0633\u0637\u0631 1" }, { "language": "fre", "label": "Adresse 1", "value": "exemple d'adresse ligne 1" }], "addressLine2": [{ "language": "ara", "label": "\u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0633\u0637\u0631 2", "value": "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0639\u064A\u0646\u0629 \u0633\u0637\u0631 2" }, { "language": "fre", "label": "Adresse 2", "value": "exemple d'adresse ligne 2" }], "addressLine3": [{ "language": "ara", "label": "\u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0633\u0637\u0631 3", "value": "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0639\u064A\u0646\u0629 \u0633\u0637\u0631 3" }, { "language": "fre", "label": "Adresse 3", "value": "exemple d'adresse ligne 3" }], "region": [{ "label": "Région", "value": "Tanger-Tétouan-Al Hoceima" }], "province": [{ "language": "ara", "label": "\u0627\u0644\u0645\u062D\u0627\u0641\u0638\u0629", "value": "\u0641\u0627\u0633-\u0645\u0643\u0646\u0627\u0633" }, { "language": "fre", "label": "province", "value": "Fès-Meknès" }], "city": [{ "language": "ara", "label": "\u0645\u062F\u064A\u0646\u0629", "value": "\u0641\u0627\u0633-\u0627\u0644\u062F\u0627\u0631 \u0627\u0644\u0628\u064A\u0636\u0627\u0621" }, { "language": "fre", "label": "ville", "value": "Casablanca" }], "pinCode": [{ "language": "ara", "label": "\u0645\u062F\u064A\u0646\u0629", "value": "600001" }, { "language": "fre", "label": "ville", "value": "600001" }], "localAdministrativeAuthority": [{ "language": "ara", "label": "\u0627\u0644\u0647\u064A\u0626\u0629 \u0627\u0644\u0625\u062F\u0627\u0631\u064A\u0629 \u0627\u0644\u0645\u062D\u0644\u064A\u0629", "value": "\u0637\u0646\u062C\u0629 - \u062A\u0637\u0648\u0627\u0646 - \u0627\u0644\u062D\u0633\u064A\u0645\u0629" }, { "language": "fre", "label": "Autorité administrative locale", "value": "Tanger-Tétouan-Al Hoceima" }], "phone": [{ "language": "", "label": "\u0631\u0642\u0645 \u0627\u0644\u0647\u0627\u062A\u0641 \u0627\u0644\u0645\u062D\u0645\u0648\u0644", "value": "+212-5398-12345" }, { "language": "fre", "label": "numéro de portable", "value": "+212-5398-12345" }], "face": [{ "label": "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0627\u064A\u0645\u064A\u0644", "value": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxMTEhUQEhIVFRUSFRASEBUQEhAQFRgWFRYWFxcVGBUYHSogGBolHRUVITEhJSkrLi4uFx8zODMtNygtLisBCgoKDg0OGhAQGSsdHR0rKysrMS0tKzcrLTcvLS0rLS0tLS0xKy0tKy0tKy0tKy01LSsrLS0tKysrLSstLS0tLf/AABEIAOEA4QMBIgACEQEDEQH/xAAcAAEAAQUBAQAAAAAAAAAAAAAABAMFBgcIAgH/xABEEAABAwIEAgcFBQUECwAAAAABAAIDBBEFEiExBkEHE1FhcYGRIjJyobEUQlJi0RUjM7LBc4KSkwg0NUNEVGODotLx/8QAGQEBAAMBAQAAAAAAAAAAAAAAAAIDBAEF/8QAJhEBAQACAQQCAQQDAAAAAAAAAAECEQMSITFREzJBIlKRoRRhcf/aAAwDAQACEQMRAD8A3iiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIi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4xvJFjzLTyug6QRQcDxEVFPFUBuUTMbIAdxmF7KcgIiICIiChX/wAKT4H/AMpXLg/hN8kRBQKgYly80RBbl6CIg+uUebZfUQrffCf8KH+yi/lCy9q+IvMz8vSw8KrVUCIq1i3YkrY5EU4hVF6h1nuP+B/0KIpRGtEfqV8KIvSec9Q7jxCm417oREEKkVxgREEpq+v2REHS/A3+z6T+wi/lCviIgIiICIiD/9mRXao6lVbiNjpXbMF/E8grnT4U613aDs5q3cZx2pHgbDL6XU8db0hlvW2UcO9NEbGtinpi1rQGh0Lg6wGmrTv6raeA4/T1kYlp5A8HcbOHc5p1BXHN1ccFxyelkEsEjmOHYd+4jmFsZXZCLVvR90tx1TmU1U3q5nWa14sI3u5A/hJ9FtJAREQEREBERAREQEREBEVKrqGxsdI42axrnOJ7ALlBhHSvxyMPg6qIg1M4IiG+Ruxkd4X0HMrnCqqHyuMkr3Pe7dzyXE+ancTY0+tqpap5JzuOQH7rAfZaOzT6q3IKDwqd1IkCjkaoAUijhL3sY33nOa1viSkcAtqs/wCjvhNxkbVPaQ1oPVh25J+94KOeUxm6lhjcrpd6jAnsAMRJ0GZvO9tworjK33mOHb7J/RZ5LS2F16pzyWDqbulgIc8+7G49vsu2/opMWE1Mm0bgPzWA+a2A1fVzqd6GHUvCTt5HgdzdT6q6QYayP3Wjx3PqrxIVDkTqtOmRBqGrGOK4c1NKPyk+iyuZi1txrxHcupoeV2yv+rW/qreOW3sr5LJO7AwvYCqtjXpzVtYlEEgggkEEEEaEEbFdAdEHSR9qAoatwE4=" }], "emailId": [{ "language": "ara", "label": "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0627\u064A\u0645\u064A\u0644", "value": "sample@samplamail.com" }, { "language": "fre", "label": "identifiant email", "value": "sample@samplamail.com" }], "CNEOrPINNumber": [{ "language": "ara", "label": "\u0631\u0642\u0645 CNE / PIN", "value": "AB453625" }, { "language": "fre", "label": "Numéro CNE / PIN", "value": "AB453625" }], "parentOrGuardianName": [{ "language": "ara", "label": "\u0627\u0633\u0645 \u0648\u0644\u064A \u0627\u0644\u0623\u0645\u0631 / \u0627\u0644\u0648\u0635\u064A", "value": "\u0633\u0644\u0645\u0649" }, { "language": "fre", "label": "Nom du parent / tuteur", "value": "salma" }], "parentOrGuardianRIDOrUIN": [{ "language": "ara", "label": "\u0627\u0644\u0648\u0627\u0644\u062F / \u0627\u0644\u0648\u0635\u064A RID / UIN", "value": "123456789123" }, { "language": "fre", "label": "parent / tuteur RID / UIN", "value": "123456789123" }], "leftEye": [{ "language": "ara", "label": "\u0627\u0644\u0639\u064A\u0646 \u0627\u0644\u064A\u0633\u0631\u0649", "value": "hashed_fileName.png" }, { "language": "fre", "label": "oeil gauche", "value": "hashed_fileName.png" }], "rightEye": [{ "language": "ara", "label": "\u0627\u0644\u0639\u064A\u0646 \u0627\u0644\u064A\u0645\u0646\u0649", "value": "hashed_fileName.png" }, { "language": "fre", "label": "l'\u0153il droit", "value": "hashed_fileName.png" }], "leftSlap": [{ "language": "ara", "label": "\u0627\u0644\u0628\u064A\u0648\u0645\u062A\u0631\u064A\u0629 \u0627\u0644\u0645\u0633\u062D \u0627\u0644\u0636\u0648\u0626\u064A 1", "value": "hashed_fileName.png" }, { "language": "fre", "label": "analyse biométrique 1", "value": "hashed_fileName.png" }], "rightSlap": [{ "language": "ara", "label": "\u0627\u0644\u0628\u064A\u0648\u0645\u062A\u0631\u064A\u0629 \u0627\u0644\u0645\u0633\u062D \u0627\u0644\u0636\u0648\u0626\u064A 2", "value": "hashed_fileName.png" }, { "language": "fre", "label": "analyse biométrique 2", "value": "hashed_fileName.png" }], "thumbs": [{ "language": "ara", "label": "\u0627\u0644\u0628\u064A\u0648\u0645\u062A\u0631\u064A\u0629 \u0627\u0644\u0645\u0633\u062D \u0627\u0644\u0636\u0648\u0626\u064A 3", "value": "hashed_fileName.png" }, { "language": "fre", "label": "analyse biométrique 3", "value": "hashed_fileName.png" }] } } } \ No newline at end of file +sample.demo.entity={ "id": "mosip.id.read", "ver": "1.0", "timestamp": "", "err": "", "status": "SUCCCESSFUL", "errmsg": "", "responseCode": "OK", "uin": "7867780967875678", "response": { "identity": { "fullName": [{ "language": "ara", "label": "\u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u0627\u0648\u0644", "value": "\u0627\u0628\u0631\u0627\u0647\u064A\u0645" }, { "language": "fre", "label": "Pr�nom", "value": "Ibrahim" }], "middleName": [{ "language": "ara", "label": "\u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u0623\u0648\u0633\u0637", "value": "\u0628\u0646" }, { "language": "fre", "label": "deuxi�me nom", "value": "Ibn" }], "lastName": [{ "language": "ara", "label": "\u0627\u0644\u0643\u0646\u064A\u0629", "value": "\u0639\u0644\u064A" }, { "language": "fre", "label": "nom de famille", "value": "Ali" }], "dateOfBirth": [{ "label": "\u062A\u0627\u0631\u064A\u062E \u0627\u0644\u0648\u0644\u0627\u062F\u0629", "value": "16/04/1955" }, { "label": "date de naissance", "value": "16/04/1955" }], "gender": [{ "language": "ara", "label": "\u062C\u0646\u0633", "value": "\u0627\u0644\u0630\u0643\u0631" }, { "language": "fre", "label": "le sexe", "value": "m�le" }], "addressLine1": [{ "language": "ara", "label": "\u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0633\u0637\u0631 1", "value": "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0639\u064A\u0646\u0629 \u0633\u0637\u0631 1" }, { "language": "fre", "label": "Adresse 1", "value": "exemple d'adresse ligne 1" }], "addressLine2": [{ "language": "ara", "label": "\u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0633\u0637\u0631 2", "value": "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0639\u064A\u0646\u0629 \u0633\u0637\u0631 2" }, { "language": "fre", "label": "Adresse 2", "value": "exemple d'adresse ligne 2" }], "addressLine3": [{ "language": "ara", "label": "\u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0633\u0637\u0631 3", "value": "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0639\u064A\u0646\u0629 \u0633\u0637\u0631 3" }, { "language": "fre", "label": "Adresse 3", "value": "exemple d'adresse ligne 3" }], "region": [{ "label": "R�gion", "value": "Tanger-T�touan-Al Hoceima" }], "province": [{ "language": "ara", "label": "\u0627\u0644\u0645\u062D\u0627\u0641\u0638\u0629", "value": "\u0641\u0627\u0633-\u0645\u0643\u0646\u0627\u0633" }, { "language": "fre", "label": "province", "value": "F�s-Mekn�s" }], "city": [{ "language": "ara", "label": "\u0645\u062F\u064A\u0646\u0629", "value": "\u0641\u0627\u0633-\u0627\u0644\u062F\u0627\u0631 \u0627\u0644\u0628\u064A\u0636\u0627\u0621" }, { "language": "fre", "label": "ville", "value": "Casablanca" }], "pinCode": [{ "language": "ara", "label": "\u0645\u062F\u064A\u0646\u0629", "value": "600001" }, { "language": "fre", "label": "ville", "value": "600001" }], "localAdministrativeAuthority": [{ "language": "ara", "label": "\u0627\u0644\u0647\u064A\u0626\u0629 \u0627\u0644\u0625\u062F\u0627\u0631\u064A\u0629 \u0627\u0644\u0645\u062D\u0644\u064A\u0629", "value": "\u0637\u0646\u062C\u0629 - \u062A\u0637\u0648\u0627\u0646 - \u0627\u0644\u062D\u0633\u064A\u0645\u0629" }, { "language": "fre", "label": "Autorit� administrative locale", "value": "Tanger-T�touan-Al Hoceima" }], "phone": [{ "language": "", "label": "\u0631\u0642\u0645 \u0627\u0644\u0647\u0627\u062A\u0641 \u0627\u0644\u0645\u062D\u0645\u0648\u0644", "value": "+212-5398-12345" }, { "language": "fre", "label": "num�ro de portable", "value": "+212-5398-12345" }], "face": [{ "label": "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0627\u064A\u0645\u064A\u0644", "value": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxMTEhUQEhIVFRUSFRASEBUQEhAQFRgWFRYWFxcVGBUYHSogGBolHRUVITEhJSkrLi4uFx8zODMtNygtLisBCgoK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F16pzyWDqbulgIc8+7G49vsu2/opMWE1Mm0bgPzWA+a2A1fVzqd6GHUvCTt5HgdzdT6q6QYayP3Wjx3PqrxIVDkTqtOmRBqGrGOK4c1NKPyk+iyuZi1txrxHcupoeV2yv+rW/qreOW3sr5LJO7AwvYCqtjXpzVtYlEEgggkEEEEaEEbFdAdEHSR9qAoatwE4=" }], "emailId": [{ "language": "ara", "label": "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0627\u064A\u0645\u064A\u0644", "value": "sample@samplamail.com" }, { "language": "fre", "label": "identifiant email", "value": "sample@samplamail.com" }], "CNEOrPINNumber": [{ "language": "ara", "label": "\u0631\u0642\u0645 CNE / PIN", "value": "AB453625" }, { "language": "fre", "label": "Num�ro CNE / PIN", "value": "AB453625" }], "parentOrGuardianName": [{ "language": "ara", "label": "\u0627\u0633\u0645 \u0648\u0644\u064A \u0627\u0644\u0623\u0645\u0631 / \u0627\u0644\u0648\u0635\u064A", "value": "\u0633\u0644\u0645\u0649" }, { "language": "fre", "label": "Nom du parent / tuteur", "value": "salma" }], "parentOrGuardianRIDOrUIN": [{ "language": "ara", "label": "\u0627\u0644\u0648\u0627\u0644\u062F / \u0627\u0644\u0648\u0635\u064A RID / UIN", "value": "123456789123" }, { "language": "fre", "label": "parent / tuteur RID / UIN", "value": "123456789123" }], "leftEye": [{ "language": "ara", "label": "\u0627\u0644\u0639\u064A\u0646 \u0627\u0644\u064A\u0633\u0631\u0649", "value": "hashed_fileName.png" }, { "language": "fre", "label": "oeil gauche", "value": "hashed_fileName.png" }], "rightEye": [{ "language": "ara", "label": "\u0627\u0644\u0639\u064A\u0646 \u0627\u0644\u064A\u0645\u0646\u0649", "value": "hashed_fileName.png" }, { "language": "fre", "label": "l'\u0153il droit", "value": "hashed_fileName.png" }], "leftSlap": [{ "language": "ara", "label": "\u0627\u0644\u0628\u064A\u0648\u0645\u062A\u0631\u064A\u0629 \u0627\u0644\u0645\u0633\u062D \u0627\u0644\u0636\u0648\u0626\u064A 1", "value": "hashed_fileName.png" }, { "language": "fre", "label": "analyse biom�trique 1", "value": "hashed_fileName.png" }], "rightSlap": [{ "language": "ara", "label": "\u0627\u0644\u0628\u064A\u0648\u0645\u062A\u0631\u064A\u0629 \u0627\u0644\u0645\u0633\u062D \u0627\u0644\u0636\u0648\u0626\u064A 2", "value": "hashed_fileName.png" }, { "language": "fre", "label": "analyse biom�trique 2", "value": "hashed_fileName.png" }], "thumbs": [{ "language": "ara", "label": "\u0627\u0644\u0628\u064A\u0648\u0645\u062A\u0631\u064A\u0629 \u0627\u0644\u0645\u0633\u062D \u0627\u0644\u0636\u0648\u0626\u064A 3", "value": "hashed_fileName.png" }, { "language": "fre", "label": "analyse biom�trique 3", "value": "hashed_fileName.png" }] } } } \ No newline at end of file diff --git a/authentication/authentication-service/src/test/java/io/mosip/authentication/service/kyc/impl/KycServiceImplTest.java b/authentication/authentication-service/src/test/java/io/mosip/authentication/service/kyc/impl/KycServiceImplTest.java index ceccb543fbd..5bb20facdd1 100644 --- a/authentication/authentication-service/src/test/java/io/mosip/authentication/service/kyc/impl/KycServiceImplTest.java +++ b/authentication/authentication-service/src/test/java/io/mosip/authentication/service/kyc/impl/KycServiceImplTest.java @@ -1,12 +1,14 @@ package io.mosip.authentication.service.kyc.impl; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.io.File; import java.io.IOException; import java.time.LocalDate; +import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.Arrays; @@ -19,6 +21,7 @@ import java.util.Set; import java.util.stream.Collectors; +import org.apache.commons.codec.DecoderException; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -41,19 +44,23 @@ import com.fasterxml.jackson.databind.ObjectMapper; import io.mosip.authentication.common.service.config.IDAMappingConfig; +import io.mosip.authentication.common.service.entity.KycTokenData; import io.mosip.authentication.common.service.factory.IDAMappingFactory; import io.mosip.authentication.common.service.helper.IdInfoHelper; import io.mosip.authentication.common.service.impl.IdInfoFetcherImpl; import io.mosip.authentication.common.service.impl.match.BioMatchType; +import io.mosip.authentication.common.service.repository.KycTokenDataRepository; +import io.mosip.authentication.common.service.transaction.manager.IdAuthSecurityManager; import io.mosip.authentication.common.service.util.EnvUtil; import io.mosip.authentication.core.constant.IdAuthCommonConstants; import io.mosip.authentication.core.constant.IdAuthenticationErrorConstants; import io.mosip.authentication.core.exception.IdAuthenticationBusinessException; import io.mosip.authentication.core.exception.IdAuthenticationDaoException; -import io.mosip.authentication.core.indauth.dto.IdentityInfoDTO; import io.mosip.authentication.core.indauth.dto.EKycResponseDTO; -import io.mosip.authentication.core.spi.bioauth.CbeffDocType; +import io.mosip.authentication.core.indauth.dto.IdentityInfoDTO; +import io.mosip.authentication.core.indauth.dto.KycExchangeRequestDTO; import io.mosip.authentication.core.spi.indauth.match.MappingConfig; +import io.mosip.authentication.core.util.CryptoUtil; import io.mosip.kernel.cbeffutil.impl.CbeffImpl; /** @@ -102,6 +109,12 @@ public class KycServiceImplTest { @Autowired private ObjectMapper mapper; + @Mock + private KycTokenDataRepository kycTokenDataRepo; + + @Mock + private IdAuthSecurityManager securityManager; + @Value("${sample.demo.entity}") String value; @@ -692,4 +705,299 @@ public void testGetKycInfo_photo_withPhotoNotInAllowedKycAttrib() throws IdAuthe Map expected = Map.of(); assertTrue(kycInfo.entrySet().containsAll(expected.entrySet())); } + + @Test + public void generateAndSaveKycTokenTest() throws DecoderException { + String idHash = "73616d706c65496448617368"; + String authToken = "testAuthToken"; + String oidcClientId = "sampleOidcClientId"; + String requestTime = "2023-10-19T12:35:57.835Z"; + String tokenGenerationTime = "2023-10-19T12:35:57.835Z"; + String reqTransactionId = "abc1234"; + String resKycToken = "sampleKycToken"; + KycTokenData kycTokenData = new KycTokenData(); + + Mockito.when(securityManager.generateKeyedHash(Mockito.any())).thenReturn(resKycToken); + Mockito.when(kycTokenDataRepo.saveAndFlush(kycTokenData)).thenReturn(null); + + String kycToken = ReflectionTestUtils.invokeMethod(kycServiceImpl2, "generateAndSaveKycToken", idHash, authToken, oidcClientId, requestTime, + tokenGenerationTime, reqTransactionId); + assertEquals(kycToken, resKycToken); + } + + @Test + public void isKycTokenExpireTest() { + LocalDateTime currentTime = LocalDateTime.now(); + LocalDateTime tokenIssuedTime = currentTime.minusSeconds(20); + String dummyToken = "dummyToken"; + boolean valid = ReflectionTestUtils.invokeMethod(kycServiceImpl2, "isKycTokenExpire", tokenIssuedTime, dummyToken); + assertFalse(valid); + } + + @Test + public void isKycTokenExpireTokenExpiredTest() { + LocalDateTime currentTime = LocalDateTime.now(); + LocalDateTime tokenIssuedTime = currentTime.plusSeconds(310); + String dummyToken = "dummyToken"; + boolean valid = ReflectionTestUtils.invokeMethod(kycServiceImpl2, "isKycTokenExpire", tokenIssuedTime, dummyToken); + assertTrue(valid); + } + + @Test + public void buildKycExchangeResponseTest() throws IdAuthenticationBusinessException { + + String dummySubject = "dummyPSUToken"; + List consentedAttributes = Arrays.asList("name", "gender", "dob", "address", "individual_id", "sub"); + List consentedLocales = Arrays.asList("ara"); + String idVid = "12232323121"; + KycExchangeRequestDTO kycExchangeRequestDTO = new KycExchangeRequestDTO(); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedIndividualAttributeName", "individual_id"); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedAddressAttributeName", "address"); + ReflectionTestUtils.setField(kycServiceImpl2, "addressSubsetAttributes", new String[]{}); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedFaceAttributeName", "picture"); + ReflectionTestUtils.setField(kycServiceImpl2, "idInfoHelper", idInfoHelper2); + + String resKycToken = "responseJWTToken"; + Mockito.when(securityManager.signWithPayload(Mockito.anyString())).thenReturn(resKycToken); + Map faceMap = prepareFaceData(idInfo); + Mockito.when(idInfoHelper.getIdEntityInfoMap(Mockito.any(), Mockito.any(), Mockito.any())).thenReturn(faceMap); + + String response = kycServiceImpl2.buildKycExchangeResponse(dummySubject, idInfo, consentedAttributes, consentedLocales, idVid, kycExchangeRequestDTO); + assertEquals(response, resKycToken); + } + + private Map prepareFaceData(Map> idInfo) { + String faceData = "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI_Pgo8QklSIHhtbG5zPSJodHRwOi8vZG9jcy5vYXNpcy1vcGVuLm9yZy9iaWFzL25zL2JpYXNwYXRyb25mb3JtYXQtMS4wLyI-CiAgICA8VmVyc2lvbj4KICAgICAgICA8TWFqb3I-MTwvTWFqb3I-CiAgICAgICAgPE1pbm9yPjE8L01pbm9yPgogICAgPC9WZXJzaW9uPgogICAgPENCRUZGVmVyc2lvbj4KICAgICAgICA8TWFqb3I-MTwvTWFqb3I-CiAgICAgICAgPE1pbm9yPjE8L01pbm9yPgogICAgPC9DQkVGRlZlcnNpb24-CiAgICA8QklSSW5mbz4KICAgICAgICA8SW50ZWdyaXR5PmZhbHNlPC9JbnRlZ3JpdHk-CiAgICA8L0JJUkluZm8-Cgk8QklSPgogICAgICAgIDxCSVJJbmZvPgogICAgICAgICAgICA8SW50ZWdyaXR5PmZhbHNlPC9JbnRlZ3JpdHk-CiAgICAgICAgPC9CSVJJbmZvPgogICAgICAgIDxCREJJbmZvPgogICAgICAgICAgICA8Rm9ybWF0T3duZXI-MjU3PC9Gb3JtYXRPd25lcj4KICAgICAgICAgICAgPEZvcm1hdFR5cGU-ODwvRm9ybWF0VHlwZT4KICAgICAgICAgICAgPENyZWF0aW9uRGF0ZT4yMDE5LTAxLTI5VDE5OjExOjMzLjQzNCswNTozMDwvQ3JlYXRpb25EYXRlPgogICAgICAgICAgICA8VHlwZT5GYWNlPC9UeXBlPgogICAgICAgICAgICA8TGV2ZWw-UmF3PC9MZXZlbD4KICAgICAgICAgICAgPFB1cnBvc2U-RW5yb2xsPC9QdXJwb3NlPgogICAgICAgICAgICA8UXVhbGl0eT45NTwvUXVhbGl0eT4KICAgICAgICA8L0JEQkluZm8-CiA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FEczVxM2NaeDJwSGdiREw2WFU4ZGIwaGx2VzJVY085TkViR3RpbnBpMXJRR2gwTGc2d0dtclR2NnJhZUE0L1Qxa1lscDVBOEhjYk9IYzVwMUJYSE4xY2NGeHllbGtFc0VqbU9IWWQrNGptRnNaWFpDTFZ2UjkwdHgxVG1VMVUzcTVuV2ExNHNJM3U1QS9oSjlGdEpBUkVRRVJFQkVSQVJFUUVSRUJFVktycUd4c2RJNDJheHJuT0o3QUxsQmhIU3Z4eU1QZzZxSWcxTTRJaUcrUnV4a2Q0WDBITXJuQ3FxSHl1TWtyM1BlN2R6eVhFK2FuY1RZMCt0cXBhcDVKenVPUUg3ckFmWmFPelQ2cTNJS0R3cWQxSWtDamthb0FVaWpoTDNzWTMzbk9hMXZpU2tjQXRxcy93Q2p2aE54a2JWUGFRMW9QVmgyNUorOTRLT2VVeG02bGhqY3JwZDZqQW5zQU1SSjBHWnZPOXR3b3JqSzMzbU9IYjdKL1JaNUxTMkYxNnB6eVdEcWJ1bGdJYzgrN0c0OXZzdTIvb3BNV0UxTW0wYmdQeldBK2EyQTFmVnpxZDZHSFV2Q1R0NUhnZHpkVDZxNlFZYXlQM1dqeDNQcXJ4SVZEa1RxdE9tUkJxR3JHT0s0YzFOS1B5aytpeXVaaTF0eHJ4SGN1cG9lVjJ5dityVy9xcmVPVzNzcjVMSk83QXd2WUNxdGpYcHpWdFlsRUVnZ2drRUVFRWFFRWJGZEFkRUhTUjlxQW9hdHdFND08L0JEQj4KICAgIDwvQklSPgo8L0JJUj4K"; + List identityList = new ArrayList<>(); + IdentityInfoDTO identityInfoDTO = new IdentityInfoDTO(); + identityInfoDTO.setLanguage(null); + identityInfoDTO.setValue(new String(CryptoUtil.decodeBase64Url(faceData))); + identityList.add(identityInfoDTO); + idInfo.put("Face", identityList); + return Map.of("Face", new String(CryptoUtil.decodeBase64Url(faceData))); + } + + @Test + public void buildKycExchangeResponseWithFaceDataTest() throws IdAuthenticationBusinessException { + + String dummySubject = "dummyPSUToken"; + List consentedAttributes = Arrays.asList("name", "gender", "dob", "address", "individual_id", "picture", "sub"); + List consentedLocales = Arrays.asList("ara"); + String idVid = "12232323121"; + KycExchangeRequestDTO kycExchangeRequestDTO = new KycExchangeRequestDTO(); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedIndividualAttributeName", "individual_id"); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedAddressAttributeName", "address"); + ReflectionTestUtils.setField(kycServiceImpl2, "addressSubsetAttributes", new String[]{}); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedFaceAttributeName", "picture"); + ReflectionTestUtils.setField(kycServiceImpl2, "idInfoHelper", idInfoHelper); + + String resKycToken = "responseJWTToken"; + Mockito.when(securityManager.signWithPayload(Mockito.anyString())).thenReturn(resKycToken); + Map faceMap = prepareFaceData(idInfo); + Mockito.when(idInfoHelper.getIdEntityInfoMap(Mockito.any(), Mockito.any(), Mockito.any())).thenReturn(faceMap); + + String response = kycServiceImpl2.buildKycExchangeResponse(dummySubject, idInfo, consentedAttributes, consentedLocales, idVid, kycExchangeRequestDTO); + assertEquals(response, resKycToken); + } + + @Test + public void buildKycExchangeResponseTypeJWETest() throws IdAuthenticationBusinessException { + + String dummySubject = "dummyPSUToken"; + List consentedAttributes = Arrays.asList("name", "gender", "dob", "address", "individual_id", "sub"); + List consentedLocales = Arrays.asList("ara"); + String idVid = "12232323121"; + KycExchangeRequestDTO kycExchangeRequestDTO = new KycExchangeRequestDTO(); + kycExchangeRequestDTO.setRespType("JWE"); + Map metadata = Map.of("PARTNER_CERTIFICATE", "DUMMY-X509-CERTIFICATE"); + kycExchangeRequestDTO.setMetadata(metadata); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedIndividualAttributeName", "individual_id"); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedAddressAttributeName", "address"); + ReflectionTestUtils.setField(kycServiceImpl2, "addressSubsetAttributes", new String[]{}); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedFaceAttributeName", "picture"); + ReflectionTestUtils.setField(kycServiceImpl2, "idInfoHelper", idInfoHelper2); + ReflectionTestUtils.setField(kycServiceImpl2, "jweResponseType", "JWE"); + + String resKycToken = "responseJWEToken"; + String dummyTokenData = "dummyJWTTokenData"; + Mockito.when(securityManager.signWithPayload(Mockito.anyString())).thenReturn(dummyTokenData); + Map faceMap = prepareFaceData(idInfo); + Mockito.when(idInfoHelper.getIdEntityInfoMap(Mockito.any(), Mockito.any(), Mockito.any())).thenReturn(faceMap); + Mockito.when(securityManager.jwtEncrypt(Mockito.anyString(), Mockito.anyString())).thenReturn(resKycToken); + + String response = kycServiceImpl2.buildKycExchangeResponse(dummySubject, idInfo, consentedAttributes, consentedLocales, idVid, kycExchangeRequestDTO); + assertEquals(response, resKycToken); + } + + @Test + public void buildKycExchangeNoLangTest() throws IdAuthenticationBusinessException { + + String dummySubject = "dummyPSUToken"; + List consentedAttributes = Arrays.asList("name", "gender", "dob", "address", "individual_id", "sub"); + List consentedLocales = List.of(); + String idVid = "12232323121"; + KycExchangeRequestDTO kycExchangeRequestDTO = new KycExchangeRequestDTO(); + + String resKycToken = "responseJWTToken"; + Mockito.when(securityManager.signWithPayload(Mockito.anyString())).thenReturn(resKycToken); + String response = kycServiceImpl2.buildKycExchangeResponse(dummySubject, idInfo, consentedAttributes, consentedLocales, idVid, kycExchangeRequestDTO); + assertEquals(response, resKycToken); + } + + @Test + public void buildKycExchangeNoFaceDataTest() throws IdAuthenticationBusinessException { + + String dummySubject = "dummyPSUToken"; + List consentedAttributes = Arrays.asList("name", "gender", "dob", "address", "individual_id", "picture", "sub"); + List consentedLocales = List.of("ara"); + String idVid = "12232323121"; + KycExchangeRequestDTO kycExchangeRequestDTO = new KycExchangeRequestDTO(); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedIndividualAttributeName", "individual_id"); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedAddressAttributeName", "address"); + ReflectionTestUtils.setField(kycServiceImpl2, "addressSubsetAttributes", new String[]{}); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedFaceAttributeName", "picture"); + ReflectionTestUtils.setField(kycServiceImpl2, "idInfoHelper", idInfoHelper); + + String resKycToken = "responseJWTToken"; + Mockito.when(securityManager.signWithPayload(Mockito.anyString())).thenReturn(resKycToken); + + String response = kycServiceImpl2.buildKycExchangeResponse(dummySubject, idInfo, consentedAttributes, consentedLocales, idVid, kycExchangeRequestDTO); + assertEquals(response, resKycToken); + } + + @Test + public void buildKycExchangeNoFullnameDataTest() throws IdAuthenticationBusinessException { + + idInfo.remove("fullName"); + String dummySubject = "dummyPSUToken"; + List consentedAttributes = Arrays.asList("name", "gender", "dob", "address", "individual_id", "sub"); + List consentedLocales = List.of("ara"); + String idVid = "12232323121"; + KycExchangeRequestDTO kycExchangeRequestDTO = new KycExchangeRequestDTO(); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedIndividualAttributeName", "individual_id"); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedAddressAttributeName", "address"); + ReflectionTestUtils.setField(kycServiceImpl2, "addressSubsetAttributes", new String[]{}); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedFaceAttributeName", "picture"); + ReflectionTestUtils.setField(kycServiceImpl2, "idInfoHelper", idInfoHelper2); + + String resKycToken = "responseJWTToken"; + Mockito.when(securityManager.signWithPayload(Mockito.anyString())).thenReturn(resKycToken); + Map faceMap = prepareFaceData(idInfo); + Mockito.when(idInfoHelper.getIdEntityInfoMap(Mockito.any(), Mockito.any(), Mockito.any())).thenReturn(faceMap); + + String response = kycServiceImpl2.buildKycExchangeResponse(dummySubject, idInfo, consentedAttributes, consentedLocales, idVid, kycExchangeRequestDTO); + assertEquals(response, resKycToken); + } + + @Test + public void buildKycExchangeResponseMultiLangTest() throws IdAuthenticationBusinessException { + + String dummySubject = "dummyPSUToken"; + List consentedAttributes = Arrays.asList("name", "gender", "dob", "address", "phone", "individual_id", "sub"); + List consentedLocales = Arrays.asList("ara", "fre"); + String idVid = "12232323121"; + KycExchangeRequestDTO kycExchangeRequestDTO = new KycExchangeRequestDTO(); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedIndividualAttributeName", "individual_id"); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedAddressAttributeName", "address"); + ReflectionTestUtils.setField(kycServiceImpl2, "addressSubsetAttributes", new String[]{}); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedFaceAttributeName", "picture"); + ReflectionTestUtils.setField(kycServiceImpl2, "idInfoHelper", idInfoHelper2); + + String resKycToken = "responseJWTToken"; + Mockito.when(securityManager.signWithPayload(Mockito.anyString())).thenReturn(resKycToken); + Map faceMap = prepareFaceData(idInfo); + Mockito.when(idInfoHelper.getIdEntityInfoMap(Mockito.any(), Mockito.any(), Mockito.any())).thenReturn(faceMap); + + String response = kycServiceImpl2.buildKycExchangeResponse(dummySubject, idInfo, consentedAttributes, consentedLocales, idVid, kycExchangeRequestDTO); + assertEquals(response, resKycToken); + } + + @Test + public void buildKycExchangeResponseMultiLangAddressAttributesTest() throws IdAuthenticationBusinessException { + + String dummySubject = "dummyPSUToken"; + List consentedAttributes = Arrays.asList("name", "gender", "dob", "address", "phone", "individual_id", "sub"); + List consentedLocales = Arrays.asList("ara", "fre"); + String idVid = "12232323121"; + KycExchangeRequestDTO kycExchangeRequestDTO = new KycExchangeRequestDTO(); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedIndividualAttributeName", "individual_id"); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedAddressAttributeName", "address"); + ReflectionTestUtils.setField(kycServiceImpl2, "addressSubsetAttributes", new String[] {"street_address","locality"}); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedFaceAttributeName", "picture"); + ReflectionTestUtils.setField(kycServiceImpl2, "idInfoHelper", idInfoHelper2); + + String resKycToken = "responseJWTToken"; + Mockito.when(securityManager.signWithPayload(Mockito.anyString())).thenReturn(resKycToken); + Map faceMap = prepareFaceData(idInfo); + Mockito.when(idInfoHelper.getIdEntityInfoMap(Mockito.any(), Mockito.any(), Mockito.any())).thenReturn(faceMap); + + String response = kycServiceImpl2.buildKycExchangeResponse(dummySubject, idInfo, consentedAttributes, consentedLocales, idVid, kycExchangeRequestDTO); + assertEquals(response, resKycToken); + } + + @Test + public void buildKycExchangeResponseAddressAttributesTest() throws IdAuthenticationBusinessException { + + String dummySubject = "dummyPSUToken"; + List consentedAttributes = Arrays.asList("name", "gender", "dob", "address", "phone", "individual_id", "sub"); + List consentedLocales = Arrays.asList("ara"); + String idVid = "12232323121"; + KycExchangeRequestDTO kycExchangeRequestDTO = new KycExchangeRequestDTO(); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedIndividualAttributeName", "individual_id"); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedAddressAttributeName", "address"); + ReflectionTestUtils.setField(kycServiceImpl2, "addressSubsetAttributes", new String[] {"street_address","locality"}); + ReflectionTestUtils.setField(kycServiceImpl2, "idInfoHelper", idInfoHelper2); + + String resKycToken = "responseJWTToken"; + Mockito.when(securityManager.signWithPayload(Mockito.anyString())).thenReturn(resKycToken); + + String response = kycServiceImpl2.buildKycExchangeResponse(dummySubject, idInfo, consentedAttributes, consentedLocales, idVid, kycExchangeRequestDTO); + assertEquals(response, resKycToken); + } + + @Test + public void buildKycExchangeTwoNameAttributesTest() throws IdAuthenticationBusinessException { + + String dummySubject = "dummyPSUToken"; + List consentedAttributes = Arrays.asList("name"); + List consentedLocales = List.of("ara"); + String idVid = "12232323121"; + KycExchangeRequestDTO kycExchangeRequestDTO = new KycExchangeRequestDTO(); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedIndividualAttributeName", "individual_id"); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedAddressAttributeName", "address"); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedNameAttributeName", "name"); + ReflectionTestUtils.setField(kycServiceImpl2, "addressSubsetAttributes", new String[]{}); + ReflectionTestUtils.setField(kycServiceImpl2, "idInfoHelper", idInfoHelper); + + String resKycToken = "responseJWTToken"; + Mockito.when(securityManager.signWithPayload(Mockito.anyString())).thenReturn(resKycToken); + List attributes = List.of("middleName", "lastName"); + Mockito.when(idInfoHelper.getIdentityAttributesForIdName(Mockito.anyString())).thenReturn(attributes); + + String response = kycServiceImpl2.buildKycExchangeResponse(dummySubject, idInfo, consentedAttributes, consentedLocales, idVid, kycExchangeRequestDTO); + assertEquals(response, resKycToken); + } + + @Test + public void buildKycExchangeTwoNameAttributesMultiLangTest() throws IdAuthenticationBusinessException { + + String dummySubject = "dummyPSUToken"; + List consentedAttributes = Arrays.asList("name"); + List consentedLocales = List.of("ara", "fre"); + String idVid = "12232323121"; + KycExchangeRequestDTO kycExchangeRequestDTO = new KycExchangeRequestDTO(); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedIndividualAttributeName", "individual_id"); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedAddressAttributeName", "address"); + ReflectionTestUtils.setField(kycServiceImpl2, "consentedNameAttributeName", "name"); + ReflectionTestUtils.setField(kycServiceImpl2, "addressSubsetAttributes", new String[]{}); + ReflectionTestUtils.setField(kycServiceImpl2, "idInfoHelper", idInfoHelper); + + String resKycToken = "responseJWTToken"; + Mockito.when(securityManager.signWithPayload(Mockito.anyString())).thenReturn(resKycToken); + List attributes = List.of("middleName", "lastName"); + Mockito.when(idInfoHelper.getIdentityAttributesForIdName(Mockito.anyString())).thenReturn(attributes); + + String response = kycServiceImpl2.buildKycExchangeResponse(dummySubject, idInfo, consentedAttributes, consentedLocales, idVid, kycExchangeRequestDTO); + assertEquals(response, resKycToken); + } } \ No newline at end of file diff --git a/authentication/authentication-service/src/test/java/io/mosip/authentication/service/kyc/util/ExchangeDataAttributesUtilTest.java b/authentication/authentication-service/src/test/java/io/mosip/authentication/service/kyc/util/ExchangeDataAttributesUtilTest.java new file mode 100644 index 00000000000..df2d5b8796b --- /dev/null +++ b/authentication/authentication-service/src/test/java/io/mosip/authentication/service/kyc/util/ExchangeDataAttributesUtilTest.java @@ -0,0 +1,135 @@ +package io.mosip.authentication.service.kyc.util; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Optional; +import java.util.Set; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.context.annotation.Import; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.TestContext; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.util.ReflectionTestUtils; +import org.springframework.web.context.WebApplicationContext; + +import io.mosip.authentication.common.service.entity.OIDCClientData; +import io.mosip.authentication.common.service.helper.IdInfoHelper; +import io.mosip.authentication.common.service.repository.OIDCClientDataRepository; +import io.mosip.authentication.common.service.util.EnvUtil; +import io.mosip.authentication.core.exception.IdAuthenticationBusinessException; +import io.mosip.authentication.core.indauth.dto.BaseRequestDTO; + +@WebMvcTest +@ContextConfiguration(classes = {TestContext.class, WebApplicationContext.class}) +@RunWith(SpringRunner.class) +@Import(EnvUtil.class) +public class ExchangeDataAttributesUtilTest { + + @Autowired + EnvUtil env; + + @Mock + private IdInfoHelper idInfoHelper; + + @Mock + private OIDCClientDataRepository oidcClientDataRepo; + + @InjectMocks + private ExchangeDataAttributesUtil exchangeDataAttributesUtil; + + @Before + public void before() { + // + } + + + @Test + public void mapConsentedAttributesToIdSchemaAttributesTest() throws IdAuthenticationBusinessException { + List consentAttributes = Arrays.asList("name", "gender", "dob", "address"); + List policyAttributes = Arrays.asList("name", "gender", "dob", "address", "picture", "individual_id"); + Set exFilterAttributes = Set.of("fullname", "gender", "dob", "address"); + + Mockito.when(idInfoHelper.getIdentityAttributesForIdName("name")).thenReturn(Arrays.asList("fullname")); + Mockito.when(idInfoHelper.getIdentityAttributesForIdName("gender")).thenReturn(Arrays.asList("gender")); + Mockito.when(idInfoHelper.getIdentityAttributesForIdName("dob")).thenReturn(Arrays.asList("dob")); + Mockito.when(idInfoHelper.getIdentityAttributesForIdName("address")).thenReturn(Arrays.asList("address")); + + ReflectionTestUtils.setField(exchangeDataAttributesUtil, "consentedIndividualIdAttributeName", "individual_id"); + Set filterAttributes = new HashSet<>(); + exchangeDataAttributesUtil.mapConsentedAttributesToIdSchemaAttributes(consentAttributes, filterAttributes, policyAttributes); + assertEquals(exFilterAttributes, filterAttributes); + } + + @Test + public void mapConsentedAttributesToIdSchemaAttributesNoIndividualIdTest() throws IdAuthenticationBusinessException { + List consentAttributes = new ArrayList<>(); + consentAttributes.add("name"); + consentAttributes.add("gender"); + consentAttributes.add("dob"); + consentAttributes.add("address"); + consentAttributes.add("individual_id"); + + List policyAttributes = Arrays.asList("name", "gender", "dob", "address", "picture"); + List exConsentAttributes = Arrays.asList("name", "gender", "dob", "address"); + + ReflectionTestUtils.setField(exchangeDataAttributesUtil, "consentedIndividualIdAttributeName", "individual_id"); + Set filterAttributes = new HashSet<>(); + exchangeDataAttributesUtil.mapConsentedAttributesToIdSchemaAttributes(consentAttributes, filterAttributes, policyAttributes); + assertEquals(consentAttributes, exConsentAttributes); + } + + @Test + public void filterByPolicyAllowedAttributesTest() { + List policyAttributes = Arrays.asList("name", "gender", "dob", "address", "picture", "individual_id"); + Set filterAttributes = Set.of("name", "gender", "dob", "address"); + + Set resFilterAttributes = exchangeDataAttributesUtil.filterByPolicyAllowedAttributes(filterAttributes, policyAttributes); + assertEquals(filterAttributes, resFilterAttributes); + } + + @Test + public void getKycExchangeResponseTimeTest() { + BaseRequestDTO authRequestDTO = new BaseRequestDTO(); + authRequestDTO.setRequestTime("2023-10-19T12:35:57.835Z"); + String resValue = exchangeDataAttributesUtil.getKycExchangeResponseTime(authRequestDTO); + assertNotNull(resValue); + } + + @Test + public void filterAllowedUserClaimsTest() { + List consentAttributes = Arrays.asList("name", "gender", "dob", "address"); + String oidcClientId = "sampleOidcClientId"; + OIDCClientData clientData = new OIDCClientData(); + clientData.setUserClaims(new String [] {"name","gender","dob","address"}); + + Mockito.when(oidcClientDataRepo.findByClientId(oidcClientId)).thenReturn(Optional.of(clientData)); + List resAttributes = exchangeDataAttributesUtil.filterAllowedUserClaims(oidcClientId, consentAttributes); + assertEquals(consentAttributes, resAttributes); + } + + @Test + public void filterAllowedUserClaimsNoConsentAttributesTest() { + List exAttributes = Arrays.asList("name", "gender", "dob"); + String oidcClientId = "sampleOidcClientId"; + OIDCClientData clientData = new OIDCClientData(); + clientData.setUserClaims(new String [] {"name","gender","dob"}); + + Mockito.when(oidcClientDataRepo.findByClientId(oidcClientId)).thenReturn(Optional.of(clientData)); + List resAttributes = exchangeDataAttributesUtil.filterAllowedUserClaims(oidcClientId, Collections.emptyList()); + assertEquals(exAttributes, resAttributes); + } +} diff --git a/authentication/authentication-service/src/test/resources/application.properties b/authentication/authentication-service/src/test/resources/application.properties index 015d4f7db80..72e0f18f6ad 100644 --- a/authentication/authentication-service/src/test/resources/application.properties +++ b/authentication/authentication-service/src/test/resources/application.properties @@ -624,7 +624,7 @@ ida.id.attribute.separator.fullAddress=, mosip.date-of-birth.pattern=yyyy/MM/dd -sample.demo.entity={ "id": "mosip.id.read", "ver": "1.0", "timestamp": "", "err": "", "status": "SUCCCESSFUL", "errmsg": "", "responseCode": "OK", "uin": "7867780967875678", "response": { "identity": { "fullName": [{ "language": "ara", "label": "\u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u0627\u0648\u0644", "value": "\u0627\u0628\u0631\u0627\u0647\u064A\u0645" }, { "language": "fre", "label": "Prénom", "value": "Ibrahim" }], "middleName": [{ "language": "ara", "label": "\u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u0623\u0648\u0633\u0637", "value": "\u0628\u0646" }, { "language": "fre", "label": "deuxième nom", "value": "Ibn" }], "lastName": [{ "language": "ara", "label": "\u0627\u0644\u0643\u0646\u064A\u0629", "value": "\u0639\u0644\u064A" }, { "language": "fre", "label": "nom de famille", "value": "Ali" }], "dateOfBirth": [{ "label": "\u062A\u0627\u0631\u064A\u062E \u0627\u0644\u0648\u0644\u0627\u062F\u0629", "value": "16/04/1955" }, { "label": "date de naissance", "value": "16/04/1955" }], "gender": [{ "language": "ara", "label": "\u062C\u0646\u0633", "value": "\u0627\u0644\u0630\u0643\u0631" }, { "language": "fre", "label": "le sexe", "value": "mâle" }], "addressLine1": [{ "language": "ara", "label": "\u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0633\u0637\u0631 1", "value": "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0639\u064A\u0646\u0629 \u0633\u0637\u0631 1" }, { "language": "fre", "label": "Adresse 1", "value": "exemple d'adresse ligne 1" }], "addressLine2": [{ "language": "ara", "label": "\u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0633\u0637\u0631 2", "value": "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0639\u064A\u0646\u0629 \u0633\u0637\u0631 2" }, { "language": "fre", "label": "Adresse 2", "value": "exemple d'adresse ligne 2" }], "addressLine3": [{ "language": "ara", "label": "\u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0633\u0637\u0631 3", "value": "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0639\u064A\u0646\u0629 \u0633\u0637\u0631 3" }, { "language": "fre", "label": "Adresse 3", "value": "exemple d'adresse ligne 3" }], "region": [{ "label": "Région", "value": "Tanger-Tétouan-Al Hoceima" }], "province": [{ "language": "ara", "label": "\u0627\u0644\u0645\u062D\u0627\u0641\u0638\u0629", "value": "\u0641\u0627\u0633-\u0645\u0643\u0646\u0627\u0633" }, { "language": "fre", "label": "province", "value": "Fès-Meknès" }], "city": [{ "language": "ara", "label": "\u0645\u062F\u064A\u0646\u0629", "value": "\u0641\u0627\u0633-\u0627\u0644\u062F\u0627\u0631 \u0627\u0644\u0628\u064A\u0636\u0627\u0621" }, { "language": "fre", "label": "ville", "value": "Casablanca" }], "pinCode": [{ "language": "ara", "label": "\u0645\u062F\u064A\u0646\u0629", "value": "600001" }, { "language": "fre", "label": "ville", "value": "600001" }], "localAdministrativeAuthority": [{ "language": "ara", "label": "\u0627\u0644\u0647\u064A\u0626\u0629 \u0627\u0644\u0625\u062F\u0627\u0631\u064A\u0629 \u0627\u0644\u0645\u062D\u0644\u064A\u0629", "value": "\u0637\u0646\u062C\u0629 - \u062A\u0637\u0648\u0627\u0646 - \u0627\u0644\u062D\u0633\u064A\u0645\u0629" }, { "language": "fre", "label": "Autorité administrative locale", "value": "Tanger-Tétouan-Al Hoceima" }], "phone": [{ "language": "", "label": "\u0631\u0642\u0645 \u0627\u0644\u0647\u0627\u062A\u0641 \u0627\u0644\u0645\u062D\u0645\u0648\u0644", "value": "+212-5398-12345" }, { "language": "fre", "label": "numéro de portable", "value": "+212-5398-12345" }], "face": [{ "label": "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0627\u064A\u0645\u064A\u0644", "value": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxMTEhUQEhIVFRUSFRASEBUQEhAQFRgWFRYWFxcVGBUYHSogGBolHRUVITEhJSkrLi4uFx8zODMtNygtLisBCgoKDg0OGhAQGSsdHR0rKysrMS0tKzcrLTcvLS0rLS0tLS0xKy0tKy0tKy0tKy01LSsrLS0tKysrLSstLS0tLf/AABEIAOEA4QMBIgACEQEDEQH/xAAcAAEAAQUBAQAAAAAAAAAAAAAABAMFBgcIAgH/xABEEAABAwIEAgcFBQUECwAAAAABAAIDBBEFEiExBkEHE1FhcYGRIjJyobEUQlJi0RUjM7LBc4KSkwg0NUNEVGODotLx/8QAGQEBAAMBAQAAAAAAAAAAAAAAAAIDBAEF/8QAJhEBAQACAQQCAQQDAAAAAAAAAAECEQMSITFREzJBIlKRoRRhcf/aAAwDAQACEQMRAD8A3iiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiA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S+zA6ELLeB+MpsNDmMAkicQ4xvJFjzLTyug6QRQcDxEVFPFUBuUTMbIAdxmF7KcgIiICIiChX/wAKT4H/AMpXLg/hN8kRBQKgYly80RBbl6CIg+uUebZfUQrffCf8KH+yi/lCy9q+IvMz8vSw8KrVUCIq1i3YkrY5EU4hVF6h1nuP+B/0KIpRGtEfqV8KIvSec9Q7jxCm417oREEKkVxgREEpq+v2REHS/A3+z6T+wi/lCviIgIiICIiD/9mRXao6lVbiNjpXbMF/E8grnT4U613aDs5q3cZx2pHgbDL6XU8db0hlvW2UcO9NEbGtinpi1rQGh0Lg6wGmrTv6raeA4/T1kYlp5A8HcbOHc5p1BXHN1ccFxyelkEsEjmOHYd+4jmFsZXZCLVvR90tx1TmU1U3q5nWa14sI3u5A/hJ9FtJAREQEREBERAREQEREBEVKrqGxsdI42axrnOJ7ALlBhHSvxyMPg6qIg1M4IiG+Ruxkd4X0HMrnCqqHyuMkr3Pe7dzyXE+ancTY0+tqpap5JzuOQH7rAfZaOzT6q3IKDwqd1IkCjkaoAUijhL3sY33nOa1viSkcAtqs/wCjvhNxkbVPaQ1oPVh25J+94KOeUxm6lhjcrpd6jAnsAMRJ0GZvO9tworjK33mOHb7J/RZ5LS2F16pzyWDqbulgIc8+7G49vsu2/opMWE1Mm0bgPzWA+a2A1fVzqd6GHUvCTt5HgdzdT6q6QYayP3Wjx3PqrxIVDkTqtOmRBqGrGOK4c1NKPyk+iyuZi1txrxHcupoeV2yv+rW/qreOW3sr5LJO7AwvYCqtjXpzVtYlEEgggkEEEEaEEbFdAdEHSR9qAoatwE4=" }], "emailId": [{ "language": "ara", "label": "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0627\u064A\u0645\u064A\u0644", "value": "sample@samplamail.com" }, { "language": "fre", "label": "identifiant email", "value": "sample@samplamail.com" }], "CNEOrPINNumber": [{ "language": "ara", "label": "\u0631\u0642\u0645 CNE / PIN", "value": "AB453625" }, { "language": "fre", "label": "Numéro CNE / PIN", "value": "AB453625" }], "parentOrGuardianName": [{ "language": "ara", "label": "\u0627\u0633\u0645 \u0648\u0644\u064A \u0627\u0644\u0623\u0645\u0631 / \u0627\u0644\u0648\u0635\u064A", "value": "\u0633\u0644\u0645\u0649" }, { "language": "fre", "label": "Nom du parent / tuteur", "value": "salma" }], "parentOrGuardianRIDOrUIN": [{ "language": "ara", "label": "\u0627\u0644\u0648\u0627\u0644\u062F / \u0627\u0644\u0648\u0635\u064A RID / UIN", "value": "123456789123" }, { "language": "fre", "label": "parent / tuteur RID / UIN", "value": "123456789123" }], "leftEye": [{ "language": "ara", "label": "\u0627\u0644\u0639\u064A\u0646 \u0627\u0644\u064A\u0633\u0631\u0649", "value": "hashed_fileName.png" }, { "language": "fre", "label": "oeil gauche", "value": "hashed_fileName.png" }], "rightEye": [{ "language": "ara", "label": "\u0627\u0644\u0639\u064A\u0646 \u0627\u0644\u064A\u0645\u0646\u0649", "value": "hashed_fileName.png" }, { "language": "fre", "label": "l'\u0153il droit", "value": "hashed_fileName.png" }], "leftSlap": [{ "language": "ara", "label": "\u0627\u0644\u0628\u064A\u0648\u0645\u062A\u0631\u064A\u0629 \u0627\u0644\u0645\u0633\u062D \u0627\u0644\u0636\u0648\u0626\u064A 1", "value": "hashed_fileName.png" }, { "language": "fre", "label": "analyse biométrique 1", "value": "hashed_fileName.png" }], "rightSlap": [{ "language": "ara", "label": "\u0627\u0644\u0628\u064A\u0648\u0645\u062A\u0631\u064A\u0629 \u0627\u0644\u0645\u0633\u062D \u0627\u0644\u0636\u0648\u0626\u064A 2", "value": "hashed_fileName.png" }, { "language": "fre", "label": "analyse biométrique 2", "value": "hashed_fileName.png" }], "thumbs": [{ "language": "ara", "label": "\u0627\u0644\u0628\u064A\u0648\u0645\u062A\u0631\u064A\u0629 \u0627\u0644\u0645\u0633\u062D \u0627\u0644\u0636\u0648\u0626\u064A 3", "value": "hashed_fileName.png" }, { "language": "fre", "label": "analyse biométrique 3", "value": "hashed_fileName.png" }] } } } +sample.demo.entity={ "id": "mosip.id.read", "ver": "1.0", "timestamp": "", "err": "", "status": "SUCCCESSFUL", "errmsg": "", "responseCode": "OK", "uin": "7867780967875678", "response": { "identity": { "fullName": [{ "language": "ara", "label": "\u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u0627\u0648\u0644", "value": "\u0627\u0628\u0631\u0627\u0647\u064A\u0645" }, { "language": "fre", "label": "Pr�nom", "value": "Ibrahim" }], "middleName": [{ "language": "ara", "label": "\u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u0623\u0648\u0633\u0637", "value": "\u0628\u0646" }, { "language": "fre", "label": "deuxi�me nom", "value": "Ibn" }], "lastName": [{ "language": "ara", "label": "\u0627\u0644\u0643\u0646\u064A\u0629", "value": "\u0639\u0644\u064A" }, { "language": "fre", "label": "nom de famille", "value": "Ali" }], "dateOfBirth": [{ "label": "\u062A\u0627\u0631\u064A\u062E \u0627\u0644\u0648\u0644\u0627\u062F\u0629", "value": "16/04/1955" }, { "label": "date de naissance", "value": "16/04/1955" }], "gender": [{ "language": "ara", "label": "\u062C\u0646\u0633", "value": "\u0627\u0644\u0630\u0643\u0631" }, { "language": "fre", "label": "le sexe", "value": "m�le" }], "addressLine1": [{ "language": "ara", "label": "\u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0633\u0637\u0631 1", "value": "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0639\u064A\u0646\u0629 \u0633\u0637\u0631 1" }, { "language": "fre", "label": "Adresse 1", "value": "exemple d'adresse ligne 1" }], "addressLine2": [{ "language": "ara", "label": "\u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0633\u0637\u0631 2", "value": "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0639\u064A\u0646\u0629 \u0633\u0637\u0631 2" }, { "language": "fre", "label": "Adresse 2", "value": "exemple d'adresse ligne 2" }], "addressLine3": [{ "language": "ara", "label": "\u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0633\u0637\u0631 3", "value": "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0639\u064A\u0646\u0629 \u0633\u0637\u0631 3" }, { "language": "fre", "label": "Adresse 3", "value": "exemple d'adresse ligne 3" }], "region": [{ "label": "R�gion", "value": "Tanger-T�touan-Al Hoceima" }], "province": [{ "language": "ara", "label": "\u0627\u0644\u0645\u062D\u0627\u0641\u0638\u0629", "value": "\u0641\u0627\u0633-\u0645\u0643\u0646\u0627\u0633" }, { "language": "fre", "label": "province", "value": "F�s-Mekn�s" }], "city": [{ "language": "ara", "label": "\u0645\u062F\u064A\u0646\u0629", "value": "\u0641\u0627\u0633-\u0627\u0644\u062F\u0627\u0631 \u0627\u0644\u0628\u064A\u0636\u0627\u0621" }, { "language": "fre", "label": "ville", "value": "Casablanca" }], "pinCode": [{ "language": "ara", "label": "\u0645\u062F\u064A\u0646\u0629", "value": "600001" }, { "language": "fre", "label": "ville", "value": "600001" }], "localAdministrativeAuthority": [{ "language": "ara", "label": "\u0627\u0644\u0647\u064A\u0626\u0629 \u0627\u0644\u0625\u062F\u0627\u0631\u064A\u0629 \u0627\u0644\u0645\u062D\u0644\u064A\u0629", "value": "\u0637\u0646\u062C\u0629 - \u062A\u0637\u0648\u0627\u0646 - \u0627\u0644\u062D\u0633\u064A\u0645\u0629" }, { "language": "fre", "label": "Autorit� administrative locale", "value": "Tanger-T�touan-Al Hoceima" }], "phone": [{ "label": "\u0631\u0642\u0645 \u0627\u0644\u0647\u0627\u062A\u0641 \u0627\u0644\u0645\u062D\u0645\u0648\u0644", "value": "+212-5398-12345" }, { "label": "num�ro de portable", "value": "+212-5398-12345" }], "face": [{ "label": "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0627\u064A\u0645\u064A\u0644", "value": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxMTEhUQEhIVFRUSFRASEBUQEhAQFRgWFRYWFxcVGBUYHSogGBolHRUVITEhJSkrLi4uFx8zODMtNygtLisBCg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S2F16pzyWDqbulgIc8+7G49vsu2/opMWE1Mm0bgPzWA+a2A1fVzqd6GHUvCTt5HgdzdT6q6QYayP3Wjx3PqrxIVDkTqtOmRBqGrGOK4c1NKPyk+iyuZi1txrxHcupoeV2yv+rW/qreOW3sr5LJO7AwvYCqtjXpzVtYlEEgggkEEEEaEEbFdAdEHSR9qAoatwE4=" }], "emailId": [{ "language": "ara", "label": "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0627\u064A\u0645\u064A\u0644", "value": "sample@samplamail.com" }, { "language": "fre", "label": "identifiant email", "value": "sample@samplamail.com" }], "CNEOrPINNumber": [{ "language": "ara", "label": "\u0631\u0642\u0645 CNE / PIN", "value": "AB453625" }, { "language": "fre", "label": "Num�ro CNE / PIN", "value": "AB453625" }], "parentOrGuardianName": [{ "language": "ara", "label": "\u0627\u0633\u0645 \u0648\u0644\u064A \u0627\u0644\u0623\u0645\u0631 / \u0627\u0644\u0648\u0635\u064A", "value": "\u0633\u0644\u0645\u0649" }, { "language": "fre", "label": "Nom du parent / tuteur", "value": "salma" }], "parentOrGuardianRIDOrUIN": [{ "language": "ara", "label": "\u0627\u0644\u0648\u0627\u0644\u062F / \u0627\u0644\u0648\u0635\u064A RID / UIN", "value": "123456789123" }, { "language": "fre", "label": "parent / tuteur RID / UIN", "value": "123456789123" }], "leftEye": [{ "language": "ara", "label": "\u0627\u0644\u0639\u064A\u0646 \u0627\u0644\u064A\u0633\u0631\u0649", "value": "hashed_fileName.png" }, { "language": "fre", "label": "oeil gauche", "value": "hashed_fileName.png" }], "rightEye": [{ "language": "ara", "label": "\u0627\u0644\u0639\u064A\u0646 \u0627\u0644\u064A\u0645\u0646\u0649", "value": "hashed_fileName.png" }, { "language": "fre", "label": "l'\u0153il droit", "value": "hashed_fileName.png" }], "leftSlap": [{ "language": "ara", "label": "\u0627\u0644\u0628\u064A\u0648\u0645\u062A\u0631\u064A\u0629 \u0627\u0644\u0645\u0633\u062D \u0627\u0644\u0636\u0648\u0626\u064A 1", "value": "hashed_fileName.png" }, { "language": "fre", "label": "analyse biom�trique 1", "value": "hashed_fileName.png" }], "rightSlap": [{ "language": "ara", "label": "\u0627\u0644\u0628\u064A\u0648\u0645\u062A\u0631\u064A\u0629 \u0627\u0644\u0645\u0633\u062D \u0627\u0644\u0636\u0648\u0626\u064A 2", "value": "hashed_fileName.png" }, { "language": "fre", "label": "analyse biom�trique 2", "value": "hashed_fileName.png" }], "thumbs": [{ "language": "ara", "label": "\u0627\u0644\u0628\u064A\u0648\u0645\u062A\u0631\u064A\u0629 \u0627\u0644\u0645\u0633\u062D \u0627\u0644\u0636\u0648\u0626\u064A 3", "value": "hashed_fileName.png" }, { "language": "fre", "label": "analyse biom�trique 3", "value": "hashed_fileName.png" }] } } } # Limit the number of async threads created in IDRepo services. This count is divided into 4 thread groups configured in IdRepoConfig.class mosip.ida.active-async-thread-count=100 diff --git a/authentication/authentication-service/src/test/resources/ida-mapping.json b/authentication/authentication-service/src/test/resources/ida-mapping.json index e02c70e36cb..0be491bfc95 100644 --- a/authentication/authentication-service/src/test/resources/ida-mapping.json +++ b/authentication/authentication-service/src/test/resources/ida-mapping.json @@ -1,123 +1,132 @@ -{ - "identity": { - "IDSchemaVersion": { - "value": "IDSchemaVersion" - }, - "name": { - "value": "fullName" - }, - "name2": { - "value": "firstName,lastName" - }, - "gender": { - "value": "gender" - }, - "dob": { - "value": "dateOfBirth" - }, - "age": { - "value": "age" - }, - "introducerRID": { - "value": "introducerRID" - }, - "introducerUIN": { - "value": "introducerUIN" - }, - "introducerVID": { - "value": "introducerVID" - }, - "introducerName": { - "value": "introducerName" - }, - "phone": { - "value": "phone" - }, - "phoneNumber": { - "value": "phone" - }, - "email": { - "value": "email" - }, - "emailId": { - "value": "email" - }, - "uin": { - "value": "UIN" - }, - "individualBiometrics": { - "value": "individualBiometrics" - }, - "introducerBiometrics": { - "value": "introducerBiometrics" - }, - "individualAuthBiometrics": { - "value": "individualAuthBiometrics" - }, - "officerBiometricFileName": { - "value": "officerBiometricFileName" - }, - "supervisorBiometricFileName": { - "value": "supervisorBiometricFileName" - }, - "residenceStatus": { - "value": "residenceStatus" - }, - "preferredLanguage": { - "value": "preferredLang" - }, - "locationHierarchyForProfiling": { - "value": "zone,postalCode" - }, - "addressLine1": { - "value": "addressLine1" - }, - "addressLine2": { - "value": "addressLine2" - }, - "addressLine3": { - "value": "addressLine3" - }, - "location1": { - "value": "city" - }, - "location2": { - "value": "region" - }, - "location3": { - "value": "province" - }, - "postalCode": { - "value": "postalCode" - }, - "location4": { - "value": "zone" - }, - "fullAddress": { - "value": "addressLine1,addressLine2,addressLine3,city,region,province,postalCode" - } - }, - "metaInfo": { - "value": "metaInfo" - }, - "audits": { - "value": "audits" - }, - "documents": { - "poa": { - "value": "proofOfAddress" - }, - "poi": { - "value": "proofOfIdentity" - }, - "por": { - "value": "proofOfRelationship" - }, - "pob": { - "value": "proofOfDateOfBirth" - }, - "poe": { - "value": "proofOfException" - } - } +{ + "identity": { + "IDSchemaVersion": { + "value": "IDSchemaVersion" + }, + "name": { + "value": "fullName" + }, + "name2": { + "value": "firstName,lastName" + }, + "gender": { + "value": "gender" + }, + "dob": { + "value": "dateOfBirth" + }, + "age": { + "value": "age" + }, + "introducerRID": { + "value": "introducerRID" + }, + "introducerUIN": { + "value": "introducerUIN" + }, + "introducerVID": { + "value": "introducerVID" + }, + "introducerName": { + "value": "introducerName" + }, + "phone": { + "value": "phone" + }, + "phoneNumber": { + "value": "phone" + }, + "email": { + "value": "email" + }, + "emailId": { + "value": "email" + }, + "uin": { + "value": "UIN" + }, + "individualBiometrics": { + "value": "individualBiometrics" + }, + "introducerBiometrics": { + "value": "introducerBiometrics" + }, + "individualAuthBiometrics": { + "value": "individualAuthBiometrics" + }, + "officerBiometricFileName": { + "value": "officerBiometricFileName" + }, + "supervisorBiometricFileName": { + "value": "supervisorBiometricFileName" + }, + "residenceStatus": { + "value": "residenceStatus" + }, + "preferredLanguage": { + "value": "preferredLang" + }, + "locationHierarchyForProfiling": { + "value": "zone,postalCode" + }, + "addressLine1": { + "value": "addressLine1" + }, + "addressLine2": { + "value": "addressLine2" + }, + "addressLine3": { + "value": "addressLine3" + }, + "location1": { + "value": "city" + }, + "location2": { + "value": "region" + }, + "location3": { + "value": "province" + }, + "postalCode": { + "value": "postalCode" + }, + "location4": { + "value": "zone" + }, + "fullAddress": { + "value": "addressLine1,addressLine2,addressLine3,city,region,province,postalCode" + }, + "address": { + "value": "addressLine1,addressLine2,addressLine3,city,region,province,postalCode" + }, + "street_address": { + "value": "addressLine1,addressLine2,addressLine3" + }, + "locality": { + "value": "city" + } + }, + "metaInfo": { + "value": "metaInfo" + }, + "audits": { + "value": "audits" + }, + "documents": { + "poa": { + "value": "proofOfAddress" + }, + "poi": { + "value": "proofOfIdentity" + }, + "por": { + "value": "proofOfRelationship" + }, + "pob": { + "value": "proofOfDateOfBirth" + }, + "poe": { + "value": "proofOfException" + } + } } \ No newline at end of file