Skip to content

Add Web Authentication types #710

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 133 additions & 0 deletions baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,34 @@ interface AudioWorkletNodeOptions extends AudioNodeOptions {
processorOptions?: any;
}

interface AuthenticationExtensionsClientInputs {
appid?: string;
authnSel?: AuthenticatorSelectionList;
exts?: boolean;
loc?: boolean;
txAuthGeneric?: txAuthGenericArg;
txAuthSimple?: string;
uvi?: boolean;
uvm?: boolean;
}

interface AuthenticationExtensionsClientOutputs {
appid?: boolean;
authnSel?: boolean;
exts?: AuthenticationExtensionsSupported;
loc?: Coordinates;
txAuthGeneric?: ArrayBuffer;
txAuthSimple?: string;
uvi?: ArrayBuffer;
uvm?: UvmEntries;
}

interface AuthenticatorSelectionCriteria {
authenticatorAttachment?: AuthenticatorAttachment;
requireResidentKey?: boolean;
userVerification?: UserVerificationRequirement;
}

interface BiquadFilterOptions extends AudioNodeOptions {
Q?: number;
detune?: number;
Expand Down Expand Up @@ -251,11 +279,13 @@ interface ConvolverOptions extends AudioNodeOptions {
}

interface CredentialCreationOptions {
publicKey?: PublicKeyCredentialCreationOptions;
signal?: AbortSignal;
}

interface CredentialRequestOptions {
mediation?: CredentialMediationRequirement;
publicKey?: PublicKeyCredentialRequestOptions;
signal?: AbortSignal;
}

Expand Down Expand Up @@ -1033,6 +1063,52 @@ interface PropertyIndexedKeyframes {
[property: string]: string | string[] | number | null | (number | null)[] | undefined;
}

interface PublicKeyCredentialCreationOptions {
attestation?: AttestationConveyancePreference;
authenticatorSelection?: AuthenticatorSelectionCriteria;
challenge: BufferSource;
excludeCredentials?: PublicKeyCredentialDescriptor[];
extensions?: AuthenticationExtensionsClientInputs;
pubKeyCredParams: PublicKeyCredentialParameters[];
rp: PublicKeyCredentialRpEntity;
timeout?: number;
user: PublicKeyCredentialUserEntity;
}

interface PublicKeyCredentialDescriptor {
id: BufferSource;
transports?: AuthenticatorTransport[];
type: PublicKeyCredentialType;
}

interface PublicKeyCredentialEntity {
icon?: string;
name: string;
}

interface PublicKeyCredentialParameters {
alg: COSEAlgorithmIdentifier;
type: PublicKeyCredentialType;
}

interface PublicKeyCredentialRequestOptions {
allowCredentials?: PublicKeyCredentialDescriptor[];
challenge: BufferSource;
extensions?: AuthenticationExtensionsClientInputs;
rpId?: string;
timeout?: number;
userVerification?: UserVerificationRequirement;
}

interface PublicKeyCredentialRpEntity extends PublicKeyCredentialEntity {
id?: string;
}

interface PublicKeyCredentialUserEntity extends PublicKeyCredentialEntity {
displayName: string;
id: BufferSource;
}

interface PushPermissionDescriptor extends PermissionDescriptor {
name: "push";
userVisibleOnly?: boolean;
Expand Down Expand Up @@ -1761,6 +1837,11 @@ interface WorkletOptions {
credentials?: RequestCredentials;
}

interface txAuthGenericArg {
content: ArrayBuffer;
contentType: string;
}

interface EventListener {
(evt: Event): void;
}
Expand Down Expand Up @@ -2286,6 +2367,35 @@ declare var AudioWorkletNode: {
new(context: BaseAudioContext, name: string, options?: AudioWorkletNodeOptions): AudioWorkletNode;
};

interface AuthenticatorAssertionResponse extends AuthenticatorResponse {
readonly authenticatorData: ArrayBuffer;
readonly signature: ArrayBuffer;
readonly userHandle: ArrayBuffer | null;
}

declare var AuthenticatorAssertionResponse: {
prototype: AuthenticatorAssertionResponse;
new(): AuthenticatorAssertionResponse;
};

interface AuthenticatorAttestationResponse extends AuthenticatorResponse {
readonly attestationObject: ArrayBuffer;
}

declare var AuthenticatorAttestationResponse: {
prototype: AuthenticatorAttestationResponse;
new(): AuthenticatorAttestationResponse;
};

interface AuthenticatorResponse {
readonly clientDataJSON: ArrayBuffer;
}

declare var AuthenticatorResponse: {
prototype: AuthenticatorResponse;
new(): AuthenticatorResponse;
};

interface BarProp {
readonly visible: boolean;
}
Expand Down Expand Up @@ -11830,6 +11940,18 @@ declare var PromiseRejectionEvent: {
new(type: string, eventInitDict: PromiseRejectionEventInit): PromiseRejectionEvent;
};

interface PublicKeyCredential extends Credential {
readonly rawId: ArrayBuffer;
readonly response: AuthenticatorResponse;
getClientExtensionResults(): AuthenticationExtensionsClientOutputs;
}

declare var PublicKeyCredential: {
prototype: PublicKeyCredential;
new(): PublicKeyCredential;
isUserVerifyingPlatformAuthenticatorAvailable(): Promise<boolean>;
};

/** This Push API interface provides a way to receive notifications from third-party servers as well as request URLs for push notifications. */
interface PushManager {
getSubscription(): Promise<PushSubscription | null>;
Expand Down Expand Up @@ -18776,6 +18898,12 @@ type ConstrainBoolean = boolean | ConstrainBooleanParameters;
type ConstrainDOMString = string | string[] | ConstrainDOMStringParameters;
type PerformanceEntryList = PerformanceEntry[];
type VibratePattern = number | number[];
type COSEAlgorithmIdentifier = number;
type AuthenticatorSelectionList = AAGUID[];
type AAGUID = BufferSource;
type AuthenticationExtensionsSupported = string[];
type UvmEntry = number[];
type UvmEntries = UvmEntry[];
type AlgorithmIdentifier = string | Algorithm;
type HashAlgorithmIdentifier = AlgorithmIdentifier;
type BigInteger = Uint8Array;
Expand Down Expand Up @@ -18810,8 +18938,11 @@ type WindowProxy = Window;
type AlignSetting = "start" | "center" | "end" | "left" | "right";
type AnimationPlayState = "idle" | "running" | "paused" | "finished";
type AppendMode = "segments" | "sequence";
type AttestationConveyancePreference = "none" | "indirect" | "direct";
type AudioContextLatencyCategory = "balanced" | "interactive" | "playback";
type AudioContextState = "suspended" | "running" | "closed";
type AuthenticatorAttachment = "platform" | "cross-platform";
type AuthenticatorTransport = "usb" | "nfc" | "ble" | "internal";
type AutoKeyword = "auto";
type AutomationRate = "a-rate" | "k-rate";
type BinaryType = "blob" | "arraybuffer";
Expand Down Expand Up @@ -18877,6 +19008,7 @@ type PermissionName = "geolocation" | "notifications" | "push" | "midi" | "camer
type PermissionState = "granted" | "denied" | "prompt";
type PlaybackDirection = "normal" | "reverse" | "alternate" | "alternate-reverse";
type PositionAlignSetting = "line-left" | "center" | "line-right" | "auto";
type PublicKeyCredentialType = "public-key";
type PushEncryptionKeyName = "p256dh" | "auth";
type PushPermissionState = "denied" | "granted" | "prompt";
type RTCBundlePolicy = "balanced" | "max-compat" | "max-bundle";
Expand Down Expand Up @@ -18932,6 +19064,7 @@ type TextTrackKind = "subtitles" | "captions" | "descriptions" | "chapters" | "m
type TextTrackMode = "disabled" | "hidden" | "showing";
type TouchType = "direct" | "stylus";
type Transport = "usb" | "nfc" | "ble";
type UserVerificationRequirement = "required" | "preferred" | "discouraged";
type VRDisplayEventReason = "mounted" | "navigation" | "requested" | "unmounted";
type VideoFacingModeEnum = "user" | "environment" | "left" | "right";
type VisibilityState = "hidden" | "visible" | "prerender";
Expand Down
Loading