refactor: only accept claims following the OIDC spec

This commit is contained in:
Stavros
2025-04-25 15:28:24 +03:00
parent 13032e564d
commit 5e4e2ddbd9
7 changed files with 32 additions and 19 deletions

View File

@@ -7,3 +7,14 @@ var TinyauthLabels = []string{
"tinyauth.allowed",
"tinyauth.headers",
}
// Claims are the OIDC supported claims
type Claims struct {
Name string `json:"name"`
FamilyName string `json:"family_name"`
GivenName string `json:"given_name"`
MiddleName string `json:"middle_name"`
Nickname string `json:"nickname"`
Picture string `json:"picture"`
Email string `json:"email"`
}