Giter VIP home page Giter VIP logo

Comments (9)

dellis23 avatar dellis23 commented on July 18, 2024

Hey, cool! I'm not really working on anything Django or Wordpress related at the moment (though I am wearing a Django hoodie), but I'd be happy to take a look at any PRs you have. And if you are very interested in working on it I'd be happy to add you as a maintainer (or whatever it's called on github).

from django-wordpress-auth.

rafaelcanovas avatar rafaelcanovas commented on July 18, 2024

About to push my changes! It's on mstrcnvs/django-wordpress-auth. It's not fully tested though, I'm testing right now.

from django-wordpress-auth.

rafaelcanovas avatar rafaelcanovas commented on July 18, 2024

Pushed, there's some refactoring involved, I hope you don't mind.

from django-wordpress-auth.

dellis23 avatar dellis23 commented on July 18, 2024

Looks good to me so far. Let me know when you have tested it fully and feel like it's good to go. I like most of the changes you've made, but I'm not sure about the renaming to simply wordpress_auth. Most of the patterns around Django applications I've seen have the prefix of django-, unless it's using a name that is specific enough to the project to not cause confusion.

A few popular examples:

I like this because as a Python library, it distinguishes between a generic WordPress (appreciate the spelling correction :) ) authentication library and one that is intended to work with Django. I imagine there would also be benefits for search engines, since I imagine that's what led you here in the first place!

from django-wordpress-auth.

rafaelcanovas avatar rafaelcanovas commented on July 18, 2024

I didn't change the project name to wordpress_auth, its still django-wordpress-auth and will be it on PyPI also. It's just the main package name, as an example you already sent, despite being named django-debug-toolbar the main package is simply named debug_toolbar, also django-registration which have its main package named registration. This is because it's a little redundant to specify django_wordpress_auth.middleware.blabla inside your Django project, you're in Django already :)

What I'm struggling with right now is that it seems that the algorithm you used to check if the cookie corresponds to a valid WordPress user is a little outdated, I think, the cookie now has 4 values separated by | instead of three, I think I'll have to do some more refactoring regarding this. Do you have any info if the cookie creation algorithm change in the last year?

from django-wordpress-auth.

dellis23 avatar dellis23 commented on July 18, 2024

I see, that makes sense.

This is pulling from really old memories, but I believe they had implemented something new but still had compatibility for the old way of storing things when I wrote this. It looks like the code lives in this function: https://github.com/WordPress/WordPress/blob/e253251ef410667cc13d2e7afb91178f9c929c48/wp-includes/pluggable.php#L616

Hopefully that helps some.

from django-wordpress-auth.

rafaelcanovas avatar rafaelcanovas commented on July 18, 2024

I'm trying to come up with a solution while maintaining backwards compatibility. Like exposing an endpoint on the WordPress installation that checks itself for the validity of the cookie. But that would require a WordPress plugin.

from django-wordpress-auth.

dellis23 avatar dellis23 commented on July 18, 2024

If you've managed to get a working version of the new one, could you just
check for the validity of either and pass if okay? That being said, anyone
who is still on that old of a WordPress release probably should be
upgrading for security's sake.

On Wed, Jan 7, 2015 at 7:53 AM, Rafael Canovas [email protected]
wrote:

I'm trying to struggle with a solution while maintaining backwards
compatibility. Like exposing an endpoint on the WordPress installation that
checks itself for the validity of the cookie. But that would require a
WordPress plugin.


Reply to this email directly or view it on GitHub
#1 (comment)
.

from django-wordpress-auth.

rafaelcanovas avatar rafaelcanovas commented on July 18, 2024

Yeah you're right. Let's do it then :-)

from django-wordpress-auth.

Related Issues (8)

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.