<div class="tab">
    <h3 class="tab-title">JWS Services</h3>
    <div class="tab-content">
        <h4>JWS Builders</h4>
        <table>
            <thead>
            <tr>
                <th>Service ID</th>
                <th>Algorithms</th>
            </tr>
            </thead>
            <tbody>
            {% for id, data in collector.getData().jws.jws_builders %}
                <tr>
                    <td>{{ id }}</td>
                    <td>
                        <ul>
                            {% for algorithm in data.signature_algorithms %}
                                <li>
                                    <span{% if algorithm in collector.getData().algorithm.messages|keys %}
                                        class="{{ collector.getData().algorithm.messages[algorithm]['severity'] }}"
                                            {% else %}
                                            {% endif %}>
                                        {{ algorithm }}
                                    </span>
                                </li>
                            {% endfor %}
                        </ul>
                    </td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
        <h4>JWS Verifiers</h4>
        <table>
            <thead>
            <tr>
                <th>Service ID</th>
                <th>Algorithms</th>
            </tr>
            </thead>
            <tbody>
            {% for id, data in collector.getData().jws.jws_verifiers %}
                <tr>
                    <td>{{ id }}</td>
                    <td>
                        <ul>
                            {% for algorithm in data.signature_algorithms %}
                                <li>
                                    <span{% if algorithm in collector.getData().algorithm.messages|keys %}
                                        class="{{ collector.getData().algorithm.messages[algorithm]['severity'] }}"
                                            {% endif %}>
                                        {{ algorithm }}
                                    </span>
                                </li>
                            {% endfor %}
                        </ul>
                    </td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
        <h4>JWS Loaders</h4>
        <table>
            <thead>
            <tr>
                <th>Service ID</th>
                <th>Serializers</th>
                <th>Algorithms</th>
            </tr>
            </thead>
            <tbody>
            {% for id, data in collector.getData().jws.jws_loaders %}
                <tr>
                    <td>{{ id }}</td>
                    <td>
                        <ul>
                            {% for serializer in data.serializers %}
                                <li>{{ serializer }}</li>
                            {% endfor %}
                        </ul>
                    </td>
                    <td>
                        <ul>
                            {% for algorithm in data.signature_algorithms %}
                                <li><span{% if algorithm == 'none' %} class="severity-low"{% endif %}>{{ algorithm }}</span></li>
                            {% endfor %}
                        </ul>
                    </td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
        {% set signatureAlgorithms = collector.getData().algorithm.algorithms %}
        {% if signatureAlgorithms['Signature'] is defined %}
            <h4>Available Signature Algorithms</h4>
            <table>
                <thead>
                <tr>
                    <th>Name</th>
                    <th>Alias</th>
                    <th>Message</th>
                </tr>
                </thead>
                <tbody>
                {% for alias, alg in signatureAlgorithms['Signature'] %}
                    <tr>
                        <td {% if alg.name in collector.getData().algorithm.messages|keys %}
                            class="{{ collector.getData().algorithm.messages[alg.name]['severity'] }}"
                                {% endif %}>{{ alg.name }}</td>
                        <td {% if alg.name in collector.getData().algorithm.messages|keys %}
                            class="{{ collector.getData().algorithm.messages[alg.name]['severity'] }}"
                                {% endif %}>{{ alias }}</td>
                        <td {% if alg.name in collector.getData().algorithm.messages|keys %}
                            class="{{ collector.getData().algorithm.messages[alg.name]['severity'] }}"
                                {% endif %}>
                            {% if alg.name in collector.getData().algorithm.messages|keys %}
                                {{ collector.getData().algorithm.messages[alg.name]['message']|raw }}
                            {% endif %}
                        </td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
            <h4>Serialization Modes</h4>
            <table>
                <thead>
                <tr>
                    <th>Name</th>
                    <th>Alias</th>
                </tr>
                </thead>
                <tbody>
                {% for alias, name in collector.getData().jws.jws_serialization %}
                    <tr>
                        <td>{{ name }}</td>
                        <td>{{ alias }}</td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
        {% else %}
            There is no signature algorithm. Did you installed "web-token/jwt-signature-bundle"?
        {% endif %}
    </div>
</div>
