Lightweight node.js based web service that provides user authentication against LDAP server (Active Directory / Windows network) credentials and returns a JSON Web Token.
Heavily based on the work of gregfroese/ldapservice.
- Replaced yaml config-files with json
- Removed support for RabbitMQ
- Updated npm dependencies
- Simplified endpoints
- Rename/Copy
config.test.json
toconfig.json
- Update config in
config.json
- Deploy
Payload
{
"username": "euler",
"password": "password"
}
Response
{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NjE3OTQxMjY0NjAsInVzZXJfbmFtZSI6ImV1bGVyIiwiZnVsbF9uYW1lIjoiTGVvbmhhcmQgRXVsZXIiLCJtYWlsIjoiZXVsZXJAbGRhcC5mb3J1bXN5cy5jb20ifQ.bqSjshvLnHsTJwcXBXsNVtGGNatvQHyqhL8MSXuMwFI",
"full_name": "Leonhard Euler"
}
Payload
{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NjE3OTQxMjY0NjAsInVzZXJfbmFtZSI6ImV1bGVyIiwiZnVsbF9uYW1lIjoiTGVvbmhhcmQgRXVsZXIiLCJtYWlsIjoiZXVsZXJAbGRhcC5mb3J1bXN5cy5jb20ifQ.bqSjshvLnHsTJwcXBXsNVtGGNatvQHyqhL8MSXuMwFI"
}
Response
{
"exp": 1495058246,
"user_name": "euler",
"full_name": "Leonhard Euler",
"mail": "euler@ldap.forumsys.com"
}
- Write Tests