Class SAMLMessageSecuritySupport
- java.lang.Object
-
- org.opensaml.saml.common.messaging.SAMLMessageSecuritySupport
-
public final class SAMLMessageSecuritySupport extends Object
A support class for SAML security-related message handler operations.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateSAMLMessageSecuritySupport()Constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancheckURLScheme(String scheme)Check whether the specified URL scheme is allowed.static org.opensaml.xmlsec.SignatureSigningParametersgetContextSigningParameters(org.opensaml.messaging.context.MessageContext messageContext)Get the signing parameters from the message context.static voidsignMessage(org.opensaml.messaging.context.MessageContext messageContext)Signs the SAML message represented in the message context if it is aSignableXMLObjectand the message context contains signing parameters as determined bygetContextSigningParameters(MessageContext).
-
-
-
Method Detail
-
signMessage
public static void signMessage(@Nonnull org.opensaml.messaging.context.MessageContext messageContext) throws org.opensaml.security.SecurityException, org.opensaml.core.xml.io.MarshallingException, org.opensaml.xmlsec.signature.support.SignatureExceptionSigns the SAML message represented in the message context if it is aSignableXMLObjectand the message context contains signing parameters as determined bygetContextSigningParameters(MessageContext).- Parameters:
messageContext- current message context- Throws:
org.opensaml.security.SecurityException- if there is a problem preparing the signatureorg.opensaml.core.xml.io.MarshallingException- if there is a problem marshalling the SAMLObjectorg.opensaml.xmlsec.signature.support.SignatureException- if there is a problem with the signature operation
-
getContextSigningParameters
@Nullable public static org.opensaml.xmlsec.SignatureSigningParameters getContextSigningParameters(@Nonnull org.opensaml.messaging.context.MessageContext messageContext)Get the signing parameters from the message context.- Parameters:
messageContext- the message context- Returns:
- the signing parameters to use, may be null
-
checkURLScheme
public static boolean checkURLScheme(@Nonnull @NotEmpty String scheme)Check whether the specified URL scheme is allowed.- Parameters:
scheme- the URL scheme to check.- Returns:
- true if allowed, otherwise false
-
-