79158287

Date: 2024-11-05 08:50:45
Score: 1
Natty:
Report link

I found a way to do what I wanted.

It's not pretty. But what I did in then end was writing a Spring Security WebFilter that uses a RouteDefinitionLocator to get the configured routes. And get's the matching RouteDefinition from those.

On the route, I added a metadata entry, containing the client registration name. Which I write to a session attribute in the WebFilter.

Then I have a RestController which is redirected to for AuthenticationEntryPoint. In the Controller, I redirect to the authorization endpoint according to the client registration session attribute.

I'll post the code at a later point, as I'm on sick leave right now.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: dscham