Package org.springframework.security.web.server.authorization

# Class HttpStatusServerAccessDeniedHandler

java.lang.Object
org.springframework.security.web.server.authorization.HttpStatusServerAccessDeniedHandler

All Implemented Interfaces:
  `ServerAccessDeniedHandler`

public class HttpStatusServerAccessDeniedHandler extends Object implements ServerAccessDeniedHandler
Sets the provided HTTP Status when access is denied.

Since:
  5.0

## Constructor Summary

Constructors
Constructor
Description
`HttpStatusServerAccessDeniedHandler(org.springframework.http.HttpStatus httpStatus)`
Creates an instance with the provided status

## Method Summary

Modifier and Type
Method
Description
`reactor.core.publisher.Mono<Void>`
`handle(org.springframework.web.server.ServerWebExchange exchange, org.springframework.security.access.AccessDeniedException ex)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### HttpStatusServerAccessDeniedHandler

public HttpStatusServerAccessDeniedHandler(org.springframework.http.HttpStatus httpStatus)
Creates an instance with the provided status

Parameters:
  `httpStatus` - the status to use

## Method Details

### handle

public reactor.core.publisher.Mono<Void> handle(org.springframework.web.server.ServerWebExchange exchange, org.springframework.security.access.AccessDeniedException ex)

Specified by:
  `handle` in interface `ServerAccessDeniedHandler`