This repository contains the Altinn Platform Authentication component. It is responsible for authenticating the users, systems and organisations that access the Altinn 3 platform, and for issuing the Altinn JSON Web Tokens (JWT) that the rest of the platform trusts.
It does two things:
- Browser sign-in — a small OIDC authorization server that delegates identity proofing to upstream providers (ID-porten, FEIDE, UIDP) and establishes an Altinn session.
- Token exchange — exchanges a trusted external token (ID-porten / Maskinporten / Altinn Studio) for an Altinn JWT.
Read more on docs.altinn.studio:
In-repo documentation lives in docs/:
| Doc | What |
|---|---|
| docs/architecture.md | The big picture: components, dependencies, code layout |
| docs/flows/ | The auth flows (browser sign-in, token exchange, sessions/cookies) |
| docs/operations.md | Config, feature flags, secrets, health, runbook |
| docs/development.md | Local setup, build, run, tests |
| docs/adr/ | Architecture Decision Records — the why |
| AGENTS.md | Guide for AI coding agents |
- .NET 10 SDK
- Docker — required to run the integration tests
- Newest Git
- A code editor / IDE of your choice
Clone the repo and run the component from src/Authentication:
cd src/Authentication
dotnet runSwagger UI is then available under http://localhost:<port>/authentication/swagger.
dotnet build Altinn.Platform.Authentication.sln
dotnet test test/Altinn.Platform.Authentication.Tests/Altinn.Platform.Authentication.Tests.csproj # needs DockerSee docs/development.md for details — note that a passing local build does not substitute for the Docker-backed test suite.