IPWorks Auth 2020 Node.js Edition

Questions / Feedback?

SortAttributes Property

A string of attribute names to sort on with optional relative matching rules.

Syntax

 ldap.getSortAttributes([callback])
 ldap.setSortAttributes( sortAttributes, [callback])

Default Value

""

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for the getSortAttributes([callback]) method is defined as:

function(err, data){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'data' is the value returned by the method.

The callback for the setSortAttributes([callback]) method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

This property contains a string of attribute names to sort on with optional relative matching rules. When set prior to a Search, entries returned by the server will be sorted according to SortAttributes. The format consists of one or more attribute names separated by spaces. Each attribute may be followed by an optional matching rule.

If matching rules are defined, they should be separated from the attribute names with a "/".

Normally the values are returned in ascending order. If descending (reverse) order of sorting is desired, the attribute type must be preceded with a "-".

Examples:


LDAPControl.SortAttributes = "loginTime"

LDAPControl.SortAttributes = "name/caseIgnoreSubstringsMatch age/numericStringSubstringsMatch"

LDAPControl.SortAttributes = "cn age/1.3.6.1.4.1.1466.115.121.1.27"

LDAPControl.SortAttributes = "-cn age/1.3.6.1.4.1.1466.115.121.1.27"
Matching Rules for Equality Filters

1.3.6.1.4.1.1466.115.121.1.38objectIdentifierMatch
1.3.6.1.4.1.1466.115.121.1.12distinguishedNameMatch
1.3.6.1.4.1.1466.115.121.1.15caseIgnoreMatch
1.3.6.1.4.1.1466.115.121.1.36numericStringMatch
1.3.6.1.4.1.1466.115.121.1.41caseIgnoreListMatch
1.3.6.1.4.1.1466.115.121.1.27integerMatch
1.3.6.1.4.1.1466.115.121.1.6bitStringMatch
1.3.6.1.4.1.1466.115.121.1.50telephoneNumberMatch
1.3.6.1.4.1.1466.115.121.1.43presentationAddressMatch
1.3.6.1.4.1.1466.115.121.1.34uniqueMemberMatch
1.3.6.1.4.1.1466.115.121.1.42protocolInformationMatch
1.3.6.1.4.1.1466.115.121.1.24generalizedTimeMatch
1.3.6.1.4.1.1466.115.121.1.26caseExactIA5Match
1.3.6.1.4.1.1466.115.121.1.26caseIgnoreIA5Match

Matching Rules for Inequality Filters

1.3.6.1.4.1.1466.115.121.1.24 generalizedTimeOrderingMatch
1.3.6.1.4.1.1466.115.121.1.15 caseIgnoreOrderingMatch

Matching Rules for Substring Filters

1.3.6.1.4.1.1466.115.121.1.58 caseIgnoreSubstringsMatch
1.3.6.1.4.1.1466.115.121.1.58 telephoneNumberSubstringsMatch
1.3.6.1.4.1.1466.115.121.1.58 numericStringSubstringsMatch

Matching Rules for Subschema Attributes

1.3.6.1.4.1.1466.115.121.1.27integerFirstComponentMatch
1.3.6.1.4.1.1466.115.121.1.38objectIdentifierFirstComponentMatch

Data Type

String

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Auth 2020 Node.js Edition - Version 20.0 [Build 8155]