S2iEvolution.SingpassApi 10.0.1
SingpassApi
Library to use Singpass in the application.
Installation
Usage
// Create a SingpassService
SingpassConfig config = ConfigLoader<SingpassConfig>.LoadConfig("singpass.json");
SingpassService service = new SingpassService(config);
Generate EC keys for jwks.json
These lines generate 1 JWKS with the private and public key pair. Please separate them in different files.
(var priv, var pub) = JWTUtils.CreateJWKPair(JWTUtils.CreateNewECDsa(), "sig");
var jwkEC =JWTUtils.CreateNewJWKSEC([priv,pub]);
string jwkStringEC = JsonConvert.SerializeObject(jwkEC);
Console.WriteLine($"JWKEC: {jwkStringEC}");
Generate EC keys and store them directly in jwks.json
// Create the service with dedicated config
SingpassConfig config = ConfigLoader<SingpassConfig>.LoadConfig("singpass.json");
SingpassService service = new SingpassService(config);
if (service is not null){
// Create sig key
(var priv, var pub) = JWTUtils.CreateJWKPair(
JWTUtils.CreateNewECDsa(),
"sig"
);
// Create enc key
(var privE, var pubE) = JWTUtils.CreateJWKPair(
JWTUtils.CreateNewECDsa(),
"enc"
);
// Create or append the keys to the dedicated files:
// jwks.json for public keys
// jwks.private.json for private keys
// Keys kid are generated to be complient to singpass notation
service.AppendKeyPairToFile(priv, pub, "../Config");
service.AppendKeyPairToFile(privE, pubE, "../Config");
}
Get singpass key set as JWKSEC
The endpoint must be set in the config file first or it will fail.
JWKSEC? jwks = await service.GetSingpassJWKSECAsync();
No packages depend on S2iEvolution.SingpassApi.
.NET 10.0
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 10.0.12)
- Microsoft.AspNetCore.Mvc.NewtonsoftJson (>= 10.0.12)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.12)
- jose-jwt (>= 5.3.0)
| Version | Downloads | Last updated |
|---|---|---|
| 10.0.1 | 10 | 09/10/2026 |
| 10.0.0 | 2 | 09/08/2026 |
| 8.0.143 | 6 | 08/31/2026 |
| 8.0.142 | 16 | 07/10/2026 |
| 8.0.141 | 15 | 06/30/2026 |
| 8.0.140 | 5 | 06/30/2026 |
| 8.0.139 | 6 | 06/30/2026 |
| 8.0.138 | 19 | 05/12/2026 |
| 8.0.137 | 11 | 05/07/2026 |
| 8.0.136 | 9 | 05/07/2026 |
| 8.0.135 | 15 | 04/21/2026 |
| 8.0.134 | 8 | 04/21/2026 |
| 8.0.133 | 8 | 04/21/2026 |
| 8.0.132 | 11 | 04/20/2026 |
| 8.0.131 | 12 | 04/14/2026 |
| 8.0.130 | 9 | 04/14/2026 |
| 8.0.129 | 10 | 04/10/2026 |
| 8.0.128 | 10 | 04/09/2026 |
| 8.0.127 | 9 | 04/08/2026 |
| 8.0.126 | 9 | 04/07/2026 |
| 8.0.125 | 9 | 04/07/2026 |
| 8.0.124 | 9 | 04/02/2026 |
| 8.0.123 | 9 | 04/02/2026 |
| 8.0.122 | 9 | 03/31/2026 |
| 8.0.121 | 7 | 03/31/2026 |
| 8.0.120 | 8 | 03/31/2026 |
| 8.0.119 | 8 | 03/31/2026 |
| 8.0.118 | 8 | 03/31/2026 |
| 8.0.117 | 9 | 03/31/2026 |
| 8.0.116 | 8 | 03/30/2026 |
| 8.0.115 | 18 | 03/17/2026 |
| 8.0.114 | 12 | 03/10/2026 |
| 8.0.113 | 10 | 03/10/2026 |
| 8.0.112 | 10 | 03/10/2026 |
| 8.0.111 | 10 | 03/09/2026 |
| 8.0.110 | 10 | 03/09/2026 |
| 8.0.109 | 14 | 02/26/2026 |
| 8.0.108 | 10 | 02/26/2026 |
| 8.0.107 | 11 | 02/26/2026 |
| 8.0.106 | 10 | 02/26/2026 |
| 8.0.105 | 10 | 02/26/2026 |
| 8.0.104 | 12 | 02/24/2026 |
| 8.0.103 | 10 | 02/24/2026 |
| 8.0.102 | 10 | 02/24/2026 |
| 8.0.101 | 10 | 02/24/2026 |
| 8.0.100 | 10 | 02/24/2026 |
| 8.0.99 | 9 | 02/24/2026 |
| 8.0.97 | 23 | 12/22/2025 |
| 8.0.96 | 11 | 12/22/2025 |
| 8.0.95 | 12 | 12/18/2025 |
| 8.0.94 | 11 | 12/18/2025 |
| 8.0.93 | 11 | 12/18/2025 |
| 8.0.92 | 13 | 12/16/2025 |
| 8.0.91 | 16 | 12/08/2025 |
| 8.0.90 | 17 | 11/25/2025 |
| 8.0.89 | 15 | 11/24/2025 |
| 8.0.88 | 14 | 11/21/2025 |
| 8.0.87 | 16 | 11/20/2025 |
| 8.0.86 | 15 | 11/18/2025 |
| 8.0.85 | 11 | 11/18/2025 |
| 8.0.84 | 11 | 11/18/2025 |
| 8.0.83 | 28 | 11/13/2025 |
| 8.0.82 | 12 | 11/13/2025 |
| 8.0.80 | 16 | 11/10/2025 |
| 8.0.79 | 10 | 11/07/2025 |
| 8.0.78 | 12 | 11/07/2025 |
| 8.0.77 | 10 | 11/07/2025 |
| 8.0.76 | 13 | 11/06/2025 |
| 8.0.75 | 13 | 11/06/2025 |
| 8.0.74 | 12 | 11/06/2025 |
| 8.0.73 | 12 | 11/06/2025 |
| 8.0.72 | 11 | 11/06/2025 |
| 8.0.71 | 10 | 11/06/2025 |
| 8.0.69 | 12 | 11/03/2025 |
| 8.0.68 | 12 | 11/03/2025 |
| 8.0.67 | 11 | 11/03/2025 |
| 8.0.66 | 12 | 11/03/2025 |
| 8.0.65 | 16 | 10/28/2025 |
| 8.0.64 | 12 | 10/27/2025 |
| 8.0.63 | 14 | 10/27/2025 |
| 8.0.62 | 12 | 10/27/2025 |
| 8.0.61 | 11 | 10/27/2025 |
| 8.0.60 | 11 | 10/27/2025 |
| 8.0.59 | 11 | 10/27/2025 |
| 8.0.58 | 11 | 10/27/2025 |
| 8.0.57 | 12 | 10/27/2025 |
| 8.0.56 | 12 | 10/27/2025 |
| 8.0.55 | 13 | 10/27/2025 |
| 8.0.54 | 10 | 10/27/2025 |
| 8.0.53 | 12 | 10/27/2025 |
| 8.0.52 | 12 | 10/27/2025 |
| 8.0.51 | 11 | 10/27/2025 |
| 8.0.50 | 12 | 10/27/2025 |
| 8.0.49 | 11 | 10/27/2025 |
| 8.0.48 | 12 | 10/27/2025 |
| 8.0.47 | 11 | 10/24/2025 |
| 8.0.46 | 15 | 10/21/2025 |
| 8.0.45 | 11 | 10/21/2025 |
| 8.0.44 | 11 | 10/21/2025 |
| 8.0.43 | 10 | 10/21/2025 |
| 8.0.42 | 17 | 02/03/2025 |
| 8.0.41 | 15 | 02/03/2025 |
| 8.0.40 | 16 | 02/03/2025 |
| 8.0.39 | 16 | 02/03/2025 |
| 8.0.38 | 17 | 02/03/2025 |
| 8.0.37 | 16 | 02/03/2025 |
| 8.0.36 | 17 | 01/30/2025 |
| 8.0.35 | 16 | 01/30/2025 |
| 8.0.34 | 18 | 01/30/2025 |
| 8.0.33 | 16 | 01/30/2025 |
| 8.0.32 | 16 | 01/30/2025 |
| 8.0.31 | 17 | 01/30/2025 |
| 8.0.30 | 17 | 01/30/2025 |
| 8.0.29 | 17 | 01/30/2025 |
| 8.0.28 | 18 | 01/30/2025 |
| 8.0.27 | 18 | 01/30/2025 |
| 8.0.26 | 19 | 01/30/2025 |
| 8.0.25 | 16 | 01/30/2025 |
| 8.0.24 | 15 | 01/30/2025 |
| 8.0.22 | 17 | 01/30/2025 |
| 8.0.21 | 18 | 01/30/2025 |
| 8.0.20 | 16 | 01/30/2025 |
| 8.0.19 | 17 | 01/30/2025 |
| 8.0.18 | 15 | 01/30/2025 |
| 8.0.17 | 17 | 01/30/2025 |
| 8.0.16 | 17 | 01/28/2025 |
| 8.0.15 | 17 | 01/28/2025 |
| 8.0.14 | 16 | 01/28/2025 |
| 8.0.13 | 16 | 01/28/2025 |
| 8.0.12 | 17 | 01/28/2025 |
| 8.0.11 | 17 | 01/28/2025 |
| 8.0.10 | 17 | 01/28/2025 |
| 8.0.9 | 19 | 01/28/2025 |
| 8.0.8 | 16 | 01/23/2025 |
| 8.0.7 | 17 | 01/23/2025 |
| 8.0.6 | 17 | 01/21/2025 |
| 8.0.5 | 16 | 01/21/2025 |
| 8.0.4 | 16 | 01/21/2025 |
| 8.0.3 | 16 | 01/21/2025 |
| 8.0.2 | 15 | 01/21/2025 |
| 8.0.1 | 16 | 01/21/2025 |
| 8.0.0 | 17 | 01/21/2025 |