# Reference Application source: https://developer.mastercard.com/benefit-allocations-service/documentation/dev-tools/reference-app/index.md ## Overview {#overview} Please refer to the Java reference app for sample code to authenticate requests with one-legged OAuth 1.0a, encrypt payloads with JWE, and invoke calls to the Benefit Allocation Service API. Its README.md has instructions on generating an OpenAPI client. ## Java Reference Application {#java-reference-application} ### Prerequisites {#prerequisites} * Java 17 installed ### Technologies Used {#technologies-used} * Spring Boot 3.2.5 * Maven 3.6.3 * Open Api Generator ### Get the Source Code {#get-the-source-code} Download the source code of the Java reference app from below [bas-ref-app-java.zip](https://static.developer.mastercard.com/content/benefit-allocations-service/uploads/bas-ref-app-java.zip) (84KB) ### Run the Java Application {#run-the-java-application} 1. Download and extract the Java reference application. 2. Follow the `README.md` in the extracted project to generate or configure the OpenAPI client. 3. Configure the intended environment base URL, OAuth 1.0a signing credentials, and the encryption certificate as described in the project `README.md`. 4. Run the Maven build and start the application according to the project `README.md`. 5. Send the sample request from the [Quick Start Guide](https://developer.mastercard.com/benefit-allocations-service/documentation/quick-start-guide/index.md#step-3-confirm-sandbox-configuration-and-make-your-first-request) and confirm the expected response. ## Validation Checklist {#validation-checklist} Before using the Java reference application as an implementation model, confirm that: * The application points to the intended environment. * OAuth 1.0a signing credentials are loaded successfully and every API request is signed. * The encrypted request body is accepted by the API. * The response status and response body match the expected result for the operation. * The correlation ID is logged for support and troubleshooting.