Closed s-k closed 2 years ago
Is there any way I can help to get the PR reviewed? 🙂
Thanks in advance!
@gwynne @Joannis @siemensikkema @0xTim
I'm going to throw this out to the community for comment. I'm not 100% convinced of the need for this vs just someone adding it as an extension in their project if they log in the user in multiple places.
(To be clear, this is useful and might get used but in general we don't want to add APIs for every possible use case as it adds more for us to maintain)
I agree with @0xTim - while this is useful, it's behavior is too specific to its use case to justify including it in Fluent's public API.
I understand. Thanks for considering it.
Types conforming to
ModelAuthenticatable
can be authenticated by callingauthenticate()
on the type. For example:This logs the user having the given username and password into
req.auth
and returns the found user. If the user is not found or the wrong password is supplied, an error will be thrown.