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

# Class PreventLoginServerMaximumSessionsExceededHandler

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

All Implemented Interfaces:
  `ServerMaximumSessionsExceededHandler`

public final class PreventLoginServerMaximumSessionsExceededHandler extends Object implements ServerMaximumSessionsExceededHandler
Returns a `Mono` that terminates with `SessionAuthenticationException` when the maximum number of sessions for a user has been reached.

Since:
  6.3

## Constructor Summary

Constructors
Constructor
Description
`PreventLoginServerMaximumSessionsExceededHandler()`

## Method Summary

Modifier and Type
Method
Description
`reactor.core.publisher.Mono<Void>`
`handle(MaximumSessionsContext context)`
Handles the scenario when the maximum number of sessions for a user has been reached.

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

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

## Constructor Details

### PreventLoginServerMaximumSessionsExceededHandler

public PreventLoginServerMaximumSessionsExceededHandler()

## Method Details

### handle

public reactor.core.publisher.Mono<Void> handle(MaximumSessionsContext context)
Description copied from interface: `ServerMaximumSessionsExceededHandler`
Handles the scenario when the maximum number of sessions for a user has been reached.

Specified by:
  `handle` in interface `ServerMaximumSessionsExceededHandler`
Parameters:
  `context` - the context with information about the sessions and the user
Returns:
  an empty `Mono` that completes when the handling is done