Skip to content
This repository has been archived by the owner on Sep 22, 2024. It is now read-only.
/ demo-applications Public archive

WirePact demo applications in a Docker container. App and API in various variants.

License

Notifications You must be signed in to change notification settings

WirePact/demo-applications

Repository files navigation

WirePact Applications

This repository contains various demo/showcase applications for WirePact. The applications are used during development of translators and for the end-to-end demo. They vary in terms of programming language and flavor to show that neither the framework nor the programming language limits the use case of WirePact.

Note that these applications are not meant for production!

Flavors/Applications

This application serves as "login" point for demo applications that use OIDC. It is a custom web app with the node-oidc-provider package to deliver OIDC login capabilities. This serves as an alternative to "Keycloak" or other OIDC provider pre-built software, which tend to have longer startup times for development.

The "OIDC client application" provides a Next.js application that uses NextAuth to authenticate the user against the OIDC Provider. As mentioned, to log in, you may use any username/password combination since the provider accepts arbitrary input.

Once you are logged in, you can enter an API url that the app shall send an HTTP GET request to. The result is then displayed in the web application.

The "OIDC API" is a dotnet (.net6.0) application that uses OIDC (more specifically OAuth2.0Introspection) authentication to check if a user may or may not access the API. The API has one endpoint (/swapi/people) that returns the first ten people from the Star Wars API.

Trivial HTML/JavaScript application that uses HTTP Basic Authentication (RFC7617) to authenticate against a given API. Served via NGINX.

.NET Razor Pages application that uses HTTP Basic Authentication (RFC7617) to authenticate against a given API. The application utilizes post-back forms to execute the basic auth request to the API. This enables the app to use the HTTP_PROXY environment variable.

This API uses simple Basic Auth (RFC7617) credentials to authenticate a user. Like the OIDC API, it exposes one possible API endpoint (/swapi/people) that returns the first ten people of the Star Wars API.

Run All Applications

If you want to try the applications, you may use the provided docker-compose.yml file to build and start the applications. Be aware that on Docker for Mac and Docker for Windows you eventually are required to change the localhost references to host.docker.internal because of the way the port forwarding works. Or vice versa.