Package org.italiangrid.voms.ac.impl
Class DefaultVOMSACParser
java.lang.Object
org.italiangrid.voms.ac.impl.DefaultVOMSACParser
- All Implemented Interfaces:
VOMSACParser
- Direct Known Subclasses:
DefaultVOMSValidator
Default implementation of the VOMS attribute certificate parsing logic.
This class is responsible for extracting and normalizing VOMS attributes
from a given X.509 certificate chain.
It utilizes a VOMSACLookupStrategy
to locate attribute certificates
within the provided chain and applies a VOMSAttributesNormalizationStrategy
to normalize the extracted attributes.
By default, it uses LeafACLookupStrategy
for lookup and
LeafVOMSExtensionNormalizationStrategy
for normalization.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final VOMSACLookupStrategy
private final VOMSAttributesNormalizationStrategy
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newDefaultVOMSACParser
with the default lookup strategy.DefaultVOMSACParser
(VOMSACLookupStrategy strategy) Creates a newDefaultVOMSACParser
with a specified lookup strategy. -
Method Summary
Modifier and TypeMethodDescriptionparse
(X509Certificate[] validatedChain) Parses and extracts VOMS attributes from a validated X.509 certificate chain.
-
Field Details
-
acLookupStrategy
-
acNormalizationStrategy
-
-
Constructor Details
-
DefaultVOMSACParser
public DefaultVOMSACParser()Creates a newDefaultVOMSACParser
with the default lookup strategy. UsesLeafACLookupStrategy
with aNullListener
instance. -
DefaultVOMSACParser
Creates a newDefaultVOMSACParser
with a specified lookup strategy. UsesLeafVOMSExtensionNormalizationStrategy
for attribute normalization.- Parameters:
strategy
- the lookup strategy to use for locating attribute certificates- Throws:
NullPointerException
- if the provided strategy isnull
-
-
Method Details
-
parse
Parses and extracts VOMS attributes from a validated X.509 certificate chain.- Specified by:
parse
in interfaceVOMSACParser
- Parameters:
validatedChain
- the certificate chain to analyze- Returns:
- a list of extracted and normalized
VOMSAttribute
objects - Throws:
NullPointerException
- if the provided certificate chain isnull
-