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

Auth explanation request #1483

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions node.js/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ uacp: This page is linked from the Help Portal at https://help.sap.com/products/
[user]: #cds-user
[`req.user`]: #cds-user

afaik we cannot (or should not) use req.user any more. Instead we use cds.context.user in the middleware now.
We need some explanation on the different users here. Today I had to debug and identify an anonymous user. This is not documented yet, so please elaborte here or somewhere else.

Represents the currently logged-in user as filled into [`req.user`](events#user) by authentication middlewares.
Simply create instances of `cds.User` or of subclasses thereof in custom middlewares.
For example:
Expand Down