1.3.9 • Published 3 years ago

@pubcore/express-login v1.3.9

Weekly downloads
44
License
MIT
Repository
github
Last release
3 years ago

Express authentication middleware

Implementation for @pubcore/authentication

Prerequisites

  • Node.js
  • Express webserver
  • Knex

Example

const login = require('@pubcore/express-login'),
	app = express(),
	options = {
		methods: {jwt:{}, form:{}, basicAuth:{}},
		publicDeactivatedUri: '/login/deactivated',
		publicCancelLoginUri: '/login/canceled',
		changePasswordUri:'/login/pwchange',
		maxTimeWithoutActivity: 1000 * 60 * 60 * 24 * 180, //[msec]
		maxTimeWithout401: 1000 * 3600, //[msec]
		maxLoginAttempts: 2,
		maxLoginAttemptsTimeWindow: 1000 * 3600 * 12, //[msec]
		minTimeBetweenUpdates: 1000 * 60, //[msec]
		jwtKeyFile: '/path/to/keyfile'
	},
	db = {knex, table:'users'}

app.use(login({db, options}))
1.3.9

3 years ago

1.3.8

4 years ago

1.3.7

4 years ago

1.3.6

5 years ago

1.3.5

5 years ago

1.3.4

5 years ago

1.3.3

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago