benvanstaveren / Mojolicious-Plugin-Authentication

A plugin to make authentication a bit easier
http://search.cpan.org/dist/Mojolicious-Plugin-Authentication/
Other
20 stars 17 forks source link

validate_user callback called regardless of auto_validate #23

Closed jjatria closed 7 years ago

jjatria commented 8 years ago

The documentation states that

If the extra data hash contains a key auto_validate, the value of that key will be used as the UID, and authenticate will not call your validate_user callback

But the code in authenticate calls the validate_user callback regardless, and ignores its result value if auto_validate is present.

If this is by design, then the documentation should be corrected. Otherwise, the code in authenticate can be simplified.

gypark commented 7 years ago

Hello,

Today I'd found this problem and came here to write about it, but jjatria did it earlier 👍

I hope new version of this great module be released soon.