To run this application you will need the .NET Core 3.1 SDK. You can launch the web application through the dotnet run
command from the Fhi.Smittestopp.Verification.Server
folder.
To perform logins through ID-porten (Test environment) you will also need a registered client for ID-porten Ver1 with "https://localhost:5001/signin-oidc" as a valid post login return url, and "https://localhost:5001/signout-callback-oidc" as a post logout return url. You will also need a valid test user to perform a login, ID-porten has a list of available test users here
Run the following command from the Fhi.Smittestopp.Verification.Server
folder to use your own client.
dotnet user-secrets set "idPorten:clientId" "<your-client-id>"
dotnet user-secrets set "idPorten:clientSecret" "<your-client-secret>"
The default configuration attempts to create a local MSSQL database. Change the connectionstring in appsettings.json or override the config as needed. A connection string value of in-memory
will use an in-memory database instead of MSSQL.
A basic test SPA client has been included in this repository to test the OIDC logins against the application. To run this client you will need Node.js installed. You can then install necessary dependencies throught the command npm install
in the test-client
folder, and then launch the client through npm run start
in the same folder. This client presents a "Login"-button to start the OIDC login flow, and on completed login presents the raw ID-token and access-token, all ID-token claims, and a button to log out.
For anyone who would like to contribute to this project, we refer to our Code of Conduct.
We prefer any changes are discussed through raising an issue before implementing the change.