Class ProxySAMLExtension

java.lang.Object
org.bouncycastle.asn1.ASN1Object
eu.emi.security.authn.x509.helpers.proxy.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 Details

    • SAML_OID

      public static final String SAML_OID
      The OID for the SAML assertion.
      See Also:
    • 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:
  • Constructor Details

    • 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 Details

    • 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