Closed pbrisbin closed 9 years ago
/cc @gabebw
This looks like an improvement to me. Did the behavior change here, or is this just a refactoring?
Nice to know about Import.NoFoundation
.
Nope, no behavior change. I wanted to refactor a bit as I pulled this example into a blog post, then I noticed I could get some test coverage on it first.
This'll be useful when we introduce other authentication plugins, to be able to test the logic of handling credsExtra
from multiple sources.
This code has actually been a source of bugs. With the new scaffold's
Import.NoFoundation
, we're able to extract more code out ofFoundation
without running into circular imports. Moving this toModel.User
made it easy to test.