From 7f53e6696a8832f82215ea41c50c3c76caa94f64 Mon Sep 17 00:00:00 2001 From: Hannes Kohlsaat Date: Wed, 9 Oct 2024 21:10:35 +0200 Subject: [PATCH] resolving comments - https://github.com/matrix-org/dendrite/pull/3380#discussion_r1759306241 - https://github.com/matrix-org/dendrite/pull/3380#discussion_r1759307519 --- clientapi/auth/user_interactive.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/clientapi/auth/user_interactive.go b/clientapi/auth/user_interactive.go index 05037a376..f028a565d 100644 --- a/clientapi/auth/user_interactive.go +++ b/clientapi/auth/user_interactive.go @@ -106,9 +106,9 @@ type UserInteractive struct { flows []userInteractiveFlow // Map of login type to implementation types map[string]Type - // Map of session ID to completed login types, will need to be extended in future - mutex sync.RWMutex + mutex sync.RWMutex + // Map of session ID to completed login types, will need to be extended in future sessions map[string][]string } @@ -160,13 +160,11 @@ func (u *UserInteractive) challenge(sessionID string) *util.JSONResponse { completed := u.sessions[sessionID] u.mutex.RUnlock() - flows := u.flows - return &util.JSONResponse{ Code: 401, JSON: Challenge{ Completed: completed, - Flows: flows, + Flows: u.flows, Session: sessionID, Params: make(map[string]interface{}), },