Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: introduce middleware based sequence for REST #5366

Merged
merged 9 commits into from
Aug 4, 2020
6 changes: 6 additions & 0 deletions docs/site/Authentication-component-action.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ sidebar: lb4_sidebar
permalink: /doc/en/lb4/Authentication-component-action.html
---

{% include note.html content="
This is not needed for [middleware-based
sequence](REST-middleware-sequence.md) as the authentication is enforced by a
middleware that's automatically discovered and added to the sequence.
" %}

## Adding an Authentication Action to a Custom Sequence

In a LoopBack 4 application with REST API endpoints, each request passes through
Expand Down
6 changes: 6 additions & 0 deletions docs/site/Authentication-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ snippet:
- Decorate the controller endpoint with `@authenticate()` and inject the user
passed from the authentication layer.

{% include note.html content="
For [middleware-based sequence](REST-middleware-sequence.md), there is no longer
needed to add the authenticate action as the authentication is enforced by a
middleware that's automatically discovered and added to the sequence.
" %}

The rest will be handled by the authentication component
`@loopback/authentication`, which incorporates the authentication mechanism, and
the JWT extension `@loopback/jwt-authentication`, which helps in implementing
Expand Down
Loading