Class DelegatingAuthenticationEntryPoint.Builder
java.lang.Object
org.springframework.security.web.authentication.DelegatingAuthenticationEntryPoint.Builder
- Enclosing class:
- DelegatingAuthenticationEntryPoint
Used to build a new instance of
DelegatingAuthenticationEntryPoint.- Since:
- 7.0
-
Method Summary
Modifier and TypeMethodDescriptionaddEntryPointFor(AuthenticationEntryPoint entryPoint, RequestMatcher requestMatcher) Adds anAuthenticationEntryPointfor the providedRequestMatcher.build()Builds theAuthenticationEntryPoint.defaultEntryPoint(@Nullable AuthenticationEntryPoint defaultEntryPoint) Set the defaultAuthenticationEntryPointif none match.
-
Method Details
-
defaultEntryPoint
public DelegatingAuthenticationEntryPoint.Builder defaultEntryPoint(@Nullable AuthenticationEntryPoint defaultEntryPoint) Set the defaultAuthenticationEntryPointif none match. The default is to use the firstAuthenticationEntryPointadded inaddEntryPointFor(AuthenticationEntryPoint, RequestMatcher).- Parameters:
defaultEntryPoint- the defaultAuthenticationEntryPointto use.- Returns:
- the
DelegatingAuthenticationEntryPoint.Builderfor further customization.
-
addEntryPointFor
public DelegatingAuthenticationEntryPoint.Builder addEntryPointFor(AuthenticationEntryPoint entryPoint, RequestMatcher requestMatcher) Adds anAuthenticationEntryPointfor the providedRequestMatcher.- Parameters:
entryPoint- theAuthenticationEntryPointto use. Cannot be null.requestMatcher- theRequestMatcherto use. Cannot be null.- Returns:
- the
DelegatingAuthenticationEntryPoint.Builderfor further customization.
-
build
Builds theAuthenticationEntryPoint. If thedefaultEntryPoint(AuthenticationEntryPoint)is not set, then the firstaddEntryPointFor(AuthenticationEntryPoint, RequestMatcher)is used as the default. If thedefaultEntryPoint(AuthenticationEntryPoint)is not set and there is only a singleaddEntryPointFor(AuthenticationEntryPoint, RequestMatcher), then theAuthenticationEntryPointis returned rather than wrapping it inDelegatingAuthenticationEntryPoint.- Returns:
- the
AuthenticationEntryPointto use.
-