Git Product home page Git Product logo

Comments (8)

ajwild avatar ajwild commented on June 21, 2024 1

While worktop is still "young" I'd say go with whatever works for your use case right now, but make it easy to extend. I just set some defaults based on what I needed, but allowed everything to be passed as parameters. I'm looking forward to giving this framework a go!

from worktop.

lukeed avatar lukeed commented on June 21, 2024 1

Thanks @mattwebbio! Yeah, there will definitely be a worktop/jwt. Still working through the knowledge gap of importKey so that I'm not setting everyone up for limited use cases.

from worktop.

ajwild avatar ajwild commented on June 21, 2024

I looked into this a while back and created jwebt so that I could send logs from Cloudflare Workers to GCP logging (with the help of jwebt-gcp). I used "pkcs8" rather than "raw". I'm not sure what the norm would be, and it's been almost a year since I worked on it, but at the time I didn't find a lot of information about best practices.

from worktop.

lukeed avatar lukeed commented on June 21, 2024

Thanks! Yeah the next building block here is a worktop/jwt module, which I have ready to go, but again – not sure if the patterns/choices I made were specific to me.

Your links are helpful, but I think you and I are in the same position, wondering if/when different key-types are preferred. 🤷‍♂️

from worktop.

lukeed avatar lukeed commented on June 21, 2024

Let me know how it fares for you!

It's young, but I still want to avoid breaking changes as much as possible. I have 3-5 new modules' worth of code I can add but I'm shopping around for feedback before adding anything. I don't think it'd be a nice early-adopter experience to be trying something new & having to rework parts of your application on every new release.

from worktop.

mattwebbio avatar mattwebbio commented on June 21, 2024

Super excited about this project! Thought I'd cast my vote since it doesn't look like you've gotten much feedback here.

I'm planning to verify and decode JWT keys created/signed from an external application with an x509 public cert. Currently accomplishing this (outside worktop) with jsrsasign. Your suggested additions in the first comment look great!

from worktop.

ajwild avatar ajwild commented on June 21, 2024

Would wrapping something like node-jose make more sense now that Cloudflare Workers (partially) supports node modules? Or is your intention to keep dependencies to an absolute minimum at this point?

https://blog.cloudflare.com/node-js-support-cloudflare-workers/
https://workers.cloudflare.com/works

from worktop.

lukeed avatar lukeed commented on June 21, 2024

I already have the code for this, and I'd 1000% rather use native APIs already available within the runtime. The entire framework is a pure Workers target. Relying on Node.js shims is a forced dependency on extensive tooling (eg, webpack or an involved, custom shim setup) and/or reliance on a platform feature which isn't fully formed yet.

from worktop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.