66![ dotnet] ( https://github.com/miracl/oidc-samples/workflows/dotnet/badge.svg )
77![ python] ( https://github.com/miracl/oidc-samples/workflows/python/badge.svg )
88
9- This repository contains samples showcasing the integration between [ MIRACL
10- Trust platform] ( https://miracl.com ) and various OIDC libraries. There are also
11- [ integration tests] ( ./integration-tests/ ) that validate both the compatibility
12- and the correct operation of the client libraries.
9+ This repository contains samples showcasing the integration between
10+ [ MIRACL Trust platform] ( https://miracl.com ) and various OIDC libraries. There
11+ are also [ integration tests] ( ./integration-tests/ ) that validate both the
12+ compatibility and the correct operation of the client libraries.
1313
1414## ENV Variables
1515
1616All samples work with the following environment variables:
1717
18- - ` HOST ` - Host to listen on. The default is "localhost".
19- - ` PORT ` - Port of the listening host . The default is "8000".
18+ - ` HOST ` - The host interface the server listens on. The default is "localhost".
19+ - ` PORT ` - The port the server listens on . The default is "8000".
2020- ` ISSUER ` - OpenID Connect Issuer. This must correspond to the OIDC Issuer
21- configured for your project in the [ MIRACL Trust Portal] ( https://trust.miracl.cloud ) .
22- It has no default value and is mandatory.
23- - ` REDIRECT_URL ` - The redirect URL of the application in the MIRACL Trust platform.
24- The default value is "http://localhost:8000/login ".
21+ configured for your project in the
22+ [ MIRACL Trust Portal] ( https://trust.miracl.cloud ) . It is mandatory and has no
23+ default value.
24+ - ` REDIRECT_URL ` - The redirect URL of the application in the MIRACL Trust
25+ platform. The default value is "http://localhost:8000/login ".
2526- ` CLIENT_ID ` - The Client ID of the application in the MIRACL Trust platform.
26- It has no default value and is mandatory.
27- - ` CLIENT_SECRET ` - The Client Secret of the application in the MIRACL Trust platform.
28- It has no default value and is mandatory.
29- - ` PROXY_HOST ` - The host address of the proxy behind which you run the sample.
30- The default value is an empty string. It is used only when the setup requires
31- a proxy, allowing us to validate that the OIDC client works behind a proxy.
32- - ` PROXY_PORT ` - The port of the proxy behind which you run the sample. The
27+ It is mandatory and has no default value.
28+ - ` CLIENT_SECRET ` - The Client Secret of the application in the MIRACL Trust
29+ platform. It is mandatory and has no default value.
30+ - ` PROXY_HOST ` - The proxy host address used when running the sample behind a
31+ proxy. The default value is an empty string. It is used only when the setup
32+ requires a proxy, allowing us to validate that the OIDC client works behind a
33+ proxy.
34+ - ` PROXY_PORT ` - The proxy port used when running the sample behind a proxy. The
3335 default value is an empty string. It is used only when the setup requires a
3436 proxy, allowing us to validate that the OIDC client works behind a proxy.
3537
36- To get those values, you'll need to [ register] ( https://miracl.com/resources/docs/get-started/register/ )
37- and [ create an application] ( https://miracl.com/resources/docs/get-started/low-code/ )
38+ To get these values, you'll need to
39+ [ register] ( https://miracl.com/resources/docs/get-started/register/ ) and
40+ [ create an application] ( https://miracl.com/resources/docs/get-started/low-code/ )
3841in our platform.
3942
4043## Usage
4144
4245You can start every sample with its native tooling. For instructions, see the
43- README.md of the sample you are interested in.
46+ README of the sample you are interested in.
4447
4548Once you start your sample of choice, go to http://localhost:8000 , which will
4649take you to the MIRACL Trust authorization page. You need to enrol the device
47- the first time you use the sample. Then, you can authenticate directly using M-PIN.
50+ the first time you use the sample. Then, you can authenticate directly using
51+ M-PIN.
4852
4953### Run with Docker
5054
51- You can also use Docker to run any sample .
55+ You can also use Docker to run any of the samples .
5256
5357``` bash
5458cd samples/< variant>
@@ -63,9 +67,9 @@ docker run \
6367
6468### Run on a different port with Docker
6569
66- All samples use port 8000 as the default; hence, the sample starts at 8000, and
67- the default OIDC Redirect URL is http://localhost:8000/login . To change the
68- port you access the sample on, do the following:
70+ All samples use port 8000 by default. This means the application starts on port
71+ 8000, and the default OIDC Redirect URL is http://localhost:8000/login . To
72+ change the port you access the sample on, do the following:
6973
7074``` bash
7175docker run \
@@ -77,25 +81,25 @@ docker run \
7781 sample
7882```
7983
80- Note that we don't need to change the port the sample runs on in the container -
81- just the Docker mapping. The redirect URL must also be updated in
82- the command and the application configuration in the [ MIRACL Trust
83- Portal] ( https://trust.miracl.cloud ) .
84+ Note that you don't need to change the port the sample runs on in the
85+ container - only the Docker mapping. You must also update the redirect URL in
86+ the command and the application configuration in the
87+ [ MIRACL Trust Portal] ( https://trust.miracl.cloud ) .
8488
85- ## Running through a proxy
89+ ## Run through a proxy
8690
87- To test how OIDC libraries behave in some edge cases (e.g. when the
91+ To test how OIDC libraries behave in certain edge cases (for example, when the
8892OIDC server misbehaves), we need to modify the traffic between the library and
8993the sample showcasing it.
9094
91- You have the option to use our proxy with the provided samples. You can check
92- the [ README] ( proxy/README.md ) in the proxy directory for information on how to
93- build and run it.
95+ You have the option to use our proxy with the provided samples. See the
96+ [ README] ( proxy/README.md ) in the proxy directory for information on how to build
97+ and run it.
9498
9599Provided that you have built Docker images of the proxy and the sample that you
96100wish to run, you can run both ` docker run ` commands with the addition of the
97- ` PROXY_HOST ` and ` PROXY_PORT ` environment variables. If you use the default values,
98- the commands to run the sample behind the proxy are:
101+ ` PROXY_HOST ` and ` PROXY_PORT ` environment variables. If you use the default
102+ values, the commands to run the sample behind the proxy are:
99103
100104``` bash
101105docker run \
@@ -111,8 +115,8 @@ docker run \
111115 sample
112116```
113117
114- You can confirm that the requests from the sample are going through a proxy if
115- you enable the verbose mode of the proxy using the ` VERBOSE ` environment
116- variable in the command above. When the proxy and the sample are started and you
117- complete a registration and authentication, the proxy output will log out the
118- information of the proxied requests.
118+ You can confirm that requests from the sample are passing through the proxy by
119+ enabling verbose mode with the ` VERBOSE ` environment variable in the command
120+ above. When the proxy and the sample are started and you complete a registration
121+ and authentication, the proxy output will log out the information of the proxied
122+ requests.
0 commit comments