Class DefaultPrincipalExtractor
- java.lang.Object
-
- com.floragunn.searchguard.ssl.transport.DefaultPrincipalExtractor
-
- All Implemented Interfaces:
PrincipalExtractor
public class DefaultPrincipalExtractor extends Object implements PrincipalExtractor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.floragunn.searchguard.ssl.transport.PrincipalExtractor
PrincipalExtractor.Type
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.logging.log4j.Loggerlog
-
Constructor Summary
Constructors Constructor Description DefaultPrincipalExtractor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringextractPrincipal(X509Certificate x509Certificate, PrincipalExtractor.Type type)Extract the principal name Please note that this method gets called for principal extraction of other nodes as well as transport clients.
-
-
-
Method Detail
-
extractPrincipal
public String extractPrincipal(X509Certificate x509Certificate, PrincipalExtractor.Type type)
Description copied from interface:PrincipalExtractorExtract the principal name Please note that this method gets called for principal extraction of other nodes as well as transport clients. It's up to the implementer to distinguish between them and handle them appropriately. Implementations must be public classes with a default public default constructor.- Specified by:
extractPrincipalin interfacePrincipalExtractor- Parameters:
x509Certificate- The first X509 certificate in the peer certificate chain This can be null, in this case the method must also returnnull.- Returns:
- The principal as string. This may be
nullin case where x509Certificate is null or the principal cannot be extracted because of any other circumstances.
-
-