@cityssm/authentication-helper
Version:
Handles the authentication requests for web applications.
31 lines (20 loc) • 1.07 kB
Markdown
# Authentication Helper
[](https://www.npmjs.com/package/@cityssm/authentication-helper)
[](https://app.deepsource.com/gh/cityssm/node-authentication-helper/)
Handles the authentication requests for web applications.
Standardizes each method to allow for easier switching.
Supports:
- [Active Directory](https://github.com/cityssm/node-activedirectory-authenticate)
- [AD Web Auth](https://github.com/cityssm/ad-web-auth)
- Function - Implement your own!
- Plain Text (_for testing purposes only!!!_)
## Installation
```sh
npm install @cityssm/authentication-helper
```
## Usage
```javascript
import { ActiveDirectoryAuthenticator } from '@cityssm/authentication-helper'
const authenticator = new ActiveDirectoryAuthenticator(config)
await authenticator.authenticate('domain\\user', 'p@ssw0rd')
```