Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<Function1<HttpSecurityDsl,Unit>>(httpSecurityDslFnType)
.getBeanProvider<Function1<HttpSecurityDsl, Unit>>(httpSecurityDslFnType)

// @formatter:off
httpSecurityDslFnProvider.orderedStream().forEach { fn -> fn.invoke(http) }
Expand Down Expand Up @@ -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<Any>(dslFunctionType)

// @formatter:off
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

/**
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -73,7 +73,7 @@ class OneTimeTokenLoginDsl {
}
generateRequestResolver?.also {
oneTimeTokenLoginConfigurer.generateRequestResolver(
generateRequestResolver
generateRequestResolver
)
}
defaultSubmitPageUrl?.also { oneTimeTokenLoginConfigurer.defaultSubmitPageUrl(defaultSubmitPageUrl) }
Expand Down