mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
23 lines
593 B
TypeScript
23 lines
593 B
TypeScript
import express = require('express');
|
|
import ntlm = require('express-ntlm');
|
|
|
|
const app = express();
|
|
|
|
app.use(ntlm({
|
|
debug() {
|
|
const args = Array.prototype.slice.apply(arguments);
|
|
console.log.apply(null, args);
|
|
},
|
|
domain: 'MYDOMAIN',
|
|
domaincontroller: 'ldap://myad.example',
|
|
|
|
// use different port (default: 389)
|
|
// domaincontroller: 'ldap://myad.example:3899',
|
|
}));
|
|
|
|
app.all('*', (request, response) => {
|
|
response.end(JSON.stringify(request.ntlm)); // {"DomainName":"MYDOMAIN","UserName":"MYUSER","Workstation":"MYWORKSTATION"}
|
|
});
|
|
|
|
app.listen(80);
|