2020-05-11 10:16:29 +00:00
|
|
|
package model
|
|
|
|
|
|
|
|
import (
|
2021-03-01 07:48:50 +00:00
|
|
|
"github.com/caos/zitadel/internal/domain"
|
2020-05-11 10:16:29 +00:00
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
type ApplicationView struct {
|
2020-10-16 05:49:38 +00:00
|
|
|
ID string
|
|
|
|
ProjectID string
|
|
|
|
Name string
|
|
|
|
CreationDate time.Time
|
|
|
|
ChangeDate time.Time
|
|
|
|
State AppState
|
|
|
|
ProjectRoleAssertion bool
|
|
|
|
ProjectRoleCheck bool
|
2020-05-11 10:16:29 +00:00
|
|
|
|
|
|
|
IsOIDC bool
|
2020-08-10 07:34:56 +00:00
|
|
|
OIDCVersion OIDCVersion
|
2020-05-11 10:16:29 +00:00
|
|
|
OIDCClientID string
|
|
|
|
OIDCRedirectUris []string
|
|
|
|
OIDCResponseTypes []OIDCResponseType
|
|
|
|
OIDCGrantTypes []OIDCGrantType
|
|
|
|
OIDCApplicationType OIDCApplicationType
|
|
|
|
OIDCAuthMethodType OIDCAuthMethodType
|
|
|
|
OIDCPostLogoutRedirectUris []string
|
2020-08-10 07:34:56 +00:00
|
|
|
NoneCompliant bool
|
|
|
|
ComplianceProblems []string
|
|
|
|
DevMode bool
|
2020-08-24 08:06:55 +00:00
|
|
|
OriginAllowList []string
|
2020-10-16 05:49:38 +00:00
|
|
|
AccessTokenType OIDCTokenType
|
|
|
|
IDTokenRoleAssertion bool
|
|
|
|
AccessTokenRoleAssertion bool
|
2020-11-27 13:10:52 +00:00
|
|
|
IDTokenUserinfoAssertion bool
|
|
|
|
ClockSkew time.Duration
|
2020-05-11 10:16:29 +00:00
|
|
|
|
|
|
|
Sequence uint64
|
|
|
|
}
|
|
|
|
|
|
|
|
type ApplicationSearchRequest struct {
|
|
|
|
Offset uint64
|
|
|
|
Limit uint64
|
2020-06-23 12:47:47 +00:00
|
|
|
SortingColumn AppSearchKey
|
2020-05-11 10:16:29 +00:00
|
|
|
Asc bool
|
|
|
|
Queries []*ApplicationSearchQuery
|
|
|
|
}
|
|
|
|
|
2020-06-23 12:47:47 +00:00
|
|
|
type AppSearchKey int32
|
2020-05-11 10:16:29 +00:00
|
|
|
|
|
|
|
const (
|
2020-06-23 12:47:47 +00:00
|
|
|
AppSearchKeyUnspecified AppSearchKey = iota
|
|
|
|
AppSearchKeyName
|
|
|
|
AppSearchKeyOIDCClientID
|
|
|
|
AppSearchKeyProjectID
|
|
|
|
AppSearchKeyAppID
|
2020-05-11 10:16:29 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type ApplicationSearchQuery struct {
|
2020-06-23 12:47:47 +00:00
|
|
|
Key AppSearchKey
|
2021-03-01 07:48:50 +00:00
|
|
|
Method domain.SearchMethod
|
2020-06-16 09:40:18 +00:00
|
|
|
Value interface{}
|
2020-05-11 10:16:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type ApplicationSearchResponse struct {
|
|
|
|
Offset uint64
|
|
|
|
Limit uint64
|
|
|
|
TotalResult uint64
|
|
|
|
Result []*ApplicationView
|
2020-07-15 11:24:36 +00:00
|
|
|
Sequence uint64
|
|
|
|
Timestamp time.Time
|
2020-05-11 10:16:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *ApplicationSearchRequest) EnsureLimit(limit uint64) {
|
|
|
|
if r.Limit == 0 || r.Limit > limit {
|
|
|
|
r.Limit = limit
|
|
|
|
}
|
|
|
|
}
|