MSC4108 support OIDC QR code login (#12370)
Co-authored-by: Hugh Nimmo-Smith <hughns@matrix.org>
This commit is contained in:
parent
ca7760789b
commit
1677ed1be0
24 changed files with 1558 additions and 733 deletions
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||
import EventEmitter from "events";
|
||||
import { MethodLikeKeys, mocked, MockedObject, PropertyLikeKeys } from "jest-mock";
|
||||
import { Feature, ServerSupport } from "matrix-js-sdk/src/feature";
|
||||
import { MatrixClient, Room, User } from "matrix-js-sdk/src/matrix";
|
||||
import { MatrixClient, Room, MatrixError, User } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { MatrixClientPeg } from "../../src/MatrixClientPeg";
|
||||
|
||||
|
@ -136,6 +136,7 @@ export const mockClientMethodsServer = (): Partial<Record<MethodLikeKeys<MatrixC
|
|||
isVersionSupported: jest.fn().mockResolvedValue(false),
|
||||
getVersions: jest.fn().mockResolvedValue({}),
|
||||
isFallbackICEServerAllowed: jest.fn(),
|
||||
getAuthIssuer: jest.fn().mockRejectedValue(new MatrixError({ errcode: "M_UNKNOWN" }, 404)),
|
||||
});
|
||||
|
||||
export const mockClientMethodsDevice = (
|
||||
|
@ -179,4 +180,5 @@ export const mockClientMethodsCrypto = (): Partial<
|
|||
|
||||
export const mockClientMethodsRooms = (rooms: Room[] = []): Partial<Record<MethodLikeKeys<MatrixClient>, unknown>> => ({
|
||||
getRooms: jest.fn().mockReturnValue(rooms),
|
||||
getRoom: jest.fn((roomId) => rooms.find((r) => r.roomId === roomId) ?? null),
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue