update config.template.json,
update .gitignore, fix required admin membership in openldap init, add set cookie header to delete ticket endpoint
This commit is contained in:
parent
2b15c04be0
commit
981388784b
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,3 @@
|
|||||||
**/package-lock.json
|
**/package-lock.json
|
||||||
**/node_modules
|
**/node_modules
|
||||||
**/*.token
|
|
||||||
**/config.json
|
**/config.json
|
@ -1,6 +1,9 @@
|
|||||||
{
|
{
|
||||||
|
"listenPort": 8082,
|
||||||
|
"ldapURL": "ldap://localhost",
|
||||||
"basedn": "dc=example,dc=com",
|
"basedn": "dc=example,dc=com",
|
||||||
"sessionSecretKey": "super secret key",
|
"sessionSecretKey": "super secret key",
|
||||||
|
"sessionCookieName": "PAASLDAPAuthTicket",
|
||||||
"sessionCookie": {
|
"sessionCookie": {
|
||||||
"path": "/",
|
"path": "/",
|
||||||
"httpOnly": true,
|
"httpOnly": true,
|
||||||
|
@ -11,7 +11,7 @@ ou: groups
|
|||||||
# admin group
|
# admin group
|
||||||
dn: cn=admins,ou=groups,$BASE_DN
|
dn: cn=admins,ou=groups,$BASE_DN
|
||||||
objectClass: groupOfNames
|
objectClass: groupOfNames
|
||||||
member: uid=paas,ou=people,$BASE_DN
|
member: uid=$ADMIN_ID,ou=people,$BASE_DN
|
||||||
cn: admins
|
cn: admins
|
||||||
|
|
||||||
# paas user
|
# paas user
|
||||||
|
@ -83,6 +83,8 @@ app.post("/ticket", async (req, res) => {
|
|||||||
app.delete("/ticket", async (req, res) => {
|
app.delete("/ticket", async (req, res) => {
|
||||||
req.session.ldap = null;
|
req.session.ldap = null;
|
||||||
req.session.destroy();
|
req.session.destroy();
|
||||||
|
const expire = new Date(0);
|
||||||
|
res.cookie(global.config.sessionCookieName, "", { expires: expire });
|
||||||
res.send({ auth: false });
|
res.send({ auth: false });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user