# express-ad-basicauth
Active directory basic auth middleware for express.
API
Simple usage
const app = ;const AdAuth = ;const port = 8080; AdAuth; app; app; app;
Check group membership
const app = ;const AdAuth = ;const port = 8080; AdAuth; app; app; app;
Edit / prepare username and / or password
...AdAuth; AdAuth;...
To cancel the authentication process with one of the functions simply return false
.
Then the user will get a 401 code.
Active Directory configuration
Simple config
url: "ldap://ad.local:389" baseDN: "dc=ad,dc=local" username: "" password: ""
Simple Query
url: "ldap://ad.local:389" baseDN: "dc=ad,dc=local" cn: "*Exchange*" username: "" password: ""
More Options
For more options visit the activedirectory2
package.
You can find it here. All options are available.