Package org.springframework.security.web.server.authentication

# Class HttpStatusServerEntryPoint

java.lang.Object
org.springframework.security.web.server.authentication.HttpStatusServerEntryPoint

All Implemented Interfaces:
  `ServerAuthenticationEntryPoint`

public class HttpStatusServerEntryPoint extends Object implements ServerAuthenticationEntryPoint
A `ServerAuthenticationEntryPoint` that sends a generic `HttpStatus` as a response. Useful for JavaScript clients which cannot use Basic authentication since the browser intercepts the response.

Since:
  5.1

## Constructor Summary

Constructors
Constructor
Description
`HttpStatusServerEntryPoint(org.springframework.http.HttpStatus httpStatus)`

## Method Summary

Modifier and Type
Method
Description
`reactor.core.publisher.Mono<Void>`
`commence(org.springframework.web.server.ServerWebExchange exchange, org.springframework.security.core.AuthenticationException authException)`
Initiates the authentication flow

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

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

## Constructor Details

### HttpStatusServerEntryPoint

public HttpStatusServerEntryPoint(org.springframework.http.HttpStatus httpStatus)

## Method Details

### commence

public reactor.core.publisher.Mono<Void> commence(org.springframework.web.server.ServerWebExchange exchange, org.springframework.security.core.AuthenticationException authException)
Description copied from interface: `ServerAuthenticationEntryPoint`
Initiates the authentication flow

Specified by:
  `commence` in interface `ServerAuthenticationEntryPoint`
Returns:
  `Mono<Void>` to indicate when the request for authentication is complete