Skip to content

Instantly share code, notes, and snippets.

@pauldougan
pauldougan / README.md
Last active June 6, 2024 08:02
public_key example

example public key

create an RSA key pair

openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:2048
openssl rsa -pubout -in private_key.pem -out public_key.pem

convert the PEM encoded public key to JWKS format

@pauldougan
pauldougan / example_did.json
Created May 7, 2024 14:18
example_did.json
{
"@context": [
"https://www.w3.org/ns/did/v1",
"https://www.w3.org/ns/security/jwk/v1"
],
"id": "did:web:identity.account.gov.uk",
"assertionMethod": [
{
"id": "cfeebabeeac2d9749993523f143fbc3f8c83411853f2996323a2efbd7acda754",
"type": "JsonWebKey",
@pauldougan
pauldougan / README.md
Last active April 23, 2024 22:20
Run node.js from gist

Run node.js from a gist

npx https://gist.github.com/pauldougan/45e7e9324257a9b34d1f051b7805e513

@pauldougan
pauldougan / Hello.py
Last active April 21, 2024 22:31
Hello World
#!/usr/bin/env python3
import this
print("hello")
@pauldougan
pauldougan / Program.cs
Created April 9, 2024 14:19
Integrate dotnet core with One Login - example
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
using Microsoft.AspNetCore.CookiePolicy;
using Microsoft.IdentityModel.Tokens;
using System.IdentityModel.Tokens.Jwt;
using System.Security.Cryptography;
using System.Security.Claims;
namespace govuk_one_login_aspdotnet_core
@pauldougan
pauldougan / Test-mermaid.md
Created April 7, 2024 15:21
Test mermaid
  graph TD;
      A-->B;
      A-->C;
      B-->D;
      C-->D;
@pauldougan
pauldougan / debug-tools.csv
Last active March 14, 2024 11:30
debug tools
tool description purpose
curl https cli tool access http(s) endpoints and send GET|POST requests
cyberchef swiss army penknife crypto tool general crypto (hashing encoding etc)
fx JSON browsing tool inspect json for a quick look
jwt JWT CLI tool encoding and decoding of JWT
jwt.ms Online JWT tool decode JWT
jq JSON tool format and process JSON data
visidata swiss army penknife data tool for tabular data exploring and converting tabular date
charles debugging http proxy wire level tracing of http flows
@pauldougan
pauldougan / Integration-libraries-and-examples.md
Last active March 10, 2024 09:27
Integration libraries and examples

Integration libraries and examples

A curated list of OIDC Connect libraries in a variety of languages and some examples public example repositories that use these Libraries.

Refrence material to inspire developer wishing to build relying parties to integrate with the GOV.UK One Login identity provider.

@pauldougan
pauldougan / README.md
Last active March 5, 2024 08:21
Architect things

Some minimal metadata for architect things

field description
owner the department that owns the resource
thing the type of thing (adr or rfc)
status the status of the resource (current or legacy)
org the GitHub organisation
repo the GitHub repository
path the path to the resource
@pauldougan
pauldougan / README.md
Last active February 25, 2024 20:06
govuk-one-login-book