mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core&ui: add webauthn support (#484)
Co-authored-by: panda <panda_dtdyy@outlook.com> Co-authored-by: undefined <i@undefined.moe>
This commit is contained in:
1 parent
3d3a5480e3
commit
d069fe127b
29 files changed
+621
-195
No files matched your search
@@ -1,6 +1,9 @@
|
||||
import { AttestationFormat } from '@simplewebauthn/server/dist/helpers/decodeAttestationObject';
|
||||
import { AuthenticationExtensionsAuthenticatorOutputs } from '@simplewebauthn/server/dist/helpers/decodeAuthenticatorExtensions';
|
||||
import { CredentialDeviceType } from '@simplewebauthn/typescript-types';
|
||||
import type fs from 'fs';
|
||||
import type { Dictionary, NumericDictionary } from 'lodash';
|
||||
import type { Cursor, ObjectID } from 'mongodb';
|
||||
import type { Binary, Cursor, ObjectID } from 'mongodb';
|
||||
import type { Context } from './context';
|
||||
import type { ProblemDoc } from './model/problem';
|
||||
import type { Handler } from './service/server';
|
||||
@@ -56,6 +59,24 @@ export interface OAuthUserResponse {
|
||||
viewLang?: string;
|
||||
}
|
||||
|
||||
export interface Authenticator {
|
||||
name: string;
|
||||
regat: number;
|
||||
|
||||
fmt: AttestationFormat;
|
||||
counter: number;
|
||||
aaguid: string;
|
||||
credentialID: Binary;
|
||||
credentialPublicKey: Binary;
|
||||
credentialType: 'public-key';
|
||||
attestationObject: Binary;
|
||||
userVerified: boolean;
|
||||
credentialDeviceType: CredentialDeviceType;
|
||||
credentialBackedUp: boolean;
|
||||
authenticatorExtensionResults?: AuthenticationExtensionsAuthenticatorOutputs;
|
||||
authenticatorAttachment: 'platform' | 'cross-platform';
|
||||
}
|
||||
|
||||
export interface Udoc extends Dictionary<any> {
|
||||
_id: number;
|
||||
mail: string;
|
||||
|
||||
Reference in new issue
Block a user