Browse Source

Update saml2-login.adoc

Fix example on registering custom marshaller for saml request
kavi87 4 years ago
parent
commit
10dce79c07

+ 3 - 1
docs/manual/src/docs/asciidoc/_includes/servlet/saml2/saml2-login.adoc

@@ -223,13 +223,15 @@ static {
 
             public Element marshall(XMLObject object, Document document) throws MarshallingException {
 				configureAuthnRequest((AuthnRequest) object);
-				return super.marshall(object, element);
+				return super.marshall(object, document);
             }
 
             private void configureAuthnRequest(AuthnRequest authnRequest) {
 				authnRequest.setForceAuthN(true);
             }
 		}
+		
+	    factory.getMarshallerFactory().registerMarshaller(AuthnRequest.DEFAULT_ELEMENT_NAME, marshaller);
 	});
 }
 ----