Skip to content

Instantly share code, notes, and snippets.

View nikosft's full-sized avatar

Nikos Fotiou nikosft

View GitHub Profile
@nikosft
nikosft / iSHARE.cs
Last active May 9, 2023 12:25
Generate a client assertion and retrieve an access token from iSHARE satellite
using Microsoft.IdentityModel.Tokens;
using System.IdentityModel.Tokens.Jwt;
using System.Security.Cryptography;
/*
* Extract from a p12 file the public key in X509 format
* openssl pkcs12 -in i4trust.p12 -out certificate.cer -nokeys
* Remove first and last line
*/
@nikosft
nikosft / jwt-vc.json
Last active April 1, 2021 18:50
A VC inside a JWT that uses Proof-of-Possession key semantics as defined in RFC7800
{
"jti": "http://example.edu/credentials/3732",
"iss": "https://example.com/keys/foo.jwk",
"nbf": 1541493724,
"iat": 1541493724,
"exp": 1573029723,
"cnf":{
"jwk":{
"kty": "EC",
"use": "sig",