mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 03:24:26 +00:00
0bd27bc8e4
* fix: add prompt on oidc rp * fix: add prompt on oidc rp * fix: translation * fix: translation * fix: not existing login policy * fix: login policy * fix: identity provider detail * fix: idp update * fix: idps in login policy * fix: lint * fix: scss * fix: external idps on auth user detail * fix: idp create mapping fields * fix: remove idp provider * fix: angular lint * fix: login policy view * fix: translations
64 lines
1.7 KiB
Go
64 lines
1.7 KiB
Go
package model
|
|
|
|
import (
|
|
iam_model "github.com/caos/zitadel/internal/iam/model"
|
|
global_model "github.com/caos/zitadel/internal/model"
|
|
"github.com/caos/zitadel/internal/view/repository"
|
|
)
|
|
|
|
type IDPProviderSearchRequest iam_model.IDPProviderSearchRequest
|
|
type IDPProviderSearchQuery iam_model.IDPProviderSearchQuery
|
|
type IDPProviderSearchKey iam_model.IDPProviderSearchKey
|
|
|
|
func (req IDPProviderSearchRequest) GetLimit() uint64 {
|
|
return req.Limit
|
|
}
|
|
|
|
func (req IDPProviderSearchRequest) GetOffset() uint64 {
|
|
return req.Offset
|
|
}
|
|
|
|
func (req IDPProviderSearchRequest) GetSortingColumn() repository.ColumnKey {
|
|
if req.SortingColumn == iam_model.IDPProviderSearchKeyUnspecified {
|
|
return nil
|
|
}
|
|
return IDPProviderSearchKey(req.SortingColumn)
|
|
}
|
|
|
|
func (req IDPProviderSearchRequest) GetAsc() bool {
|
|
return req.Asc
|
|
}
|
|
|
|
func (req IDPProviderSearchRequest) GetQueries() []repository.SearchQuery {
|
|
result := make([]repository.SearchQuery, len(req.Queries))
|
|
for i, q := range req.Queries {
|
|
result[i] = IDPProviderSearchQuery{Key: q.Key, Value: q.Value, Method: q.Method}
|
|
}
|
|
return result
|
|
}
|
|
|
|
func (req IDPProviderSearchQuery) GetKey() repository.ColumnKey {
|
|
return IDPProviderSearchKey(req.Key)
|
|
}
|
|
|
|
func (req IDPProviderSearchQuery) GetMethod() global_model.SearchMethod {
|
|
return req.Method
|
|
}
|
|
|
|
func (req IDPProviderSearchQuery) GetValue() interface{} {
|
|
return req.Value
|
|
}
|
|
|
|
func (key IDPProviderSearchKey) ToColumnName() string {
|
|
switch iam_model.IDPProviderSearchKey(key) {
|
|
case iam_model.IDPProviderSearchKeyAggregateID:
|
|
return IDPProviderKeyAggregateID
|
|
case iam_model.IDPProviderSearchKeyIdpConfigID:
|
|
return IDPProviderKeyIdpConfigID
|
|
case iam_model.IDPProviderSearchKeyState:
|
|
return IDPProviderKeyState
|
|
default:
|
|
return ""
|
|
}
|
|
}
|