public class SAMLUtil extends Object
This class contains utility methods and constants that are used by the SAML token providers.
Modifier and Type | Field and Description |
---|---|
protected static Logger |
log |
static String |
SAML11_BEARER_URI |
static String |
SAML11_HOLDER_OF_KEY_URI |
static String |
SAML11_SENDER_VOUCHES_URI |
static String |
SAML11_TOKEN_TYPE |
static String |
SAML11_VALUE_TYPE |
static String |
SAML2_BEARER_URI |
static String |
SAML2_HOLDER_OF_KEY_URI |
static String |
SAML2_SENDER_VOUCHES_URI |
static String |
SAML2_TOKEN_TYPE |
static String |
SAML2_VALUE_TYPE |
protected static boolean |
trace |
Constructor and Description |
---|
SAMLUtil() |
Modifier and Type | Method and Description |
---|---|
static AssertionType |
fromElement(Element assertionElement)
Utility method that unmarshals the specified
Element into an AssertionType instance. |
static SAML11AssertionType |
saml11FromElement(Element assertionElement)
Given a
Element that represents a SAML 1.1 assertion, convert it into a SAML11AssertionType |
static Element |
toElement(AssertionType assertion)
Utility method that marshals the specified
AssertionType object into an Element instance. |
static Element |
toElement(SAML11AssertionType assertion)
Utility method that marshals the specified
AssertionType object into an Element instance. |
protected static Logger log
protected static boolean trace
public static final String SAML11_BEARER_URI
public static final String SAML11_HOLDER_OF_KEY_URI
public static final String SAML11_SENDER_VOUCHES_URI
public static final String SAML2_BEARER_URI
public static final String SAML2_HOLDER_OF_KEY_URI
public static final String SAML2_SENDER_VOUCHES_URI
public static final String SAML11_TOKEN_TYPE
public static final String SAML11_VALUE_TYPE
public static final String SAML2_TOKEN_TYPE
public static final String SAML2_VALUE_TYPE
public static Element toElement(AssertionType assertion) throws Exception
Utility method that marshals the specified AssertionType
object into an Element
instance.
assertion
- an AssertionType
object representing the SAML assertion to be marshaled.Element
that contains the marshaled SAML assertion.Exception
- if an error occurs while marshaling the assertion.public static Element toElement(SAML11AssertionType assertion) throws Exception
Utility method that marshals the specified AssertionType
object into an Element
instance.
assertion
- an AssertionType
object representing the SAML assertion to be marshaled.Element
that contains the marshaled SAML assertion.Exception
- if an error occurs while marshaling the assertion.public static AssertionType fromElement(Element assertionElement) throws ProcessingException, ConfigurationException, ParsingException
Utility method that unmarshals the specified Element
into an AssertionType
instance.
assertionElement
- the Element
that contains the marshaled SAMLV2.0 assertion.AssertionType
instance.ConfigurationException
ProcessingException
ParsingException
public static SAML11AssertionType saml11FromElement(Element assertionElement) throws GeneralSecurityException
Element
that represents a SAML 1.1 assertion, convert it into a SAML11AssertionType
assertionElement
- GeneralSecurityException
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.