MCPcopy
hub / github.com/vouch/vouch-proxy / PrepareUserData

Method PrepareUserData

pkg/structs/structs.go:60–75  ·  view source on GitHub ↗

PrepareUserData implement PersonalData interface

()

Source from the content-addressed store, hash-verified

58
59// PrepareUserData implement PersonalData interface
60func (u *AzureUser) PrepareUserData() {
61 // AzureAD uses the 'upn' (UserPrincipleName) field to store the email address of the user
62 // See https://docs.microsoft.com/en-us/azure/active-directory/hybrid/plan-connect-userprincipalname
63
64 if u.Username == "" {
65 u.Username = u.UPN
66 }
67
68 if u.Username == "" {
69 u.Username = u.PreferredUsername
70 }
71
72 if u.Email == "" {
73 u.Email = u.UPN
74 }
75}
76
77// GoogleUser is a retrieved and authentiacted user from Google.
78// unused!

Callers 1

GetUserInfoMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected