mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 11:34:26 +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>
71 lines
1.7 KiB
Go
71 lines
1.7 KiB
Go
package model
|
|
|
|
import (
|
|
"github.com/caos/zitadel/internal/crypto"
|
|
"github.com/caos/zitadel/internal/model"
|
|
"time"
|
|
)
|
|
|
|
type IDPConfigView struct {
|
|
AggregateID string
|
|
IDPConfigID string
|
|
Name string
|
|
LogoSrc []byte
|
|
State IDPConfigState
|
|
CreationDate time.Time
|
|
ChangeDate time.Time
|
|
Sequence uint64
|
|
IDPProviderType IDPProviderType
|
|
|
|
IsOIDC bool
|
|
OIDCClientID string
|
|
OIDCClientSecret *crypto.CryptoValue
|
|
OIDCIssuer string
|
|
OIDCScopes []string
|
|
OIDCIDPDisplayNameMapping OIDCMappingField
|
|
OIDCUsernameMapping OIDCMappingField
|
|
}
|
|
|
|
type IDPConfigSearchRequest struct {
|
|
Offset uint64
|
|
Limit uint64
|
|
SortingColumn IDPConfigSearchKey
|
|
Asc bool
|
|
Queries []*IDPConfigSearchQuery
|
|
}
|
|
|
|
type IDPConfigSearchKey int32
|
|
|
|
const (
|
|
IDPConfigSearchKeyUnspecified IDPConfigSearchKey = iota
|
|
IDPConfigSearchKeyName
|
|
IDPConfigSearchKeyAggregateID
|
|
IDPConfigSearchKeyIdpConfigID
|
|
IDPConfigSearchKeyIdpProviderType
|
|
)
|
|
|
|
type IDPConfigSearchQuery struct {
|
|
Key IDPConfigSearchKey
|
|
Method model.SearchMethod
|
|
Value interface{}
|
|
}
|
|
|
|
type IDPConfigSearchResponse struct {
|
|
Offset uint64
|
|
Limit uint64
|
|
TotalResult uint64
|
|
Result []*IDPConfigView
|
|
Sequence uint64
|
|
Timestamp time.Time
|
|
}
|
|
|
|
func (r *IDPConfigSearchRequest) EnsureLimit(limit uint64) {
|
|
if r.Limit == 0 || r.Limit > limit {
|
|
r.Limit = limit
|
|
}
|
|
}
|
|
|
|
func (r *IDPConfigSearchRequest) AppendMyOrgQuery(orgID, iamID string) {
|
|
r.Queries = append(r.Queries, &IDPConfigSearchQuery{Key: IDPConfigSearchKeyAggregateID, Method: model.SearchMethodIsOneOf, Value: []string{orgID, iamID}})
|
|
}
|