express-audit-broadcast
v1.0.4
Published
This is a express middleware to send audit-broadcast messages on resource change.
Downloads
2
Readme
About
This is a express middleware to send audit-broadcast messages on resource change. The middleware expects you are using a sri-audit-broadcast server.
How to use
var getPersonHref = function (req, res) {
if(req.user) {
return '/persons/' + req.user.uuid;
} else {
return null
}
};
audit.config({
person: getPersonHref,
api: {
host: "https://hostToAudit.com",
user: "",
password: "",
headers: {}
},
component: "/security/components/test-component",
resources: [
{
resource: '/store/products',
type: "PRODUCTS"
},
{
resource: '/schools',
type: "SCHOOL"
}
]
});
person: Is a function that returns the current user.
resources: Configures the resources that need to have versions.
compontent: What is the component
api: How to connect to the api
MERGE
The merge operation is not yet supported