{"id":28577587,"url":"https://github.com/mastercard/mastercard-idservice-tp-reference-app","last_synced_at":"2025-06-11T00:38:58.958Z","repository":{"id":65512467,"uuid":"536630491","full_name":"Mastercard/mastercard-idservice-tp-reference-app","owner":"Mastercard","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-07T19:02:21.000Z","size":249,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-16T10:43:18.013Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mastercard.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-09-14T14:57:26.000Z","updated_at":"2022-12-18T17:39:03.000Z","dependencies_parsed_at":"2024-01-17T19:18:42.649Z","dependency_job_id":"d7ca30fa-d4f2-4bf2-b101-4b103050072c","html_url":"https://github.com/Mastercard/mastercard-idservice-tp-reference-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mastercard%2Fmastercard-idservice-tp-reference-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mastercard%2Fmastercard-idservice-tp-reference-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mastercard%2Fmastercard-idservice-tp-reference-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mastercard%2Fmastercard-idservice-tp-reference-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mastercard","download_url":"https://codeload.github.com/Mastercard/mastercard-idservice-tp-reference-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mastercard%2Fmastercard-idservice-tp-reference-app/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259177339,"owners_count":22817349,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-11T00:38:28.782Z","updated_at":"2025-06-11T00:38:58.947Z","avatar_url":"https://github.com/Mastercard.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ID for Trust Providers Reference Implementation\n\n[![](https://developer.mastercard.com/_/_/src/global/assets/svg/mcdev-logo-dark.svg)](https://developer.mastercard.com/)\n\n[![](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](./LICENSE)\n[![](https://sonarcloud.io/api/project_badges/measure?project=Mastercard_mastercard-idservice-tp-reference-app\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Mastercard_mastercard-idservice-tp-reference-app)\n[![](https://sonarcloud.io/api/project_badges/measure?project=Mastercard_mastercard-idservice-tp-reference-app\u0026metric=coverage)](https://sonarcloud.io/summary/new_code?id=Mastercard_mastercard-idservice-tp-reference-app)\n[![](https://sonarcloud.io/api/project_badges/measure?project=Mastercard_mastercard-idservice-tp-reference-app\u0026metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=Mastercard_mastercard-idservice-tp-reference-app)\n\n## Table of Contents\n- [Overview](#overview)\n  * [References](#references)\n- [Usage](#usage)\n  * [Prerequisites](#prerequisites)\n  * [Configuration](#configuration)\n  * [Integrating with OpenAPI Generator](#integrating-with-openapi-generator)\n  * [OpenAPI Generator Plugin Configuration](#openapi-generator-plugin-configuration)\n  * [Generating The API Client Sources](#generating-the-api-client-sources)\n  * [Running the Project](#running-the-project)\n  * [Use Cases](#use-cases)\n  * [Execute the Use-Cases](#execute-use-cases)\n- [API Reference](#api-reference)\n  * [Request Examples](#request-examples)\n- [Support](#support)\n\n## Overview \u003ca name=\"overview\"\u003e\u003c/a\u003e\nID for Trust Providers is a digital identity service from Mastercard that helps you apply for, enroll in, log in to, and access services more simply, securely and privately. Rather than manually providing your information when you are trying to complete tasks online or in apps, ID enables you to share your verified information automatically, more securely, and with your consent and control. ID also enables you to do away with passwords and protects your personal information. Please see here for more details on the API: [ID for Trust Providers](https://developer.mastercard.com/mastercard-id-for-tp/documentation/).\n\nFor more information regarding the program, refer to [ID Service](https://idservice.com/)\n\n### References \u003ca name=\"references\"\u003e\u003c/a\u003e\n* [Mastercard's OAuth Signer library](https://github.com/Mastercard/oauth1-signer-java)\n* [Using OAuth 1.0a to Access Mastercard APIs](https://developer.mastercard.com/platform/documentation/using-oauth-1a-to-access-mastercard-apis/)\n* [Mastercard's Payload Encryption/Decryption library](https://github.com/Mastercard/client-encryption-java)\n* [Using Payload Encryption](https://developer.mastercard.com/platform/documentation/security-and-authentication/securing-sensitive-data-using-payload-encryption/)\n\n## Usage \u003ca name=\"usage\"\u003e\u003c/a\u003e\n### Prerequisites \u003ca name=\"prerequisites\"\u003e\u003c/a\u003e\n* [Mastercard Developers Account](https://developer.mastercard.com/dashboard) with access to ID for Trust Providers API\n* IntelliJ IDEA (or any other IDE)\n* [Spring Boot 2.2+ up to 2.7.x](https://spring.io/projects/spring-boot)\n* [Apache Maven 3.3+](https://maven.apache.org/download.cgi)\n* [Java 8 or later is installed](http://www.oracle.com/technetwork/java/javase/downloads/index.html)\n* Set up the `JAVA_HOME` environment variable to match the location of your Java installation\n\n### Configuration \u003ca name=\"configuration\"\u003e\u003c/a\u003e\n\n1. Create an account at [Mastercard Developers](https://developer.mastercard.com/account/sign-up).\n2. Create a new project and add `ID for Trust Providers` API to your project.\n3. Download Sandbox Signing Key, a .p12 file will be downloaded.\n4. In the Client Encryption Keys section of the dashboard, click on the `Actions` dropdown and download the client encryption key, a `.pem` file will be downloaded.\n5. Select all `.p12` and `.pem` files, and copy them to `src/main/resources` in the project folder.\n6. Open `${project.basedir}/src/main/resources/application.properties` and configure the below parameters.\n\n    **Authentication**\n\n    \u003e**mastercard.api.key.file=classpath:** Path to keystore (.p12) file, just change the name as per the downloaded file in step 5 and set value as \"classpath:your-Mastercard_ID_Service_MTF-sandbox.p12\"\n    \n    \u003e**mastercard.api.consumer.key=** This refers to your consumer key. Copy it from the \"Keys\" section on your project page in [Mastercard Developers](https://developer.mastercard.com/dashboard).\n    \n    \u003e**mastercard.api.keystore.alias=** Alias of your key. Default key alias for sandbox is `keyalias`.\n    \n    \u003e**mastercard.api.keystore.password=** Password of your Keystore. Default keystore password for sandbox project is `keystorepassword`.\n    \n    \u003e**mastercard.user.selectedCountry=** Replace this country code as required. Following ISO 3166-1 alpha-3 standard. Example: USA.\n    \n    \u003e**mastercard.client.userProfileId=** This will be used by /user-profiles API to register a user profile using the given userProfileId. An error will be returned if the user profile already exists.\n\n    \u003e**mastercard.client.enrollment.workflowId=** This workflowId is created by the identity verification provider during the enrollment of the user, and it will be used by other APIs to retrieve the extracted data of the document in a subsequent call.\n\n    \u003e**mastercard.client.sessionId=** This sessionId is the tpAuditMetadata sessionId from the client.\n    \n    \u003e**mastercard.client.transactionGroupId=** This is the tpAuditMetadata transactionGroupId from the client.\n\n    **Encryption**\n    \n    \u003e**mastercard.api.encryption.certificateFile=classpath:** Copy your downloaded certificate (.pem) file to src/main/resources and set value as \"classpath:your-mastercard-ID-ServiceClientEnc.pem\"\n    \n    \u003e**mastercard.api.encryption.fingerPrint=** Fingerprint, copy this from the \"Client Encryption Keys\" section on your project page in [Mastercard Developers](https://developer.mastercard.com/dashboard).\n\n   **Decryption**\n    \n    \u003e**mastercard.api.decryption.keystore=classpath:** Copy your downloaded .p12 file to src/main/resources and set value as \"classpath:keyalias-encryption-mc.p12\"\n    \n    \u003e**mastercard.api.decryption.alias=** Alias of your key. Default key alias for sandbox is `keyalias`.\n    \n    \u003e**mastercard.api.decryption.keystore.password=** Password of your Keystore. Default keystore password for sandbox project is `keystorepassword`.\n    \n    \u003e**server.port=** Application port.\n    \n    \u003e**mastercard.api.pds.update.conflict.attribute=** Replace this value with \"FATHERS_NAME\" or \"MOTHERS_NAME\" or \"LEGAL_NAME\". More information about it. Please search for IdentityAttributeItem at the mids-reference-app-spec.yaml file.\n    \n    \u003e**mastercard.api.pds.update.conflict.attribute.value=** This name should be present in one of the scanned documents(Drivers License or Passport).\n    \n    \u003e**mastercard.api.scanID=** Replace this value with updated value.\n    \n    \u003e**api.session.token=** Replace this value with X-user-identity obtained for the user profileID.\n\n### Integrating with OpenAPI Generator \u003ca name=\"integrating-with-openapi-generator\"\u003e\u003c/a\u003e\n[OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator) generates API client libraries from [OpenAPI Specs](https://github.com/OAI/OpenAPI-Specification).\nIt provides generators and library templates for supporting multiple languages and frameworks.\n\nSee also:\n* [OpenAPI Generator (maven Plugin)](https://mvnrepository.com/artifact/org.openapitools/openapi-generator-maven-plugin)\n* [OpenAPI Generator (executable)](https://mvnrepository.com/artifact/org.openapitools/openapi-generator-cli)\n* [CONFIG OPTIONS for java](https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/java.md)\n\n#### OpenAPI Generator Plugin Configuration \u003ca name=\"openapi-generator-plugin-configuration\"\u003e\u003c/a\u003e\n```xml\n\u003c!-- https://mvnrepository.com/artifact/org.openapitools/openapi-generator-maven-plugin --\u003e\n\u003cplugin\u003e\n    \u003cgroupId\u003eorg.openapitools\u003c/groupId\u003e\n    \u003cartifactId\u003eopenapi-generator-maven-plugin\u003c/artifactId\u003e\n    \u003cversion\u003e${openapi-generator.version}\u003c/version\u003e\n    \u003cexecutions\u003e\n        \u003cexecution\u003e\n            \u003cgoals\u003e\n                \u003cgoal\u003egenerate\u003c/goal\u003e\n            \u003c/goals\u003e\n            \u003cconfiguration\u003e\n                \u003cinputSpec\u003e${project.basedir}/src/main/resources/mastercard-idservice-reference_api_spec.yaml\u003c/inputSpec\u003e\n                \u003cgeneratorName\u003ejava\u003c/generatorName\u003e\n                \u003clibrary\u003eokhttp-gson\u003c/library\u003e\n                \u003cgenerateApiTests\u003efalse\u003c/generateApiTests\u003e\n                \u003cgenerateModelTests\u003efalse\u003c/generateModelTests\u003e\n                \u003cconfigOptions\u003e\n                    \u003csourceFolder\u003esrc/gen/main/java\u003c/sourceFolder\u003e\n                    \u003cdateLibrary\u003ejava8\u003c/dateLibrary\u003e\n                \u003c/configOptions\u003e\n            \u003c/configuration\u003e\n        \u003c/execution\u003e\n    \u003c/executions\u003e\n\u003c/plugin\u003e\n```\n\n#### Generating The API Client Sources \u003ca name=\"generating-the-api-client-sources\"\u003e\u003c/a\u003e\nNow that you have all the required dependencies, you can generate the sources. To do this, use one of the following methods:\n\n* **Using IDE**\u003cbr/\u003e\n  In IntelliJ IDEA (or any other IDE of your choice), open the Maven menu. Click the icons `Reimport All Maven Projects` and `Generate Sources and Update Folders for All Projects`.\n\n* **Using Terminal or CMD**\u003cbr/\u003e\n  Navigate to the project's root directory within a terminal window and execute the `mvn clean compile` command.\n\n### Running the Project \u003ca name=\"running-the-project\"\u003e\u003c/a\u003e\n\n* **VM Parameter for country selection**\u003cbr/\u003e\n  Pass VM Options for `userSelectedCountry`. `USA` set as default.\u003cbr/\u003e\n  Example: `-DuserSelectedCountry=BRA`\n\n* **Using IDE**\u003cbr/\u003e\n  Navigate to the `com.mastercard.dis.mids.reference` package and right-click to run `MIDSReferenceApplication`\n\n* **Using Terminal or CMD**\u003cbr/\u003e\n  Navigate to the project's root directory within a terminal window and execute the `mvn spring-boot:run` command.\n\n* After that you can see all the menu options, such as:\n\n1. Registering a User Profile\n2. Access Token API (SDKToken)\n3. Create User Identity\n4. Multi-Access Token API (MultiSDKToken)\n5. Access User Identity\n6. Update ID Confirmations (Enrollment)\n7. Update ID Confirmations (Re-authentication)\n8. User Account Activity Searches\n9. Email OTP\n10. SMS OTP\n11. User Profiles Identity Searches\n12. Share User Identity (TP-TP)\n13. RP Activity Searches\n14. Audit Events\n15. Delete ID\n16. Share User Identity (TP-RP) (Enrollment)\n17. Additional Document Support\n18. Share User Identity (TP-RP) (Re-authentication)\n19. TP Scopes\n20. TP Data Shares\n21. Update Identity\n22. Delete Identity Attribute\n23. Authentication Decisions\n24. Exit\n\n### Use cases \u003ca name=\"use-cases\"\u003e\u003c/a\u003e\nThe main use cases in ID for Trust Providers Reference APIs are Personal Data Storage, SMS One Time Password, Email One Time Password, Document Verification, Multi Document Verification, Re-Authentication, GPA-Authentication, Claims Sharing, Audit Events, User Profile, Delete ID, TP Scopes Request and Fraud Data.\n\nMore details can be found [here](https://developer.mastercard.com/mastercard-id-for-tp/documentation/use-cases/).\n\n### Execute the Use-Cases \u003ca name=\"execute-use-cases\"\u003e\u003c/a\u003e\n1. Run mvn clean install from the root of the project directory.\n2. There are two ways to execute the user cases :\n   1. Execute the test cases\n    - At the `src/test/java` which is the main root folder for all Junit tests of the application.\n    - Run the tests.\n   2. Select the menu options provided by the application\n    - Run ```mvn spring-boot:run``` command to run the application.\n    - Once the application is running, you should be able chose the options.\n\n## API Reference \u003ca name=\"api-reference\"\u003e\u003c/a\u003e\n\n- To develop a client application that consumes the ID for Trust Providers API with Spring Boot, refer to the  [ID for Trust Providers Reference](https://developer.mastercard.com/mastercard-id-for-tp/documentation/api-reference/).\n\n- The OpenAPI specification with `idservice` endpoints can be found [here](https://developer.mastercard.com/mastercard-id-for-tp/documentation/reference-app/).\n\n### Request Examples \u003ca name=\"request-examples\"\u003e\u003c/a\u003e\nYou can change the default input passed to APIs, modify values in following file:\n* `com.mastercard.dis.mids.reference.constants.Constants`\n\n## Support \u003ca name=\"support\"\u003e\u003c/a\u003e\n\n- For further information, send an e-mail to `apisupport@mastercard.com`.\n- For information regarding licensing, refer to the [LICENSE](LICENSE.md).\n- For copyright information, refer to the [COPYRIGHT](COPYRIGHT.md).\n- For instructions on how to contribute to this project, refer to the [CONTRIBUTING](CONTRIBUTING.md).\n- For changelog information, refer to the [CHANGELOG](CHANGELOG.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmastercard%2Fmastercard-idservice-tp-reference-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmastercard%2Fmastercard-idservice-tp-reference-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmastercard%2Fmastercard-idservice-tp-reference-app/lists"}