
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
hapi-request-user
Advanced tools
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-featuregit commit -am 'Add some feature'git push origin my-new-featureMIT © Future Studio
futurestud.io · GitHub @futurestudio · Twitter @futurestud_io
FAQs
hapi plugin that shortcuts request.auth.credentials to request.user
The npm package hapi-request-user receives a total of 0 weekly downloads. As such, hapi-request-user popularity was classified as not popular.
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
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.