forked from Github-Mirrors/canaille
Minor demo improvements
This commit is contained in:
parent
b135805a0f
commit
5b31da36ce
3 changed files with 36 additions and 6 deletions
|
@ -26,7 +26,7 @@ def create_app():
|
||||||
server_metadata_url=get_well_known_url(
|
server_metadata_url=get_well_known_url(
|
||||||
app.config["OAUTH_AUTH_SERVER"], external=True
|
app.config["OAUTH_AUTH_SERVER"], external=True
|
||||||
),
|
),
|
||||||
client_kwargs={"scope": "openid profile email groups"},
|
client_kwargs={"scope": "openid profile email phone address groups"},
|
||||||
)
|
)
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
{% if user %}
|
{% if user %}
|
||||||
<a class="item" href="{{ url_for('logout') }}">
|
<a class="item" href="{{ url_for('logout') }}">
|
||||||
<i class="sign out alternate icon"></i>
|
<i class="sign out alternate icon"></i>
|
||||||
Sign out
|
Log out
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="item" href="{{ url_for('login') }}">
|
<a class="item" href="{{ url_for('login') }}">
|
||||||
|
@ -37,6 +37,13 @@
|
||||||
Sign in
|
Sign in
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="labeled icon right menu">
|
||||||
|
<a class="item" href="{{ config.OAUTH_AUTH_SERVER }}" target="_blank">
|
||||||
|
<i class="id card icon big"></i>
|
||||||
|
Identity server
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
|
@ -59,14 +66,29 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<span class="header">{{ user.name }}</span>
|
<span class="header">{{ user.name }}</span>
|
||||||
<div class="meta">
|
<div class="meta" title="id">
|
||||||
{{ user.sub }}
|
{{ user.sub }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% if user.email %}
|
||||||
|
<div class="extra content">
|
||||||
|
<i class="envelope icon" title="mail"></i>
|
||||||
|
<a href="mailto:{{ user.email }}">{{ user.email }}</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if user.phone_number %}
|
||||||
|
<div class="extra content">
|
||||||
|
<i class="phone icon" title="phone"></i>
|
||||||
|
<a href="tel:{{ user.phone_number }}">{{ user.phone_number }}</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if user.groups %}
|
{% if user.groups %}
|
||||||
<div class="extra content">
|
<div class="extra content">
|
||||||
<i class="user users icon"></i>
|
<i class="user users icon" title="Groups"></i>
|
||||||
{% for group in user.groups %}
|
{% for group in user.groups %}
|
||||||
<span class="label">{{ group }}</span>
|
<span class="label" title="Groups">{{ group }}</span>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -79,7 +101,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="ui primary button" href="{{ url_for('login') }}">Sign in</a>.
|
<a class="ui primary button" href="{{ url_for('login') }}">Sign in</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -16,6 +16,8 @@ uid: admin
|
||||||
mail: admin@mydomain.tld
|
mail: admin@mydomain.tld
|
||||||
telephoneNumber: 555-000-000
|
telephoneNumber: 555-000-000
|
||||||
employeeNumber: 1000
|
employeeNumber: 1000
|
||||||
|
labeledURI: https://admin.example
|
||||||
|
postalAddress: 123, Admin Lane - Gotham City 12345
|
||||||
userPassword: {SSHA}7zQVLckaEc6cJEsS0ylVipvb2PAR/4tS
|
userPassword: {SSHA}7zQVLckaEc6cJEsS0ylVipvb2PAR/4tS
|
||||||
|
|
||||||
dn: uid=moderator,ou=users,dc=mydomain,dc=tld
|
dn: uid=moderator,ou=users,dc=mydomain,dc=tld
|
||||||
|
@ -28,6 +30,7 @@ uid: moderator
|
||||||
mail: moderator@mydomain.tld
|
mail: moderator@mydomain.tld
|
||||||
telephoneNumber: 555-000-002
|
telephoneNumber: 555-000-002
|
||||||
employeeNumber: 1002
|
employeeNumber: 1002
|
||||||
|
labeledURI: https://moderator.example
|
||||||
userPassword: {SSHA}+eHyxWqajMHsOWnhONC2vbtfNZzKTkag
|
userPassword: {SSHA}+eHyxWqajMHsOWnhONC2vbtfNZzKTkag
|
||||||
|
|
||||||
dn: uid=user,ou=users,dc=mydomain,dc=tld
|
dn: uid=user,ou=users,dc=mydomain,dc=tld
|
||||||
|
@ -40,6 +43,7 @@ uid: user
|
||||||
mail: user@mydomain.tld
|
mail: user@mydomain.tld
|
||||||
telephoneNumber: 555-000-001
|
telephoneNumber: 555-000-001
|
||||||
employeeNumber: 1001
|
employeeNumber: 1001
|
||||||
|
labeledURI: https://user.example
|
||||||
userPassword: {SSHA}Yr1ZxSljRsKyaTB30suY2iZ1KRTStF1X
|
userPassword: {SSHA}Yr1ZxSljRsKyaTB30suY2iZ1KRTStF1X
|
||||||
|
|
||||||
dn: uid=james,ou=users,dc=mydomain,dc=tld
|
dn: uid=james,ou=users,dc=mydomain,dc=tld
|
||||||
|
@ -86,6 +90,8 @@ oauthScope: openid
|
||||||
oauthScope: profile
|
oauthScope: profile
|
||||||
oauthScope: email
|
oauthScope: email
|
||||||
oauthScope: groups
|
oauthScope: groups
|
||||||
|
oauthScope: address
|
||||||
|
oauthScope: phone
|
||||||
oauthResponseType: code
|
oauthResponseType: code
|
||||||
oauthResponseType: id_token
|
oauthResponseType: id_token
|
||||||
oauthTokenEndpointAuthMethod: client_secret_basic
|
oauthTokenEndpointAuthMethod: client_secret_basic
|
||||||
|
@ -106,6 +112,8 @@ oauthScope: openid
|
||||||
oauthScope: profile
|
oauthScope: profile
|
||||||
oauthScope: email
|
oauthScope: email
|
||||||
oauthScope: groups
|
oauthScope: groups
|
||||||
|
oauthScope: address
|
||||||
|
oauthScope: phone
|
||||||
oauthResponseType: code
|
oauthResponseType: code
|
||||||
oauthResponseType: id_token
|
oauthResponseType: id_token
|
||||||
oauthTokenEndpointAuthMethod: client_secret_basic
|
oauthTokenEndpointAuthMethod: client_secret_basic
|
||||||
|
|
Loading…
Reference in a new issue