mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-06 10:42:33 +00:00
Clarify requireInitialize Example
Closes gh-9484
This commit is contained in:
parent
5b24bd1288
commit
498be8f431
@ -208,7 +208,8 @@ This replaces OpenSAML's `InitializationService#initialize`.
|
|||||||
Occasionally, it can be valuable to customize how OpenSAML builds, marshalls, and unmarshalls SAML objects.
|
Occasionally, it can be valuable to customize how OpenSAML builds, marshalls, and unmarshalls SAML objects.
|
||||||
In these circumstances, you may instead want to call `OpenSamlInitializationService#requireInitialize(Consumer)` that gives you access to OpenSAML's `XMLObjectProviderFactory`.
|
In these circumstances, you may instead want to call `OpenSamlInitializationService#requireInitialize(Consumer)` that gives you access to OpenSAML's `XMLObjectProviderFactory`.
|
||||||
|
|
||||||
For example, in the event that you always want to always force the asserting party to reauthenticate the user, you can register your own `AuthnRequestMarshaller`, like so:
|
For example, when sending an unsigned AuthNRequest, you may want to force reauthentication.
|
||||||
|
In that case, you can register your own `AuthnRequestMarshaller`, like so:
|
||||||
|
|
||||||
[source,java]
|
[source,java]
|
||||||
----
|
----
|
||||||
@ -230,7 +231,7 @@ static {
|
|||||||
authnRequest.setForceAuthN(true);
|
authnRequest.setForceAuthN(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
factory.getMarshallerFactory().registerMarshaller(AuthnRequest.DEFAULT_ELEMENT_NAME, marshaller);
|
factory.getMarshallerFactory().registerMarshaller(AuthnRequest.DEFAULT_ELEMENT_NAME, marshaller);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user