diff --git a/README.md b/README.md index afb055f71..cd7eea428 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,9 @@ # CDC Trusted Intermediary ## Requirements - Any distribution of the Java 17 JDK. -For apple silicon you will want to enable the Docker option for `Use Rosetta for x86/amd64 emulation on Apple Silicon`. -After enabling this option it is recommended that you delete all docker images and containers and rebuild them -with this option enabled. - ## Using and Running - To run the application directly, execute... ```shell @@ -18,6 +12,15 @@ To run the application directly, execute... This will run the web API on port 8080. You can view the API documentation at `/openapi`. +### Generating and using a token +1. Run `brew install mike-engel/jwt-cli/jwt-cli` +2. Run `jwt encode --exp='+5min' --jti $(uuidgen) --alg RS256 --no-iat -S @/PATH_TO_FILE_ON_YOUR_MACHINE/trusted-intermediary/mock_credentials/organization-trusted-intermediary-private-key-local.pem` +3. Copy token from terminal and paste into your postman body with the key `client_assertion` +4. Add a key to the body with the key `scope` and value of `trusted-intermediary` +5. Body type should be `x-wwww-form-urlencoded` +6. You should be able to run the post call against the `v1/auth/token` endpoint to receive a bearer token [to be used in this step](#submit-request-to-reportstream) + + ## Development ### Additional Requirements @@ -215,15 +218,12 @@ CDC including this GitHub page may be subject to applicable federal law, includi ``` 3. Run TI with `REPORT_STREAM_URL_PREFIX=http://localhost:7071 ./gradlew clean app:run` -#### ReportStream Setup +## ReportStream Setup + +For Apple Silicon you will want to enable the Docker option for `Use Rosetta for x86/amd64 emulation on Apple Silicon`. +After enabling this option it is recommended that you delete all docker images and containers and rebuild them +with this option enabled. -### Generating and using a token -1. Run `brew install mike-engel/jwt-cli/jwt-cli` -2. Run `jwt encode --exp='+5min' --jti $(uuidgen) --alg RS256 --no-iat -S @/PATH_TO_FILE_ON_YOUR_MACHINE/trusted-intermediary/mock_credentials/organization-trusted-intermediary-private-key-local.pem` -3. Copy token from terminal and paste into your postman body with the key `client_assertion` -4. Add a key to the body with the key `scope` and value of `trusted-intermediary` -5. Body type should be `x-wwww-form-urlencoded` -6. You should be able to run the post call against the `v1/auth/token` endpoint to receive a bearer token [to be used in this step](#submit-request-to-reportstream) ### Running TI with ReportStream diff --git a/etor/src/main/java/gov/hhs/cdc/trustedintermediary/etor/EtorDomainRegistration.java b/etor/src/main/java/gov/hhs/cdc/trustedintermediary/etor/EtorDomainRegistration.java index b830ee356..588b2a62d 100644 --- a/etor/src/main/java/gov/hhs/cdc/trustedintermediary/etor/EtorDomainRegistration.java +++ b/etor/src/main/java/gov/hhs/cdc/trustedintermediary/etor/EtorDomainRegistration.java @@ -63,11 +63,11 @@ public Map> domainRegistra ApplicationContext.register(OrderController.class, OrderController.getInstance()); ApplicationContext.register(SendOrderUseCase.class, SendOrderUseCase.getInstance()); - if (ApplicationContext.getEnvironment().equalsIgnoreCase("local")) { - ApplicationContext.register(OrderSender.class, LocalFileOrderSender.getInstance()); - } else { +// if (ApplicationContext.getEnvironment().equalsIgnoreCase("local")) { +// ApplicationContext.register(OrderSender.class, LocalFileOrderSender.getInstance()); +// } else { ApplicationContext.register(OrderSender.class, ReportStreamOrderSender.getInstance()); - } +// } return endpoints; }