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) }