S2iEvolution.SingpassApi 8.0.97

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.

Version Downloads Last updated
8.0.97 14 12/22/2025
8.0.96 4 12/22/2025
8.0.95 5 12/18/2025
8.0.94 4 12/18/2025
8.0.93 4 12/18/2025
8.0.92 6 12/16/2025
8.0.91 9 12/08/2025
8.0.90 11 11/25/2025
8.0.89 9 11/24/2025
8.0.88 8 11/21/2025
8.0.87 10 11/20/2025
8.0.86 9 11/18/2025
8.0.85 5 11/18/2025
8.0.84 5 11/18/2025
8.0.83 16 11/13/2025
8.0.82 6 11/13/2025
8.0.80 10 11/10/2025
8.0.79 4 11/07/2025
8.0.78 6 11/07/2025
8.0.77 4 11/07/2025
8.0.76 6 11/06/2025
8.0.75 7 11/06/2025
8.0.74 6 11/06/2025
8.0.73 6 11/06/2025
8.0.72 5 11/06/2025
8.0.71 4 11/06/2025
8.0.69 6 11/03/2025
8.0.68 6 11/03/2025
8.0.67 5 11/03/2025
8.0.66 6 11/03/2025
8.0.65 10 10/28/2025
8.0.64 6 10/27/2025
8.0.63 8 10/27/2025
8.0.62 6 10/27/2025
8.0.61 5 10/27/2025
8.0.60 5 10/27/2025
8.0.59 5 10/27/2025
8.0.58 5 10/27/2025
8.0.57 6 10/27/2025
8.0.56 6 10/27/2025
8.0.55 7 10/27/2025
8.0.54 4 10/27/2025
8.0.53 6 10/27/2025
8.0.52 6 10/27/2025
8.0.51 5 10/27/2025
8.0.50 6 10/27/2025
8.0.49 5 10/27/2025
8.0.48 6 10/27/2025
8.0.47 5 10/24/2025
8.0.46 9 10/21/2025
8.0.45 5 10/21/2025
8.0.44 5 10/21/2025
8.0.43 4 10/21/2025
8.0.42 11 02/03/2025
8.0.41 9 02/03/2025
8.0.40 10 02/03/2025
8.0.39 10 02/03/2025
8.0.38 11 02/03/2025
8.0.37 10 02/03/2025
8.0.36 11 01/30/2025
8.0.35 10 01/30/2025
8.0.34 12 01/30/2025
8.0.33 10 01/30/2025
8.0.32 10 01/30/2025
8.0.31 12 01/30/2025
8.0.30 11 01/30/2025
8.0.29 11 01/30/2025
8.0.28 12 01/30/2025
8.0.27 12 01/30/2025
8.0.26 13 01/30/2025
8.0.25 10 01/30/2025
8.0.24 9 01/30/2025
8.0.22 11 01/30/2025
8.0.21 12 01/30/2025
8.0.20 10 01/30/2025
8.0.19 11 01/30/2025
8.0.18 9 01/30/2025
8.0.17 11 01/30/2025
8.0.16 11 01/28/2025
8.0.15 11 01/28/2025
8.0.14 10 01/28/2025
8.0.13 10 01/28/2025
8.0.12 11 01/28/2025
8.0.11 11 01/28/2025
8.0.10 11 01/28/2025
8.0.9 13 01/28/2025
8.0.8 10 01/23/2025
8.0.7 11 01/23/2025
8.0.6 11 01/21/2025
8.0.5 10 01/21/2025
8.0.4 10 01/21/2025
8.0.3 10 01/21/2025
8.0.2 9 01/21/2025
8.0.1 10 01/21/2025
8.0.0 11 01/21/2025