fix: improvements for login and oidc (#227)

* add csrf

* caching

* caching

* caching

* caching

* security headers

* csp and security headers

* error handler csp

* select user with display name

* csp

* user selection styling

* username to loginname

* regenerate grpc

* regenerate

* change to login name
This commit is contained in:
Livio Amstutz
2020-06-17 08:06:40 +02:00
committed by GitHub
parent dfe6d0deb4
commit 1c59d18fee
108 changed files with 19226 additions and 19220 deletions
@@ -6,17 +6,32 @@
<form action="{{ userSelectionUrl }}" method="POST">
{{ .CSRF }}
<input type="hidden" name="authRequestID" value="{{ .AuthReqID }}" />
<div class="actions">
{{ range $user := .Users }}
{{ $sessionState := (t (printf "UserSelection.SessionState%v" $user.UserSessionState)) }}
<button type="submit" name="userID" value="{{$user.UserID}}" class="primary">
<span class="username">{{$user.UserName}}</span>
<span class="sessionstate">({{$sessionState}})</span>
</button>
{{ if .Users }}
<div class="user-selection-list">
{{ range $user := .Users }}
{{ $sessionState := (printf "sessionstate-%v" $user.UserSessionState) }}
<button type="submit" name="userID" value="{{$user.UserID}}" class="clean user-selection">
<div>
<div class="profile-image"></div>
<div class="sessionstate {{$sessionState}}"></div>
</div>
<div class="names">
<div class="displayname">{{$user.DisplayName}}</div>
<div class="loginname">{{$user.LoginName}}</div>
</div>
</button>
{{ end }}
</div>
{{ end }}
<button type="submit" name="userID" value="0" class="primary">{{t "UserSelection.OtherUser"}}</button>
<button type="submit" name="userID" value="0" class="clean other-user">
<div class="other-user-image"></div>
<div>{{t "UserSelection.OtherUser"}}</div>
</button>
</div>
</form>