Skip to content

Bring in JavaScript / TypeScript code from key-did-provider-p256Test-remote ... fix signer for JWT #14

@bshambaugh

Description

@bshambaugh

https://github.com/bshambaugh/key-did-provider-p256Test-remote/tree/master/src

Here is a gist of the results of running remoteT4.js

https://gist.github.com/bshambaugh/9ca6abde074b559ab46a8624bdf0bda6

Here is the relevant stuff:

https://twitter.com/Brent_Shambaugh/status/1595847900650786820?s=20&t=udPnofc1ox3qn2yk5hbmyw
message: https://ceramic-clay.3boxlabs.com/api/v0/streams/k3y52l7qbv1fry9pmqrwfi6l7o3aqb387c9ouhwt35klzja8536eg5dxbqvp5yk8w
schema: https://gist.github.com/bshambaugh/9ca6abde074b559ab46a8624bdf0bda6

Unfortunately I do not get the same nice results as before:

https://twitter.com/Brent_Shambaugh/status/1595845195685400576?s=20&t=udPnofc1ox3qn2yk5hbmyw

verify the signatures using https://www.rfc-editor.org/rfc/rfc7519 and https://www.rfc-editor.org/rfc/rfc7520

This is the most simple code that will work:


websocketServer.on('stream',function(stream,request) {

 //   stream.setEncoding('utf8');

setTimeout(function(){
  (async function() {
    
    
          let did = 'did:key:zDnaezUFn4zmNoNeZvBEdVyCv6MVL69X8NRD8YavTCJWGuXM7';
          const signer = await remoteP256Signer(stream);
          const jwt = await createJWT({ requested: ['name', 'phone'] }, { issuer: did, signer },{alg: 'ES256'})
          console.log(jwt)
    
  })();

},250);

})

posted in #cplusplus in techlahoma on Nov 11th at 10:05:55PM

this is probably this code: https://github.com/bshambaugh/key-did-provider-p256Test-remote/blob/master/src/remote-matchDIDKeyWRemoteT2-getJWT-nl1.1.ts

go back to verify the JWT using the method in RFC7520 and then

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions