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 Summary
Fields Modifier and Type Field Description static java.lang.String
LEGACY_SAML_OID
The legacy OID for the SAML assertion.static java.lang.String
SAML_OID
The OID for the SAML assertion.
-
Constructor Summary
Constructors Constructor Description ProxySAMLExtension(byte[] bytes)
Generates a new SAMLExtension object from the byte arrayProxySAMLExtension(java.lang.String samlString)
Used to generate an instance from the SAML assertion in String format.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ProxySAMLExtension
getInstance(java.security.cert.X509Certificate cert)
Returns the SAML extension from the certificate.java.lang.String
getSAML()
Used to get the SAML assertion in String format.org.bouncycastle.asn1.ASN1Primitive
toASN1Primitive()
-
-
-
Field Detail
-
SAML_OID
public static final java.lang.String SAML_OID
The OID for the SAML assertion.- See Also:
- Constant Field Values
-
LEGACY_SAML_OID
public static final java.lang.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 java.io.IOException
Generates a new SAMLExtension object from the byte array- Parameters:
bytes
- byte array- Throws:
java.io.IOException
- IO exception
-
ProxySAMLExtension
public ProxySAMLExtension(java.lang.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(java.security.cert.X509Certificate cert) throws java.io.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:
java.io.IOException
- In case there is a problem parsing the certificate.
-
getSAML
public java.lang.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 interfaceorg.bouncycastle.asn1.ASN1Encodable
- Specified by:
toASN1Primitive
in classorg.bouncycastle.asn1.ASN1Object
-
-