Move code from user template into main_page

master
Joel Franusic 10 years ago
parent 98d0bdcbfc
commit 537ffb781f

@ -17,7 +17,6 @@
<div id="navbar" class="collapse navbar-collapse"> <div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
{% if current_user.is_authenticated() %} {% if current_user.is_authenticated() %}
<li><a href="{{ url_for('user') }}">User</a></li>
<li><a href="{{ url_for('logout') }}">Logout</a></li> <li><a href="{{ url_for('logout') }}">Logout</a></li>
{% endif %} {% endif %}
</ul> </ul>

@ -1,9 +1,30 @@
{% extends 'base.html' %} {% extends 'base.html' %}
{% block content %} {% block content %}
<p class="lead">Select the IdP you want to use to authenticate:</p> {% if current_user.is_authenticated() %}
<ol> <div class="container">
<h1>Logged in</h1>
<p class="lead">
Contents of the most recent SAML assertion:
</p>
<div class="col-md-8">
<table class="table">
{% if session.saml_attributes %}
{% for attribute in session.saml_attributes.keys() %}
<tr>
<td>{{ attribute }}</td>
<td>{{ session.saml_attributes[attribute][0] }}</td>
</tr>
{% endfor %}
{% endif %}
</table>
</div>
</div>
{% else %}
<p class="lead">Select the IdP you want to use to authenticate:</p>
<ol>
{% for idp in idp_dict.keys() %} {% for idp in idp_dict.keys() %}
<li><a href="/saml/login/{{idp}}">{{idp}}</a></li> <li><a href="/saml/login/{{idp}}">{{idp}}</a></li>
{% endfor %} {% endfor %}
</ol> </ol>
{% endif %}
{% endblock %} {% endblock %}

@ -1,21 +0,0 @@
{% extends 'base.html' %}
{% block content %}
<div class="container">
<h1>Logged in</h1>
<p class="lead">
Contents of the most recent SAML assertion:
</p>
<div class="col-md-8">
<table class="table">
{% if session.saml_attributes %}
{% for attribute in session.saml_attributes.keys() %}
<tr>
<td>{{ attribute }}</td>
<td>{{ session.saml_attributes[attribute][0] }}</td>
</tr>
{% endfor %}
{% endif %}
</table>
</div>
</div>
{% endblock %}
Loading…
Cancel
Save