{"id":28577574,"url":"https://github.com/mastercard/send-util-crossborder-oauth2","last_synced_at":"2026-07-18T09:31:35.880Z","repository":{"id":37825013,"uuid":"483118133","full_name":"Mastercard/send-util-crossborder-oauth2","owner":"Mastercard","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-17T19:45:11.000Z","size":24,"stargazers_count":1,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-04-21T16:31:35.222Z","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":"other","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","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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-04-19T06:09:06.000Z","updated_at":"2025-07-13T03:07:00.000Z","dependencies_parsed_at":"2025-06-11T00:39:16.824Z","dependency_job_id":"a5c3e689-531b-4fd7-9719-0dc2b231bac2","html_url":"https://github.com/Mastercard/send-util-crossborder-oauth2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Mastercard/send-util-crossborder-oauth2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mastercard%2Fsend-util-crossborder-oauth2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mastercard%2Fsend-util-crossborder-oauth2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mastercard%2Fsend-util-crossborder-oauth2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mastercard%2Fsend-util-crossborder-oauth2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mastercard","download_url":"https://codeload.github.com/Mastercard/send-util-crossborder-oauth2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mastercard%2Fsend-util-crossborder-oauth2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35614490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-18T02:00:07.223Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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:22.539Z","updated_at":"2026-07-18T09:31:35.853Z","avatar_url":"https://github.com/Mastercard.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## OAUTH2.0 Implementation for Token Generation\n\nThis is a OAUTH2.0 Client Utility application to generate the request token. Please see here for more details : [Mastercard Developers](https://developer.mastercard.com/cross-border-services/documentation/getting-started-oauth2/). \nThis application illustrates the generation of request token required to connect with the cross-border APIs with oauth2 authentication method.\n\n### Setup \n \n- Create an account at [Mastercard Developers](https://developer.mastercard.com/account/sign-up).\n- Create a new project and add `Mastercard Cross-Border Services` API to your project. This project will provide access to APIs in sandbox the environment first.\n- Download signing key(a zip file will get downloaded). These properties and file will be required in utility to generate request token. \n- Select .p12 file from zip, copy it to some folder and give its path with filename.\n\n### Build and Run   \n\n- Open OAUTH2 utility application in IDE and dependencies will be downloaded automatically. Open the maven window,\n- Select MasterCard Cross-border Services - Oauth2Token - API\n- Select Life cycle \n- Run clean and install\n\n### Decoding Request token\n\n|      Token Attributes     |                   Significance                    |                    Possible Values                       |\n| --------------------------| --------------------------------------------------|----------------------------------------------------------|\n|          x5t#S256         |                  Certificate thumbprint           |                   Signature public key\n|           kid             |                  Consumer key of cert             |             Consumer Key which we will get from DevZone\n|           cty             |                     Content Type                  |                            JWS\n|           typ             |                   JOSE object type                |                            JWT\n|           alg             |                    JWS Algorithm                  |                       RS256 / ES256\n|           nbf             |                  Not before Date                  |                       auto populated\n|           exp             |                   Expiry date                     |                       auto populated\n|           iat             |                 Issued At date                    |                      auto populated\n|           jti             |                  Unique JWT id                    |                      JWT Generated id\n\n### Executing the use cases\n**Generate a sample token**\n\n- Go to [project folder](\\src\\test\\java\\com\\mastercard\\oauth2\\requesttoken\\generator), Open Oauth2RequestTokenGeneratorTest.java\n- To generate sample token, pass required input parameters.\n- Right click on testGenerateToken() method in the class and run. You will get the request token. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmastercard%2Fsend-util-crossborder-oauth2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmastercard%2Fsend-util-crossborder-oauth2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmastercard%2Fsend-util-crossborder-oauth2/lists"}