OpenID Connect ID Token Signature Validation Samples

When creating a library that has to validate ID tokens according to the OpenID specification, it is useful to include some tests that check if the signature validation is working properly. Here are some samples that may help you do this:

Response of .well-known/openid-configuration endpoint

{
  "issuer": "http://localhost:8080",
  "token_endpoint": "http://localhost:8080/token",
  "authorization_endpoint": "http://localhost:8080/authorize",
  "userinfo_endpoint": "http://localhost:8080/userinfo",
  "token_endpoint_auth_methods_supported": ["none"],
  "jwks_uri": "http://localhost:8080/jwks",
  "response_types_supported": ["code"],
  "grant_types_supported": [
    "client_credentials",
    "authorization_code",
    "password"
  ],
  "token_endpoint_auth_signing_alg_values_supported": ["RS256"],
  "response_modes_supported": ["query"],
  "id_token_signing_alg_values_supported": ["RS256"],
  "revocation_endpoint": "http://localhost:8080/revoke",
  "subject_types_supported": ["public"],
  "end_session_endpoint": "http://localhost:8080/endsession",
  "introspection_endpoint": "http://localhost:8080/introspect"
}

Response of JWK endpoint

{
  "keys": [
    {
      "kty": "RSA",
      "n": "wFTZ6hX5HBOg3McPxoKA175wcOP82iiq-JkehT5Wl1Zt8Ljak9BgUoxoMteMTlY5b-NUemaTZhZ-EO2H9jEzUT6bESnsn6AexuoTFiENxcc5gtYWsQEfhB4G1DuDhG5szuqcM2sDjAonduZ6M4Nen-41vbsC_jwhX9uuEJ3jBtmjJUohO1it-spx4Iz50kE2iarY4a-lDo3KJgH8kYLvK-IIZhNV2lNihxuiADLjsELgGJrxvg6hskYrTDcZJ-cOCo9POtq6GxSR7zRFAWN0DRpk9jT65GxFDv5b6uBqZ3m-31iRNsftT-JnL5KzDW4tHkAvedWdqfyjD8fGkloo8w",
      "e": "AQAB",
      "kid": "192363785517f3280776d2868fe4b42063b15fe2bcd578154f1a20277c04f08186840468eeb7d723",
      "alg": "RS256"
    }
  ]
}

Response of token endpoint

{
  "token_type": "Bearer",
  "expires_in": 3600,
  "access_token": "eyJraWQiOiIxOTIzNjM3ODU1MTdmMzI4MDc3NmQyODY4ZmU0YjQyMDYzYjE1ZmUyYmNk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jldQUOSqSQ42YlNxaZN1xdYTyPElCtg8nPksRYTM6FZy_39tGAHZgz8_vuSk13WSGG5xYqSzlagQDoE-QwH9blXLcVHxpZlFBnXRG68samqno6yigFfNz8XtrGaPDP22oxXTCA_YlzZZivMNB3FwXdczZw_tO3CRYm6YgUrPstNBOb7_45Uud0WHwBcCA"
}
Dall-E promptsUsing Playwright on Openshift