@@ -113,15 +113,44 @@ type ServerConfig struct {
113113}
114114
115115type AuthConfig struct {
116- IP IPConfig `description:"IP whitelisting config options." yaml:"ip"`
117- Users []string `description:"Comma-separated list of users (username:hashed_password)." yaml:"users"`
118- UsersFile string `description:"Path to the users file." yaml:"usersFile"`
119- SecureCookie bool `description:"Enable secure cookies." yaml:"secureCookie"`
120- SessionExpiry int `description:"Session expiry time in seconds." yaml:"sessionExpiry"`
121- SessionMaxLifetime int `description:"Maximum session lifetime in seconds." yaml:"sessionMaxLifetime"`
122- LoginTimeout int `description:"Login timeout in seconds." yaml:"loginTimeout"`
123- LoginMaxRetries int `description:"Maximum login retries." yaml:"loginMaxRetries"`
124- TrustedProxies []string `description:"Comma-separated list of trusted proxy addresses." yaml:"trustedProxies"`
116+ IP IPConfig `description:"IP whitelisting config options." yaml:"ip"`
117+ Users []string `description:"Comma-separated list of users (username:hashed_password)." yaml:"users"`
118+ UserAttributes map [string ]UserAttributes `description:"Map of per-user OIDC attributes (username -> attributes)." yaml:"userAttributes"`
119+ UsersFile string `description:"Path to the users file." yaml:"usersFile"`
120+ SecureCookie bool `description:"Enable secure cookies." yaml:"secureCookie"`
121+ SessionExpiry int `description:"Session expiry time in seconds." yaml:"sessionExpiry"`
122+ SessionMaxLifetime int `description:"Maximum session lifetime in seconds." yaml:"sessionMaxLifetime"`
123+ LoginTimeout int `description:"Login timeout in seconds." yaml:"loginTimeout"`
124+ LoginMaxRetries int `description:"Maximum login retries." yaml:"loginMaxRetries"`
125+ TrustedProxies []string `description:"Comma-separated list of trusted proxy addresses." yaml:"trustedProxies"`
126+ }
127+
128+ type UserAttributes struct {
129+ Name string `description:"Full name of the user." yaml:"name"`
130+ GivenName string `description:"Given (first) name of the user." yaml:"givenName"`
131+ FamilyName string `description:"Family (last) name of the user." yaml:"familyName"`
132+ MiddleName string `description:"Middle name of the user." yaml:"middleName"`
133+ Nickname string `description:"Nickname of the user." yaml:"nickname"`
134+ Profile string `description:"URL of the user's profile page." yaml:"profile"`
135+ Picture string `description:"URL of the user's profile picture." yaml:"picture"`
136+ Website string `description:"URL of the user's website." yaml:"website"`
137+ Email string `description:"Email address of the user." yaml:"email"`
138+ Gender string `description:"Gender of the user." yaml:"gender"`
139+ Birthdate string `description:"Birthdate of the user (YYYY-MM-DD)." yaml:"birthdate"`
140+ Zoneinfo string `description:"Time zone of the user (e.g. Europe/Athens)." yaml:"zoneinfo"`
141+ Locale string `description:"Locale of the user (e.g. en-US)." yaml:"locale"`
142+ PhoneNumber string `description:"Phone number of the user." yaml:"phoneNumber"`
143+ PhoneNumberVerified bool `description:"Whether the phone number has been verified." yaml:"phoneNumberVerified"`
144+ Address AddressClaim `description:"Address of the user." yaml:"address"`
145+ }
146+
147+ type AddressClaim struct {
148+ Formatted string `description:"Full mailing address, formatted for display." yaml:"formatted" json:"formatted,omitempty"`
149+ StreetAddress string `description:"Street address." yaml:"streetAddress" json:"street_address,omitempty"`
150+ Locality string `description:"City or locality." yaml:"locality" json:"locality,omitempty"`
151+ Region string `description:"State, province, or region." yaml:"region" json:"region,omitempty"`
152+ PostalCode string `description:"Zip or postal code." yaml:"postalCode" json:"postal_code,omitempty"`
153+ Country string `description:"Country." yaml:"country" json:"country,omitempty"`
125154}
126155
127156type IPConfig struct {
@@ -228,6 +257,7 @@ type User struct {
228257 Username string
229258 Password string
230259 TotpSecret string
260+ Attributes UserAttributes
231261}
232262
233263type LdapUser struct {
@@ -254,6 +284,7 @@ type UserContext struct {
254284 OAuthName string
255285 OAuthSub string
256286 LdapGroups string
287+ Attributes UserAttributes
257288}
258289
259290// API responses and queries
0 commit comments