From 5560c5342d09b119c37566767955d11e2830faa7 Mon Sep 17 00:00:00 2001 From: Simon Von Date: Fri, 10 Oct 2025 17:51:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=93=94=20Documentation=201.=20Correct?= =?UTF-8?q?=20the=20org.springframework.security.config.annotation.web.Log?= =?UTF-8?q?outDsl's=20property=20description?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Simon Von --- .../springframework/security/config/annotation/web/LogoutDsl.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/src/main/kotlin/org/springframework/security/config/annotation/web/LogoutDsl.kt b/config/src/main/kotlin/org/springframework/security/config/annotation/web/LogoutDsl.kt index 5bab4d41976..7fba48cd350 100644 --- a/config/src/main/kotlin/org/springframework/security/config/annotation/web/LogoutDsl.kt +++ b/config/src/main/kotlin/org/springframework/security/config/annotation/web/LogoutDsl.kt @@ -35,7 +35,7 @@ import jakarta.servlet.http.HttpSession * @since 5.3 * @property clearAuthentication whether the [SecurityContextLogoutHandler] should clear * the [Authentication] at the time of logout. - * @property clearAuthentication whether to invalidate the [HttpSession] at the time of logout. + * @property invalidateHttpSession whether to invalidate the [HttpSession] at the time of logout. * @property logoutUrl the URL that triggers log out to occur. * @property logoutRequestMatcher the [RequestMatcher] that triggers log out to occur. * @property logoutSuccessUrl the URL to redirect to after logout has occurred. From 2de17890449290d98dae58ce30b75c2d86b762fa Mon Sep 17 00:00:00 2001 From: Simon Von Date: Tue, 21 Oct 2025 12:00:59 -0400 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=94=20Documentation=201.=20org.spr?= =?UTF-8?q?ingframework.security.config.annotation.web.HttpSecurityDsl:=20?= =?UTF-8?q?=20=20-=20Redundant=20'Unit'=20return=20type.=20=20=20-=20Refor?= =?UTF-8?q?mat=20code.=20=20=20-=20Unnecessary=20non-null=20assertion=20(!?= =?UTF-8?q?!)=20on=20a=20non-null=20receiver=20of=20type=20'ResolvableType?= =?UTF-8?q?'.=20=20=20-=20Import=20RelyingPartyRegistration=20for=20docume?= =?UTF-8?q?ntation:=20Navigate=20=E2=86=92=20Go=20to=20Declaration=20or=20?= =?UTF-8?q?Usages.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2. org.springframework.security.config.annotation.web.HttpsRedirectDsl: - Corrected the property description. 3. org.springframework.security.config.annotation.web.OneTimeTokenLoginDsl: - Corrected the order of property descriptions. Signed-off-by: Simon Von --- .../config/annotation/web/HttpSecurityDsl.kt | 13 ++++++++----- .../config/annotation/web/HttpsRedirectDsl.kt | 4 ++-- .../config/annotation/web/OneTimeTokenLoginDsl.kt | 4 ++-- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/config/src/main/kotlin/org/springframework/security/config/annotation/web/HttpSecurityDsl.kt b/config/src/main/kotlin/org/springframework/security/config/annotation/web/HttpSecurityDsl.kt index 06863f06e52..667a59d4173 100644 --- a/config/src/main/kotlin/org/springframework/security/config/annotation/web/HttpSecurityDsl.kt +++ b/config/src/main/kotlin/org/springframework/security/config/annotation/web/HttpSecurityDsl.kt @@ -27,6 +27,7 @@ import org.springframework.security.authentication.AuthenticationManager import org.springframework.security.config.annotation.SecurityConfigurerAdapter import org.springframework.security.config.annotation.web.builders.HttpSecurity import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository +import org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistration import org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistrationRepository import org.springframework.security.web.DefaultSecurityFilterChain import org.springframework.security.web.util.matcher.RequestMatcher @@ -108,11 +109,13 @@ class HttpSecurityDsl(private val http: HttpSecurity, private val init: HttpSecu * } * ``` */ - private fun applyFunction1HttpSecurityDslBeans(context: ApplicationContext, http: HttpSecurityDsl) : Unit { - val httpSecurityDslFnType = ResolvableType.forClassWithGenerics(Function1::class.java, - HttpSecurityDsl::class.java, Unit::class.java) + private fun applyFunction1HttpSecurityDslBeans(context: ApplicationContext, http: HttpSecurityDsl) { + val httpSecurityDslFnType = ResolvableType.forClassWithGenerics( + Function1::class.java, + HttpSecurityDsl::class.java, Unit::class.java + ) val httpSecurityDslFnProvider = context - .getBeanProvider>(httpSecurityDslFnType) + .getBeanProvider>(httpSecurityDslFnType) // @formatter:off httpSecurityDslFnProvider.orderedStream().forEach { fn -> fn.invoke(http) } @@ -160,7 +163,7 @@ class HttpSecurityDsl(private val http: HttpSecurity, private val init: HttpSecu return@MethodFilter extractDslType(method) != null } val invokeWithEachDslBean = ReflectionUtils.MethodCallback { dslMethod: Method -> - val dslFunctionType = firstMethodResolvableType(dslMethod)!! + val dslFunctionType = firstMethodResolvableType(dslMethod) val dslFunctionProvider: ObjectProvider<*> = context.getBeanProvider(dslFunctionType) // @formatter:off diff --git a/config/src/main/kotlin/org/springframework/security/config/annotation/web/HttpsRedirectDsl.kt b/config/src/main/kotlin/org/springframework/security/config/annotation/web/HttpsRedirectDsl.kt index 0c0cf220f1b..33712b63425 100644 --- a/config/src/main/kotlin/org/springframework/security/config/annotation/web/HttpsRedirectDsl.kt +++ b/config/src/main/kotlin/org/springframework/security/config/annotation/web/HttpsRedirectDsl.kt @@ -18,7 +18,7 @@ package org.springframework.security.config.annotation.web import org.springframework.security.config.annotation.web.builders.HttpSecurity import org.springframework.security.config.annotation.web.configurers.HttpsRedirectConfigurer -import org.springframework.security.web.PortMapper +import org.springframework.security.config.web.server.ServerHttpSecurity import org.springframework.security.web.util.matcher.RequestMatcher /** @@ -27,7 +27,7 @@ import org.springframework.security.web.util.matcher.RequestMatcher * * @author Eleftheria Stein * @since 5.4 - * @property portMapper the [PortMapper] that specifies a custom HTTPS port to redirect to. + * @property requestMatchers the [RequestMatcher] that specifies a custom HTTPS port to redirect to. */ @SecurityMarker class HttpsRedirectDsl { diff --git a/config/src/main/kotlin/org/springframework/security/config/annotation/web/OneTimeTokenLoginDsl.kt b/config/src/main/kotlin/org/springframework/security/config/annotation/web/OneTimeTokenLoginDsl.kt index e1508f54b54..bec1e9a2e7d 100644 --- a/config/src/main/kotlin/org/springframework/security/config/annotation/web/OneTimeTokenLoginDsl.kt +++ b/config/src/main/kotlin/org/springframework/security/config/annotation/web/OneTimeTokenLoginDsl.kt @@ -37,9 +37,9 @@ import org.springframework.security.web.authentication.ott.OneTimeTokenGeneratio * @property authenticationSuccessHandler the [AuthenticationSuccessHandler] to be used * @property generateRequestResolver the [GenerateOneTimeTokenRequestResolver] to be used * @property defaultSubmitPageUrl sets the URL that the default submit page will be generated - * @property showDefaultSubmitPage configures whether the default one-time token submit page should be shown * @property loginProcessingUrl the URL to process the login request * @property tokenGeneratingUrl the URL that a One-Time Token generate request will be processed + * @property showDefaultSubmitPage configures whether the default one-time token submit page should be shown * @property oneTimeTokenGenerationSuccessHandler the strategy to be used to handle generated one-time tokens * @property authenticationProvider the [AuthenticationProvider] to use when authenticating the user */ @@ -73,7 +73,7 @@ class OneTimeTokenLoginDsl { } generateRequestResolver?.also { oneTimeTokenLoginConfigurer.generateRequestResolver( - generateRequestResolver + generateRequestResolver ) } defaultSubmitPageUrl?.also { oneTimeTokenLoginConfigurer.defaultSubmitPageUrl(defaultSubmitPageUrl) }