zitadel/internal/idp/providers/ldap/user.go
Stefan Benz 586495a0be
feat: add management for ldap idp template (#5220)
Add management functionality for LDAP idps with templates and the basic functionality for the LDAP provider, which can then be used with a separate login page in the future.

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>
2023-02-15 08:14:59 +00:00

92 lines
1.7 KiB
Go

package ldap
import "golang.org/x/text/language"
type User struct {
id string
firstName string
lastName string
displayName string
nickName string
preferredUsername string
email string
emailVerified bool
phone string
phoneVerified bool
preferredLanguage language.Tag
avatarURL string
profile string
}
func NewUser(
id string,
firstName string,
lastName string,
displayName string,
nickName string,
preferredUsername string,
email string,
emailVerified bool,
phone string,
phoneVerified bool,
preferredLanguage language.Tag,
avatarURL string,
profile string,
) *User {
return &User{
id,
firstName,
lastName,
displayName,
nickName,
preferredUsername,
email,
emailVerified,
phone,
phoneVerified,
preferredLanguage,
avatarURL,
profile,
}
}
func (u *User) GetID() string {
return u.id
}
func (u *User) GetFirstName() string {
return u.firstName
}
func (u *User) GetLastName() string {
return u.lastName
}
func (u *User) GetDisplayName() string {
return u.displayName
}
func (u *User) GetNickname() string {
return u.nickName
}
func (u *User) GetPreferredUsername() string {
return u.preferredUsername
}
func (u *User) GetEmail() string {
return u.email
}
func (u *User) IsEmailVerified() bool {
return u.emailVerified
}
func (u *User) GetPhone() string {
return u.phone
}
func (u *User) IsPhoneVerified() bool {
return u.phoneVerified
}
func (u *User) GetPreferredLanguage() language.Tag {
return u.preferredLanguage
}
func (u *User) GetAvatarURL() string {
return u.avatarURL
}
func (u *User) GetProfile() string {
return u.profile
}