S2iEvolution.SingpassApi 8.0.91
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 8.0
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 8.0.7)
- Microsoft.AspNetCore.Mvc.NewtonsoftJson (>= 8.0.7)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
- jose-jwt (>= 5.2.0)
| Version | Downloads | Last updated |
|---|---|---|
| 8.0.91 | 3 | 12/08/2025 |
| 8.0.90 | 8 | 11/25/2025 |
| 8.0.89 | 7 | 11/24/2025 |
| 8.0.88 | 5 | 11/21/2025 |
| 8.0.87 | 8 | 11/20/2025 |
| 8.0.86 | 7 | 11/18/2025 |
| 8.0.85 | 3 | 11/18/2025 |
| 8.0.84 | 3 | 11/18/2025 |
| 8.0.83 | 8 | 11/13/2025 |
| 8.0.82 | 4 | 11/13/2025 |
| 8.0.80 | 7 | 11/10/2025 |
| 8.0.79 | 1 | 11/07/2025 |
| 8.0.78 | 3 | 11/07/2025 |
| 8.0.77 | 1 | 11/07/2025 |
| 8.0.76 | 3 | 11/06/2025 |
| 8.0.75 | 3 | 11/06/2025 |
| 8.0.74 | 3 | 11/06/2025 |
| 8.0.73 | 2 | 11/06/2025 |
| 8.0.72 | 2 | 11/06/2025 |
| 8.0.71 | 1 | 11/06/2025 |
| 8.0.69 | 3 | 11/03/2025 |
| 8.0.68 | 3 | 11/03/2025 |
| 8.0.67 | 2 | 11/03/2025 |
| 8.0.66 | 3 | 11/03/2025 |
| 8.0.65 | 7 | 10/28/2025 |
| 8.0.64 | 3 | 10/27/2025 |
| 8.0.63 | 4 | 10/27/2025 |
| 8.0.62 | 3 | 10/27/2025 |
| 8.0.61 | 2 | 10/27/2025 |
| 8.0.60 | 2 | 10/27/2025 |
| 8.0.59 | 2 | 10/27/2025 |
| 8.0.58 | 2 | 10/27/2025 |
| 8.0.57 | 3 | 10/27/2025 |
| 8.0.56 | 3 | 10/27/2025 |
| 8.0.55 | 2 | 10/27/2025 |
| 8.0.54 | 1 | 10/27/2025 |
| 8.0.53 | 3 | 10/27/2025 |
| 8.0.52 | 3 | 10/27/2025 |
| 8.0.51 | 2 | 10/27/2025 |
| 8.0.50 | 3 | 10/27/2025 |
| 8.0.49 | 2 | 10/27/2025 |
| 8.0.48 | 3 | 10/27/2025 |
| 8.0.47 | 2 | 10/24/2025 |
| 8.0.46 | 6 | 10/21/2025 |
| 8.0.45 | 2 | 10/21/2025 |
| 8.0.44 | 2 | 10/21/2025 |
| 8.0.43 | 1 | 10/21/2025 |
| 8.0.42 | 8 | 02/03/2025 |
| 8.0.41 | 6 | 02/03/2025 |
| 8.0.40 | 7 | 02/03/2025 |
| 8.0.39 | 6 | 02/03/2025 |
| 8.0.38 | 8 | 02/03/2025 |
| 8.0.37 | 7 | 02/03/2025 |
| 8.0.36 | 8 | 01/30/2025 |
| 8.0.35 | 7 | 01/30/2025 |
| 8.0.34 | 9 | 01/30/2025 |
| 8.0.33 | 7 | 01/30/2025 |
| 8.0.32 | 7 | 01/30/2025 |
| 8.0.31 | 9 | 01/30/2025 |
| 8.0.30 | 7 | 01/30/2025 |
| 8.0.29 | 8 | 01/30/2025 |
| 8.0.28 | 8 | 01/30/2025 |
| 8.0.27 | 8 | 01/30/2025 |
| 8.0.26 | 9 | 01/30/2025 |
| 8.0.25 | 7 | 01/30/2025 |
| 8.0.24 | 6 | 01/30/2025 |
| 8.0.22 | 8 | 01/30/2025 |
| 8.0.21 | 8 | 01/30/2025 |
| 8.0.20 | 7 | 01/30/2025 |
| 8.0.19 | 8 | 01/30/2025 |
| 8.0.18 | 6 | 01/30/2025 |
| 8.0.17 | 7 | 01/30/2025 |
| 8.0.16 | 7 | 01/28/2025 |
| 8.0.15 | 8 | 01/28/2025 |
| 8.0.14 | 7 | 01/28/2025 |
| 8.0.13 | 7 | 01/28/2025 |
| 8.0.12 | 7 | 01/28/2025 |
| 8.0.11 | 7 | 01/28/2025 |
| 8.0.10 | 8 | 01/28/2025 |
| 8.0.9 | 9 | 01/28/2025 |
| 8.0.8 | 7 | 01/23/2025 |
| 8.0.7 | 7 | 01/23/2025 |
| 8.0.6 | 8 | 01/21/2025 |
| 8.0.5 | 7 | 01/21/2025 |
| 8.0.4 | 7 | 01/21/2025 |
| 8.0.3 | 7 | 01/21/2025 |
| 8.0.2 | 6 | 01/21/2025 |
| 8.0.1 | 7 | 01/21/2025 |
| 8.0.0 | 8 | 01/21/2025 |