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 givenX509PeerCertificateChainEvidence
from 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 int
altNametype
private int
segment
-
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 Principal
getPrincipal(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_NAME
GeneralName.DNS_NAME
GeneralName.DIRECTORY_NAME
GeneralName.URI_NAME
GeneralName.IP_ADDRESS
GeneralName.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_NAME
GeneralName.DNS_NAME
GeneralName.DIRECTORY_NAME
GeneralName.URI_NAME
GeneralName.IP_ADDRESS
GeneralName.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:EvidenceDecoder
Get the principal from the given evidence. If this decoder does not understand the given evidence,null
is returned.- Specified by:
getPrincipal
in interfaceEvidenceDecoder
- Parameters:
evidence
- the evidence to decode- Returns:
- the principal, or
null
if this decoder does not understand the evidence
-
-