X509SubjectDnRetriever (Apache Tomcat 9.0.117 API Documentation)
Description: declaration: package: org.apache.catalina.realm, class: X509SubjectDnRetriever

# Class X509SubjectDnRetriever

java.lang.Object
org.apache.catalina.realm.X509SubjectDnRetriever

All Implemented Interfaces:
  `X509UsernameRetriever`

public class X509SubjectDnRetriever extends Object implements X509UsernameRetriever
An X509UsernameRetriever that returns a certificate's entire SubjectDN as the username.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `X509SubjectDnRetriever()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getUsername(X509Certificate clientCert)`
  Gets a username from an X509Certificate.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### X509SubjectDnRetriever

    public X509SubjectDnRetriever()

- ## Method Details

  - ### getUsername

    public String getUsername(X509Certificate clientCert)
    Description copied from interface: `X509UsernameRetriever`
    Gets a username from an X509Certificate.
    Specified by:
      `getUsername` in interface `X509UsernameRetriever`
    Parameters:
      `clientCert` - The certificate containing the username.
    Returns:
      An appropriate username obtained from one or more fields in the certificate.