Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
seguir-express-middleware
Advanced tools
Readme
Part of the Seguir social platform, used to quickly create your own application that uses seguir as a backend.
http://cliftonc.github.io/seguir/server
This is express middleware that you can add to your own application, that will expose a set of local endpoints that you can use to build a front end for Seguir.
We have done it this way to enable you to wire up whatever authentication mechanism you like for users, with the only requirement being that the request hits the seguir middleware with a req.user object that has a seguirID (this can be over-ridden).
req.user = {
seguirId: '92029c7b-0ded-4d4f-b782-b2514c3dbb47'
}
Assuming your express app is running on /app, you can add the endpoints via:
var express = require('express');
var Seguir = require('seguir/client');
var seguir = new Seguir(config);
var seguirMiddleware = require('seguir-express-middleware');
var authMiddleware = function(req, res, next) {
// example middleware to retrieve seguirId for your use case
req.user.seguirId = getSeguirIdFromRequest(req);
next();
}
app.use('/social', seguirMiddleware(options, express, seguir, authMiddleware));
You can over ride the userProperty
(e.g. req.user), along with the seguirId property req.user.seguirId
.
Additionally, you can switch off the elements of the api that you do not want to use. All are on by default.
{
userProperty: 'user',
seguirIdProperty: 'seguirId',
user: true,
post: true,
friend: true,
follow: true,
like: true,
feed: true
}
npm run docs
This will create API documents in /docs.
git subtree push --prefix doc origin gh-pages
This will push any documentation changes to gh-pages.
FAQs
Experss middleware for seguir self-hosted social network backend and API
The npm package seguir-express-middleware receives a total of 1 weekly downloads. As such, seguir-express-middleware popularity was classified as not popular.
We found that seguir-express-middleware 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.