mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-04-19 02:03:39 +00:00
Differentiate between users and AS upon reg
This commit is contained in:
parent
53a726fab1
commit
04733b1360
1 changed files with 11 additions and 0 deletions
|
@ -485,6 +485,17 @@ func Register(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Application services can register users with no auth type, but require
|
||||||
|
// access token. Differentiate from users who are initially hitting register
|
||||||
|
// without an auth type
|
||||||
|
if r.Auth.Type == "" && req.URL.Query().Get("access_token") == "" {
|
||||||
|
return util.JSONResponse{
|
||||||
|
Code: http.StatusUnauthorized,
|
||||||
|
JSON: newUserInteractiveResponse(sessionID,
|
||||||
|
cfg.Derived.Registration.Flows, cfg.Derived.Registration.Params),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
logger := util.GetLogger(req.Context())
|
logger := util.GetLogger(req.Context())
|
||||||
logger.WithFields(log.Fields{
|
logger.WithFields(log.Fields{
|
||||||
"username": r.Username,
|
"username": r.Username,
|
||||||
|
|
Loading…
Reference in a new issue