Class X509SubjectAltNameEvidenceDecoder
- java.lang.Object
-
- org.wildfly.security.x500.principal.X509SubjectAltNameEvidenceDecoder
-
- All Implemented Interfaces:
Function<Evidence,Principal>,EvidenceDecoder
public final class X509SubjectAltNameEvidenceDecoder extends Object implements EvidenceDecoder
An evidence decoder that derives the principal that should be associated with the givenX509PeerCertificateChainEvidencefrom an X.509 subject alternative name from the first certificate in the given evidence.- Since:
- 1.10.0
- Author:
- Farah Juma
-
-
Field Summary
Fields Modifier and Type Field Description private intaltNametypeprivate intsegment
-
Constructor Summary
Constructors Constructor Description X509SubjectAltNameEvidenceDecoder(int altNameType)Construct a new instance.X509SubjectAltNameEvidenceDecoder(int altNameType, int segment)Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PrincipalgetPrincipal(Evidence evidence)Get the principal from the given evidence.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.wildfly.security.auth.server.EvidenceDecoder
apply
-
-
-
-
Constructor Detail
-
X509SubjectAltNameEvidenceDecoder
public X509SubjectAltNameEvidenceDecoder(int altNameType)
Construct a new instance.- Parameters:
altNameType- the subject alternative name type to decode. Must be one of:GeneralName.RFC_822_NAMEGeneralName.DNS_NAMEGeneralName.DIRECTORY_NAMEGeneralName.URI_NAMEGeneralName.IP_ADDRESSGeneralName.REGISTERED_ID
-
X509SubjectAltNameEvidenceDecoder
public X509SubjectAltNameEvidenceDecoder(int altNameType, int segment)Construct a new instance.- Parameters:
altNameType- the subject alternative name type to decode. Must be one of:GeneralName.RFC_822_NAMEGeneralName.DNS_NAMEGeneralName.DIRECTORY_NAMEGeneralName.URI_NAMEGeneralName.IP_ADDRESSGeneralName.REGISTERED_ID
segment- the 0-based occurrence of the subject alternative name to map, used when there is more than one subject alternative name of the givenaltNameType
-
-
Method Detail
-
getPrincipal
public Principal getPrincipal(Evidence evidence)
Description copied from interface:EvidenceDecoderGet the principal from the given evidence. If this decoder does not understand the given evidence,nullis returned.- Specified by:
getPrincipalin interfaceEvidenceDecoder- Parameters:
evidence- the evidence to decode- Returns:
- the principal, or
nullif this decoder does not understand the evidence
-
-