model

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	es_models.ObjectRoot

	Country       string
	Locality      string
	PostalCode    string
	Region        string
	StreetAddress string
}

type Email

type Email struct {
	es_models.ObjectRoot

	EmailAddress    string
	IsEmailVerified bool
}

func (*Email) GenerateEmailCodeIfNeeded

func (e *Email) GenerateEmailCodeIfNeeded(emailGenerator crypto.Generator) (*EmailCode, error)

func (*Email) IsValid

func (e *Email) IsValid() bool

type EmailCode

type EmailCode struct {
	es_models.ObjectRoot

	Code   *crypto.CryptoValue
	Expiry time.Duration
}

func (*EmailCode) GenerateEmailCode

func (code *EmailCode) GenerateEmailCode(emailGenerator crypto.Generator) error

type ExternalIDP added in v0.87.0

type ExternalIDP struct {
	es_models.ObjectRoot

	IDPConfigID string
	UserID      string
	DisplayName string
}

func (*ExternalIDP) IsValid added in v0.87.0

func (idp *ExternalIDP) IsValid() bool

type ExternalIDPSearchKey added in v0.87.0

type ExternalIDPSearchKey int32
const (
	ExternalIDPSearchKeyUnspecified ExternalIDPSearchKey = iota
	ExternalIDPSearchKeyExternalUserID
	ExternalIDPSearchKeyUserID
	ExternalIDPSearchKeyIdpConfigID
	ExternalIDPSearchKeyResourceOwner
)

type ExternalIDPSearchQuery added in v0.87.0

type ExternalIDPSearchQuery struct {
	Key    ExternalIDPSearchKey
	Method domain.SearchMethod
	Value  interface{}
}

type ExternalIDPSearchRequest added in v0.87.0

type ExternalIDPSearchRequest struct {
	Offset        uint64
	Limit         uint64
	SortingColumn ExternalIDPSearchKey
	Asc           bool
	Queries       []*ExternalIDPSearchQuery
}

func (*ExternalIDPSearchRequest) AppendUserQuery added in v0.87.0

func (r *ExternalIDPSearchRequest) AppendUserQuery(userID string)

func (*ExternalIDPSearchRequest) EnsureLimit added in v0.87.0

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

type ExternalIDPSearchResponse added in v0.87.0

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

type ExternalIDPView added in v0.87.0

type ExternalIDPView struct {
	UserID          string
	IDPConfigID     string
	ExternalUserID  string
	IDPName         string
	UserDisplayName string
	CreationDate    time.Time
	ChangeDate      time.Time
	ResourceOwner   string
	Sequence        uint64
}

type Gender

type Gender int32
const (
	GenderUnspecified Gender = iota
	GenderFemale
	GenderMale
	GenderDiverse
)

type HumanView added in v0.81.0

type HumanView struct {
	PasswordSet            bool
	PasswordChangeRequired bool
	UsernameChangeRequired bool
	PasswordChanged        time.Time
	FirstName              string
	LastName               string
	NickName               string
	DisplayName            string
	PreferredLanguage      string
	Gender                 Gender
	Email                  string
	IsEmailVerified        bool
	Phone                  string
	IsPhoneVerified        bool
	Country                string
	Locality               string
	PostalCode             string
	Region                 string
	StreetAddress          string
	OTPState               MFAState
	U2FTokens              []*WebAuthNView
	PasswordlessTokens     []*WebAuthNView
	MFAMaxSetUp            req_model.MFALevel
	MFAInitSkipped         time.Time
	InitRequired           bool
}

type MFAState added in v0.108.0

type MFAState int32
const (
	MFAStateUnspecified MFAState = iota
	MFAStateNotReady
	MFAStateReady
)

type MFAType added in v0.12.0

type MFAType int32
const (
	MFATypeUnspecified MFAType = iota
	MFATypeOTP
	MFATypeU2F
)

type MachineView added in v0.81.0

type MachineView struct {
	LastKeyAdded time.Time
	Name         string
	Description  string
}

type MemberType added in v0.66.0

type MemberType int32
const (
	MemberTypeUnspecified MemberType = iota
	MemberTypeOrganisation
	MemberTypeProject
	MemberTypeProjectGrant
	MemberTypeIam
)

type MultiFactor added in v0.12.0

type MultiFactor struct {
	Type      MFAType
	State     MFAState
	Attribute string
	ID        string
}

type NotificationType

type NotificationType int32
const (
	NotificationTypeEmail NotificationType = iota
	NotificationTypeSms
)

type NotifyUser added in v0.17.0

type NotifyUser struct {
	ID                 string
	CreationDate       time.Time
	ChangeDate         time.Time
	ResourceOwner      string
	UserName           string
	PreferredLoginName string
	LoginNames         []string
	FirstName          string
	LastName           string
	NickName           string
	DisplayName        string
	PreferredLanguage  string
	Gender             Gender
	LastEmail          string
	VerifiedEmail      string
	LastPhone          string
	VerifiedPhone      string
	PasswordSet        bool
	Sequence           uint64
}

type NotifyUserSearchKey added in v0.17.0

type NotifyUserSearchKey int32
const (
	NotifyUserSearchKeyUnspecified NotifyUserSearchKey = iota
	NotifyUserSearchKeyUserID
	NotifyUserSearchKeyResourceOwner
)

type NotifyUserSearchQuery added in v0.17.0

type NotifyUserSearchQuery struct {
	Key    NotifyUserSearchKey
	Method domain.SearchMethod
	Value  string
}

type NotifyUserSearchRequest added in v0.17.0

type NotifyUserSearchRequest struct {
	Offset        uint64
	Limit         uint64
	SortingColumn NotifyUserSearchKey
	Asc           bool
	Queries       []*NotifyUserSearchQuery
}

type NotifyUserSearchResponse added in v0.17.0

type NotifyUserSearchResponse struct {
	Offset      uint64
	Limit       uint64
	TotalResult uint64
	Result      []*UserView
}

type Password

type Password struct {
	es_models.ObjectRoot

	SecretString   string
	SecretCrypto   *crypto.CryptoValue
	ChangeRequired bool
}

func (*Password) HashPasswordIfExisting

func (p *Password) HashPasswordIfExisting(policy *iam_model.PasswordComplexityPolicyView, passwordAlg crypto.HashAlgorithm, onetime bool) error

func (*Password) IsValid

func (p *Password) IsValid() bool

type PasswordCode

type PasswordCode struct {
	es_models.ObjectRoot

	Code             *crypto.CryptoValue
	Expiry           time.Duration
	NotificationType NotificationType
}

type Phone

type Phone struct {
	es_models.ObjectRoot

	PhoneNumber     string
	IsPhoneVerified bool
}

func (*Phone) GeneratePhoneCodeIfNeeded

func (p *Phone) GeneratePhoneCodeIfNeeded(phoneGenerator crypto.Generator) (*PhoneCode, error)

func (*Phone) IsValid

func (p *Phone) IsValid() bool

type PhoneCode

type PhoneCode struct {
	es_models.ObjectRoot

	Code   *crypto.CryptoValue
	Expiry time.Duration
}

func (*PhoneCode) GeneratePhoneCode

func (code *PhoneCode) GeneratePhoneCode(phoneGenerator crypto.Generator) error

type Profile

type Profile struct {
	es_models.ObjectRoot

	FirstName          string
	LastName           string
	NickName           string
	DisplayName        string
	PreferredLanguage  language.Tag
	Gender             Gender
	PreferredLoginName string
	LoginNames         []string
}

func (*Profile) IsValid

func (p *Profile) IsValid() bool

func (*Profile) SetNamesAsDisplayname added in v0.66.0

func (p *Profile) SetNamesAsDisplayname()

type RefreshToken added in v1.8.0

type RefreshToken struct {
	es_models.ObjectRoot

	TokenID           string
	ApplicationID     string
	UserAgentID       string
	Audience          []string
	Expiration        time.Time
	Scopes            []string
	PreferredLanguage string
}

type RefreshTokenSearchKey added in v1.8.0

type RefreshTokenSearchKey int32
const (
	RefreshTokenSearchKeyUnspecified RefreshTokenSearchKey = iota
	RefreshTokenSearchKeyRefreshTokenID
	RefreshTokenSearchKeyUserID
	RefreshTokenSearchKeyApplicationID
	RefreshTokenSearchKeyUserAgentID
	RefreshTokenSearchKeyExpiration
	RefreshTokenSearchKeyResourceOwner
)

type RefreshTokenSearchQuery added in v1.8.0

type RefreshTokenSearchQuery struct {
	Key    RefreshTokenSearchKey
	Method domain.SearchMethod
	Value  interface{}
}

type RefreshTokenSearchRequest added in v1.8.0

type RefreshTokenSearchRequest struct {
	Offset        uint64
	Limit         uint64
	SortingColumn RefreshTokenSearchKey
	Asc           bool
	Queries       []*RefreshTokenSearchQuery
}

func (*RefreshTokenSearchRequest) EnsureLimit added in v1.8.0

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

type RefreshTokenSearchResponse added in v1.8.0

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

type RefreshTokenView added in v1.8.0

type RefreshTokenView struct {
	ID                    string
	CreationDate          time.Time
	ChangeDate            time.Time
	ResourceOwner         string
	UserID                string
	ClientID              string
	UserAgentID           string
	AuthMethodsReferences []string
	Audience              []string
	AuthTime              time.Time
	IdleExpiration        time.Time
	Expiration            time.Time
	Scopes                []string
	Sequence              uint64
	Token                 string
}

type Token added in v0.93.0

type Token struct {
	es_models.ObjectRoot

	TokenID           string
	ApplicationID     string
	UserAgentID       string
	Audience          []string
	Expiration        time.Time
	Scopes            []string
	PreferredLanguage string
}

type TokenSearchKey added in v0.93.0

type TokenSearchKey int32
const (
	TokenSearchKeyUnspecified TokenSearchKey = iota
	TokenSearchKeyTokenID
	TokenSearchKeyUserID
	TokenSearchKeyApplicationID
	TokenSearchKeyUserAgentID
	TokenSearchKeyExpiration
	TokenSearchKeyResourceOwner
)

type TokenSearchQuery added in v0.93.0

type TokenSearchQuery struct {
	Key    TokenSearchKey
	Method domain.SearchMethod
	Value  interface{}
}

type TokenSearchRequest added in v0.93.0

type TokenSearchRequest struct {
	Offset        uint64
	Limit         uint64
	SortingColumn TokenSearchKey
	Asc           bool
	Queries       []*TokenSearchQuery
}

func (*TokenSearchRequest) EnsureLimit added in v0.93.0

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

type TokenSearchResponse added in v0.93.0

type TokenSearchResponse struct {
	Offset      uint64
	Limit       uint64
	TotalResult uint64
	Result      []*Token
}

type TokenView added in v0.93.0

type TokenView struct {
	ID                string
	CreationDate      time.Time
	ChangeDate        time.Time
	ResourceOwner     string
	UserID            string
	ApplicationID     string
	UserAgentID       string
	Audience          []string
	Expiration        time.Time
	Scopes            []string
	Sequence          uint64
	PreferredLanguage string
}

type UserChange added in v0.25.1

type UserChange struct {
	ChangeDate   *timestamp.Timestamp `json:"changeDate,omitempty"`
	EventType    string               `json:"eventType,omitempty"`
	Sequence     uint64               `json:"sequence,omitempty"`
	ModifierID   string               `json:"modifierUser,omitempty"`
	ModifierName string               `json:"-"`
	Data         interface{}          `json:"data,omitempty"`
}

type UserChanges added in v0.25.1

type UserChanges struct {
	Changes      []*UserChange
	LastSequence uint64
}

type UserMembershipSearchKey added in v0.66.0

type UserMembershipSearchKey int32
const (
	UserMembershipSearchKeyUnspecified UserMembershipSearchKey = iota
	UserMembershipSearchKeyUserID
	UserMembershipSearchKeyMemberType
	UserMembershipSearchKeyAggregateID
	UserMembershipSearchKeyObjectID
	UserMembershipSearchKeyResourceOwner
)

type UserMembershipSearchQuery added in v0.66.0

type UserMembershipSearchQuery struct {
	Key    UserMembershipSearchKey
	Method domain.SearchMethod
	Value  interface{}
}

type UserMembershipSearchRequest added in v0.66.0

type UserMembershipSearchRequest struct {
	Offset        uint64
	Limit         uint64
	SortingColumn UserMembershipSearchKey
	Asc           bool
	Queries       []*UserMembershipSearchQuery
}

func (*UserMembershipSearchRequest) AppendResourceOwnerAndIamQuery added in v0.76.3

func (r *UserMembershipSearchRequest) AppendResourceOwnerAndIamQuery(orgID, iamID string)

func (*UserMembershipSearchRequest) AppendUserIDQuery added in v0.66.0

func (r *UserMembershipSearchRequest) AppendUserIDQuery(userID string)

func (*UserMembershipSearchRequest) EnsureLimit added in v0.66.0

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

func (*UserMembershipSearchRequest) GetSearchQuery added in v0.66.0

type UserMembershipSearchResponse added in v0.66.0

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

type UserMembershipView added in v0.66.0

type UserMembershipView struct {
	UserID      string
	MemberType  MemberType
	AggregateID string
	//ObjectID differs from aggregate id if obejct is sub of an aggregate
	ObjectID string

	Roles             []string
	DisplayName       string
	CreationDate      time.Time
	ChangeDate        time.Time
	ResourceOwner     string
	ResourceOwnerName string
	Sequence          uint64
}

type UserSearchKey added in v0.12.0

type UserSearchKey int32
const (
	UserSearchKeyUnspecified UserSearchKey = iota
	UserSearchKeyUserID
	UserSearchKeyUserName
	UserSearchKeyFirstName
	UserSearchKeyLastName
	UserSearchKeyNickName
	UserSearchKeyDisplayName
	UserSearchKeyEmail
	UserSearchKeyState
	UserSearchKeyResourceOwner
	UserSearchKeyLoginNames
	UserSearchKeyType
	UserSearchKeyPreferredLoginName
)

type UserSearchQuery added in v0.12.0

type UserSearchQuery struct {
	Key    UserSearchKey
	Method domain.SearchMethod
	Value  interface{}
}

type UserSearchRequest added in v0.12.0

type UserSearchRequest struct {
	Offset        uint64
	Limit         uint64
	SortingColumn UserSearchKey
	Asc           bool
	Queries       []*UserSearchQuery
}

func (*UserSearchRequest) AppendMyOrgQuery added in v0.12.0

func (r *UserSearchRequest) AppendMyOrgQuery(orgID string)

func (*UserSearchRequest) EnsureLimit added in v0.12.0

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

type UserSearchResponse added in v0.12.0

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

type UserSessionSearchKey added in v0.16.0

type UserSessionSearchKey int32
const (
	UserSessionSearchKeyUnspecified UserSessionSearchKey = iota
	UserSessionSearchKeyUserAgentID
	UserSessionSearchKeyUserID
	UserSessionSearchKeyState
	UserSessionSearchKeyResourceOwner
)

type UserSessionSearchQuery added in v0.16.0

type UserSessionSearchQuery struct {
	Key    UserSessionSearchKey
	Method domain.SearchMethod
	Value  interface{}
}

type UserSessionSearchRequest added in v0.16.0

type UserSessionSearchRequest struct {
	Offset        uint64
	Limit         uint64
	SortingColumn UserSessionSearchKey
	Asc           bool
	Queries       []*UserSessionSearchQuery
}

func (*UserSessionSearchRequest) EnsureLimit added in v0.16.0

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

type UserSessionSearchResponse added in v0.16.0

type UserSessionSearchResponse struct {
	Offset      uint64
	Limit       uint64
	TotalResult uint64
	Result      []*UserSessionView
}

type UserSessionView added in v0.16.0

type UserSessionView struct {
	CreationDate                 time.Time
	ChangeDate                   time.Time
	State                        req_model.UserSessionState
	ResourceOwner                string
	UserAgentID                  string
	UserID                       string
	UserName                     string
	LoginName                    string
	DisplayName                  string
	SelectedIDPConfigID          string
	PasswordVerification         time.Time
	PasswordlessVerification     time.Time
	ExternalLoginVerification    time.Time
	SecondFactorVerification     time.Time
	SecondFactorVerificationType req_model.MFAType
	MultiFactorVerification      time.Time
	MultiFactorVerificationType  req_model.MFAType
	Sequence                     uint64
}

type UserState

type UserState int32
const (
	UserStateUnspecified UserState = iota
	UserStateActive
	UserStateInactive
	UserStateDeleted
	UserStateLocked
	UserStateSuspend
	UserStateInitial
)

type UserView added in v0.12.0

type UserView struct {
	ID                 string
	UserName           string
	CreationDate       time.Time
	ChangeDate         time.Time
	State              UserState
	Sequence           uint64
	ResourceOwner      string
	LastLogin          time.Time
	PreferredLoginName string
	LoginNames         []string
	*MachineView
	*HumanView
}

func (*UserView) GetAddress added in v0.28.0

func (u *UserView) GetAddress() (*Address, error)

func (*UserView) GetEmail added in v0.28.0

func (u *UserView) GetEmail() (*Email, error)

func (*UserView) GetPhone added in v0.28.0

func (u *UserView) GetPhone() (*Phone, error)

func (*UserView) GetProfile added in v0.28.0

func (u *UserView) GetProfile() (*Profile, error)

func (*UserView) HasRequiredOrgMFALevel added in v0.102.0

func (u *UserView) HasRequiredOrgMFALevel(policy *iam_model.LoginPolicyView) bool

func (*UserView) IsPasswordlessReady added in v0.108.0

func (u *UserView) IsPasswordlessReady() bool

func (*UserView) IsU2FReady added in v0.108.0

func (u *UserView) IsU2FReady() bool

func (*UserView) MFATypesAllowed added in v0.108.0

func (u *UserView) MFATypesAllowed(level domain.MFALevel, policy *domain.LoginPolicy) ([]domain.MFAType, bool)

func (*UserView) MFATypesSetupPossible added in v0.108.0

func (u *UserView) MFATypesSetupPossible(level domain.MFALevel, policy *domain.LoginPolicy) []domain.MFAType

type WebAuthNView added in v0.108.0

type WebAuthNView struct {
	TokenID string
	Name    string
	State   MFAState
}

Jump to

Keyboard shortcuts

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