Class SAMLMessageSecuritySupport
java.lang.Object
org.opensaml.saml.common.messaging.SAMLMessageSecuritySupport
A support class for SAML security-related message handler operations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckURLScheme(String scheme) Check whether the specified URL scheme is allowed.static SignatureSigningParametersgetContextSigningParameters(MessageContext messageContext) Get the signing parameters from the message context.static voidsignMessage(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).
-
Constructor Details
-
SAMLMessageSecuritySupport
private SAMLMessageSecuritySupport()Constructor.
-
-
Method Details
-
signMessage
public static void signMessage(@Nonnull MessageContext messageContext) throws SecurityException, MarshallingException, SignatureException Signs 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:
SecurityException- if there is a problem preparing the signatureMarshallingException- if there is a problem marshalling the SAMLObjectSignatureException- if there is a problem with the signature operation
-
getContextSigningParameters
@Nullable public static SignatureSigningParameters getContextSigningParameters(@Nonnull 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
Check whether the specified URL scheme is allowed.- Parameters:
scheme- the URL scheme to check.- Returns:
- true if allowed, otherwise false
-