mirror of
https://github.com/Awesome-Technologies/synapse-admin.git
synced 2025-07-22 05:24:30 +02:00
Add identifier when login with password (#601)
* Add identifier when login with password * add identifier to unit tests
This commit is contained in:
parent
ad876bb790
commit
61c32fb473
@ -30,7 +30,17 @@ describe("authProvider", () => {
|
|||||||
|
|
||||||
expect(ret).toBe(undefined);
|
expect(ret).toBe(undefined);
|
||||||
expect(fetch).toBeCalledWith("http://example.com/_matrix/client/r0/login", {
|
expect(fetch).toBeCalledWith("http://example.com/_matrix/client/r0/login", {
|
||||||
body: '{"device_id":null,"initial_device_display_name":"Synapse Admin","type":"m.login.password","user":"@user:example.com","password":"secret"}',
|
body: JSON.stringify({
|
||||||
|
device_id: null,
|
||||||
|
initial_device_display_name: "Synapse Admin",
|
||||||
|
type: "m.login.password",
|
||||||
|
user: "@user:example.com",
|
||||||
|
password: "secret",
|
||||||
|
identifier: {
|
||||||
|
type: "m.id.user",
|
||||||
|
user: "@user:example.com",
|
||||||
|
}
|
||||||
|
}),
|
||||||
headers: new Headers({
|
headers: new Headers({
|
||||||
Accept: "application/json",
|
Accept: "application/json",
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
@ -33,6 +33,10 @@ const authProvider: AuthProvider = {
|
|||||||
type: "m.login.password",
|
type: "m.login.password",
|
||||||
user: username,
|
user: username,
|
||||||
password: password,
|
password: password,
|
||||||
|
identifier: {
|
||||||
|
type: "m.id.user",
|
||||||
|
user: username,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user