Class ProxySAMLExtension

  • All Implemented Interfaces:
    org.bouncycastle.asn1.ASN1Encodable, org.bouncycastle.util.Encodable

    public class ProxySAMLExtension
    extends org.bouncycastle.asn1.ASN1Object
    A class for handling the SAML extension in the Certificate. OID: 1.3.6.1.4.1.3536.1.1.1.12
    Author:
    joni.hahkala@cern.ch, K. Benedyczak
    • Field Detail

      • LEGACY_SAML_OID

        public static final String LEGACY_SAML_OID
        The legacy OID for the SAML assertion. Not supported as format is flawed.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ProxySAMLExtension

        public ProxySAMLExtension​(byte[] bytes)
                           throws IOException
        Generates a new SAMLExtension object from the byte array
        Parameters:
        bytes - byte array
        Throws:
        IOException - IO exception
      • ProxySAMLExtension

        public ProxySAMLExtension​(String samlString)
        Used to generate an instance from the SAML assertion in String format.
        Parameters:
        samlString - SAML string
    • Method Detail

      • getInstance

        public static ProxySAMLExtension getInstance​(X509Certificate cert)
                                              throws IOException
        Returns the SAML extension from the certificate.
        Parameters:
        cert - certificate
        Returns:
        The SAML assertion extension object. In no SAML extension was found, null is returned.
        Throws:
        IOException - In case there is a problem parsing the certificate.
      • getSAML

        public String getSAML()
        Used to get the SAML assertion in String format.
        Returns:
        The SAML sertion in string format.
      • toASN1Primitive

        public org.bouncycastle.asn1.ASN1Primitive toASN1Primitive()
        Specified by:
        toASN1Primitive in interface org.bouncycastle.asn1.ASN1Encodable
        Specified by:
        toASN1Primitive in class org.bouncycastle.asn1.ASN1Object