wangzhibo
2026-05-09 53418655c061ac26f66058253f39200aced1ab1d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
'use strict'
 
const LdapResult = require('../ldap-result')
const { operations } = require('@ldapjs/protocol')
 
/**
 * Implements the modifydn response message as described in
 * https://www.rfc-editor.org/rfc/rfc4511.html#section-4.9.
 */
class ModifyDnResponse extends LdapResult {
  /**
   * @param {LdapResultOptions} options
   */
  constructor (options = {}) {
    options.protocolOp = operations.LDAP_RES_MODRDN
    super(options)
  }
 
  /**
   * The name of the request type.
   *
   * @type {string}
   */
  get type () {
    return 'ModifyDnResponse'
  }
 
  /**
   * Implements the standardized `parseToPojo` method.
   *
   * @see LdapMessage.parseToPojo
   *
   * @param {import('@ldapjs/asn1').BerReader} ber
   *
   * @returns {object}
   */
  static parseToPojo (ber) {
    return LdapResult._parseToPojo({
      opCode: operations.LDAP_RES_MODRDN,
      berReader: ber
    })
  }
}
 
module.exports = ModifyDnResponse