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(
|
||||
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("/")
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
{% if user %}
|
||||
<a class="item" href="{{ url_for('logout') }}">
|
||||
<i class="sign out alternate icon"></i>
|
||||
Sign out
|
||||
Log out
|
||||
</a>
|
||||
{% else %}
|
||||
<a class="item" href="{{ url_for('login') }}">
|
||||
|
@ -37,6 +37,13 @@
|
|||
Sign in
|
||||
</a>
|
||||
{% 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>
|
||||
|
||||
<div class="ui container">
|
||||
|
@ -59,14 +66,29 @@
|
|||
{% endif %}
|
||||
<div class="content">
|
||||
<span class="header">{{ user.name }}</span>
|
||||
<div class="meta">
|
||||
<div class="meta" title="id">
|
||||
{{ user.sub }}
|
||||
</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 %}
|
||||
<div class="extra content">
|
||||
<i class="user users icon"></i>
|
||||
<i class="user users icon" title="Groups"></i>
|
||||
{% for group in user.groups %}
|
||||
<span class="label">{{ group }}</span>
|
||||
<span class="label" title="Groups">{{ group }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@ -79,7 +101,7 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
{% 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 %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -16,6 +16,8 @@ uid: admin
|
|||
mail: admin@mydomain.tld
|
||||
telephoneNumber: 555-000-000
|
||||
employeeNumber: 1000
|
||||
labeledURI: https://admin.example
|
||||
postalAddress: 123, Admin Lane - Gotham City 12345
|
||||
userPassword: {SSHA}7zQVLckaEc6cJEsS0ylVipvb2PAR/4tS
|
||||
|
||||
dn: uid=moderator,ou=users,dc=mydomain,dc=tld
|
||||
|
@ -28,6 +30,7 @@ uid: moderator
|
|||
mail: moderator@mydomain.tld
|
||||
telephoneNumber: 555-000-002
|
||||
employeeNumber: 1002
|
||||
labeledURI: https://moderator.example
|
||||
userPassword: {SSHA}+eHyxWqajMHsOWnhONC2vbtfNZzKTkag
|
||||
|
||||
dn: uid=user,ou=users,dc=mydomain,dc=tld
|
||||
|
@ -40,6 +43,7 @@ uid: user
|
|||
mail: user@mydomain.tld
|
||||
telephoneNumber: 555-000-001
|
||||
employeeNumber: 1001
|
||||
labeledURI: https://user.example
|
||||
userPassword: {SSHA}Yr1ZxSljRsKyaTB30suY2iZ1KRTStF1X
|
||||
|
||||
dn: uid=james,ou=users,dc=mydomain,dc=tld
|
||||
|
@ -86,6 +90,8 @@ oauthScope: openid
|
|||
oauthScope: profile
|
||||
oauthScope: email
|
||||
oauthScope: groups
|
||||
oauthScope: address
|
||||
oauthScope: phone
|
||||
oauthResponseType: code
|
||||
oauthResponseType: id_token
|
||||
oauthTokenEndpointAuthMethod: client_secret_basic
|
||||
|
@ -106,6 +112,8 @@ oauthScope: openid
|
|||
oauthScope: profile
|
||||
oauthScope: email
|
||||
oauthScope: groups
|
||||
oauthScope: address
|
||||
oauthScope: phone
|
||||
oauthResponseType: code
|
||||
oauthResponseType: id_token
|
||||
oauthTokenEndpointAuthMethod: client_secret_basic
|
||||
|
|
Loading…
Reference in a new issue