express-api-user-management-signup
Advanced tools
Comparing version 0.0.2 to 0.0.5
@@ -31,3 +31,3 @@ | ||
// customize the account settings form // | ||
// customize the account settings form // | ||
@@ -43,7 +43,19 @@ $('#account-form h1').text('Account Settings'); | ||
// setup the confirm window that displays when the user chooses to delete their account // | ||
// setup the confirm window that displays when the user chooses to delete their account // | ||
hc.initConfirm(); | ||
// init dropdown | ||
$('a.dropdown-toggle').dropdown(); | ||
// generate form | ||
$.getJSON( $("#metaformurl").attr('value'), {}, function(data){ | ||
values = $("#meta").attr('value'); | ||
if( !data ) data = {} | ||
data.value = values.length ? JSON.parse( values ) : {} | ||
console.dir(data); | ||
var jsonForm = $("#metaform").jsonForm( data ); | ||
// update the hidden input field with jsondata | ||
$('#metaform').on('change keyup', function() { | ||
$("#meta").attr('value', JSON.stringify( jsonForm.getFormValues() ) ); | ||
}); | ||
}); | ||
}); |
{ | ||
"name": "express-api-user-management-signup", | ||
"version": "0.0.2", | ||
"description": "adds user frontend with login / registration features to your (express) application. Startingpoint for DIY api management", | ||
"version": "0.0.5", | ||
"description": "adds user frontend with login-, registration-, and webhook- features to your (express) application. Startingpoint for DIY api management", | ||
"author": { | ||
@@ -20,2 +20,3 @@ "name": "Coder of Salvation" | ||
"jade": "0.27.7", | ||
"mongodb":"2.0.27", | ||
"moment": "1.7.2", | ||
@@ -22,0 +23,0 @@ "emailjs": "0.3.3", |
@@ -9,13 +9,16 @@ express-api-user-management-signup | ||
<img src=".res/loggedin.png"> | ||
<br><br> | ||
<img src=".res/webhooks.png"> | ||
# WARNING: BETA, not production ready | ||
## WARNING: BETA, not production ready | ||
# Install: standalone | ||
## Install: standalone | ||
sudo npm install coffee-script -g | ||
npm install express-api-user-management-signup | ||
WEBHOOKURL="http://localhost:8123" node app.js | ||
# or | ||
WEBHOOKURL="http://localhost:8123" coffee app.coffee | ||
# NON-COFFEESCRIPTERS: coffee -c app.coffee will convert it to app.js | ||
# Install: as library | ||
## Install: as library | ||
@@ -28,11 +31,8 @@ Use it directly in your existing express servercode: | ||
Using the code below, it will add extra routes to your existing express app: | ||
In your existing express-app, just put this above app.listen(....) : | ||
var express = require("express"); | ||
var port = process.env.PORT || 8111 | ||
var host = process.env.HOST || "127.0.0.1" | ||
var app = express(); | ||
require("./usermanagement.js")(app,express); | ||
//>>>>>>>>>>>> BEGIN OF CODE | ||
where usermanagement.js looks something like this: | ||
var config = { | ||
@@ -43,3 +43,9 @@ webhook: { | ||
} | ||
mongo: { dbName: "localhost", dbPort: 27017, dbName: "foo"} | ||
mongo: { | ||
host: "localhost", | ||
port: 27017, | ||
name: "foo" | ||
// user: "foo" | ||
// password: "23kj4" | ||
} | ||
layout: { | ||
@@ -54,14 +60,11 @@ title: { | ||
"Contact": {target:"_blank",url:"mailto:support@foo.com"} | ||
} | ||
}, | ||
formurl: "/js/form.json" | ||
} | ||
} | ||
require("coffee-script/register") | ||
require('express-api-user-management-signup/lib')(app,express,webhookurl,requestdata,mongocfg) | ||
module.parent.require("coffee-script/register") | ||
module.parent.require('express-api-user-management-signup/lib')(app,express,config) | ||
//<<<<<<<<<<<< END OF CODE | ||
## Features: | ||
app.listen(....) | ||
# Features: | ||
* coffeescript yay! | ||
@@ -74,8 +77,21 @@ * New User Account Creation | ||
* Blowfish-based Scheme Password Encryption | ||
* extra webhooks for flexibilitystorage (to integrate with api proxy like apiaxle e.g.) | ||
* end-user webhooks | ||
* optional internal webhooks for flexibilitystorage (to integrate with api proxy like apiaxle or emailgateway e.g.) | ||
* logging of db actions | ||
* apikey support + regeneration of apikey | ||
* works standalone and as express drop-in lib (the latter needs improvement eg. app.use) | ||
* flexible form using (optionally remote) jsonschema | ||
#### Webhooks | ||
## Extend forms easily | ||
By using [jsonform](https://github.com/joshfire/jsonform), we can easily extend the form without having to fiddle with database code. | ||
Just have a look at : | ||
* the '[form.json](https://github.com/coderofsalvation/express-api-user-management-signup/blob/master/app/public.account/js/form.json)' in this package | ||
* the [docs](http://github.com/joshfire/jsonform/wiki). | ||
> HINT: you can change the 'formurl'-parameter of 'app.[js,coffee]' (or the json above) into a remote url in order to remotely manage the form | ||
## Webhooks | ||
The following webhooks are fired whenever | ||
@@ -96,9 +112,15 @@ | ||
Where configuredhost is defined by you ('http://mygateway.com/foo' e.g.) | ||
These webhooks can be reacted upon by other middle/software in order to | ||
send emails or update api proxy settings e.g. | ||
*** | ||
## Todo | ||
####Node-Login is built on top of the following libraries : | ||
* tests | ||
* responsive ui (for smartphone etc) | ||
* url validation for webhook url in jsonschema | ||
* smaller fonts jsonform validation error tooltips (to match the layout) | ||
## Built with | ||
* [Node.js](http://nodejs.org/) - Application Server | ||
@@ -112,5 +134,4 @@ * [Express.js](http://expressjs.com/) - Node.js Web Framework | ||
* [Twitter Bootstrap](http://twitter.github.com/bootstrap/) - UI Component & Layout Library | ||
####Credits | ||
* [braitsch](http://github.com/braitsch) for his node-login boilerplate | ||
* [jsonform](http://developer.joshfire.com/doc/dev/ref/jsonform) | ||
* [underscore](http://documentcloud.github.com/underscore) | ||
* [JSV](https://github.com/garycourt/JSV) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
724348
55
10221
131
8
2
2
+ Addedmongodb@2.0.27
+ Addedbindings@1.5.0(transitive)
+ Addedbson@0.3.2(transitive)
+ Addedbson-ext@0.1.13(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addedfile-uri-to-path@1.0.0(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedisarray@0.0.1(transitive)
+ Addedkerberos@0.0.24(transitive)
+ Addedminimist@0.0.8(transitive)
+ Addedmkdirp@0.5.0(transitive)
+ Addedmongodb@2.0.27(transitive)
+ Addedmongodb-core@1.1.21(transitive)
+ Addednan@2.0.92.10.0(transitive)
+ Addedreadable-stream@1.0.31(transitive)
+ Addedrimraf@2.2.6(transitive)
+ Addedstring_decoder@0.10.31(transitive)