Update saml2-login.adoc

Fix example on registering custom marshaller for saml request
This commit is contained in:
kavi87 2021-02-04 17:54:09 +01:00 committed by Josh Cummings
parent 9b42495afa
commit 10dce79c07
1 changed files with 3 additions and 1 deletions

View File

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