public static class SamlValidator.Builder extends Object
Timeout
of 10 minutes and clockSkew
of 30 seconds. Modifier and Type | Field and Description |
---|---|
protected SamlProtocol.Binding |
binding |
protected Duration |
clockSkew |
protected String |
destination |
protected boolean |
isRequest |
protected String |
relayState |
protected String |
requestId |
protected String |
samlString |
protected String |
sigAlgo |
protected String |
signature |
protected String |
signingCertificate |
protected SimpleSign |
simpleSign |
protected Duration |
timeout |
protected org.opensaml.core.xml.XMLObject |
xmlObject |
Constructor and Description |
---|
Builder(SimpleSign simpleSign)
Creates a new
SamlValidator.Builder with the given SimpleSign. |
Modifier and Type | Method and Description |
---|---|
SamlValidator |
build(String destination,
SamlProtocol.Binding binding,
org.opensaml.xmlsec.signature.SignableXMLObject xmlObject) |
void |
buildAndValidate(String destination,
SamlProtocol.Binding binding,
org.opensaml.xmlsec.signature.SignableXMLObject xmlObject)
Utility method that calls the
build(String, SamlProtocol.Binding, SignableXMLObject)
method and then validates the object. |
SamlValidator.Builder |
setClockSkew(Duration clockSkew) |
SamlValidator.Builder |
setRedirectParams(String relayState,
String signature,
String sigAlgo,
String samlString,
String signingCertificate) |
SamlValidator.Builder |
setRequestId(String requestId) |
SamlValidator.Builder |
setTimeout(Duration timeout) |
protected SimpleSign simpleSign
protected SamlProtocol.Binding binding
protected boolean isRequest
protected org.opensaml.core.xml.XMLObject xmlObject
protected Duration timeout
protected Duration clockSkew
protected String requestId
protected String destination
protected String relayState
protected String signature
protected String sigAlgo
protected String samlString
protected String signingCertificate
public Builder(SimpleSign simpleSign)
SamlValidator.Builder
with the given SimpleSign.
build()
or buildAndValidate
.simpleSign
- an instance of SimpleSign
public void buildAndValidate(@NotNull String destination, @NotNull SamlProtocol.Binding binding, @NotNull org.opensaml.xmlsec.signature.SignableXMLObject xmlObject) throws IllegalStateException, ValidationException
build(String, SamlProtocol.Binding, SignableXMLObject)
method and then validates the object.destination
- The actual endpoint that the saml object was sent to, not the destination
field on the objectbinding
- The binding of the object (POST or REDIRECT)xmlObject
- target object to validateIllegalStateException
ValidationException
public SamlValidator build(@NotNull String destination, @NotNull SamlProtocol.Binding binding, @NotNull org.opensaml.xmlsec.signature.SignableXMLObject xmlObject) throws IllegalStateException, ValidationException
destination
- The actual endpoint that the saml object was sent to, not the destination
field on the objectbinding
- The binding of the object (POST or REDIRECT)xmlObject
- target object to validateSamlValidator
objectIllegalStateException
ValidationException
public SamlValidator.Builder setRedirectParams(String relayState, String signature, String sigAlgo, String samlString, String signingCertificate)
public SamlValidator.Builder setRequestId(@NotNull String requestId)
public SamlValidator.Builder setTimeout(@NotNull Duration timeout)
public SamlValidator.Builder setClockSkew(@NotNull Duration clockSkew)
This work is licensed under a Creative Commons Attribution 4.0 International License.