-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Petya Koleva
committed
Jan 10, 2025
1 parent
0d46e90
commit 44b1817
Showing
8 changed files
with
276 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,45 @@ | ||
# MIRACL Trust DotNet Framework 4.8 OIDC Integration Sample | ||
# MIRACL Trust .NET Framework 4.8 OIDC Integration Sample | ||
|
||
This is an example integration with the standard dotnet framework library using Owin and OpenID Connect dependencies: | ||
- [https://www.nuget.org/packages/Microsoft.AspNet.Identity.Owin/](https://www.nuget.org/packages/Microsoft.AspNet.Identity.Owin/) | ||
![dotnet](https://github.com/miracl/oidc-samples/workflows/dotnet/badge.svg) | ||
|
||
This is an example of an [OIDC integration](https://miracl.com/resources/docs/guides/authentication/oidc/) | ||
with the [MIRACL Trust platform](https://miracl.com) using standard .NET framework library. | ||
It uses Owin and OpenID Connect dependencies to integrate with the MIRACL Trust platform: | ||
- [https://www.nuget.org/packages/Microsoft.AspNet.Identity.Owin](https://www.nuget.org/packages/Microsoft.AspNet.Identity.Owin/) | ||
- [https://www.nuget.org/packages/Microsoft.Owin.Host.SystemWeb](https://www.nuget.org/packages/Microsoft.Owin.Host.SystemWeb) | ||
- [https://www.nuget.org/packages/OpenAthens.Owin.Security.OpenIdConnect/](https://www.nuget.org/packages/OpenAthens.Owin.Security.OpenIdConnect/) | ||
- [https://www.nuget.org/packages/OpenAthens.Owin.Security.OpenIdConnect](https://www.nuget.org/packages/OpenAthens.Owin.Security.OpenIdConnect/) | ||
|
||
## Usage | ||
# Setup | ||
|
||
You can run any sample as Docker container | ||
To start an OIDC integration, you must create an OIDC application in the | ||
[MIRACL Trust Portal](https://trust.miracl.com) as described [here](https://miracl.com/resources/docs/get-started/low-code/). | ||
The `Redirect URL` must be the same as the one the sample is run with. If you use the | ||
sample's default value, it must be set to `http://localhost:59504/login`. | ||
You must pass the app's credentials to the sample through its `web.config` file | ||
as follows: | ||
|
||
``` bash | ||
<appSettings> | ||
..... | ||
<add key="REDIRECT_URL" value="http://localhost:59504/login" /> | ||
<add key="CLIENT_ID" value="CLIENT_ID" /> | ||
<add key="CLIENT_SECRET" value="CLIENT_SECRET" /> | ||
</appSettings> | ||
``` | ||
cd samples/<variant> | ||
docker build -t sample . | ||
docker run -p 8000:8000 -e CLIENT_ID=<client-id> -e CLIENT_SECRET=<client-secret> sample | ||
``` | ||
|
||
# Usage | ||
|
||
To run the sample, do the following: | ||
|
||
1. Open the OidcSample.sln in your Visual Studio. | ||
1. Right click over the solution in the Solution Explorer and press | ||
`Restore NuGet Packages`. | ||
1. Run the sample using `F5` or the Run button of the redactor. | ||
|
||
This starts the sample HTTP server. When you access http://localhost:59504/, you | ||
will be directed to the MIRACL Trust authorization page to begin the | ||
registration and authentication process. After a successful authentication, the | ||
sample retrieves the OIDC UserInfo endpoint and returns the result. | ||
|
||
If you would like to run the sample with Docker, follow the instructions in the | ||
main [README.md](../../README.md#run-with-docker) file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,39 @@ | ||
# MIRACL Trust DotNet 6.0 OIDC Integration Sample | ||
# MIRACL Trust .NET 6.0 OIDC Integration Sample | ||
|
||
This example integrates the | ||
[.NET authentication library](https://www.nuget.org/packages/Microsoft.AspNetCore.Authentication.OpenIdConnect/) | ||
with the MIRACL Trust platform. | ||
![dotnet6](https://github.com/miracl/oidc-samples/workflows/dotnet6/badge.svg) | ||
|
||
This is an example of an [OIDC integration](https://miracl.com/resources/docs/guides/authentication/oidc/) | ||
with the [MIRACL Trust platform](https://miracl.com) using .NET 6.0. | ||
It uses the [.NET authentication](https://www.nuget.org/packages/Microsoft.AspNetCore.Authentication.OpenIdConnect/) | ||
library to integrate with the MIRACL Trust platform. | ||
|
||
# Setup | ||
|
||
To start an OIDC integration, you must create an OIDC application in the | ||
[MIRACL Trust Portal](https://trust.miracl.com) as described [here](https://miracl.com/resources/docs/get-started/low-code/). | ||
The `Redirect URL` must be the same as the one the sample is run with. If you use the | ||
sample's default value, it must be set to `http://localhost:8000/login`. | ||
You must pass the app's credentials to the sample through environment | ||
variables as follows: | ||
|
||
``` bash | ||
export CLIENT_ID=<client-id> | ||
export CLIENT_SECRET=<client-secret> | ||
``` | ||
|
||
# Usage | ||
|
||
To run the sample, do the following: | ||
|
||
```bash | ||
cd samples/dotnet6 | ||
dotnet run | ||
``` | ||
|
||
This starts the sample HTTP server. When you access http://localhost:8000/, you | ||
will be directed to the MIRACL Trust authorization page to begin the | ||
registration and authentication process. After a successful authentication, the | ||
sample retrieves the OIDC UserInfo endpoint and returns the result. | ||
|
||
If you would like to run the sample with Docker, follow the instructions in the | ||
main [README.md](../../README.md#run-with-docker) file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,35 @@ | ||
# MIRACL Trust Go OIDC Integration Sample | ||
|
||
This example integrates the [go-oidc library](https://github.com/coreos/go-oidc) | ||
with the MIRACL Trust platform. | ||
![go](https://github.com/miracl/oidc-samples/workflows/go/badge.svg) | ||
|
||
This is an example of an [OIDC integration](https://miracl.com/resources/docs/guides/authentication/oidc/) | ||
with the [MIRACL Trust platform](https://miracl.com) using Go. | ||
It uses the [go-oidc](https://github.com/coreos/go-oidc) library | ||
to integrate with the MIRACL Trust platform. See its documentation for | ||
the integration steps. | ||
|
||
# Setup | ||
|
||
To start an OIDC integration, you must create an OIDC application in the | ||
[MIRACL Trust Portal](https://trust.miracl.com) as described [here](https://miracl.com/resources/docs/get-started/low-code/). | ||
The `Redirect URL` must be the same as the one the sample is run with. If you use the | ||
sample's default value, it must be set to `http://localhost:8000/login`. | ||
|
||
# Usage | ||
|
||
To run the sample, do the following: | ||
|
||
```bash | ||
cd samples/go | ||
go run . \ | ||
-client-id <client-id> \ | ||
-client-secret <client-secret> | ||
``` | ||
|
||
This starts the sample HTTP server. When you access http://localhost:8000/, you | ||
will be directed to the MIRACL Trust authorization page to begin the | ||
registration and authentication process. After a successful authentication, the | ||
sample retrieves the OIDC UserInfo endpoint and returns the result. | ||
|
||
If you would like to run the sample with Docker, follow the instructions in the | ||
main [README.md](../../README.md#run-with-docker) file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,41 @@ | ||
# MIRACL Trust Node.js OIDC Integration Sample | ||
|
||
This example integrates the | ||
[openid-client](https://www.npmjs.com/package/openid-client) library with the | ||
MIRACL Trust platform. | ||
![nodejs](https://github.com/miracl/oidc-samples/workflows/nodejs/badge.svg) | ||
|
||
This is an example of an [OIDC integration](https://miracl.com/resources/docs/guides/authentication/oidc/) | ||
with the [MIRACL Trust platform](https://miracl.com) using Node.js. | ||
It uses the [openid-client](https://www.npmjs.com/package/openid-client) library | ||
to integrate with the MIRACL Trust platform. See its documentation for | ||
the integration steps. | ||
|
||
# Setup | ||
|
||
To start an OIDC integration, you must create an OIDC application in the | ||
[MIRACL Trust Portal](https://trust.miracl.com) as described [here](https://miracl.com/resources/docs/get-started/low-code/). | ||
The `Redirect URL` must be the same as the one the sample is run with. If you use the | ||
sample's default value, it must be set to `http://localhost:8000/login`. | ||
You must pass the app's credentials to the sample through environment | ||
variables as follows: | ||
|
||
``` bash | ||
export CLIENT_ID=<client-id> | ||
export CLIENT_SECRET=<client-secret> | ||
``` | ||
|
||
# Usage | ||
|
||
To run the sample, do the following: | ||
|
||
```bash | ||
cd samples/nodejs | ||
npm install | ||
node index.js | ||
``` | ||
|
||
This starts the sample HTTP server. When you access http://localhost:8000/, you | ||
will be directed to the MIRACL Trust authorization page to begin the | ||
registration and authentication process. After a successful authentication, the | ||
sample retrieves the OIDC UserInfo endpoint and returns the result. | ||
|
||
If you would like to run the sample with Docker, follow the instructions in the | ||
main [README.md](../../README.md#run-with-docker) file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,40 @@ | ||
# MIRACL Trust Python OIDC Integration Sample | ||
|
||
This example integrates the | ||
[IdPyOIDC](https://idpy-oidc.readthedocs.io/en/latest/) library with the | ||
MIRACL Trust platform. | ||
![python](https://github.com/miracl/oidc-samples/workflows/python/badge.svg) | ||
|
||
This is an example of an [OIDC integration](https://miracl.com/resources/docs/guides/authentication/oidc/) | ||
with the [MIRACL Trust platform](https://miracl.com) using Python. | ||
It uses the [IdPyOIDC](https://idpy-oidc.readthedocs.io/en/latest/) library | ||
to integrate with the MIRACL Trust platform. See its documentation for | ||
the integration steps. | ||
|
||
# Setup | ||
|
||
To start an OIDC integration, you must create an OIDC application in the | ||
[MIRACL Trust Portal](https://trust.miracl.com) as described [here](https://miracl.com/resources/docs/get-started/low-code/). | ||
The `Redirect URL` must be the same as the one the sample is run with. If you use the | ||
sample's default value, it must be set to `http://localhost:8000/login`. | ||
|
||
# Usage | ||
|
||
To run the sample, you need to first [setup](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/) | ||
your environment. | ||
|
||
```bash | ||
cd samples/python | ||
python3 -m venv .venv | ||
source .venv/bin/activate | ||
python3 -m pip install -r requirements.txt | ||
|
||
python app.py \ | ||
--client-id <client-id> \ | ||
--client-secret <client-secret> | ||
``` | ||
|
||
This starts the sample HTTP server. When you access http://localhost:8000/, you | ||
will be directed to the MIRACL Trust authorization page to begin the | ||
registration and authentication process. After a successful authentication, the | ||
sample retrieves the OIDC UserInfo endpoint and returns the result. | ||
|
||
If you would like to run the sample with Docker, follow the instructions in the | ||
main [README.md](../../README.md#run-with-docker) file. |