mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-07 23:13:11 -06:00
Self-review
This commit is contained in:
parent
a0bcffa68e
commit
a647d633dd
|
|
@ -5,7 +5,5 @@ type LoginType string
|
|||
|
||||
// The relevant login types implemented in Dendrite
|
||||
const (
|
||||
LoginTypeDummy = "m.login.dummy"
|
||||
LoginTypeRecaptcha = "m.login.recaptcha"
|
||||
LoginTypePassword = "m.login.password"
|
||||
LoginTypeDummy = "m.login.dummy"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ type registerRequest struct {
|
|||
type authDict struct {
|
||||
Type types.LoginType `json:"type"`
|
||||
Session string `json:"session"`
|
||||
// TODO: Lots of custom keys depending on the type
|
||||
}
|
||||
|
||||
// http://matrix.org/speculator/spec/HEAD/client_server/unstable.html#user-interactive-authentication-api
|
||||
|
|
@ -106,7 +107,8 @@ func Register(req *http.Request, accountDB *storage.AccountDatabase) util.JSONRe
|
|||
if r.Auth.Type == "" {
|
||||
return util.JSONResponse{
|
||||
Code: 401,
|
||||
// Hard-coded 'dummy' auth for now with a bogus session ID.
|
||||
// TODO: Hard-coded 'dummy' auth for now with a bogus session ID.
|
||||
// Server admins should be able to change things around (eg enable captcha)
|
||||
JSON: newUserInteractiveResponse("totallyuniquesessionid", []flow{
|
||||
flow{[]types.LoginType{types.LoginTypeDummy}},
|
||||
}),
|
||||
|
|
|
|||
Loading…
Reference in a new issue