mirror of https://github.com/vector-im/riot-web
Use typeof in customisations to avoid repeating
parent
6066645207
commit
86b2cd1f82
|
@ -67,24 +67,13 @@ function setupEncryptionNeeded(kind: SetupEncryptionKind): boolean {
|
||||||
// them all as optional. This allows customisers to only define and export the
|
// them all as optional. This allows customisers to only define and export the
|
||||||
// customisations they need while still maintaining type safety.
|
// customisations they need while still maintaining type safety.
|
||||||
export interface ISecurityCustomisations {
|
export interface ISecurityCustomisations {
|
||||||
examineLoginResponse?: (
|
examineLoginResponse?: typeof examineLoginResponse;
|
||||||
response: any,
|
persistCredentials?: typeof persistCredentials;
|
||||||
credentials: IMatrixClientCreds,
|
createSecretStorageKey?: typeof createSecretStorageKey,
|
||||||
) => void;
|
getSecretStorageKey?: typeof getSecretStorageKey,
|
||||||
persistCredentials?: (
|
catchAccessSecretStorageError?: typeof catchAccessSecretStorageError,
|
||||||
credentials: IMatrixClientCreds,
|
setupEncryptionNeeded?: typeof setupEncryptionNeeded,
|
||||||
) => void;
|
getDehydrationKey?: typeof getDehydrationKey,
|
||||||
createSecretStorageKey?: () => Uint8Array,
|
|
||||||
getSecretStorageKey?: () => Uint8Array,
|
|
||||||
catchAccessSecretStorageError?: (
|
|
||||||
e: Error,
|
|
||||||
) => void,
|
|
||||||
setupEncryptionNeeded?: (
|
|
||||||
kind: SetupEncryptionKind,
|
|
||||||
) => boolean,
|
|
||||||
getDehydrationKey?: (
|
|
||||||
keyInfo: ISecretStorageKeyInfo,
|
|
||||||
) => Promise<Uint8Array>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// A real customisation module will define and export one or more of the
|
// A real customisation module will define and export one or more of the
|
||||||
|
|
Loading…
Reference in New Issue