Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
hapi-gitlab-webhooks
Advanced tools
A Hapi plugin for receiving requests from the GitLab webhooks API.
Github version here: hapi-github-webhooks.
An authentication strategy plugin for hapi for validating webhook requests from Gitlab. This strategy validates the payload with the signature sent with the request.
The 'gitlabwebhook'
scheme takes the following options:
secret
- (required) the token configured for the webhook (never share or commit this to your project!)1.1.X: compatible HAPI 17.x.x
1.0.X: compatible HAPI 16.x.x
var hapi = require('hapi');
var gitlabWebhooksPlugin = require('hapi-gitlab-webhooks');
var token = 'SomeUnsharedSecretToken';
var server = new hapi.Server({
host: host,
port: port
});
try {
await server.register(hapiGitlabWebhook)
} catch (err) {
throw err;
}
// Register gitlab webhook auth strategy
server.auth.strategy('gitlabwebhook', 'gitlabwebhook', { secret: token });
// Apply the strategy to the route that handles webhooks
server.route([
{
method: 'POST',
path: '/webhooks/gitlab',
config: {
auth: {
strategies: ['gitlabwebhook'],
payload: 'required'
}
},
handler: () => null
}
]);
1.1.2 - 2018-01-31
FAQs
A Hapi plugin for receiving requests from the GitLab webhooks API.
We found that hapi-gitlab-webhooks demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.