eu.emi.security.authn.x509.helpers.proxy
Class ProxySAMLExtension

java.lang.Object
  extended by org.bouncycastle.asn1.ASN1Encodable
      extended by eu.emi.security.authn.x509.helpers.proxy.ProxySAMLExtension
All Implemented Interfaces:
DEREncodable

public class ProxySAMLExtension
extends ASN1Encodable

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
static String LEGACY_SAML_OID
          The legacy OID for the SAML assertion.
static String SAML_OID
          The OID for the SAML assertion.
 
Fields inherited from class org.bouncycastle.asn1.ASN1Encodable
BER, DER
 
Constructor Summary
ProxySAMLExtension(byte[] bytes)
          Generates a new SAMLExtension object form the byte array
ProxySAMLExtension(String samlString)
          Used to generate an instance form the SAML assertion in String format.
 
Method Summary
static ProxySAMLExtension getInstance(X509Certificate cert)
          Returns the SAML extension form the certificate.
 String getSAML()
          Used to get the SAML assertion in String format.
 DERObject toASN1Object()
          
 
Methods inherited from class org.bouncycastle.asn1.ASN1Encodable
equals, getDEREncoded, getDERObject, getEncoded, getEncoded, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SAML_OID

public static final String SAML_OID
The OID for the SAML assertion.

See Also:
Constant Field Values

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 form the byte array

Parameters:
bytes -
Throws:
IOException

ProxySAMLExtension

public ProxySAMLExtension(String samlString)
Used to generate an instance form the SAML assertion in String format.

Parameters:
samlString -
Method Detail

getInstance

public static ProxySAMLExtension getInstance(X509Certificate cert)
                                      throws IOException
Returns the SAML extension form the 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.

toASN1Object

public DERObject toASN1Object()

Specified by:
toASN1Object in class ASN1Encodable


Copyright © 2012-2013 European Middleware Initiative. All Rights Reserved.