-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
Description
The authentication package is being updated with
- a new authentication strategy interface Add abstraction for authentication strategy #2466
- a new authentication action Refactor the authentication action to be a common one. #2467
- extensionPoint and extensionFor decorators which allow the registration of authentication strategy implementations Extension point for registering the authentication strategies #2312
- a new authentication strategy resolver Extension point for registering the authentication strategies #2312 + Access modified request in Authentication Provider #2367 which discovers registered authentication strategies
The shopping cart example will also be given an overhaul to utilize the new capabilities of the authentication package in loopbackio/loopback4-example-shopping#79 and will contain an example of a jwt authentication strategy being registered as an extension of the authentication strategy extension point.
Also #2312 will have light documentation on how to properly register authentication strategies.
So this blog would mention :
- that our
authenticationpackage has been updated with these new capabilities - that we welcome community members to contribute new authentications strategies to the
authenticatepackage - that our passport strategy adapter is still available and works in the updated design
- links to documentation for understanding how strategies are registered
- link to the shopping cart example
how theusers/loginendpoint in the shopping cart example wasn't decorated with a strategy, and the logic for validating user credentials occurred in the controller method, and a token service was used to create a JWT tokenshow how the JWTAuthenticationStrategy in the shopping cart example was registered as an authentication strategy extension , and how theusers/meendpoint was decorated with@authenticate('jwt')and how the JWTAuthenticationStrategy.authenticate() method will determine if the user is authorized to access this endpoint or not.
Acceptance Criteria
- Blog conforms to LoopBack team's blogging standards