You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-05 00:42:10 +03:00
Rename and move crypto.IBootstrapCrossSigningOpts
(#3352)
* Define `UIAuthCallback` type and use in `IBootstrapCrossSigningOpts` * Move `IBootstrapCrossSigningOpts` to `crypto-api` and rename * Replace uses of `IBootstrapCrossSigningOpts` ... with `BootstrapCrossSigningOpts` * Update src/crypto-api.ts
This commit is contained in:
committed by
GitHub
parent
90e8336797
commit
ceb2a57feb
@@ -20,6 +20,7 @@ import { logger } from "./logger";
|
||||
import { MatrixClient } from "./client";
|
||||
import { defer, IDeferred } from "./utils";
|
||||
import { MatrixError } from "./http-api";
|
||||
import { UIAResponse } from "./@types/uia";
|
||||
|
||||
const EMAIL_STAGE_TYPE = "m.login.email.identity";
|
||||
const MSISDN_STAGE_TYPE = "m.login.msisdn";
|
||||
@@ -118,6 +119,16 @@ export class NoAuthFlowFoundError extends Error {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of an application callback to perform the user-interactive bit of UIA.
|
||||
*
|
||||
* It is called with a single parameter, `makeRequest`, which is a function which takes the UIA parameters and
|
||||
* makes the HTTP request.
|
||||
*
|
||||
* The generic parameter `T` is the type of the response of the endpoint, once it is eventually successful.
|
||||
*/
|
||||
export type UIAuthCallback<T> = (makeRequest: (authData: IAuthDict) => Promise<UIAResponse<T>>) => Promise<T>;
|
||||
|
||||
interface IOpts {
|
||||
/**
|
||||
* A matrix client to use for the auth process
|
||||
|
Reference in New Issue
Block a user