Documentation ¶
Index ¶
- func GetEnabledProviders(providers config.ThirdPartyProviders) []string
- func NewHTTPErrorHandler(config HTTPErrorHandlerConfig) func(err error, c echo.Context)
- func ToHttpError(err error) *echo.HTTPError
- func UseEnterpriseConnection(samlConfig *samlConfig.Saml) bool
- type Account
- type CreateUserResponse
- type CustomValidator
- type EmailCreateRequest
- type EmailJwt
- type EmailResponse
- type EmailUpdateRequest
- type Emails
- type GetUserResponse
- type HTTPErrorHandlerConfig
- type Identities
- type Identity
- type MFAConfig
- type PasscodeFinishRequest
- type PasscodeInitRequest
- type PasscodeReturn
- type Password
- type ProfileData
- type PublicConfig
- type SessionData
- type ThirdPartyAuthCallback
- type ThirdPartyAuthRequest
- type UserInfoResponse
- type Username
- type ValidateSessionRequest
- type ValidateSessionResponse
- type ValidationErrors
- type WebauthnCredentialResponse
- type WebauthnCredentialUpdateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEnabledProviders ¶ added in v0.5.0
func GetEnabledProviders(providers config.ThirdPartyProviders) []string
func NewHTTPErrorHandler ¶
func NewHTTPErrorHandler(config HTTPErrorHandlerConfig) func(err error, c echo.Context)
func ToHttpError ¶
func ToHttpError(err error) *echo.HTTPError
func UseEnterpriseConnection ¶ added in v0.9.0
func UseEnterpriseConnection(samlConfig *samlConfig.Saml) bool
Types ¶
type CreateUserResponse ¶
type CustomValidator ¶
type CustomValidator struct {
Validator *validator.Validate
}
func NewCustomValidator ¶
func NewCustomValidator() *CustomValidator
func (*CustomValidator) Validate ¶
func (cv *CustomValidator) Validate(i interface{}) error
type EmailCreateRequest ¶
type EmailCreateRequest struct {
Address string `json:"address"`
}
type EmailJwt ¶ added in v0.10.1
type EmailJwt struct { Address string `json:"address"` IsPrimary bool `json:"is_primary"` IsVerified bool `json:"is_verified"` }
func JwtFromEmailModel ¶ added in v0.10.1
type EmailResponse ¶
type EmailResponse struct { ID uuid.UUID `json:"id"` Address string `json:"address"` IsVerified bool `json:"is_verified"` IsPrimary bool `json:"is_primary"` Identity *Identity `json:"identity,omitempty"` // Deprecated Identities Identities `json:"identities,omitempty"` }
func FromEmailModel ¶
func FromEmailModel(email *models.Email) *EmailResponse
FromEmailModel Converts the DB model to a DTO object
type EmailUpdateRequest ¶
type EmailUpdateRequest struct {
IsPrimary *bool `json:"is_primary"`
}
type GetUserResponse ¶
type GetUserResponse struct { ID uuid.UUID `json:"id"` Email *string `json:"email,omitempty"` Username *string `json:"username,omitempty"` WebauthnCredentials []models.WebauthnCredential `json:"webauthn_credentials"` // deprecated UpdatedAt time.Time `json:"updated_at"` CreatedAt time.Time `json:"created_at"` }
type HTTPErrorHandlerConfig ¶
type HTTPErrorHandlerConfig struct { Debug bool Logger echo.Logger }
type Identities ¶ added in v0.10.0
type Identities []Identity
func FromIdentitiesModel ¶ added in v0.10.0
func FromIdentitiesModel(identities models.Identities) Identities
type Identity ¶ added in v0.5.0
func FromIdentityModel ¶ added in v0.5.0
type PasscodeFinishRequest ¶
type PasscodeInitRequest ¶
type PasscodeReturn ¶
type ProfileData ¶ added in v1.0.0
type ProfileData struct { UserID uuid.UUID `json:"user_id"` Passkeys []WebauthnCredentialResponse `json:"passkeys,omitempty"` SecurityKeys []WebauthnCredentialResponse `json:"security_keys,omitempty"` MFAConfig MFAConfig `json:"mfa_config"` Emails []EmailResponse `json:"emails,omitempty"` Username *Username `json:"username,omitempty"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
func ProfileDataFromUserModel ¶ added in v1.0.0
func ProfileDataFromUserModel(user *models.User, cfg *config.Config) *ProfileData
type PublicConfig ¶
type PublicConfig struct { Password Password `json:"password"` Emails Emails `json:"emails"` Providers []string `json:"providers"` Account Account `json:"account"` UseEnterpriseConnection bool `json:"use_enterprise"` }
PublicConfig is the part of the configuration that will be shared with the frontend
func FromConfig ¶
func FromConfig(cfg config.Config) PublicConfig
FromConfig Returns a PublicConfig from the Application configuration
type SessionData ¶ added in v1.1.0
type SessionData struct { ID uuid.UUID `json:"id"` UserAgentRaw string `json:"user_agent_raw"` UserAgent string `json:"user_agent"` IpAddress string `json:"ip_address"` Current bool `json:"current"` CreatedAt time.Time `json:"created_at"` ExpiresAt *time.Time `json:"expires_at,omitempty"` LastUsed time.Time `json:"last_used"` }
func FromSessionModel ¶ added in v1.1.0
func FromSessionModel(model models.Session, current bool) SessionData
type ThirdPartyAuthCallback ¶ added in v0.5.0
type ThirdPartyAuthCallback struct { AuthCode string `query:"code"` State string `query:"state" validate:"required"` Error string `query:"error"` ErrorDescription string `query:"error_description"` }
func (ThirdPartyAuthCallback) HasError ¶ added in v0.5.0
func (cb ThirdPartyAuthCallback) HasError() bool
type ThirdPartyAuthRequest ¶ added in v0.5.0
type UserInfoResponse ¶
type Username ¶ added in v1.0.0
type Username struct { ID uuid.UUID `json:"id"` Username string `json:"username"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
func FromUsernameModel ¶ added in v1.0.0
type ValidateSessionRequest ¶ added in v1.1.0
type ValidateSessionRequest struct {
SessionToken string `json:"session_token" validate:"required"`
}
type ValidateSessionResponse ¶ added in v1.1.0
type ValidationErrors ¶
type ValidationErrors struct {
Errors []string `json:"errors"`
}
type WebauthnCredentialResponse ¶
type WebauthnCredentialResponse struct { ID string `json:"id"` Name *string `json:"name,omitempty"` PublicKey string `json:"public_key"` AttestationType string `json:"attestation_type"` AAGUID uuid.UUID `json:"aaguid"` LastUsedAt *time.Time `json:"last_used_at,omitempty"` CreatedAt time.Time `json:"created_at"` Transports []string `json:"transports"` BackupEligible bool `json:"backup_eligible"` BackupState bool `json:"backup_state"` }
func FromWebauthnCredentialModel ¶
func FromWebauthnCredentialModel(c *models.WebauthnCredential) *WebauthnCredentialResponse
FromWebauthnCredentialModel Converts the DB model to a DTO object
type WebauthnCredentialUpdateRequest ¶
type WebauthnCredentialUpdateRequest struct {
Name *string `json:"name"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.