PicketLink Federation Core 2.1.6.Final-redhat-2

org.picketlink.identity.federation.core.wstrust.plugins.saml
Class SAMLUtil

java.lang.Object
  extended by org.picketlink.identity.federation.core.wstrust.plugins.saml.SAMLUtil

public class SAMLUtil
extends Object

This class contains utility methods and constants that are used by the SAML token providers.

Author:
Stefan Guilhen

Field Summary
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
           
 
Constructor Summary
SAMLUtil()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SAML11_BEARER_URI

public static final String SAML11_BEARER_URI
See Also:
Constant Field Values

SAML11_HOLDER_OF_KEY_URI

public static final String SAML11_HOLDER_OF_KEY_URI
See Also:
Constant Field Values

SAML11_SENDER_VOUCHES_URI

public static final String SAML11_SENDER_VOUCHES_URI
See Also:
Constant Field Values

SAML2_BEARER_URI

public static final String SAML2_BEARER_URI
See Also:
Constant Field Values

SAML2_HOLDER_OF_KEY_URI

public static final String SAML2_HOLDER_OF_KEY_URI
See Also:
Constant Field Values

SAML2_SENDER_VOUCHES_URI

public static final String SAML2_SENDER_VOUCHES_URI
See Also:
Constant Field Values

SAML11_TOKEN_TYPE

public static final String SAML11_TOKEN_TYPE
See Also:
Constant Field Values

SAML11_VALUE_TYPE

public static final String SAML11_VALUE_TYPE
See Also:
Constant Field Values

SAML2_TOKEN_TYPE

public static final String SAML2_TOKEN_TYPE
See Also:
Constant Field Values

SAML2_VALUE_TYPE

public static final String SAML2_VALUE_TYPE
See Also:
Constant Field Values
Constructor Detail

SAMLUtil

public SAMLUtil()
Method Detail

toElement

public static Element toElement(AssertionType assertion)
                         throws Exception

Utility method that marshals the specified AssertionType object into an Element instance.

Parameters:
assertion - an AssertionType object representing the SAML assertion to be marshaled.
Returns:
a reference to the Element that contains the marshaled SAML assertion.
Throws:
Exception - if an error occurs while marshaling the assertion.

toElement

public static Element toElement(SAML11AssertionType assertion)
                         throws Exception

Utility method that marshals the specified AssertionType object into an Element instance.

Parameters:
assertion - an AssertionType object representing the SAML assertion to be marshaled.
Returns:
a reference to the Element that contains the marshaled SAML assertion.
Throws:
Exception - if an error occurs while marshaling the assertion.

fromElement

public static AssertionType fromElement(Element assertionElement)
                                 throws ProcessingException,
                                        ConfigurationException,
                                        ParsingException

Utility method that unmarshals the specified Element into an AssertionType instance.

Parameters:
assertionElement - the Element that contains the marshaled SAMLV2.0 assertion.
Returns:
a reference to the unmarshaled AssertionType instance.
Throws:
ConfigurationException
ProcessingException
ParsingException

saml11FromElement

public static SAML11AssertionType saml11FromElement(Element assertionElement)
                                             throws GeneralSecurityException
Given a Element that represents a SAML 1.1 assertion, convert it into a SAML11AssertionType

Parameters:
assertionElement -
Returns:
Throws:
GeneralSecurityException

PicketLink Federation Core 2.1.6.Final-redhat-2

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.