Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
hapi-request-user
Advanced tools
hapi plugin that shortcuts request.auth.credentials to request.user
hapi plugin that shortcuts “request.auth.credentials” to “request.user”
Installation · Usage ·
Follow @marcuspoehls for updates!
Development of this hapi plugin is supported by Future Studio University 🚀
Join the Future Studio University and Skyrocket in Node.js
A hapi plugin that shortcuts access to the authenticated user from request.auth.credentials
to request.user
.
Access the authenticated user in request lifecycle methods, like this:
{
method: 'GET',
path: '/authenticated-user',
handler: (request, h) => {
return request.user // instead of "request.auth.credentials"
}
}
hapi v17 and Node.js v8 (or newer)
This plugin requires hapi v17 (or later) and uses async/await which requires Node.js v8 or newer.
Add hapi-request-user
as a dependency to your project:
npm i hapi-request-user
Register the hapi-request-user
plugin and you’re done:
await server.register({
plugin: require('hapi-request-user'),
})
Do you miss a feature? Please don’t hesitate to create an issue with a short description of your desired addition to this plugin.
git checkout -b my-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT © Future Studio
futurestud.io · GitHub @futurestudio · Twitter @futurestud_io
FAQs
hapi plugin that shortcuts request.auth.credentials to request.user
We found that hapi-request-user demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.