Pylons / pyramid

Pyramid - A Python web framework
https://trypyramid.com/
Other
3.97k stars 887 forks source link

Documentation Proposal #3770

Open crooksey opened 1 day ago

crooksey commented 1 day ago

I have just upgraded to the new 2.0 auth stack and as I only use pyramid for the base of API calls, all of my authentication is JWT based (much more of the norm now then when I started first using these tokens 7 years ago).

I originally used wiggy's pyramid_jwt repo, but with the new style authstack pyramid has, this really isn't a necessary plugin.

I have quite a simple solution now to using JWT based authentication and security using the pyramid 2.0 auth stack (with no external dependencies other than the core JWT package itself).

I was planning on writing a mini tutorial for the documentation, and then updating the core security page to reference this example.

I just wanted to check if this would be well received before writing it all and it then to get rejected for not fitting documentation guidelines etc.

stevepiercy commented 1 day ago

@crooksey if it doesn't get adopted in Pyramid core, I think it would be useful to add to https://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/auth/index.html. In fact, that might be the place to start, as the official tutorials started there, IIRC.

A link to it should be added to https://docs.pylonsproject.org/projects/pyramid_tutorials/en/latest/.

We have the upgrade guide, too, at https://docs.pylonsproject.org/projects/pyramid/en/latest/whatsnew-2.0.html#upgrading-authentication-authorization.

crooksey commented 1 day ago

Thanks, ill send something over for the cookbook, if reviewed I can add links to elsewhere.