thiagobustamante / typescript-rest

This is a lightweight annotation-based expressjs extension for typescript.
MIT License
525 stars 108 forks source link

Authenticator: Add res param to getRoles() function #144

Closed mr-short closed 3 years ago

mr-short commented 4 years ago

This allows access to the res.locals variable which commonly stores data between middleware:

https://expressjs.com/en/api.html#res.locals

res.locals An object that contains response local variables scoped to the request, and therefore available only to the view(s) rendered during that request / response cycle (if any). Otherwise, this property is identical to app.locals.

This property is useful for exposing request-level information such as the request path name, authenticated user, user settings, and so on.

mr-short commented 3 years ago

@thiagobustamante Is this module still being maintained?