/
wax_boy
/
semaphore_custom
Обзор
Документация
Войти
/
wax_boy
/
semaphore_custom
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
develop
db/UserExternalIdentity.go
23 строки
875 B
Denis Gukov
feat(auth): link LDAP/OIDC logins via external identity instead of email matching (#4025)
14 июл 2026, 08:14
Не верифицирован
14 июл 2026, 08:14
1201b3c
Код
Авторство
О чём код?
package db import "time" // Identity type values stored in user__external_identity.type (varchar(4)). const ( IdentityTypeLdap = "ldap" IdentityTypeOidc = "oidc" ) // UserExternalIdentity links a Semaphore user to an identity at an external // auth provider. Provider is "ldap" or a key of the oidc_providers config map. // ExternalUID is the provider's stable user ID: the OIDC "sub" claim or the // LDAP entry DN. Matching by this pair (instead of by email) prevents account // takeover via reused/unverified emails. type UserExternalIdentity struct { ID int `db:"id" json:"id"` UserID int `db:"user_id" json:"user_id"` Type string `db:"type" json:"type"` Provider string `db:"provider" json:"provider"` ExternalUID string `db:"external_uid" json:"external_uid"` Created time.Time `db:"created" json:"created"` }