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

Parameter

Type

Description

entry

SearchEntry

The LDAP source entry

vendor

LdapVendor

The LDAP vendor

attributeName

string | undefined

The source attribute to map. If the attribute is undefined the mapping will be silently ignored.

setter

(value: string) => void

The function to be called with the decoded attribute from the source entry

**Returns:**

void