@simplewebauthn/typescript-types
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -5,50 +5,22 @@ /// <reference types="node" /> | ||
* (eventually) get passed into navigator.credentials.create(...) in the browser. | ||
* | ||
* Noteworthy values: | ||
* @param challenge A random string of characters. Will be converted to a Uint8Array in the browser | ||
* @param user.id Your unique, internal ID for the user. Will be converted to a Uint8Array in the | ||
* browser | ||
*/ | ||
export declare type PublicKeyCredentialCreationOptionsJSON = { | ||
publicKey: { | ||
challenge: string; | ||
rp: { | ||
name: string; | ||
id: string; | ||
}; | ||
user: { | ||
id: string; | ||
name: string; | ||
displayName: string; | ||
}; | ||
pubKeyCredParams: [{ | ||
alg: -7; | ||
type: 'public-key'; | ||
}]; | ||
timeout?: number; | ||
attestation: 'direct' | 'indirect'; | ||
excludeCredentials: PublicKeyCredentialDescriptorJSON[]; | ||
}; | ||
}; | ||
export interface PublicKeyCredentialCreationOptionsJSON extends Omit<PublicKeyCredentialCreationOptions, 'challenge' | 'user' | 'excludeCredentials'> { | ||
user: PublicKeyCredentialUserEntityJSON; | ||
challenge: string; | ||
excludeCredentials: PublicKeyCredentialDescriptorJSON[]; | ||
} | ||
/** | ||
* A variant of PublicKeyCredentialRequestOptions suitable for JSON transmission to the browser to | ||
* (eventually) get passed into navigator.credentials.get(...) in the browser. | ||
* | ||
* Noteworthy values: | ||
* @param challenge A random string of characters. Will be converted to a Uint8Array in the browser | ||
* @param allowCredentials.id Base64-encoded credentialId. Will be converted to a Uint8Array in the | ||
* browser | ||
*/ | ||
export declare type PublicKeyCredentialRequestOptionsJSON = { | ||
publicKey: { | ||
challenge: string; | ||
allowCredentials: PublicKeyCredentialDescriptorJSON[]; | ||
rpId?: string; | ||
timeout?: number; | ||
userVerification?: UserVerificationRequirement; | ||
}; | ||
}; | ||
export interface PublicKeyCredentialRequestOptionsJSON extends Omit<PublicKeyCredentialRequestOptions, 'challenge' | 'allowCredentials'> { | ||
challenge: string; | ||
allowCredentials: PublicKeyCredentialDescriptorJSON[]; | ||
} | ||
export interface PublicKeyCredentialDescriptorJSON extends Omit<PublicKeyCredentialDescriptor, 'id'> { | ||
id: string; | ||
} | ||
export interface PublicKeyCredentialUserEntityJSON extends Omit<PublicKeyCredentialUserEntity, 'id'> { | ||
id: string; | ||
} | ||
/** | ||
@@ -55,0 +27,0 @@ * The value returned from navigator.credentials.create() |
{ | ||
"name": "@simplewebauthn/typescript-types", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "TypeScript types used by the @simplewebauthn series of libraries", | ||
@@ -22,3 +22,3 @@ "main": "dist/index.js", | ||
], | ||
"gitHead": "0c4a5f127cc66456a7f17c77926ce671e3535d43" | ||
"gitHead": "edca8a8ba7014118db5d4687e6069dbbc7be3e56" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8365
191