mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
d8ff186303
Client and server now have their own tsconfig so that the transpilation is only done on the part that is being modified. It also allows faster transpilation since tests are now excluded from tsconfig. They are compiled by ts-node during unit tests execution.
45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
|
|
|
|
declare module "u2f" {
|
|
export interface Request {
|
|
version: "U2F_V2";
|
|
appId: string;
|
|
challenge: string;
|
|
keyHandle?: string;
|
|
}
|
|
|
|
export interface RegistrationData {
|
|
clientData: string;
|
|
registrationData: string;
|
|
errorCode?: number;
|
|
}
|
|
|
|
export interface RegistrationResult {
|
|
successful: boolean;
|
|
publicKey: string;
|
|
keyHandle: string;
|
|
certificate: string;
|
|
}
|
|
|
|
|
|
export interface SignatureData {
|
|
clientData: string;
|
|
signatureData: string;
|
|
errorCode?: number;
|
|
}
|
|
|
|
export interface SignatureResult {
|
|
successful: boolean;
|
|
userPresent: boolean;
|
|
counter: number;
|
|
}
|
|
|
|
export interface Error {
|
|
errorCode: number;
|
|
errorMessage: string;
|
|
}
|
|
|
|
export function request(appId: string, keyHandle?: string): Request;
|
|
export function checkRegistration(request: Request, registerData: RegistrationData): RegistrationResult | Error;
|
|
export function checkSignature(request: Request, signData: SignatureData, publicKey: string): SignatureResult | Error;
|
|
} |