A yet incomplete beta-quality implementation of the HTTP REST API of the PACT Tech Specs Version 2.2.0-20240327
This means, you should not yet rely on this implementation for conducting conformance testing, yet.
For details on the backlog, please see BACKLOG.md.
The following endpoints are available:
- Endpoints from Use Case 001 Specification Version 1
/2/footprints
implementing theListFootprints
action/2/footprints/<footprint-id>
implementing theGetFootprint
action/2/events
implementing theEvents
action/auth/token
implementingAuthenticate
action
- Additional endpoints are:
/.well-known/openid-configuration
: OpenId provider configuration document/jwks
: the JSON Web Key Set used to encode and sign the authentication token/openapi.json
: OpenAPI description file which is automatically generated from the types defined inapi_types.rs
and endpoints defined inmain.rs
- Swagger UI:
/swagger-ui/
if you fancy a visualization
No further endpoints are supported by this implementation and all return {"message":"Bad Request","code":"BadRequest"
.
Currently, credentials are hardcoded to:
- client-id:
hello
- client-secret:
pathfinder
You need a working and up-to-date Rust toolchain installed. See https://rustup.rs/ for details.
After having installed rustup
, ensure you have the stable toolchain
installed like this:
rustup update
rustup toolchain install stable
Once Rust is installed via rustup, just perform
cargo build
You first need to create a private key:
scripts/keygen.sh
Which will create the file keypair.pem
for you.
Then, you can run the server like this:
PRIV_KEY=`cat keypair.pem` cargo run
To run it at a different port, e.g. 3333:
ROCKET_PORT=3333 PRIV_KEY=`cat keypair.pem` cargo run
## building
cargo build --release
## running
export ROCKET_SECRET_KEY=$(openssl rand -base64 32)
export PRIV_KEY="..."
cargo run --release
The resulting binary can be found in target/release/bootstrap