Class CertConstraintsParser

java.lang.Object
org.apache.cxf.sts.token.realm.CertConstraintsParser

public class CertConstraintsParser extends Object
This class provides the functionality to match a given X509Certificate against a list of regular expressions.
  • Constructor Details

    • CertConstraintsParser

      public CertConstraintsParser()
  • Method Details

    • setSubjectConstraints

      public void setSubjectConstraints(List<String> constraints)
      Set a list of Strings corresponding to regular expression constraints on the subject DN of a certificate
    • getCompiledSubjectContraints

      public Collection<Pattern> getCompiledSubjectContraints()
    • matches

      public boolean matches(X509Certificate cert)
      Returns:
      true if the certificate's SubjectDN matches the constraints defined in the subject DNConstraints; false, otherwise. The certificate subject DN only has to match ONE of the subject cert constraints (not all).