spring-projects / spring-projects/spring-security

No API to perform formLogin and logout on webflux

Open
#5,767 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: ideal-for-contribution
Dominant language
Java
Stars
9.6k
Forks
6.3k
Avg merge
2d 11h
Merged PRs (30d)
52

Description

Summary

While SecurityMockMvcRequestBuilders provides APIs to perform a formLogin and logout, there seems to be no equivalent for the reactive stack.

Configuration

My current configuration looks as follow:

    @Before
    public void setup() {
        this.rest = WebTestClient
            .bindToApplicationContext(this.context)
            .apply(springSecurity())
            .configureClient()
            .filter(basicAuthentication())
            .build();
    }

Instead of the basicAuthentication filter, I'd like to use a formAuthentication
Also a Utility to perform a logout is required.

Version

5.0.6.RELEASE

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the existing SecurityMockMvcRequestBuilders formLogin and logout APIs with the reactive WebTestClient setup described in the issue. Identify the reactive test-support entry points that expose basicAuthentication, then define equivalent form-login and logout utilities whose behavior can be verified with WebTestClient tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
authentication, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.