Skip to content

Commit 5b1ce4f

Browse files
realmerxmrts
authored andcommitted
Updated library include instructions
1 parent 9fa8d66 commit 5b1ce4f

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

README.md

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,41 @@ More information about the Web eID project is available on the project [website]
88

99
# Quickstart
1010

11-
Complete the steps below to add support for secure authentication with eID cards to your ASP.NET Core web application back end. Instructions for the front end are available [here](https://github.com/web-eid/web-eid.js).
11+
Complete the steps below to add support for secure authentication with eID cards to your ASP.NET Core web application backend. Instructions for the frontend are available [here](https://github.com/web-eid/web-eid.js).
1212

1313
See full example [here](https://github.com/web-eid/web-eid-asp-dotnet-example).
1414

1515
## 1. Add the library to your project
1616

17-
To install the package, you can use the Package Manager Console.
17+
### When using Visual Studio
1818

19-
1. Select the **Tools** > **NuGet Package Manager** > **Package Manager Console** menu command.
20-
2. Once the console opens, check that the **Default project** drop-down list shows the project into which you want to install the package. If you have a single project in the solution, it is already selected.
21-
3. Enter the following commands:
19+
1. Configure Web eID GitLab package repository as a NuGet package source.
20+
In MS Visual Studio, go to the **Tools** > **NuGet Package Manager** > **Package Manager Settings** menu command. Select **Package Sources** and add a new source. Name it _Web eID GitLab_ and set the _Source_ URL to `https://gitlab.com/api/v4/projects/35362906/packages/nuget/index.json`.
21+
22+
2. Install the `WebEid.Security` NuGet package.
23+
You can install the package either from the GUI or the Package Manager Console.
24+
25+
- From GUI:
26+
Right-click the project in the Solution Explorer where you want to install the Web eID dependency. Select **Manage NuGet Packages**. Choose the _Web eID GitLab_ package source you added earlier from the _Package source_ dropdown. Then, install the `WebEid.Security` package.
27+
28+
29+
- From Package Manager Console:
30+
Run the following command:
2231
```
23-
Add-Source -Name "Web eID GitLab" -Source "https://gitlab.com/api/v4/projects/35362906/packages/nuget/index.json"
2432
Install-Package WebEid.Security
2533
```
2634
27-
When you install a package, NuGet records the dependency in either your project file or a `packages.config` file (depending on the project format).
35+
### When using `dotnet` CLI
36+
37+
In case you prefer using command line tools, you can add the package using the `dotnet` CLI with the following command:
38+
39+
```
40+
dotnet add package WebEid.Security --source https://gitlab.com/api/v4/projects/35362906/packages/nuget/index.json
41+
```
42+
43+
**Note:** When you install a package, NuGet records the dependency in either your project file or a `packages.config` file, depending on the selected package management format (`Packages.config` or `PackageReference`).
44+
45+
For more detailed information on different methods of installing NuGet packages, refer to [Microsoft's official documentation](https://learn.microsoft.com/en-us/nuget/consume-packages/overview-and-workflow#ways-to-install-a-nuget-package).
2846
2947
## 2. Configure the challenge nonce store
3048
@@ -306,7 +324,7 @@ The authentication token validation process consists of two stages:
306324
- First, **user certificate validation**: the validator parses the token and extracts the user certificate from the *unverifiedCertificate* field. Then it checks the certificate expiration, purpose and policies. Next it checks that the certificate is signed by a trusted CA and checks the certificate status with OCSP.
307325
- Second, **token signature validation**: the validator validates that the token signature was created using the provided user certificate by reconstructing the signed data `hash(origin)+hash(challenge)` and using the public key from the certificate to verify the signature in the `signature` field. If the signature verification succeeds, then the origin and challenge nonce have been implicitly and correctly verified without the need to implement any additional security checks.
308326

309-
The website back end must lookup the challenge nonce from its local store using an identifier specific to the browser session, to guarantee that the authentication token was received from the same browser to which the corresponding challenge nonce was issued. The website back end must guarantee that the challenge nonce lifetime is limited and that its expiration is checked, and that it can be used only once by removing it from the store during validation.
327+
The website backend must lookup the challenge nonce from its local store using an identifier specific to the browser session, to guarantee that the authentication token was received from the same browser to which the corresponding challenge nonce was issued. The website backend must guarantee that the challenge nonce lifetime is limited and that its expiration is checked, and that it can be used only once by removing it from the store during validation.
310328

311329
## Basic usage
312330

0 commit comments

Comments
 (0)