public class SAML2Utils extends Object
Constructor and Description |
---|
SAML2Utils() |
Modifier and Type | Method and Description |
---|---|
static org.opensaml.saml2.core.Assertion |
createAssertion() |
static org.opensaml.saml2.core.Conditions |
createConditions(org.joda.time.DateTime creationTime,
org.joda.time.DateTime expirationTime) |
static org.opensaml.saml2.core.Issuer |
createIssuer(String issuerName) |
static org.opensaml.saml2.core.NameID |
createNamedIdentifier(String principalName,
String format)
Create named identifier.
|
static Element |
getElementFromAssertion(org.opensaml.xml.XMLObject xmlObj) |
static SAML2KeyInfo |
getSAML2KeyInfo(org.opensaml.saml2.core.Assertion assertion,
org.apache.ws.security.components.crypto.Crypto crypto,
CallbackHandler cb) |
static SAML2KeyInfo |
getSAML2KeyInfo(Element elem,
org.apache.ws.security.components.crypto.Crypto crypto,
CallbackHandler cb)
Extract certificates or the key available in the SAMLAssertion
|
static String |
getSAML2SubjectConfirmationMethod(org.opensaml.saml2.core.Assertion assertion)
Get the subject confirmation method of a SAML 2.0 assertion
|
public static Element getElementFromAssertion(org.opensaml.xml.XMLObject xmlObj) throws TrustException
TrustException
public static SAML2KeyInfo getSAML2KeyInfo(Element elem, org.apache.ws.security.components.crypto.Crypto crypto, CallbackHandler cb) throws org.apache.ws.security.WSSecurityException
elem
- The element to process.crypto
- The crypto properties.cb
- Callback class to get the Keyorg.apache.ws.security.WSSecurityException
- If an error occurred while extracting KeyInfo.public static SAML2KeyInfo getSAML2KeyInfo(org.opensaml.saml2.core.Assertion assertion, org.apache.ws.security.components.crypto.Crypto crypto, CallbackHandler cb) throws org.apache.ws.security.WSSecurityException
org.apache.ws.security.WSSecurityException
public static String getSAML2SubjectConfirmationMethod(org.opensaml.saml2.core.Assertion assertion)
assertion
- SAML 2.0 assertionpublic static org.opensaml.saml2.core.Assertion createAssertion() throws TrustException
TrustException
public static org.opensaml.saml2.core.Issuer createIssuer(String issuerName) throws TrustException
TrustException
public static org.opensaml.saml2.core.Conditions createConditions(org.joda.time.DateTime creationTime, org.joda.time.DateTime expirationTime) throws TrustException
TrustException
public static org.opensaml.saml2.core.NameID createNamedIdentifier(String principalName, String format) throws TrustException
principalName
- Name of the subject.format
- Format of the subject, whether it is an email, uid etc ...TrustException
- If unable to find the builder.Copyright © Apache Software Foundation. All Rights Reserved.