implement group methods,
implement modUser
This commit is contained in:
33
src/main.js
33
src/main.js
@@ -22,36 +22,3 @@ global.package = _package(global.argv.package);
|
||||
global.config = _config(global.argv.configPath);
|
||||
|
||||
const ldap = new LDAP(global.argv.ldapURL, global.config.basedn);
|
||||
|
||||
/* import { readFileSync } from "fs";
|
||||
const paas = {
|
||||
dn: `uid=paas,ou=people,${global.config.basedn}`,
|
||||
password: readFileSync("paas.token").toString()
|
||||
};
|
||||
console.log(await ldap.addUser(paas, "testuser", { cn: "test", sn: "test", userPassword: "test" }));
|
||||
console.log((await ldap.getUser(paas, "testuser")).entries[0].attributes);
|
||||
console.log(await ldap.delUser(paas, "testuser"));
|
||||
console.log(await ldap.addGroup(paas, "testgroup"));
|
||||
console.log(await ldap.delGroup(paas, "testgroup"));
|
||||
exit(0); */
|
||||
|
||||
const app = express();
|
||||
app.use(bodyParser.urlencoded({ extended: true }));
|
||||
app.use(cookieParser());
|
||||
app.use(morgan("combined"));
|
||||
|
||||
app.listen(global.argv.listenPort, () => {
|
||||
console.log(`proxmoxaas-ldap v${global.package.version} listening on port ${global.argv.listenPort}`);
|
||||
});
|
||||
|
||||
app.get("/:user", async (req, res) => {
|
||||
});
|
||||
|
||||
app.post("/:user", async (req, res) => {
|
||||
});
|
||||
|
||||
app.delete("/:user", async (req, res) => {
|
||||
});
|
||||
|
||||
app.post("/:user/password", async (req, res) => {
|
||||
});
|
||||
|
Reference in New Issue
Block a user