Package ddf.security.samlp.impl
Class SamlValidator.Builder
java.lang.Object
ddf.security.samlp.impl.SamlValidator.Builder
- Enclosing class:
- SamlValidator
Builder class for SamlValidator.
Default
If validating a redirect saml type, the Signature, Signature Algorithm, Relay State, original Saml string, and signing certificate are required. For Post binding type, only the object is required.
Default
Timeout of 10 minutes and clockSkew of 30 seconds. If validating a redirect saml type, the Signature, Signature Algorithm, Relay State, original Saml string, and signing certificate are required. For Post binding type, only the object is required.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SamlProtocol.Bindingprotected Durationprotected Stringprotected booleanprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected SimpleSignprotected Durationprotected org.opensaml.core.xml.XMLObject -
Constructor Summary
ConstructorsConstructorDescriptionBuilder(SimpleSign simpleSign) Creates a newSamlValidator.Builderwith the given SimpleSign. -
Method Summary
Modifier and TypeMethodDescriptionbuild(String destination, SamlProtocol.Binding binding, org.opensaml.xmlsec.signature.SignableXMLObject xmlObject) voidbuildAndValidate(String destination, SamlProtocol.Binding binding, org.opensaml.xmlsec.signature.SignableXMLObject xmlObject) Utility method that calls thebuild(String, SamlProtocol.Binding, SignableXMLObject)method and then validates the object.setClockSkew(Duration clockSkew) setRedirectParams(String relayState, String signature, String sigAlgo, String samlString, String signingCertificate) setRequestId(String requestId) setTimeout(Duration timeout)
-
Field Details
-
simpleSign
-
binding
-
isRequest
protected boolean isRequest -
xmlObject
protected org.opensaml.core.xml.XMLObject xmlObject -
timeout
-
clockSkew
-
requestId
-
destination
-
relayState
-
signature
-
sigAlgo
-
samlString
-
signingCertificate
-
-
Constructor Details
-
Builder
Creates a newSamlValidator.Builderwith the given SimpleSign.
Create a new instance, set any optional arguments, and then finish by calling eitherbuild()orbuildAndValidate.- Parameters:
simpleSign- an instance ofSimpleSign
-
-
Method Details
-
buildAndValidate
public void buildAndValidate(@NotNull String destination, @NotNull SamlProtocol.Binding binding, @NotNull org.opensaml.xmlsec.signature.SignableXMLObject xmlObject) throws IllegalStateException, ValidationException Utility method that calls thebuild(String, SamlProtocol.Binding, SignableXMLObject)method and then validates the object.- Parameters:
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 validate- Throws:
IllegalStateExceptionValidationException
-
build
public SamlValidator build(@NotNull String destination, SamlProtocol.Binding binding, @NotNull org.opensaml.xmlsec.signature.SignableXMLObject xmlObject) throws IllegalStateException, ValidationException - Parameters:
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 validate- Returns:
- A
SamlValidatorobject - Throws:
IllegalStateExceptionValidationException
-
setRedirectParams
-
setRequestId
-
setTimeout
-
setClockSkew
-