mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 19:14:23 +00:00
320ddfa46d
* feat: add/ remove external idps * feat: external idp add /remove * fix: auth proto * fix: handle login * feat: loginpolicy on authrequest * feat: idp providers on login * feat: link external idp * fix: check login policy on check username * feat: add mapping fields for idp config * feat: use user org id if existing * feat: use user org id if existing * feat: register external user * feat: register external user * feat: user linking * feat: user linking * feat: design external login * feat: design external login * fix: tests * fix: regenerate login design * feat: next step test linking process * feat: next step test linking process * feat: cascade remove external idps on user * fix: tests * fix: tests * feat: external idp requsts on users * fix: generate protos * feat: login styles * feat: login styles * fix: link user * fix: register user on specifig org * fix: user linking * fix: register external, linking auto * fix: remove unnecessary request from proto * fix: tests * fix: new oidc package * fix: migration version * fix: policy permissions * Update internal/ui/login/static/i18n/en.yaml Co-authored-by: Livio Amstutz <livio.a@gmail.com> * Update internal/ui/login/static/i18n/en.yaml Co-authored-by: Livio Amstutz <livio.a@gmail.com> * Update internal/ui/login/handler/renderer.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * Update internal/ui/login/handler/renderer.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * fix: pr requests * Update internal/ui/login/handler/link_users_handler.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * fix: pr requests * fix: pr requests * fix: pr requests * fix: login name size * fix: profile image light * fix: colors * fix: pr requests * fix: remove redirect uri validator * fix: remove redirect uri validator Co-authored-by: Livio Amstutz <livio.a@gmail.com>
62 lines
1.3 KiB
Go
62 lines
1.3 KiB
Go
package model
|
|
|
|
import (
|
|
"github.com/caos/zitadel/internal/model"
|
|
"time"
|
|
)
|
|
|
|
type ExternalIDPView struct {
|
|
UserID string
|
|
IDPConfigID string
|
|
ExternalUserID string
|
|
IDPName string
|
|
UserDisplayName string
|
|
CreationDate time.Time
|
|
ChangeDate time.Time
|
|
ResourceOwner string
|
|
Sequence uint64
|
|
}
|
|
|
|
type ExternalIDPSearchRequest struct {
|
|
Offset uint64
|
|
Limit uint64
|
|
SortingColumn ExternalIDPSearchKey
|
|
Asc bool
|
|
Queries []*ExternalIDPSearchQuery
|
|
}
|
|
|
|
type ExternalIDPSearchKey int32
|
|
|
|
const (
|
|
ExternalIDPSearchKeyUnspecified ExternalIDPSearchKey = iota
|
|
ExternalIDPSearchKeyExternalUserID
|
|
ExternalIDPSearchKeyUserID
|
|
ExternalIDPSearchKeyIdpConfigID
|
|
ExternalIDPSearchKeyResourceOwner
|
|
)
|
|
|
|
type ExternalIDPSearchQuery struct {
|
|
Key ExternalIDPSearchKey
|
|
Method model.SearchMethod
|
|
Value interface{}
|
|
}
|
|
|
|
type ExternalIDPSearchResponse struct {
|
|
Offset uint64
|
|
Limit uint64
|
|
TotalResult uint64
|
|
Result []*ExternalIDPView
|
|
Sequence uint64
|
|
Timestamp time.Time
|
|
}
|
|
|
|
func (r *ExternalIDPSearchRequest) EnsureLimit(limit uint64) {
|
|
if r.Limit == 0 || r.Limit > limit {
|
|
r.Limit = limit
|
|
}
|
|
}
|
|
|
|
func (r *ExternalIDPSearchRequest) AppendUserQuery(userID string) {
|
|
r.Queries = append(r.Queries, &ExternalIDPSearchQuery{Key: ExternalIDPSearchKeyUserID, Method: model.SearchMethodEquals, Value: userID})
|
|
}
|