mirror of
https://github.com/matrix-org/dendrite.git
synced 2024-11-22 14:21:55 -06:00
resolving comments
- https://github.com/matrix-org/dendrite/pull/3380#discussion_r1759306241 - https://github.com/matrix-org/dendrite/pull/3380#discussion_r1759307519
This commit is contained in:
parent
4954427ed7
commit
7f53e6696a
|
@ -106,9 +106,9 @@ type UserInteractive struct {
|
||||||
flows []userInteractiveFlow
|
flows []userInteractiveFlow
|
||||||
// Map of login type to implementation
|
// Map of login type to implementation
|
||||||
types map[string]Type
|
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
|
sessions map[string][]string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,13 +160,11 @@ func (u *UserInteractive) challenge(sessionID string) *util.JSONResponse {
|
||||||
completed := u.sessions[sessionID]
|
completed := u.sessions[sessionID]
|
||||||
u.mutex.RUnlock()
|
u.mutex.RUnlock()
|
||||||
|
|
||||||
flows := u.flows
|
|
||||||
|
|
||||||
return &util.JSONResponse{
|
return &util.JSONResponse{
|
||||||
Code: 401,
|
Code: 401,
|
||||||
JSON: Challenge{
|
JSON: Challenge{
|
||||||
Completed: completed,
|
Completed: completed,
|
||||||
Flows: flows,
|
Flows: u.flows,
|
||||||
Session: sessionID,
|
Session: sessionID,
|
||||||
Params: make(map[string]interface{}),
|
Params: make(map[string]interface{}),
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue