waiting-for-dev / warden-jwt_auth

JWT token authentication with warden
MIT License
113 stars 56 forks source link

Fix dry-configuration compatibility #28

Closed seuros closed 4 years ago

seuros commented 4 years ago

Related to https://github.com/waiting-for-dev/devise-jwt/pull/177

And fix waiting-for-dev/warden-jwt_auth#22 waiting-for-dev/warden-jwt_auth#21 waiting-for-dev/warden-jwt_auth#27

seuros commented 4 years ago

@waiting-for-dev , any ETA for this release ?

waiting-for-dev commented 4 years ago

Let's do that @seuros !

However, I'm not fully understanding the changes in this PR. In which way they're needed to make devise-jwt compatible with dry-configurable?

As far as I see you're proposing two changes:

Why are all of those changes needed when we talk to fix it for dry-configurable in devise-jwt?

Thanks in advance.

waiting-for-dev commented 4 years ago

At least, your changes in devise-jwt pull request have a green test suite when combined with warden-jwt_auth last release... Haven't tried in a real application, though.

seuros commented 4 years ago

Allow revocation strategies and mappings to be specified as strings.

Yes, that option is useful to allow early autoloading. You can specified string or class.

Define helper methods in JWT module at the instance level instead of class level.

Actually the current code is patching dry-config with instance methods. I removed that.

Those changes are required because of the new dry-configurable lazy loading. we cannot patch the Proc.

seuros commented 4 years ago

At least, your changes in devise-jwt pull request have a green test suite when combined with warden-jwt_auth last release... Haven't tried in a real application, though.

That right, but remember that warden-jwt_auth lock dry-configurable to 0.9.

waiting-for-dev commented 4 years ago

Thanks! Released as v0.5.0.