<div class="tab">
    <h2 class="tab-title">Request</h2>
    <div class="tab-content">
        <p class="help">
            The following table lists all Public Key Credential Request Options generated by the application.<br>
        </p>
        <table>
            <caption>Public Key Credential Request Options</caption>
            <thead>
            <tr>
                <th>Public Key Credential Request Options</th>
            </tr>
            </thead>
            <tbody>
            {% if not collector.getData().publicKeyCredentialRequestOptions is empty %}
                {% for id, data in collector.getData().publicKeyCredentialRequestOptions %}
                    <tr>
                        <td>
                            <span>{{ profiler_dump(data.options) }}</span>
                            <div class="text-small font-normal">
                                <a
                                    class="btn btn-link text-small sf-toggle sf-toggle-off"
                                    data-toggle-selector="#webauthn-pkcco-{{ id }}" data-toggle-alt-content="Hide JSON"
                                >
                                    Show JSON
                                </a>
                            </div>
                            <div id="webauthn-pkcco-{{ id }}" class="context sf-toggle-content sf-toggle-hidden">
                                <pre>{{ data.json }}</pre>
                            </div>
                        </td>
                    </tr>
                {% endfor %}
            {% else %}
                <tr>
                    <td colspan="1">No Public Key Credential Request Options have been generated</td>
                </tr>
            {% endif %}
            </tbody>
        </table>
        <p class="help">
            The following table lists all Authenticator Requests validated by the application.<br>
        </p>
        <table>
            <caption>Verified Authenticator Assertions</caption>
            <thead>
            <tr>
                <th>User Handle (ID)</th>
                <th>Credential ID</th>
                <th>Assertion Response</th>
                <th>Options</th>
                <th>Result</th>
            </tr>
            </thead>
            <tbody>
            {% if collector.getData().authenticatorAssertionResponseValidationSucceeded is empty and collector.getData().authenticatorAssertionResponseValidationFailed is empty %}
                <tr>
                    <td colspan="5">No Authenticator Assertion have been validated</td>
                </tr>
            {% endif %}
            {% if not collector.getData().authenticatorAssertionResponseValidationSucceeded is empty %}
                {% for id, data in collector.getData().authenticatorAssertionResponseValidationSucceeded %}
                    <tr>
                        <td>{{ profiler_dump(data.user_handle) }}</td>
                        <td>{{ profiler_dump(data.credential_id) }}</td>
                        <td>{{ profiler_dump(data.assertion_response) }}</td>
                        <td>
                            <span>{{ profiler_dump(data.options) }}</span>
                            <div class="text-small font-normal">
                                <a
                                    class="btn btn-link text-small sf-toggle sf-toggle-off"
                                    data-toggle-selector="#webauthn-attestation-validation-succeeded-{{ id }}"
                                    data-toggle-alt-content="Hide JSON"
                                >
                                    Show JSON
                                </a>
                            </div>
                            <div
                                id="webauthn-attestation-validation-succeeded-{{ id }}"
                                class="context sf-toggle-content sf-toggle-hidden"
                            >
                                <pre>{{ data.options_json }}</pre>
                            </div>
                        </td>
                        <td>
                            <span>{{ profiler_dump(data.credential_source) }}</span>
                        </td>
                    </tr>
                {% endfor %}
            {% endif %}
            {% if not collector.getData().authenticatorAssertionResponseValidationFailed is empty %}
                {% for id, data in collector.getData().authenticatorAssertionResponseValidationFailed %}
                    <tr>
                        <td>{{ profiler_dump(data.user_handle) }}</td>
                        <td>{{ profiler_dump(data.credential_id) }}</td>
                        <td>{{ profiler_dump(data.assertion_response) }}</td>
                        <td>
                            <span>{{ profiler_dump(data.options) }}</span>
                            <div class="text-small font-normal">
                                <a
                                    class="btn btn-link text-small sf-toggle sf-toggle-off"
                                    data-toggle-selector="#webauthn-attestation-validation-failed-{{ id }}"
                                    data-toggle-alt-content="Hide JSON"
                                >
                                    Show JSON
                                </a>
                            </div>
                            <div
                                id="webauthn-attestation-validation-failed-{{ id }}"
                                class="context sf-toggle-content sf-toggle-hidden"
                            >
                                <pre>{{ data.options_json }}</pre>
                            </div>
                        </td>
                        <td>
                            <span>{{ profiler_dump(data.exception) }}</span>
                        </td>
                    </tr>
                {% endfor %}
            {% endif %}
            </tbody>
        </table>
    </div>
</div>
