ActiveLogin/ActiveLogin.Identity
62.9
Adequate · 3 October 2026
1.8k
lines of production code
F#
with C#
2
measurements over time
What this system is
This system is a .NET library for parsing, validating, and extracting demographic hints from Swedish personal identity numbers and coordination numbers. It provides core parsing logic, ASP.NET Core validation attributes, and sample applications in both C\# and F\#. The implementation has been migrated to F\# and updated to target .NET 10, with comprehensive test coverage ensuring strict validation modes and accurate checksum verification.
Features
Add F\# console sample for Swedish personal identity numbers
A new F\# console application sample has been added to demonstrate parsing and displaying Swedish personal identity numbers, including support for coordination numbers and test number detection.
samples/ConsoleSample.FSharp · high confidence
Added Coordination Number validation and renamed Personal Identity Number attribute
The library now includes a new CoordinationNumberAttribute for validating Swedish coordination numbers, expanding the range of supported identity types. Additionally, the existing SwedishPersonalIdentityNumberAttribute has been renamed to PersonalIdentityNumberAttribute to remove the redundant 'Swedish' prefix from the type name, while maintaining the same validation logic for personal identity numbers.
src/ActiveLogin.Identity.Swedish.AspNetCore · high confidence
Added test data support for Swedish Coordination Numbers
The test data library now includes official test Coordination Numbers (Samordningsnummer) alongside existing Personal Identity Numbers. This adds new \CoordinationNumberTestData\ and \PersonalIdentityNumberTestData\ classes with methods to retrieve random or shuffled test numbers, and introduces \IsTestNumber\ extension methods for both types to easily verify if a number is a test value.
src/ActiveLogin.Identity.Swedish.TestData · high confidence
Support for Swedish Coordination Numbers and Strict Parsing Modes
The library now supports parsing and validating Swedish Coordination Numbers (used when the exact date of birth is unknown) alongside standard Personal Identity Numbers. This change introduces a new \StrictMode\ configuration with options for ten-digit, twelve-digit, or mixed-length validation, allowing users to enforce stricter input formats. The underlying type system has been updated to distinguish between personal and coordination number structures, ensuring accurate checksum validation for both types.
ActiveLogin.Identity.Swedish · high confidence
Behavioural changes
Repository structure overhaul and F\# migration
The project has been restructured to include new solution folders for samples, docs, and GitHub configuration, alongside the addition of standard repository governance files (CODE\_OF\_CONDUCT, CONTRIBUTING, SECURITY). The core library implementation has migrated from C\# to F\#, reflected by the new \.fsproj\ project files and F\#-specific test and benchmark projects. The solution now targets .NET SDK 10.0.101 and includes a new C\# console sample, while the main library project has been renamed to remove the 'Swedish' prefix from its type names.
(repo-wide) · high confidence
Swedish identity number parsing rewritten in F\# with coordination number support
The Swedish personal identity number parsing logic has been rewritten from C\# to F\#, introducing a new \CoordinationNumber\ type alongside the existing \PersonalIdentityNumber\. This change adds support for parsing and validating Swedish coordination numbers (Samordningsnummer), which are used for individuals not yet registered in the Swedish population register. The parser now supports stricter validation modes and provides hint extensions for date of birth, age, and gender for both personal and coordination numbers. The old C\# implementation and the \SwedishLegalGender\ enum have been removed.
src/ActiveLogin.Identity.Swedish · high confidence
Updated C\# sample to demonstrate Swedish identity number parsing and strict modes
The ConsoleSample.CSharp project has been updated to showcase the library's capabilities for parsing Swedish personal identity numbers, coordination numbers, and individual identity numbers. The sample now includes specific demonstrations of parsing in strict mode (e.g., TenDigits), utilizes the new TestData project for generating test inputs, and reflects namespace changes such as the move of extensions to ActiveLogin.Identity.Swedish.Extensions.
samples/ConsoleSample.CSharp · high confidence
Test coverage
Added F\# property-based tests for Swedish identity numbers; Added unit tests for Swedish identity validation attributes; Migrate Swedish Personal Identity Number tests to new API.
Dependencies
Upgrade to .NET 10 and update core dependencies
The sample projects and test suites have been upgraded to target .NET 10.0, replacing the previous .NET Core 2.1 target. Additionally, the AspNetCore library's dependency on System.ComponentModel.Annotations has been updated from version 4.5.0 to 5.0.0, and test tooling packages (xUnit, Microsoft.NET.Test.Sdk) have been bumped to their latest versions.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 63 → 63 (-0.3)
- Rubric changed (rubric-2026.09.15 → rubric-2026.10.1) — scores are not directly comparable.
Lenses
- Code Health 97 → 97 (+0.0)
- Architecture 97 → 100 (+2.5)
- Maturity 50 → 50 (+0.0)
- Readiness 61 → 61 (+0.0)
- Security 83 → 80 (-2.9)
Resolved (4)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- The parameter representing the string form of a Swedish personal identity number is named differently in different contexts. One uses the suffix 'String' (personalIdentityNumberString) while the other uses the base name (personalIdentityNumber). While personalIdentityNumber might refer to the object type in some contexts, here both are string parameters, suggesting a naming inconsistency for the same concept.
- redundant comment (samples/ConsoleSample.CSharp/Program.cs)
Architecture
- Unchanged — 0 containers · 1 contexts · 0 edges
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
ActiveLogin/ActiveLogin.Identity was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 3 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 1d7b915612355353f392b2dd9e4a8aafcdd1ac10 — the exact code this score is about.
- Scored under rubric-2026.10.1 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-4f4226d619ea.