<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <style>
        table, th, td {
            border: 1px solid black;
        }
        tbody td {
            color: blue;
        }
    </style>

</head>
<body>
<h1>dj-sso-server sample</h1>
<a href="https://github.com/feifangit/dj-sso-server"><img
                style="position: absolute; top: 0; right: 0; border: 0;"
                src="https://camo.githubusercontent.com/e7bbb0521b397edbd5fe43e7f760759336b5e05f/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677265656e5f3030373230302e706e67"
                alt="Fork me on GitHub"
                data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png"></a>
<hr>
{% if user.is_authenticated %}
    <p>Welcome, {{ user.username }}. <a href="/logout/">log out</a> </p>
{% else %}
    <p>Please <a href="/login/">log in</a> with user1/123</p>
{% endif %}
<hr>
{% if user.is_authenticated %}
<h3>Available API keys for SSO</h3>
<table>
    <thead>
        <tr>
            <td>API key</td>
            <td>SEC key</td>
            <td>Host</td>
            <td>Note</td>
          </tr>
    </thead>
    <tbody>
        {% for sapi in ssoapi.all %}
            <tr>
            <td>{{ sapi.credential.apikey }}</td>
            <td>{{ sapi.credential.seckey }}</td>
            <td>{{ sapi.host }}</td>
            <td>{{ sapi.note }}</td>
            </tr>
        {% endfor %}

    </tbody>
</table>


<h3>User information</h3>
<ul>
    <li>first name: {{ user.first_name }}</li>
    <li>last name: {{ user.last_name }}</li>
    <li>email: {{ user.email }}</li>
</ul>
{% endif %}
</body>
</html>