model

package
v1.87.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IdpProviderViewsToDomain

func IdpProviderViewsToDomain(idpProviders []*IDPProviderView) []*domain.IDPProvider

Types

type CustomTextSearchKey

type CustomTextSearchKey int32
const (
	CustomTextSearchKeyUnspecified CustomTextSearchKey = iota
	CustomTextSearchKeyAggregateID
	CustomTextSearchKeyTemplate
	CustomTextSearchKeyLanguage
	CustomTextSearchKeyKey
)

type CustomTextSearchQuery

type CustomTextSearchQuery struct {
	Key    CustomTextSearchKey
	Method domain.SearchMethod
	Value  interface{}
}

type CustomTextSearchRequest

type CustomTextSearchRequest struct {
	Offset        uint64
	Limit         uint64
	SortingColumn CustomTextSearchKey
	Asc           bool
	Queries       []*CustomTextSearchQuery
}

type CustomTextSearchResponse

type CustomTextSearchResponse struct {
	Offset      uint64
	Limit       uint64
	TotalResult uint64
	Result      []*CustomTextView
	Sequence    uint64
	Timestamp   time.Time
}

type CustomTextView

type CustomTextView struct {
	AggregateID string
	Template    string
	Language    language.Tag
	Key         string
	Text        string

	CreationDate time.Time
	ChangeDate   time.Time
	Sequence     uint64
}

type IAM

type IAM struct {
	es_models.ObjectRoot
	GlobalOrgID  string
	IAMProjectID string
	SetUpDone    domain.Step
	SetUpStarted domain.Step
	Members      []*IAMMember
}

type IAMMember

type IAMMember struct {
	es_models.ObjectRoot

	UserID string
	Roles  []string
}

func NewIAMMember

func NewIAMMember(iamID, userID string) *IAMMember

func (*IAMMember) IsValid

func (i *IAMMember) IsValid() bool

type IAMMemberSearchKey

type IAMMemberSearchKey int32
const (
	IAMMemberSearchKeyUnspecified IAMMemberSearchKey = iota
	IAMMemberSearchKeyUserName
	IAMMemberSearchKeyEmail
	IAMMemberSearchKeyFirstName
	IAMMemberSearchKeyLastName
	IAMMemberSearchKeyIamID
	IAMMemberSearchKeyUserID
)

type IAMMemberSearchQuery

type IAMMemberSearchQuery struct {
	Key    IAMMemberSearchKey
	Method domain.SearchMethod
	Value  interface{}
}

type IAMMemberSearchRequest

type IAMMemberSearchRequest struct {
	Offset        uint64
	Limit         uint64
	SortingColumn IAMMemberSearchKey
	Asc           bool
	Queries       []*IAMMemberSearchQuery
}

func (*IAMMemberSearchRequest) EnsureLimit

func (r *IAMMemberSearchRequest) EnsureLimit(limit uint64) error

type IAMMemberSearchResponse

type IAMMemberSearchResponse struct {
	Offset      uint64
	Limit       uint64
	TotalResult uint64
	Result      []*IAMMemberView
	Sequence    uint64
	Timestamp   time.Time
}

type IAMMemberView

type IAMMemberView struct {
	UserID             string
	IAMID              string
	UserName           string
	Email              string
	FirstName          string
	LastName           string
	DisplayName        string
	PreferredLoginName string
	AvatarURL          string
	UserResourceOwner  string
	Roles              []string
	CreationDate       time.Time
	ChangeDate         time.Time
	Sequence           uint64
}

type IDPConfig

type IDPConfig struct {
	es_models.ObjectRoot
	IDPConfigID  string
	Type         IdpConfigType
	Name         string
	StylingType  IDPStylingType
	State        IDPConfigState
	OIDCConfig   *OIDCIDPConfig
	JWTIDPConfig *JWTIDPConfig
}

func NewIDPConfig

func NewIDPConfig(iamID, idpID string) *IDPConfig

func (*IDPConfig) IsValid

func (idp *IDPConfig) IsValid(includeConfig bool) bool

type IDPConfigSearchKey

type IDPConfigSearchKey int32
const (
	IDPConfigSearchKeyUnspecified IDPConfigSearchKey = iota
	IDPConfigSearchKeyName
	IDPConfigSearchKeyAggregateID
	IDPConfigSearchKeyIdpConfigID
	IDPConfigSearchKeyIdpProviderType
)

type IDPConfigSearchQuery

type IDPConfigSearchQuery struct {
	Key    IDPConfigSearchKey
	Method domain.SearchMethod
	Value  interface{}
}

type IDPConfigSearchRequest

type IDPConfigSearchRequest struct {
	Offset        uint64
	Limit         uint64
	SortingColumn IDPConfigSearchKey
	Asc           bool
	Queries       []*IDPConfigSearchQuery
}

func (*IDPConfigSearchRequest) AppendMyOrgQuery

func (r *IDPConfigSearchRequest) AppendMyOrgQuery(orgID, iamID string)

func (*IDPConfigSearchRequest) EnsureLimit

func (r *IDPConfigSearchRequest) EnsureLimit(limit uint64) error

type IDPConfigSearchResponse

type IDPConfigSearchResponse struct {
	Offset      uint64
	Limit       uint64
	TotalResult uint64
	Result      []*IDPConfigView
	Sequence    uint64
	Timestamp   time.Time
}

type IDPConfigState

type IDPConfigState int32
const (
	IDPConfigStateActive IDPConfigState = iota
	IDPConfigStateInactive
	IDPConfigStateRemoved
)

type IDPConfigView

type IDPConfigView struct {
	AggregateID     string
	IDPConfigID     string
	Name            string
	StylingType     IDPStylingType
	AutoRegister    bool
	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
	OAuthAuthorizationEndpoint string
	OAuthTokenEndpoint         string
	JWTEndpoint                string
	JWTIssuer                  string
	JWTKeysEndpoint            string
	JWTHeaderName              string
}

type IDPProvider

type IDPProvider struct {
	models.ObjectRoot
	Type        IDPProviderType
	IDPConfigID string
}

func (*IDPProvider) IsValid

func (p *IDPProvider) IsValid() bool

type IDPProviderSearchKey

type IDPProviderSearchKey int32
const (
	IDPProviderSearchKeyUnspecified IDPProviderSearchKey = iota
	IDPProviderSearchKeyAggregateID
	IDPProviderSearchKeyIdpConfigID
	IDPProviderSearchKeyState
)

type IDPProviderSearchQuery

type IDPProviderSearchQuery struct {
	Key    IDPProviderSearchKey
	Method domain.SearchMethod
	Value  interface{}
}

type IDPProviderSearchRequest

type IDPProviderSearchRequest struct {
	Offset        uint64
	Limit         uint64
	SortingColumn IDPProviderSearchKey
	Asc           bool
	Queries       []*IDPProviderSearchQuery
}

func (*IDPProviderSearchRequest) AppendAggregateIDQuery

func (r *IDPProviderSearchRequest) AppendAggregateIDQuery(aggregateID string)

func (*IDPProviderSearchRequest) EnsureLimit

func (r *IDPProviderSearchRequest) EnsureLimit(limit uint64) error

type IDPProviderSearchResponse

type IDPProviderSearchResponse struct {
	Offset      uint64
	Limit       uint64
	TotalResult uint64
	Result      []*IDPProviderView
	Sequence    uint64
	Timestamp   time.Time
}

type IDPProviderType

type IDPProviderType int32
const (
	IDPProviderTypeSystem IDPProviderType = iota
	IDPProviderTypeOrg
)

type IDPProviderView

type IDPProviderView struct {
	AggregateID     string
	IDPConfigID     string
	IDPProviderType IDPProviderType
	Name            string
	StylingType     IDPStylingType
	IDPConfigType   IdpConfigType
	IDPState        IDPConfigState

	CreationDate time.Time
	ChangeDate   time.Time
	Sequence     uint64
}

type IDPStylingType

type IDPStylingType int32
const (
	IDPStylingTypeUnspecified IDPStylingType = iota
	IDPStylingTypeGoogle
)

func (IDPStylingType) GetCSSClass

func (st IDPStylingType) GetCSSClass() string

type IdpConfigType

type IdpConfigType int32
const (
	IDPConfigTypeOIDC IdpConfigType = iota
	IDPConfigTypeSAML
	IDPConfigTypeJWT
)

type JWTIDPConfig

type JWTIDPConfig struct {
	es_models.ObjectRoot
	IDPConfigID  string
	JWTEndpoint  string
	Issuer       string
	KeysEndpoint string
}

type LabelPolicy

type LabelPolicy struct {
	models.ObjectRoot

	State               PolicyState
	Default             bool
	PrimaryColor        string
	BackgroundColor     string
	FontColor           string
	WarnColor           string
	PrimaryColorDark    string
	BackgroundColorDark string
	FontColorDark       string
	WarnColorDark       string
	HideLoginNameSuffix bool
}

func (*LabelPolicy) IsValid

func (p *LabelPolicy) IsValid() bool

type LabelPolicySearchKey

type LabelPolicySearchKey int32
const (
	LabelPolicySearchKeyUnspecified LabelPolicySearchKey = iota
	LabelPolicySearchKeyAggregateID
	LabelPolicySearchKeyState
)

type LabelPolicySearchQuery

type LabelPolicySearchQuery struct {
	Key    LabelPolicySearchKey
	Method domain.SearchMethod
	Value  interface{}
}

type LabelPolicySearchRequest

type LabelPolicySearchRequest struct {
	Offset        uint64
	Limit         uint64
	SortingColumn LabelPolicySearchKey
	Asc           bool
	Queries       []*LabelPolicySearchQuery
}

type LabelPolicySearchResponse

type LabelPolicySearchResponse struct {
	Offset      uint64
	Limit       uint64
	TotalResult uint64
	Result      []*LabelPolicyView
	Sequence    uint64
	Timestamp   time.Time
}

type LabelPolicyView

type LabelPolicyView struct {
	AggregateID     string
	PrimaryColor    string
	BackgroundColor string
	WarnColor       string
	FontColor       string
	LogoURL         string
	IconURL         string

	PrimaryColorDark    string
	BackgroundColorDark string
	WarnColorDark       string
	FontColorDark       string
	LogoDarkURL         string
	IconDarkURL         string
	FontURL             string

	HideLoginNameSuffix bool
	ErrorMsgPopup       bool
	DisableWatermark    bool

	Default bool

	CreationDate time.Time
	ChangeDate   time.Time
	Sequence     uint64
}

type LockoutPolicy

type LockoutPolicy struct {
	models.ObjectRoot

	State               PolicyState
	MaxPasswordAttempts uint64
	ShowLockOutFailures bool
}

type LockoutPolicySearchKey

type LockoutPolicySearchKey int32
const (
	LockoutPolicySearchKeyUnspecified LockoutPolicySearchKey = iota
	LockoutPolicySearchKeyAggregateID
)

type LockoutPolicySearchQuery

type LockoutPolicySearchQuery struct {
	Key    LockoutPolicySearchKey
	Method domain.SearchMethod
	Value  interface{}
}

type LockoutPolicySearchRequest

type LockoutPolicySearchRequest struct {
	Offset        uint64
	Limit         uint64
	SortingColumn LockoutPolicySearchKey
	Asc           bool
	Queries       []*LockoutPolicySearchQuery
}

type LockoutPolicySearchResponse

type LockoutPolicySearchResponse struct {
	Offset      uint64
	Limit       uint64
	TotalResult uint64
	Result      []*LockoutPolicyView
	Sequence    uint64
	Timestamp   time.Time
}

type LockoutPolicyView

type LockoutPolicyView struct {
	AggregateID         string
	MaxPasswordAttempts uint64
	ShowLockOutFailures bool
	Default             bool

	CreationDate time.Time
	ChangeDate   time.Time
	Sequence     uint64
}

type LoginPolicy

type LoginPolicy struct {
	models.ObjectRoot

	State                 PolicyState
	Default               bool
	AllowUsernamePassword bool
	AllowRegister         bool
	AllowExternalIdp      bool
	IDPProviders          []*IDPProvider
	ForceMFA              bool
	SecondFactors         []domain.SecondFactorType
	MultiFactors          []domain.MultiFactorType
	PasswordlessType      PasswordlessType
}

func (*LoginPolicy) GetIdpProvider

func (p *LoginPolicy) GetIdpProvider(id string) (int, *IDPProvider)

func (*LoginPolicy) GetMultiFactor

func (p *LoginPolicy) GetMultiFactor(mfaType domain.MultiFactorType) (int, domain.MultiFactorType)

func (*LoginPolicy) GetSecondFactor

func (p *LoginPolicy) GetSecondFactor(mfaType domain.SecondFactorType) (int, domain.SecondFactorType)

func (*LoginPolicy) IsValid

func (p *LoginPolicy) IsValid() bool

type LoginPolicySearchKey

type LoginPolicySearchKey int32
const (
	LoginPolicySearchKeyUnspecified LoginPolicySearchKey = iota
	LoginPolicySearchKeyAggregateID
	LoginPolicySearchKeyDefault
)

type LoginPolicySearchQuery

type LoginPolicySearchQuery struct {
	Key    LoginPolicySearchKey
	Method domain.SearchMethod
	Value  interface{}
}

type LoginPolicySearchRequest

type LoginPolicySearchRequest struct {
	Offset        uint64
	Limit         uint64
	SortingColumn LoginPolicySearchKey
	Asc           bool
	Queries       []*LoginPolicySearchQuery
}

type LoginPolicySearchResponse

type LoginPolicySearchResponse struct {
	Offset      uint64
	Limit       uint64
	TotalResult uint64
	Result      []*LoginPolicyView
	Sequence    uint64
	Timestamp   time.Time
}

type LoginPolicyView

type LoginPolicyView struct {
	AggregateID           string
	AllowUsernamePassword bool
	AllowRegister         bool
	AllowExternalIDP      bool
	ForceMFA              bool
	HidePasswordReset     bool
	PasswordlessType      PasswordlessType
	SecondFactors         []domain.SecondFactorType
	MultiFactors          []domain.MultiFactorType
	Default               bool

	CreationDate time.Time
	ChangeDate   time.Time
	Sequence     uint64
}

func (*LoginPolicyView) HasMultiFactors

func (p *LoginPolicyView) HasMultiFactors() bool

func (*LoginPolicyView) HasSecondFactors

func (p *LoginPolicyView) HasSecondFactors() bool

func (*LoginPolicyView) ToLoginPolicyDomain

func (p *LoginPolicyView) ToLoginPolicyDomain() *domain.LoginPolicy

type MFASearchKey

type MFASearchKey int32
const (
	MFASearchKeyUnspecified MFASearchKey = iota
	MFASearchKeyAggregateID
)

type MFASearchQuery

type MFASearchQuery struct {
	Key    MFASearchKey
	Method domain.SearchMethod
	Value  interface{}
}

type MailTemplate

type MailTemplate struct {
	models.ObjectRoot

	State    PolicyState
	Default  bool
	Template []byte
}

func (*MailTemplate) IsValid

func (p *MailTemplate) IsValid() bool

type MailText

type MailText struct {
	models.ObjectRoot

	State        PolicyState
	Default      bool
	MailTextType string
	Language     string
	Title        string
	PreHeader    string
	Subject      string
	Greeting     string
	Text         string
	ButtonText   string
	FooterText   string
}

func (*MailText) IsValid

func (p *MailText) IsValid() bool

type MailTexts

type MailTexts struct {
	Texts   []*MailText
	Default bool
}

type MessageTextSearchKey

type MessageTextSearchKey int32
const (
	MessageTextSearchKeyUnspecified MessageTextSearchKey = iota
	MessageTextSearchKeyAggregateID
	MessageTextSearchKeyMessageTextType
	MessageTextSearchKeyLanguage
)

type MessageTextSearchQuery

type MessageTextSearchQuery struct {
	Key    MessageTextSearchKey
	Method domain.SearchMethod
	Value  interface{}
}

type MessageTextSearchRequest

type MessageTextSearchRequest struct {
	Offset        uint64
	Limit         uint64
	SortingColumn MessageTextSearchKey
	Asc           bool
	Queries       []*MessageTextSearchQuery
}

type MessageTextSearchResponse

type MessageTextSearchResponse struct {
	Offset      uint64
	Limit       uint64
	TotalResult uint64
	Result      []*MessageTextView
	Sequence    uint64
	Timestamp   time.Time
}

type MessageTextView

type MessageTextView struct {
	AggregateID     string
	MessageTextType string
	Language        language.Tag
	Title           string
	PreHeader       string
	Subject         string
	Greeting        string
	Text            string
	ButtonText      string
	FooterText      string
	Default         bool

	CreationDate time.Time
	ChangeDate   time.Time
	Sequence     uint64
}

type MultiFactorType

type MultiFactorType int32
const (
	MultiFactorTypeUnspecified MultiFactorType = iota
	MultiFactorTypeU2FWithPIN
)

type MultiFactorsSearchRequest

type MultiFactorsSearchRequest struct {
	Offset  uint64
	Limit   uint64
	Asc     bool
	Queries []*MFASearchQuery
}

func (*MultiFactorsSearchRequest) AppendAggregateIDQuery

func (r *MultiFactorsSearchRequest) AppendAggregateIDQuery(aggregateID string)

type MultiFactorsSearchResponse

type MultiFactorsSearchResponse struct {
	TotalResult uint64
	Result      []domain.MultiFactorType
}

type OIDCIDPConfig

type OIDCIDPConfig struct {
	es_models.ObjectRoot
	IDPConfigID           string
	ClientID              string
	ClientSecret          *crypto.CryptoValue
	ClientSecretString    string
	Issuer                string
	Scopes                []string
	IDPDisplayNameMapping OIDCMappingField
	UsernameMapping       OIDCMappingField
}

func (*OIDCIDPConfig) CryptSecret

func (oi *OIDCIDPConfig) CryptSecret(crypt crypto.Crypto) error

func (*OIDCIDPConfig) IsValid

func (oi *OIDCIDPConfig) IsValid(withSecret bool) bool

type OIDCMappingField

type OIDCMappingField int32
const (
	OIDCMappingFieldUnspecified OIDCMappingField = iota
	OIDCMappingFieldPreferredLoginName
	OIDCMappingFieldEmail
)

type OrgIAMPolicy

type OrgIAMPolicy struct {
	models.ObjectRoot

	State                 PolicyState
	UserLoginMustBeDomain bool
	Default               bool
}

type PasswordAgePolicy

type PasswordAgePolicy struct {
	models.ObjectRoot

	State          PolicyState
	MaxAgeDays     uint64
	ExpireWarnDays uint64
}

type PasswordAgePolicySearchKey

type PasswordAgePolicySearchKey int32
const (
	PasswordAgePolicySearchKeyUnspecified PasswordAgePolicySearchKey = iota
	PasswordAgePolicySearchKeyAggregateID
)

type PasswordAgePolicySearchQuery

type PasswordAgePolicySearchQuery struct {
	Key    PasswordAgePolicySearchKey
	Method domain.SearchMethod
	Value  interface{}
}

type PasswordAgePolicySearchRequest

type PasswordAgePolicySearchRequest struct {
	Offset        uint64
	Limit         uint64
	SortingColumn PasswordAgePolicySearchKey
	Asc           bool
	Queries       []*PasswordAgePolicySearchQuery
}

type PasswordAgePolicySearchResponse

type PasswordAgePolicySearchResponse struct {
	Offset      uint64
	Limit       uint64
	TotalResult uint64
	Result      []*PasswordAgePolicyView
	Sequence    uint64
	Timestamp   time.Time
}

type PasswordAgePolicyView

type PasswordAgePolicyView struct {
	AggregateID    string
	MaxAgeDays     uint64
	ExpireWarnDays uint64
	Default        bool

	CreationDate time.Time
	ChangeDate   time.Time
	Sequence     uint64
}

type PasswordComplexityPolicy

type PasswordComplexityPolicy struct {
	models.ObjectRoot

	State        PolicyState
	MinLength    uint64
	HasLowercase bool
	HasUppercase bool
	HasNumber    bool
	HasSymbol    bool

	Default bool
}

func (*PasswordComplexityPolicy) Check

func (p *PasswordComplexityPolicy) Check(password string) error

func (*PasswordComplexityPolicy) IsValid

func (p *PasswordComplexityPolicy) IsValid() error

type PasswordComplexityPolicySearchKey

type PasswordComplexityPolicySearchKey int32
const (
	PasswordComplexityPolicySearchKeyUnspecified PasswordComplexityPolicySearchKey = iota
	PasswordComplexityPolicySearchKeyAggregateID
)

type PasswordComplexityPolicySearchQuery

type PasswordComplexityPolicySearchQuery struct {
	Key    PasswordComplexityPolicySearchKey
	Method domain.SearchMethod
	Value  interface{}
}

type PasswordComplexityPolicySearchRequest

type PasswordComplexityPolicySearchRequest struct {
	Offset        uint64
	Limit         uint64
	SortingColumn PasswordComplexityPolicySearchKey
	Asc           bool
	Queries       []*PasswordComplexityPolicySearchQuery
}

type PasswordComplexityPolicySearchResponse

type PasswordComplexityPolicySearchResponse struct {
	Offset      uint64
	Limit       uint64
	TotalResult uint64
	Result      []*PasswordComplexityPolicyView
	Sequence    uint64
	Timestamp   time.Time
}

type PasswordComplexityPolicyView

type PasswordComplexityPolicyView struct {
	AggregateID  string
	MinLength    uint64
	HasLowercase bool
	HasUppercase bool
	HasNumber    bool
	HasSymbol    bool
	Default      bool

	CreationDate time.Time
	ChangeDate   time.Time
	Sequence     uint64
}

type PasswordlessType

type PasswordlessType int32
const (
	PasswordlessTypeNotAllowed PasswordlessType = iota
	PasswordlessTypeAllowed
)

type PolicyState

type PolicyState int32
const (
	PolicyStateActive PolicyState = iota
	PolicyStateRemoved
)

type PrivacyPolicySearchKey

type PrivacyPolicySearchKey int32
const (
	PrivacyPolicySearchKeyUnspecified PrivacyPolicySearchKey = iota
	PrivacyPolicySearchKeyAggregateID
)

type PrivacyPolicySearchQuery

type PrivacyPolicySearchQuery struct {
	Key    PrivacyPolicySearchKey
	Method domain.SearchMethod
	Value  interface{}
}

type PrivacyPolicySearchRequest

type PrivacyPolicySearchRequest struct {
	Offset        uint64
	Limit         uint64
	SortingColumn PrivacyPolicySearchKey
	Asc           bool
	Queries       []*PrivacyPolicySearchQuery
}

type PrivacyPolicySearchResponse

type PrivacyPolicySearchResponse struct {
	Offset      uint64
	Limit       uint64
	TotalResult uint64
	Result      []*PrivacyPolicyView
	Sequence    uint64
	Timestamp   time.Time
}

type PrivacyPolicyView

type PrivacyPolicyView struct {
	AggregateID string
	TOSLink     string
	PrivacyLink string
	Default     bool

	CreationDate time.Time
	ChangeDate   time.Time
	Sequence     uint64
}

type SecondFactorsSearchRequest

type SecondFactorsSearchRequest struct {
	Queries []*MFASearchQuery
}

func (*SecondFactorsSearchRequest) AppendAggregateIDQuery

func (r *SecondFactorsSearchRequest) AppendAggregateIDQuery(aggregateID string)

type SecondFactorsSearchResponse

type SecondFactorsSearchResponse struct {
	TotalResult uint64
	Result      []domain.SecondFactorType
}

type Step

type Step int
const (
	Step1 Step = iota + 1
	Step2
	Step3
	Step4
	Step5
	Step6
	Step7
	Step8
	Step9
	Step10
	//StepCount marks the the length of possible steps (StepCount-1 == last possible step)
	StepCount
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL