Documentation ¶
Index ¶
- Constants
- type Address
- type AuthRequest
- type BrowserInfo
- type Email
- type EmailCode
- type ExternalIDP
- type Human
- type InitUserCode
- type LanguageTag
- type Machine
- type MachineKey
- type OTP
- type OTPVerified
- type Password
- type PasswordChange
- type PasswordCode
- type Phone
- type PhoneCode
- type Profile
- type Token
- type User
- type WebAuthNLogin
- type WebAuthNSignCount
- type WebAuthNToken
- type WebAuthNTokenID
- type WebAuthNVerify
Constants ¶
View Source
const (
UserVersion = "v2"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type AuthRequest ¶
type AuthRequest struct { ID string `json:"id,omitempty"` UserAgentID string `json:"userAgentID,omitempty"` SelectedIDPConfigID string `json:"selectedIDPConfigID,omitempty"` *BrowserInfo }
func (*AuthRequest) SetData ¶
func (a *AuthRequest) SetData(event eventstore.Event) error
type BrowserInfo ¶
type Email ¶
type Email struct { es_models.ObjectRoot EmailAddress string `json:"email,omitempty"` IsEmailVerified bool `json:"-"` }
type EmailCode ¶
type EmailCode struct { es_models.ObjectRoot Code *crypto.CryptoValue `json:"code,omitempty"` Expiry time.Duration `json:"expiry,omitempty"` }
type ExternalIDP ¶
type ExternalIDP struct { es_models.ObjectRoot IDPConfigID string `json:"idpConfigId,omitempty"` UserID string `json:"userId,omitempty"` DisplayName string `json:"displayName,omitempty"` }
func GetExternalIDP ¶
func GetExternalIDP(idps []*ExternalIDP, id string) (int, *ExternalIDP)
type Human ¶
type Human struct { *Password *Profile *Email *Phone *Address ExternalIDPs []*ExternalIDP `json:"-"` InitCode *InitUserCode `json:"-"` EmailCode *EmailCode `json:"-"` PhoneCode *PhoneCode `json:"-"` PasswordCode *PasswordCode `json:"-"` OTP *OTP `json:"-"` U2FTokens []*WebAuthNToken `json:"-"` PasswordlessTokens []*WebAuthNToken `json:"-"` U2FLogins []*WebAuthNLogin `json:"-"` PasswordlessLogins []*WebAuthNLogin `json:"-"` // contains filtered or unexported fields }
func (*Human) ComputeObject ¶
func (h *Human) ComputeObject()
type InitUserCode ¶
type InitUserCode struct { es_models.ObjectRoot Code *crypto.CryptoValue `json:"code,omitempty"` Expiry time.Duration `json:"expiry,omitempty"` }
type LanguageTag ¶
func (*LanguageTag) MarshalBinary ¶
func (t *LanguageTag) MarshalBinary() ([]byte, error)
func (LanguageTag) MarshalJSON ¶
func (t LanguageTag) MarshalJSON() ([]byte, error)
func (*LanguageTag) UnmarshalBinary ¶
func (t *LanguageTag) UnmarshalBinary(data []byte) error
UnmarshalBinary modifies the receiver so it must take a pointer receiver.
func (*LanguageTag) UnmarshalJSON ¶
func (t *LanguageTag) UnmarshalJSON(data []byte) error
type Machine ¶
type MachineKey ¶
type MachineKey struct { es_models.ObjectRoot `json:"-"` KeyID string `json:"keyId,omitempty"` Type int32 `json:"type,omitempty"` ExpirationDate time.Time `json:"expirationDate,omitempty"` PublicKey []byte `json:"publicKey,omitempty"` // contains filtered or unexported fields }
func (*MachineKey) AppendEvent ¶
func (key *MachineKey) AppendEvent(event *es_models.Event) (err error)
func (*MachineKey) AppendEvents ¶
func (key *MachineKey) AppendEvents(events ...*es_models.Event) error
type OTP ¶
type OTP struct { es_models.ObjectRoot Secret *crypto.CryptoValue `json:"otpSecret,omitempty"` State int32 `json:"-"` }
type OTPVerified ¶
type OTPVerified struct {
UserAgentID string `json:"userAgentID,omitempty"`
}
func (*OTPVerified) SetData ¶
func (o *OTPVerified) SetData(event eventstore.Event) error
type Password ¶
type Password struct { es_models.ObjectRoot Secret *crypto.CryptoValue `json:"secret,omitempty"` EncodedHash string `json:"encodedHash,omitempty"` ChangeRequired bool `json:"changeRequired,omitempty"` }
type PasswordChange ¶
func (*PasswordChange) SetData ¶
func (pw *PasswordChange) SetData(event eventstore.Event) error
type PasswordCode ¶
type PasswordCode struct { es_models.ObjectRoot Code *crypto.CryptoValue `json:"code,omitempty"` Expiry time.Duration `json:"expiry,omitempty"` NotificationType int32 `json:"notificationType,omitempty"` }
func (*PasswordCode) SetData ¶
func (c *PasswordCode) SetData(event eventstore.Event) error
type Phone ¶
type Phone struct { es_models.ObjectRoot PhoneNumber string `json:"phone,omitempty"` IsPhoneVerified bool `json:"-"` }
type PhoneCode ¶
type PhoneCode struct { es_models.ObjectRoot Code *crypto.CryptoValue `json:"code,omitempty"` Expiry time.Duration `json:"expiry,omitempty"` }
type Profile ¶
type Profile struct { es_models.ObjectRoot FirstName string `json:"firstName,omitempty"` LastName string `json:"lastName,omitempty"` NickName string `json:"nickName,omitempty"` DisplayName string `json:"displayName,omitempty"` PreferredLanguage LanguageTag `json:"preferredLanguage,omitempty"` Gender int32 `json:"gender,omitempty"` }
type Token ¶
type Token struct { es_models.ObjectRoot TokenID string `json:"tokenId" gorm:"column:token_id"` ApplicationID string `json:"applicationId" gorm:"column:application_id"` UserAgentID string `json:"userAgentId" gorm:"column:user_agent_id"` Audience database.TextArray[string] `json:"audience" gorm:"column:audience"` Scopes database.TextArray[string] `json:"scopes" gorm:"column:scopes"` Expiration time.Time `json:"expiration" gorm:"column:expiration"` PreferredLanguage string `json:"preferredLanguage" gorm:"column:preferred_language"` }
type User ¶
type WebAuthNLogin ¶
type WebAuthNLogin struct { es_models.ObjectRoot WebauthNTokenID string `json:"webAuthNTokenId"` Challenge string `json:"challenge"` *AuthRequest }
type WebAuthNSignCount ¶
type WebAuthNToken ¶
type WebAuthNToken struct { es_models.ObjectRoot WebauthNTokenID string `json:"webAuthNTokenId"` Challenge string `json:"challenge"` State int32 `json:"-"` KeyID []byte `json:"keyId"` PublicKey []byte `json:"publicKey"` AttestationType string `json:"attestationType"` AAGUID []byte `json:"aaguid"` SignCount uint32 `json:"signCount"` WebAuthNTokenName string `json:"webAuthNTokenName"` }
func GetWebauthn ¶
func GetWebauthn(webauthnTokens []*WebAuthNToken, id string) (int, *WebAuthNToken)
type WebAuthNTokenID ¶
type WebAuthNTokenID struct {
WebauthNTokenID string `json:"webAuthNTokenId"`
}
type WebAuthNVerify ¶
type WebAuthNVerify struct { WebAuthNTokenID string `json:"webAuthNTokenId"` KeyID []byte `json:"keyId"` PublicKey []byte `json:"publicKey"` AttestationType string `json:"attestationType"` AAGUID []byte `json:"aaguid"` SignCount uint32 `json:"signCount"` WebAuthNTokenName string `json:"webAuthNTokenName"` UserAgentID string `json:"userAgentID,omitempty"` }
func (*WebAuthNVerify) SetData ¶
func (w *WebAuthNVerify) SetData(event eventstore.Event) error
Click to show internal directories.
Click to hide internal directories.