Skip to main content

mapStringAttr()

Home > @backstage/plugin-catalog-backend-module-ldap > mapStringAttr

Maps a single-valued attribute to a consumer.

This helper can be useful when implementing a user or group transformer.

Signature:

function mapStringAttr(entry: SearchEntry, vendor: LdapVendor, attributeName: string | undefined, setter: (value: string) => void): void;

Parameters

ParameterTypeDescription
entrySearchEntryThe LDAP source entry
vendorLdapVendorThe LDAP vendor
attributeNamestring | undefinedThe source attribute to map. If the attribute is undefined the mapping will be silently ignored.
setter(value: string) => voidThe function to be called with the decoded attribute from the source entry

Returns:

void