passport-bitauth
BitAuth authentication strategy for PassportJS.
Please note! This authenticates the request, it does not authorize it. You should think about how your application's permission structure is organized; there is a different between a user and a user who is permitted to perform an action.
Use
// assuming you have an express application...// if not: `var app = require('express')();` // include the auth strategyvar BitAuthStrategy = Strategy; // an example datastore// in production, this is likely a real databasevar users = 'Tf7UNQnxB8SccfoyZScQmb34V2GdEtQkzDz': name: 'Alice' sin: 'Tf7UNQnxB8SccfoyZScQmb34V2GdEtQkzDz' 'Tf22EUFxHWh4wmA3sDuw151W5C5g32jgph2': name: 'Bob' sin: 'Tf22EUFxHWh4wmA3sDuw151W5C5g32jgph2' passport; app; app;