mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-04 09:42:29 +00:00
Update authentication.adoc
This commit is contained in:
parent
571c7c81a4
commit
4ec5beb509
@ -139,7 +139,7 @@ public class SecurityConfig {
|
|||||||
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
|
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
|
||||||
OpenSaml4AuthenticationProvider authenticationProvider = new OpenSaml4AuthenticationProvider();
|
OpenSaml4AuthenticationProvider authenticationProvider = new OpenSaml4AuthenticationProvider();
|
||||||
authenticationProvider.setAssertionValidator(OpenSaml4AuthenticationProvider
|
authenticationProvider.setAssertionValidator(OpenSaml4AuthenticationProvider
|
||||||
.createDefaultAssertionValidator(assertionToken -> {
|
.createDefaultAssertionValidatorWithParameters(assertionToken -> {
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
params.put(CLOCK_SKEW, Duration.ofMinutes(10).toMillis());
|
params.put(CLOCK_SKEW, Duration.ofMinutes(10).toMillis());
|
||||||
// ... other validation parameters
|
// ... other validation parameters
|
||||||
@ -171,7 +171,7 @@ open class SecurityConfig {
|
|||||||
val authenticationProvider = OpenSaml4AuthenticationProvider()
|
val authenticationProvider = OpenSaml4AuthenticationProvider()
|
||||||
authenticationProvider.setAssertionValidator(
|
authenticationProvider.setAssertionValidator(
|
||||||
OpenSaml4AuthenticationProvider
|
OpenSaml4AuthenticationProvider
|
||||||
.createDefaultAssertionValidator(Converter<OpenSaml4AuthenticationProvider.AssertionToken, ValidationContext> {
|
.createDefaultAssertionValidatorWithParameters(Converter<OpenSaml4AuthenticationProvider.AssertionToken, ValidationContext> {
|
||||||
val params: MutableMap<String, Any> = HashMap()
|
val params: MutableMap<String, Any> = HashMap()
|
||||||
params[CLOCK_SKEW] =
|
params[CLOCK_SKEW] =
|
||||||
Duration.ofMinutes(10).toMillis()
|
Duration.ofMinutes(10).toMillis()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user