mirror of
https://github.com/signaller-matrix/signaller.git
synced 2024-12-22 08:51:50 +00:00
Update login method structures names
This commit is contained in:
parent
32637e5c37
commit
a99393f7a6
@ -48,7 +48,7 @@ func LoginHandler(w http.ResponseWriter, r *http.Request) {
|
||||
// https://models.org/docs/spec/client_server/latest#post-models-client-r0-login
|
||||
case "POST":
|
||||
{
|
||||
var request login.LoginRequest
|
||||
var request login.PostRequest
|
||||
getRequest(r, &request) // TODO: handle error
|
||||
|
||||
// delete start "@" if presents
|
||||
|
@ -4,9 +4,9 @@ import (
|
||||
common "github.com/nxshock/signaller/internal/models/common"
|
||||
)
|
||||
|
||||
// LoginRequest represents login request
|
||||
// https://matrix.org/docs/spec/client_server/r0.4.0.html#post-matrix-client-r0-login
|
||||
type LoginRequest struct {
|
||||
// PostRequest represents POST login request
|
||||
// https://matrix.org/docs/spec/client_server/latest#get-matrix-client-r0-login
|
||||
type PostRequest struct {
|
||||
Type common.AuthenticationType `json:"type"` // Required. The login type being used. One of: ["m.login.password", "m.login.token"]
|
||||
Identifier common.UserIdentifier `json:"identifier"` // Identification information for the user.
|
||||
Password string `json:"password,omitempty"` // Required when type is m.login.password. The user's password.
|
||||
|
Loading…
Reference in New Issue
Block a user