Skip to content

Missing example with Spring Security maximum sessions feature #1537

@arnaldop

Description

@arnaldop

There is no example to illustrate session management with maximum sessions.

The java code is:

            .sessionManagement()
                .maximumSessions(1)
                .maxSessionsPreventsLogin(false)
                .expiredUrl("/login?expired")

but logout does not invalidate the login.

There are some forums that mention org.springframework.security.web.session.HttpSessionEventPublisher, but it's supposed to be added to web.xml, which Spring Boot doesn't use.

I can't piece it together into code that successfully logs the user out and allows for a new login.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions