webauthn-procs.tcl

Support for WebAuthn/FIDO2

This file defines the following Objects and Classes: ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i], ::webauthn::WebAuthn[i]

Location:
packages/webauthn/tcl/webauthn-procs.tcl

Procedures in this file

Detailed information

Class ::webauthn::WebAuthn (public)

 ::nx::Class ::webauthn::WebAuthn[i]

rp_id: The WebAuthn Relying Party ID (domain), e.g. 'openacs.org' or 'login.example.com'; Must be a registrable domain / host that matches the site origin rules. after_successful_login_url: Where to redirect after login if no return_url exists in state. login_failure_url: Where to send users on failure if you don’t want to show debug output.

Testcases:
No testcase defined.

webauthn::JQ (private)

 webauthn::JQ s

Perform quoting for JavaScript literals.

Parameters:
s (required)
Returns:
JSON-escaped string content (WITHOUT surrounding quotes).

Partial Call Graph (max 5 caller/called nodes):

Testcases:
No testcase defined.

webauthn::WebAuthn method assert_clientdata_json (protected)

 <instance of webauthn::WebAuthn[i]> assert_clientdata_json \
    [ -clientData_raw clientData_raw ] \
    [ -expected_type expected_type ] \
    [ -expected_challenge expected_challenge ] \
    [ -expected_origin expected_origin ]

clientDataJSON is bytes (as received). We decode and validate: - type - challenge - origin

Switches:
-clientData_raw (optional)
-expected_type (optional)
-expected_challenge (optional)
-expected_origin (optional)

Testcases:
No testcase defined.

webauthn::WebAuthn method assert_rpidhash (protected)

 <instance of webauthn::WebAuthn[i]> assert_rpidhash \
    [ -rpIdHash rpIdHash ] [ -rpId rpId ] [ -context context ]
Switches:
-rpIdHash (optional)
-rpId (optional)
-context (optional)

Testcases:
No testcase defined.

webauthn::WebAuthn method init (protected)

 <instance of webauthn::WebAuthn[i]> init

Testcases:
No testcase defined.

webauthn::WebAuthn method login_url (public)

 <instance of webauthn::WebAuthn[i]> login_url \
    [ -return_url return_url ]

Compatibility function with other external_registry objects

Switches:
-return_url (optional, defaults to "/")

Testcases:
No testcase defined.

webauthn::WebAuthn method logout (public)

 <instance of webauthn::WebAuthn[i]> logout

Compatibility function with other external_registry objects

Testcases:
No testcase defined.

webauthn::WebAuthn method lookup_user_id (protected)

 <instance of webauthn::WebAuthn[i]> lookup_user_id \
    [ -credential_id credential_id ]
Switches:
-credential_id (optional)

Testcases:
No testcase defined.

webauthn::WebAuthn method name (public)

 <instance of webauthn::WebAuthn[i]> name

compatibility with xo::Authorize

Testcases:
No testcase defined.

webauthn::WebAuthn method new_challenge (public)

 <instance of webauthn::WebAuthn[i]> new_challenge [ nbytes ]
Parameters:
nbytes (optional, defaults to "32")

Testcases:
No testcase defined.

webauthn::WebAuthn method origin (public)

 <instance of webauthn::WebAuthn[i]> origin

Returns the "origin" field provided to the attestation.

Testcases:
No testcase defined.

webauthn::WebAuthn method return_err (public)

 <instance of webauthn::WebAuthn[i]> return_err [ -status status ] \
    error detail
Switches:
-status (optional, defaults to "400")
Parameters:
error (required)
detail (required)

Testcases:
No testcase defined.

webauthn::WebAuthn method state_key (protected)

 <instance of webauthn::WebAuthn[i]> state_key purpose state
Parameters:
purpose (required)
state (required)

Testcases:
No testcase defined.

webauthn::WebAuthn method store (public)

 <instance of webauthn::WebAuthn[i]> store

Testcases:
No testcase defined.

webauthn::WebAuthn method auth assertion_verify (public)

 <instance of webauthn::WebAuthn[i]> auth assertion_verify \
    [ -st st ] [ -req req ]
Switches:
-st (optional)
-req (optional)

Testcases:
No testcase defined.

webauthn::WebAuthn method auth issue_options (public)

 <instance of webauthn::WebAuthn[i]> auth issue_options \
    [ -return_url return_url ]
Switches:
-return_url (optional, defaults to "/")

Testcases:
No testcase defined.

webauthn::WebAuthn method reg attestation_verify (public)

 <instance of webauthn::WebAuthn[i]> reg attestation_verify \
    [ -st st ] [ -req req ]
Switches:
-st (optional)
-req (optional)

Testcases:
No testcase defined.

webauthn::validRpIdP (private)

 webauthn::validRpIdP rpid

Validate the provided rpid (Relying Party ID)

Parameters:
rpid (required)
Returns:
boolean value

Partial Call Graph (max 5 caller/called nodes):

Testcases:
No testcase defined.
[ show source ]