|
@@ -30,13 +30,18 @@ import org.springframework.web.server.ServerWebExchange;
|
|
import java.nio.charset.Charset;
|
|
import java.nio.charset.Charset;
|
|
|
|
|
|
/**
|
|
/**
|
|
- * Sets an HTTP Status that is provided when
|
|
|
|
|
|
+ * Sets the provided HTTP Status when access is denied.
|
|
|
|
+ *
|
|
* @author Rob Winch
|
|
* @author Rob Winch
|
|
* @since 5.0
|
|
* @since 5.0
|
|
*/
|
|
*/
|
|
public class HttpStatusServerAccessDeniedHandler implements ServerAccessDeniedHandler {
|
|
public class HttpStatusServerAccessDeniedHandler implements ServerAccessDeniedHandler {
|
|
private final HttpStatus httpStatus;
|
|
private final HttpStatus httpStatus;
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Creates an instance with the provided status
|
|
|
|
+ * @param httpStatus the status to use
|
|
|
|
+ */
|
|
public HttpStatusServerAccessDeniedHandler(HttpStatus httpStatus) {
|
|
public HttpStatusServerAccessDeniedHandler(HttpStatus httpStatus) {
|
|
Assert.notNull(httpStatus, "httpStatus cannot be null");
|
|
Assert.notNull(httpStatus, "httpStatus cannot be null");
|
|
this.httpStatus = httpStatus;
|
|
this.httpStatus = httpStatus;
|