mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-11 21:03:31 +00:00
Add ServerHttpSecurity.exceptionHandling()
Fixes gh-4750
This commit is contained in:
parent
d9584384c4
commit
4fa9b4dd15
@ -96,6 +96,8 @@ public class ServerHttpSecurity {
|
|||||||
|
|
||||||
private CsrfBuilder csrf = new CsrfBuilder();
|
private CsrfBuilder csrf = new CsrfBuilder();
|
||||||
|
|
||||||
|
private ExceptionHandlingBuilder exceptionHandling = new ExceptionHandlingBuilder();
|
||||||
|
|
||||||
private HttpBasicBuilder httpBasic;
|
private HttpBasicBuilder httpBasic;
|
||||||
|
|
||||||
private FormLoginBuilder formLogin;
|
private FormLoginBuilder formLogin;
|
||||||
@ -173,6 +175,13 @@ public class ServerHttpSecurity {
|
|||||||
return this.headers;
|
return this.headers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ExceptionHandlingBuilder exceptionHandling() {
|
||||||
|
if(this.exceptionHandling == null) {
|
||||||
|
this.exceptionHandling = new ExceptionHandlingBuilder();
|
||||||
|
}
|
||||||
|
return this.exceptionHandling;
|
||||||
|
}
|
||||||
|
|
||||||
public AuthorizeExchangeBuilder authorizeExchange() {
|
public AuthorizeExchangeBuilder authorizeExchange() {
|
||||||
if(this.authorizeExchangeBuilder == null) {
|
if(this.authorizeExchangeBuilder == null) {
|
||||||
this.authorizeExchangeBuilder = new AuthorizeExchangeBuilder();
|
this.authorizeExchangeBuilder = new AuthorizeExchangeBuilder();
|
||||||
@ -404,6 +413,23 @@ public class ServerHttpSecurity {
|
|||||||
private CsrfBuilder() {}
|
private CsrfBuilder() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Rob Winch
|
||||||
|
* @since 5.0
|
||||||
|
*/
|
||||||
|
public class ExceptionHandlingBuilder {
|
||||||
|
public ExceptionHandlingBuilder serverAuthenticationEntryPoint(ServerAuthenticationEntryPoint authenticationEntryPoint) {
|
||||||
|
ServerHttpSecurity.this.serverAuthenticationEntryPoint = authenticationEntryPoint;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ServerHttpSecurity and() {
|
||||||
|
return ServerHttpSecurity.this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private ExceptionHandlingBuilder() {}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
* @since 5.0
|
* @since 5.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user