{{define "userInfo.html"}} User info endpoint {{template "header.html"}}
{{.csrfField}}
{{range .User.GetClaim "picture"}} user image {{else}} {{end}}
{{with .User.Name}} Hi {{.}}! {{else}} {{range .User.GetClaim "given_name"}} Hi {{.}}! {{end}} {{end}}
Session Details
{{if .Session}} {{with .Session.UserId}} {{end}} {{with .Session.Id}} {{end}} {{with .Session.ExpiresAt}} {{end}}
Claims
User ID {{.}}
ID {{.}}
Expires At {{.AsTime | formatTime}}
Impersonated {{.IsImpersonated}}
{{else}} No session details found! {{end}}
User Claims {{with .Session.IdToken}} {{end}}
{{if .Session}} {{range $k,$v:=.Session.Claims}} {{end}}
Claims
{{$k}} {{range $v.AsSlice}} {{if eq $k "exp" "iat" "updated_at"}}

{{formatTime .}}

{{else}}

{{.}}

{{end}} {{end}}
{{else}} No user claims found! {{end}}
Groups
{{if .DirectoryGroups}} {{range .DirectoryGroups}} {{end}}
ID Name
{{.Id}} {{.Name}}
{{else}} No groups found! {{end}}
Current Session Device Credentials
{{if .CurrentDeviceCredentials}} {{range .CurrentDeviceCredentials}} {{end}}
ID
{{.ID}}
{{$.csrfField}}
{{else}} No device credentials found! {{end}}
{{if .OtherDeviceCredentials}}
Other Device Credentials
{{range .OtherDeviceCredentials}} {{end}}
ID
{{.ID}}
{{$.csrfField}}
{{end}}
{{end}}