vapor / fluent

Vapor ORM (queries, models, and relations) for NoSQL and SQL databases
https://docs.vapor.codes/4.0/fluent/overview/
MIT License
1.32k stars 172 forks source link

Add default implementation for CredentialsAuthenticatable #711

Closed 0xTim closed 3 years ago

0xTim commented 3 years ago

Improves the experience for users writing web applications. Adds a ModelCredentialsAuthenticator to automatically conform Model types to CredentialsAuthenticatable and provide a middleware to use.

This can be used when logging in users via a web form, as shown in the tests. This also backfills some tests for ModelSessionAuthenticatable.

Also fixes a bug where the SessionAuthenticator was not using the provided DatabaseID

Resolves #710 Resolves #701

Docs here vapor/docs#576

tanner0101 commented 3 years ago

These changes are now available in 4.1.0