zitadel/internal/iam/model/idp_config_view.go
Fabi 4eb380a825
fix: IDP login button styles (#869)
* fix: styling type on idp

* fix: google styling

* fix: google styling

* fix: google styling

* fix: remove logo src from angular

* fix: pr requests

* fix drop column migration

* fix: drop column migration

* fix: grant id
2020-10-19 17:10:02 +02:00

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
StylingType IDPStylingType
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}})
}