Skip to content

CredentialManagementAPI

Types

attestationConveyancePreference

type attestationConveyancePreference =
| @as("direct") Direct
| @as("enterprise") Enterprise
| @as("indirect") Indirect
| @as("none") None

authenticationExtensionsClientInputs

type authenticationExtensionsClientInputs = {
mutable minPinLength?: bool,
mutable hmacCreateSecret?: bool,
mutable appid?: string,
mutable credProps?: bool,
mutable prf?: authenticationExtensionsPRFInputs,
}

Record fields

minPinLength
option< bool >
hmacCreateSecret
option< bool >
appid
option< string >
credProps
option< bool >

authenticationExtensionsPRFInputs

type authenticationExtensionsPRFInputs = {
mutable eval?: authenticationExtensionsPRFValues,
mutable evalByCredential?: WebAPI.Prelude.any,
}

Record fields

evalByCredential
option< WebAPI.Prelude.any >

authenticationExtensionsPRFValues

type authenticationExtensionsPRFValues = {
mutable first: WebAPI.Prelude.bufferSource,
mutable second?: WebAPI.Prelude.bufferSource,
}

Record fields

second

authenticatorAttachment

type authenticatorAttachment =
| @as("cross-platform") CrossPlatform
| @as("platform") Platform

authenticatorSelectionCriteria

type authenticatorSelectionCriteria = {
mutable authenticatorAttachment?: authenticatorAttachment,
mutable residentKey?: residentKeyRequirement,
mutable requireResidentKey?: bool,
mutable userVerification?: userVerificationRequirement,
}

Record fields

authenticatorAttachment
residentKey
requireResidentKey
option< bool >
userVerification

authenticatorTransport

type authenticatorTransport =
| @as("ble") Ble
| @as("hybrid") Hybrid
| @as("internal") Internal
| @as("nfc") Nfc
| @as("usb") Usb

credential

type credential = {id: string, type_: string}

Record fields

id
string
type_
string

credentialCreationOptions

type credentialCreationOptions = {
mutable signal?: WebAPI.EventAPI.abortSignal,
mutable publicKey?: publicKeyCredentialCreationOptions,
}

Record fields

signal

credentialMediationRequirement

type credentialMediationRequirement =
| @as("conditional") Conditional
| @as("optional") Optional
| @as("required") Required
| @as("silent") Silent

credentialRequestOptions

type credentialRequestOptions = {
mutable mediation?: credentialMediationRequirement,
mutable signal?: WebAPI.EventAPI.abortSignal,
mutable publicKey?: publicKeyCredentialRequestOptions,
}

Record fields

mediation
signal
publicKey

credentialsContainer

type credentialsContainer = {}

Module

There are methods and helpers defined in CredentialsContainer .

publicKeyCredentialCreationOptions

type publicKeyCredentialCreationOptions = {
mutable rp: publicKeyCredentialRpEntity,
mutable user: publicKeyCredentialUserEntity,
mutable challenge: WebAPI.Prelude.bufferSource,
mutable pubKeyCredParams: array<
publicKeyCredentialParameters,
>,
mutable timeout?: int,
mutable excludeCredentials?: array<
publicKeyCredentialDescriptor,
>,
mutable authenticatorSelection?: authenticatorSelectionCriteria,
mutable attestation?: attestationConveyancePreference,
mutable extensions?: authenticationExtensionsClientInputs,
}

Record fields

pubKeyCredParams
timeout
option< int >
excludeCredentials
option< array< publicKeyCredentialDescriptor > >
authenticatorSelection
attestation

publicKeyCredentialDescriptor

type publicKeyCredentialDescriptor = {
mutable type_: publicKeyCredentialType,
mutable id: WebAPI.Prelude.bufferSource,
mutable transports?: array<authenticatorTransport>,
}

Record fields

transports
option< array< authenticatorTransport > >

publicKeyCredentialEntity

type publicKeyCredentialEntity = {mutable name: string}

Record fields

name
string

publicKeyCredentialParameters

type publicKeyCredentialParameters = {
mutable type_: publicKeyCredentialType,
mutable alg: int,
}

Record fields

alg
int

publicKeyCredentialRequestOptions

type publicKeyCredentialRequestOptions = {
mutable challenge: WebAPI.Prelude.bufferSource,
mutable timeout?: int,
mutable rpId?: string,
mutable allowCredentials?: array<
publicKeyCredentialDescriptor,
>,
mutable userVerification?: userVerificationRequirement,
mutable extensions?: authenticationExtensionsClientInputs,
}

Record fields

timeout
option< int >
rpId
option< string >
allowCredentials
option< array< publicKeyCredentialDescriptor > >
userVerification

publicKeyCredentialRpEntity

type publicKeyCredentialRpEntity = {
mutable name: string,
mutable id?: string,
}

Record fields

name
string
id
option< string >

publicKeyCredentialType

type publicKeyCredentialType = @as("public-key") PublicKey

publicKeyCredentialUserEntity

type publicKeyCredentialUserEntity = {
mutable name: string,
mutable id: WebAPI.Prelude.bufferSource,
mutable displayName: string,
}

Record fields

name
string
displayName
string

residentKeyRequirement

type residentKeyRequirement =
| @as("discouraged") Discouraged
| @as("preferred") Preferred
| @as("required") Required

userVerificationRequirement

type userVerificationRequirement =
| @as("discouraged") Discouraged
| @as("preferred") Preferred
| @as("required") Required