Module bus.http

Class DistinguishedNameParser

java.lang.Object
org.miaixz.bus.http.secure.DistinguishedNameParser

public final class DistinguishedNameParser extends Object
A parser for X.500 distinguished names as specified in RFC 2253. This parser can extract specific attribute values from a DN string.
Since:
Java 17+
Author:
Kimi Liu
  • Method Details

    • findMostSpecific

      public String findMostSpecific(String attributeType)
      Parses the DN and returns the most significant attribute value for an attribute type, or null if none found.
      Parameters:
      attributeType - attribute type to look for (e.g. "cn", "o").
      Returns:
      The value of the first matching attribute, or null if not found.