@first-lego-league/ms-authentication
v1.0.6
Published
Service Provider using JWT
Downloads
12
Keywords
Readme
MS-Authentication
Authentication library using the Identity Provider module based on the MS (Module Standard)
Usage
First, install the package:npm install @first-lego-league/ms-authentication
Or use yarn (prefered):yarn add @first-lego-league/ms-authentication
After the installation, you just need import it and add it to use it as a router. everything route that fits this router will be protected by the IdP:
app.use(require('@first-lego-league/ms-authentication').authenticationMiddleware)
And for dev servers (Faking an authentication cookie):
app.use(require('@first-lego-league/ms-authentication').authenticationDevMiddleware)
Development
- Fork this repository
- make some changes
- create a Pull Request
- Wait for a CR from the code owner
- make sure everything is well
- merge
A few things to notice while developing:
- Use
yarn
notnpm
- Follow javascript standard as described here
- Keep the package lightweight and easy to use
- Don't break API if not neccessary
- Be creative and have fun