Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
ldapjs-type-parsers
Advanced tools
Object
Coerce an ldapjs entry into an object with keys (using entry.object as a base) (This uses module.attributeTransforms to map attribute names to type parsers. Many of the names present are Active-Directory-LDAP specific and I don't honestly know how well it works on other instances)
Number
Parse an LDAP Interger8 buffer into a Number
String
Parse an LDAP OctetString buffer into a base 64 encoded certificate string with line breaks every 64 characters. (this should match the content in a .pem certificate file)
Buffer
Parse a base 64 encoded certificate string into a buffer representing an LDAP OctetString.
Date
Parse an LDAP GeneralizedDate buffer into a javascript Date object
String
Convert a javascript Date object into an LDAP GeneralizedDate string (Can be converted to a buffer with Buffer.from(str, 'utf8) but the most common use-case is in ldapjs filters, which take a string)
Date
Parse an LDAP IntegerDate buffer into a javascript Date object
String
Convert a javascript Date object into an LDAP IntegerDate string (Can be converted to a buffer with Buffer.from(str, 'utf8) but the most common use-case is in ldapjs filters, which take a string)
Date
Parse an LDAP IntegerDate buffer into a javascript Date object
String
Parse an LDAP ObjectSID buffer into a string
Buffer
Convert an objectSID string into an LDAP ObjectSID buffer
String
Parse an LDAP ObjectGUID buffer into a string
Buffer
Convert an ObjectGUID string into an LDAP ObjectGUID buffer
Boolean
Parse an LDAP Boolean buffer into a javascript Boolean
String
Convert a javascript Boolean into a string representation of an LDAP Boolean
String
Parse an LDAP UnicodeString buffer into a javascript String
Object
Parse an LDAP UserAccountControl buffer into a javascript Object
Object
Parse an LDAP SAMAccountType buffer into a javascript Object
Object
Coerce an ldapjs entry into an object with keys (using entry.object as a base) (This uses module.attributeTransforms to map attribute names to type parsers. Many of the names present are Active-Directory-LDAP specific and I don't honestly know how well it works on other instances)
Kind: global function
Returns: Object
- An object in the form { sAMAccountName: 'PickleRick', objectSid: 'S-1-5-21-3231561394-915883793-4011936924-6446' }
Param | Type | Description |
---|---|---|
entry | Object | An entry object retuend from ldapjs |
Number
Parse an LDAP Interger8 buffer into a Number
Kind: global function
Returns: Number
- A Number
Param | Type | Description |
---|---|---|
buffer | Buffer | A buffer representing an attribute of type Integer8. |
String
Parse an LDAP OctetString buffer into a base 64 encoded certificate string with line breaks every 64 characters. (this should match the content in a .pem certificate file)
Kind: global function
Returns: String
- A Base64 string
Param | Type | Description |
---|---|---|
buffer | Buffer | A buffer representing an LDAP attribute of type OctetString |
Buffer
Parse a base 64 encoded certificate string into a buffer representing an LDAP OctetString.
Kind: global function
Returns: Buffer
- A buffer representing an LDAP attribute of type OctetString.
Param | Type | Description |
---|---|---|
str | String | A Base64 string |
Date
Parse an LDAP GeneralizedDate buffer into a javascript Date object
Kind: global function
Returns: Date
- A Date object
Param | Type | Description |
---|---|---|
buffer | Buffer | A buffer representing an LDAP GeneralizedDate attribute. |
String
Convert a javascript Date object into an LDAP GeneralizedDate string (Can be converted to a buffer with Buffer.from(str, 'utf8) but the most common use-case is in ldapjs filters, which take a string)
Kind: global function
Returns: String
- - A String in the format "YYYYMMDDHHMMSS.mmmZ" eg."20211225070000.000Z"
Param | Type | Description |
---|---|---|
date | Date | A Date object |
Date
Parse an LDAP IntegerDate buffer into a javascript Date object
Kind: global function
Returns: Date
- A Date object
Param | Type | Description |
---|---|---|
buffer | Buffer | A buffer representing an LDAP IntegerDate attribute. |
String
Convert a javascript Date object into an LDAP IntegerDate string (Can be converted to a buffer with Buffer.from(str, 'utf8) but the most common use-case is in ldapjs filters, which take a string)
Kind: global function
Returns: String
- - A string representation of an integer
Param | Type | Description |
---|---|---|
date | Date | A Date object |
Date
Parse an LDAP IntegerDate buffer into a javascript Date object
Kind: global function
Returns: Date
- A Date object
Param | Type | Description |
---|---|---|
buffer | Buffer | A buffer representing an LDAP IntegerDate attribute. |
NumberType | function | A constructor for the Type of Number you want returned (defaults to String). You can supply "BigInt" here, if your environment supports it. |
String
Parse an LDAP ObjectSID buffer into a string
Kind: global function
Returns: String
- An ObjectSID string eg S-1-5-21-3231561394-915883793-4011936924-6446
Param | Type | Description |
---|---|---|
buffer | Buffer | A buffer representing an LDAP ObjectSID attribute. |
Buffer
Convert an objectSID string into an LDAP ObjectSID buffer
Kind: global function
Returns: Buffer
- A buffer representing an LDAP ObjectSID
Param | Type | Description |
---|---|---|
str | String | An ObjectSID string eg. S-1-5-21-3231561394-915883793-4011936924-6446 |
String
Parse an LDAP ObjectGUID buffer into a string
Kind: global function
Returns: String
- An ObjectSID string eg S-1-5-21-3231561394-915883793-4011936924-6446
Param | Type | Description |
---|---|---|
buffer | Buffer | A buffer representing an LDAP ObjectGUID attribute. |
Buffer
Convert an ObjectGUID string into an LDAP ObjectGUID buffer
Kind: global function
Returns: Buffer
- A buffer representing an LDAP ObjectGUID attribute
Param | Type | Description |
---|---|---|
str | String | An ObjectGUID string eg. 1E633E26-741B-4D0E-94C7-64D8DED0791F |
Boolean
Parse an LDAP Boolean buffer into a javascript Boolean
Kind: global function
Returns: Boolean
- A javascript Boolean
Param | Type | Description |
---|---|---|
buffer | Buffer | A buffer representing an LDAP Boolean attribute. |
String
Convert a javascript Boolean into a string representation of an LDAP Boolean
Kind: global function
Returns: String
- An upper case javascript string. Either "TRUE" or "FALSE"
Param | Type | Description |
---|---|---|
buffer | Boolean | A buffer representing an LDAP Boolean attribute |
String
Parse an LDAP UnicodeString buffer into a javascript String
Kind: global function
Returns: String
- A javascript String
Param | Type | Description |
---|---|---|
buffer | Buffer | A buffer representing an LDAP UnicodeString attribute |
Object
Parse an LDAP UserAccountControl buffer into a javascript Object
Kind: global function
Returns: Object
- A javascript Object with Boolean properties representing each possible flag in a UserAccountControl bitmask eg: { accountDisabled: true, lockedOut: false, ...}
Param | Type | Description |
---|---|---|
buffer | Buffer | A buffer representing an LDAP UserAccountControl attribute |
Object
Parse an LDAP SAMAccountType buffer into a javascript Object
Kind: global function
Returns: Object
- A javascript Object with Boolean properties representing each possible flag in a SAMAccountType bitmask eg: { userObject: true, normalUserAccount: true, ...}
Param | Type | Description |
---|---|---|
buffer | Buffer | A buffer representing an LDAP SAMAccountType attribute |
FAQs
A collection of functions to parse raw buffers from LDAPJS
The npm package ldapjs-type-parsers receives a total of 22 weekly downloads. As such, ldapjs-type-parsers popularity was classified as not popular.
We found that ldapjs-type-parsers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.