Skip to content

AbstractAuthenticationFilterConfigurer: add defaultSuccessUrl() function which doesn't override the successHandler field, or the variant with successHandler parameter #33773

@Hotvianskyi

Description

@Hotvianskyi

Type: Enhancement

Currently, when creating a builder chain for HttpSecurity, and building FormLoginConfigurer inside of formLogin() method, 2 builder methods can be called in one chain: defaultSuccessUrl().<...>.successHandler(). But in reality, they are incompatible, because defaultSuccessUrl() creates its own successHandler inside, and calls successHandler() as well.
So when we have these 2 orders in the chain:

  1. defaultSuccessUrl().successHandler(): We lose the result of defaultSuccessUrl
  2. .successHandler().defaultSuccessUrl(): We lose the result of successHandler

There are 2 possible solutions:

  • create a variant for defaultSuccessUrl which does not override the successHandler
  • create a variant for defaultSuccessUrl with successHandler as input parameter

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions