org.jaggeryjs.modules.sso.common.util
Class Util

java.lang.Object
  extended by org.jaggeryjs.modules.sso.common.util.Util

public class Util
extends Object


Constructor Summary
Util()
           
 
Method Summary
static org.opensaml.xml.XMLObject buildXMLObject(QName objectQName)
           
static String createID()
          Generates a unique Id for Authentication Requests
static String decode(String encodedStr)
          Decoding and deflating the encoded AuthReq
static void doBootstrap()
          This method is used to initialize the OpenSAML2 library.
static String encode(String xmlString)
          Encoding the response
static String getDomainName(org.opensaml.xml.XMLObject samlObject)
           
static String marshall(org.opensaml.xml.XMLObject xmlObject)
          Serializing a SAML2 object into a String
static org.opensaml.xml.XMLObject unmarshall(String authReqStr)
          Constructing the XMLObject Object from a String
static boolean validateSignature(org.opensaml.saml2.core.Response resp, String keyStoreName, String keyStorePassword, String alias, int tenantId, String tenantDomain)
          This method validates the signature of the SAML Response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

doBootstrap

public static void doBootstrap()
This method is used to initialize the OpenSAML2 library. It calls the bootstrap method, if it is not initialized yet.


buildXMLObject

public static org.opensaml.xml.XMLObject buildXMLObject(QName objectQName)
                                                 throws Exception
Throws:
Exception

createID

public static String createID()
Generates a unique Id for Authentication Requests

Returns:
generated unique ID

unmarshall

public static org.opensaml.xml.XMLObject unmarshall(String authReqStr)
                                             throws Exception
Constructing the XMLObject Object from a String

Parameters:
authReqStr -
Returns:
Corresponding XMLObject which is a SAML2 object
Throws:
Exception

marshall

public static String marshall(org.opensaml.xml.XMLObject xmlObject)
                       throws Exception
Serializing a SAML2 object into a String

Parameters:
xmlObject - object that needs to serialized.
Returns:
serialized object
Throws:
Exception

encode

public static String encode(String xmlString)
Encoding the response

Parameters:
xmlString - String to be encoded
Returns:
encoded String

decode

public static String decode(String encodedStr)
                     throws Exception
Decoding and deflating the encoded AuthReq

Parameters:
encodedStr - encoded AuthReq
Returns:
decoded AuthReq
Throws:
Exception

validateSignature

public static boolean validateSignature(org.opensaml.saml2.core.Response resp,
                                        String keyStoreName,
                                        String keyStorePassword,
                                        String alias,
                                        int tenantId,
                                        String tenantDomain)
This method validates the signature of the SAML Response.

Parameters:
resp - SAML Response
Returns:
true, if signature is valid.

getDomainName

public static String getDomainName(org.opensaml.xml.XMLObject samlObject)


Copyright © 2015 WSO2 Inc. All rights reserved.