CDPotion.Domain.WebAuthn (cdpotion v0.1.4)
Summary
Types
description not provided :(
description not provided :(
description not provided :(
description not provided :(
description not provided :(
description not provided :(
Functions
Adds the credential to the specified authenticator.
Creates and adds a virtual authenticator.
Clears all the credentials from the specified device.
Disable the WebAuthn domain.
Enable the WebAuthn domain and start intercepting credential storage and retrieval with a virtual authenticator.
Returns a single credential stored in the given virtual authenticator that matches the credential ID.
Returns all the credentials stored in the given virtual authenticator.
Removes a credential from the authenticator.
Removes the given authenticator.
Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator. The default is true.
Resets parameters isBogusSignature, isBadUV, isBadUP to false if they are not present.
Sets whether User Verification succeeds or fails for an authenticator. The default is true.
Types
authenticator_id()
@type authenticator_id() :: String.t()
description not provided :(
authenticator_protocol()
@type authenticator_protocol() :: :u2f | :ctap2
description not provided :(
authenticator_transport()
@type authenticator_transport() :: :usb | :nfc | :ble | :cable | :internal
description not provided :(
credential()
@type credential() :: %{ credentialId: String.t(), isResidentCredential: boolean(), largeBlob: String.t() | nil, privateKey: String.t(), rpId: String.t() | nil, signCount: integer(), userHandle: String.t() | nil }
description not provided :(
ctap2_version()
@type ctap2_version() :: :ctap2_0 | :ctap2_1
description not provided :(
virtual_authenticator_options()
@type virtual_authenticator_options() :: %{ automaticPresenceSimulation: boolean() | nil, ctap2Version: ctap2_version() | nil, hasCredBlob: boolean() | nil, hasLargeBlob: boolean() | nil, hasMinPinLength: boolean() | nil, hasPrf: boolean() | nil, hasResidentKey: boolean() | nil, hasUserVerification: boolean() | nil, isUserVerified: boolean() | nil, protocol: authenticator_protocol(), transport: authenticator_transport() }
description not provided :(
Functions
add_credential(authenticator_id, credential)
@spec add_credential( authenticator_id(), credential() ) :: {String.t(), map()}
Adds the credential to the specified authenticator.
Parameters:
- (Required)
authenticator_id
: description not provided :( - (Required)
credential
: description not provided :(
add_virtual_authenticator(options)
@spec add_virtual_authenticator(virtual_authenticator_options()) :: {String.t(), map()}
Creates and adds a virtual authenticator.
Parameters:
- (Required)
options
: description not provided :(
clear_credentials(authenticator_id)
@spec clear_credentials(authenticator_id()) :: {String.t(), map()}
Clears all the credentials from the specified device.
Parameters:
- (Required)
authenticator_id
: description not provided :(
disable()
Disable the WebAuthn domain.
enable(enable_ui \\ nil)
Enable the WebAuthn domain and start intercepting credential storage and retrieval with a virtual authenticator.
Parameters:
- (Optional)
enable_ui
: Whether to enable the WebAuthn user interface. Enabling the UI is recommended for debugging and demo purposes, as it is closer to the real experience. Disabling the UI is recommended for automated testing. Supported at the embedder's discretion if UI is available. Defaults to false.
get_credential(authenticator_id, credential_id)
@spec get_credential(authenticator_id(), String.t()) :: {String.t(), map()}
Returns a single credential stored in the given virtual authenticator that matches the credential ID.
Parameters:
- (Required)
authenticator_id
: description not provided :( - (Required)
credential_id
: description not provided :(
get_credentials(authenticator_id)
@spec get_credentials(authenticator_id()) :: {String.t(), map()}
Returns all the credentials stored in the given virtual authenticator.
Parameters:
- (Required)
authenticator_id
: description not provided :(
remove_credential(authenticator_id, credential_id)
@spec remove_credential(authenticator_id(), String.t()) :: {String.t(), map()}
Removes a credential from the authenticator.
Parameters:
- (Required)
authenticator_id
: description not provided :( - (Required)
credential_id
: description not provided :(
remove_virtual_authenticator(authenticator_id)
@spec remove_virtual_authenticator(authenticator_id()) :: {String.t(), map()}
Removes the given authenticator.
Parameters:
- (Required)
authenticator_id
: description not provided :(
set_automatic_presence_simulation(authenticator_id, enabled)
@spec set_automatic_presence_simulation(authenticator_id(), boolean()) :: {String.t(), map()}
Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator. The default is true.
Parameters:
- (Required)
authenticator_id
: description not provided :( - (Required)
enabled
: description not provided :(
set_response_override_bits(authenticator_id, is_bogus_signature \\ nil, is_bad_uv \\ nil, is_bad_up \\ nil)
@spec set_response_override_bits( authenticator_id(), boolean(), boolean(), boolean() ) :: {String.t(), map()}
Resets parameters isBogusSignature, isBadUV, isBadUP to false if they are not present.
Parameters:
- (Required)
authenticator_id
: description not provided :( - (Optional)
is_bogus_signature
: If isBogusSignature is set, overrides the signature in the authenticator response to be zero. Defaults to false. - (Optional)
is_bad_uv
: If isBadUV is set, overrides the UV bit in the flags in the authenticator response to be zero. Defaults to false. - (Optional)
is_bad_up
: If isBadUP is set, overrides the UP bit in the flags in the authenticator response to be zero. Defaults to false.
set_user_verified(authenticator_id, is_user_verified)
@spec set_user_verified(authenticator_id(), boolean()) :: {String.t(), map()}
Sets whether User Verification succeeds or fails for an authenticator. The default is true.
Parameters:
- (Required)
authenticator_id
: description not provided :( - (Required)
is_user_verified
: description not provided :(