feat(authentication): Add setup method for auth strategies#1611
feat(authentication): Add setup method for auth strategies#1611daffl merged 3 commits intofeathersjs:dovefrom
Conversation
d50263b to
f818a04
Compare
|
couldn't you do all of this in |
Why have those separate methods when one will do? In Service you do not have |
|
Good points. This would be very useful for a project I'm currently working on. |
|
Hm, sorry I'm not sure why this got closed. Going to reopen but will review again to add in v5 (which will also have asynchronous application setup). |
f818a04 to
4a5b7ff
Compare
|
Rebased. |
|
Will go out in the next prerelease. Better late than never I guess, sorry about that 😄 |
Add
setupmethod toAuthenticationStrategyby analogy with service setup. More convenient alternative tosetAuthentication/setApplication/setNameand removes the need for getters, since it ensures that all services are already registered by the time of a call.For example, right now every time you get
entityServicein a strategy you call:AuthenticationBaseStrategy.configurationAuthenticationBase.configurationObject.assignandapp.getapp.serviceAll of those calls can be done once in
setupmethod instead doing them every time.Also fixed small inconsistencies in
app.setup:Moved this line up since otherwise a service registered in other service setup call will not get setup call.
Moved those lines down so that setup call for a dynamically registered service happens after the service is registered just like for a usual service.