initial commit

This commit is contained in:
2025-02-12 16:01:36 +01:00
commit b0309018ad
8 changed files with 662 additions and 0 deletions

22
core/core.go Normal file
View File

@ -0,0 +1,22 @@
package core
type User struct {
UUID string `json:"sub"`
EmailVerified bool `json:"email_verified"`
Name string `json:"name"`
Groups []string `json:"groups"`
PreferredUsername string `json:"preferred_username"`
GivenName string `json:"given_name"`
FamilyName string `json:"family_name"`
Email string `json:"email"`
}
func (u User) HasGroupMembership(targetGroup string) bool {
for _, group := range u.Groups {
if group == targetGroup {
return true
}
}
return false
}