Skip to content

[py] add remaining code for virtual authenticator #2096

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 2 commits into from
Dec 10, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_virtual_authenticator_options():
assert len(options.to_dict()) == 6


def test_create_authenticator(driver):
def test_add_authenticator(driver):
# Create virtual authenticator options
options = VirtualAuthenticatorOptions()
options.protocol = VirtualAuthenticatorOptions.Protocol.U2F
Expand Down Expand Up @@ -93,7 +93,7 @@ def test_create_and_add_resident_key(driver):
privatekey = urlsafe_b64decode(BASE64__ENCODED_PK)
sign_count = 0

# create a resident credential using above parameters
# create a resident credential using above parameters
resident_credential = Credential.create_resident_credential(credential_id, rp_id, user_handle, privatekey, sign_count)

# add the credential created to virtual authenticator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Creates a resident (stateful) credential with the given required credential [par
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L80-L97" >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L89-L97" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L80-L94" >}}
Expand All @@ -132,7 +132,7 @@ Creates a resident (stateless) credential with the given required credential [pa
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L140-L147" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L136-L140" >}}
Expand All @@ -157,7 +157,7 @@ Registers the credential with the authenticator.
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L150" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L131-L142" >}}
Expand All @@ -182,7 +182,7 @@ Returns the list of credentials owned by the authenticator.
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L183" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L154-L170" >}}
Expand All @@ -207,7 +207,7 @@ Removes a credential from the authenticator based on the passed credential id.
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L209" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< badge-code >}}
Expand All @@ -233,7 +233,7 @@ Removes all the credentials from the authenticator.
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L239" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L181-L190" >}}
Expand All @@ -258,7 +258,7 @@ Sets whether the authenticator will simulate success or fail on user verificatio
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L245-L247" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L197-L197" >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Creates a resident (stateful) credential with the given required credential [par
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L80-L97" >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L89-L97" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L80-L94" >}}
Expand All @@ -137,7 +137,7 @@ Creates a resident (stateless) credential with the given required credential [pa
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L140-L147" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L136-L140" >}}
Expand All @@ -161,7 +161,7 @@ Registers the credential with the authenticator.
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L150" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L131-L142" >}}
Expand All @@ -185,7 +185,7 @@ Returns the list of credentials owned by the authenticator.
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L183" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L154-L170" >}}
Expand All @@ -210,7 +210,7 @@ Removes a credential from the authenticator based on the passed credential id.
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L209" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< /tab >}}
Expand All @@ -234,7 +234,7 @@ Removes all the credentials from the authenticator.
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L239" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L181-L190" >}}
Expand All @@ -258,7 +258,7 @@ Sets whether the authenticator will simulate success or fail on user verificatio
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L245-L247" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L197-L197" >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Cria uma resident (stateful) credential com os requeridos [parâmetros](https://
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L80-L97" >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L89-L97" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L80-L94" >}}
Expand All @@ -128,7 +128,7 @@ Cria uma resident (stateless) credential com os requeridos [parâmetros](https:/
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L140-L147" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L136-L140" >}}
Expand All @@ -152,7 +152,7 @@ Registra a credencial com o autenticador.
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L150" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L131-L142" >}}
Expand All @@ -176,7 +176,7 @@ Retorna a lista de credenciais que o autenticador possui.
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L183" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L154-L170" >}}
Expand All @@ -201,7 +201,7 @@ Remove a credencial do autenticador baseado na id da credencial passado.
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L209" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< /tab >}}
Expand All @@ -225,7 +225,7 @@ Remove todas as credenciais do autenticador.
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L239" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L181-L190" >}}
Expand All @@ -249,7 +249,7 @@ Diz se o autenticador simulará sucesso ou falha na verificação de usuário.
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L245-L247" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L197-L197" >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Web 应用程序可以启用基于公钥的身份验证机制(称为 Web 身
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L80-L97" >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L89-L97" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L80-L94" >}}
Expand All @@ -128,7 +128,7 @@ Web 应用程序可以启用基于公钥的身份验证机制(称为 Web 身
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L140-L147" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L136-L140" >}}
Expand All @@ -152,7 +152,7 @@ Web 应用程序可以启用基于公钥的身份验证机制(称为 Web 身
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L150" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L131-L142" >}}
Expand All @@ -176,7 +176,7 @@ Web 应用程序可以启用基于公钥的身份验证机制(称为 Web 身
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L183" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L154-L170" >}}
Expand All @@ -201,7 +201,7 @@ Web 应用程序可以启用基于公钥的身份验证机制(称为 Web 身
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L209" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< /tab >}}
Expand All @@ -225,7 +225,7 @@ Web 应用程序可以启用基于公钥的身份验证机制(称为 Web 身
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L239" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L181-L190" >}}
Expand All @@ -249,7 +249,7 @@ Web 应用程序可以启用基于公钥的身份验证机制(称为 Web 身
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/tests/interactions/test_virtual_authenticator.py#L245-L247" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L197-L197" >}}
Expand Down
Loading