public class Util extends Object
| Constructor and Description |
|---|
Util() |
| Modifier and Type | Method and Description |
|---|---|
static org.opensaml.saml2.core.NameID |
buildNameID(String nameIdFormat,
String subject)
Build NameID object given name ID format
|
static org.opensaml.saml2.core.NameIDPolicy |
buildNameIDPolicy(String nameIdPolicy)
Build NameIDPolicy object given name ID policy format
|
static org.opensaml.xml.XMLObject |
buildXMLObject(QName objectQName)
Builds an xml object with the given QName
|
static String |
createID()
Generates a unique Id for Authentication Requests
|
static String |
decode(String encodedStr)
Decoding and deflating the encoded AuthReq
|
static String |
deflateAndEncode(String xmlString) |
static void |
doBootstrap()
This method is used to initialize the OpenSAML2 library.
|
static String |
encode(String xmlString)
Compressing and Encoding the response
|
static org.opensaml.saml2.core.Assertion |
getDecryptedAssertion(org.opensaml.saml2.core.EncryptedAssertion encryptedAssertion,
String keyStoreName,
String keyStorePassword,
String alias,
int tenantId,
String tenantDomain) |
static String |
getDomainName(org.opensaml.xml.XMLObject samlObject) |
static org.wso2.carbon.user.core.service.RealmService |
getRealmService() |
static DocumentBuilderFactory |
getSecuredDocumentBuilder()
Returns a secured DocumentBuilderFactory instance
|
static String |
marshall(org.opensaml.xml.XMLObject xmlObject)
Serializing a SAML2 object into a String
|
static String |
processAcsUrl(String acsUrl)
Replaces the ${} in url with system properties and returns
|
static void |
setRealmService(org.wso2.carbon.user.core.service.RealmService realmService) |
static org.opensaml.xml.XMLObject |
unmarshall(String authReqStr)
Constructing the XMLObject Object from a String
|
static boolean |
validateSignature(org.opensaml.xml.signature.Signature signature,
String keyStoreName,
String keyStorePassword,
String alias,
int tenantId,
String tenantDomain)
This method validates the signature of the SAML Response.
|
public static void doBootstrap()
public static org.opensaml.xml.XMLObject buildXMLObject(QName objectQName) throws SSOHostObjectException
objectQName - QName objectSSOHostObjectExceptionpublic static String createID()
public static org.opensaml.xml.XMLObject unmarshall(String authReqStr) throws Exception
authReqStr - Exceptionpublic static String marshall(org.opensaml.xml.XMLObject xmlObject) throws Exception
xmlObject - object that needs to serialized.Exceptionpublic static String encode(String xmlString) throws Exception
xmlString - String to be encodedExceptionpublic static String deflateAndEncode(String xmlString) throws Exception
xmlString - String to be encodedExceptionpublic static String decode(String encodedStr) throws Exception
encodedStr - encoded AuthReqExceptionpublic static boolean validateSignature(org.opensaml.xml.signature.Signature signature,
String keyStoreName,
String keyStorePassword,
String alias,
int tenantId,
String tenantDomain)
throws SignatureVerificationException,
SignatureVerificationFailure
signature - Signature to verifySignatureVerificationExceptionSignatureVerificationFailurepublic static org.opensaml.saml2.core.Assertion getDecryptedAssertion(org.opensaml.saml2.core.EncryptedAssertion encryptedAssertion,
String keyStoreName,
String keyStorePassword,
String alias,
int tenantId,
String tenantDomain)
throws Exception
Exceptionpublic static String getDomainName(org.opensaml.xml.XMLObject samlObject)
public static void setRealmService(org.wso2.carbon.user.core.service.RealmService realmService)
public static org.wso2.carbon.user.core.service.RealmService getRealmService()
public static org.opensaml.saml2.core.NameIDPolicy buildNameIDPolicy(String nameIdPolicy)
nameIdPolicy - Name ID policy formatpublic static org.opensaml.saml2.core.NameID buildNameID(String nameIdFormat, String subject)
nameIdFormat - Name ID formatsubject - Subjectpublic static String processAcsUrl(String acsUrl)
acsUrl - assertion consumer service urlpublic static DocumentBuilderFactory getSecuredDocumentBuilder()
Copyright © 2017 WSO2. All rights reserved.