fix: eslint

Signed-off-by: John Redwood <john.r.k.redwood@gmail.com>
This commit is contained in:
John Redwood
2024-11-24 11:41:58 +11:00
parent 54916f2446
commit 95ac4a2dc8
3 changed files with 18 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend-module-ldap': minor
---
Add new ldap vendor config 'LLDAP'
@@ -26,6 +26,7 @@ import {
ActiveDirectoryVendor,
DefaultLdapVendor,
GoogleLdapVendor,
LLDAPVendor,
FreeIpaVendor,
LdapVendor,
} from './vendors';
@@ -248,6 +249,8 @@ export class LdapClient {
return AEDirVendor;
} else if (clientHost === 'ldap.google.com') {
return GoogleLdapVendor;
} else if (root && root.raw?.vendorName?.toString() === 'LLDAP') {
return LLDAPVendor;
}
return DefaultLdapVendor;
})
@@ -94,6 +94,16 @@ export const GoogleLdapVendor: LdapVendor = {
},
};
export const LLDAPVendor: LdapVendor = {
dnAttributeName: 'dn',
uuidAttributeName: 'entryuuid',
decodeStringAttribute: (entry, name) => {
return decode(entry, name.toLocaleLowerCase('en-US'), value => {
return value.toString();
});
},
};
// Decode an attribute to a consumer
function decode(
entry: SearchEntry,