Documentation ¶
Index ¶
- func GetEnabledProviders(providers config.ThirdPartyProviders) []string
- func NewHTTPErrorHandler(config HTTPErrorHandlerConfig) func(err error, c echo.Context)
- func ToHttpError(err error) *echo.HTTPError
- type CreateUserResponse
- type CustomValidator
- type EmailCreateRequest
- type EmailResponse
- type EmailUpdateRequest
- type GetUserResponse
- type HTTPErrorHandlerConfig
- type Identity
- type PasscodeFinishRequest
- type PasscodeInitRequest
- type PasscodeReturn
- type PublicConfig
- type ThirdPartyAuthCallback
- type ThirdPartyAuthRequest
- type UserInfoResponse
- 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
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 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"` }
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 HTTPErrorHandlerConfig ¶
type HTTPErrorHandlerConfig struct { Debug bool Logger echo.Logger }
type Identity ¶ added in v0.5.0
func FromIdentityModel ¶ added in v0.5.0
type PasscodeFinishRequest ¶
type PasscodeInitRequest ¶
type PasscodeReturn ¶
type PublicConfig ¶
type PublicConfig struct { Password config.Password `json:"password"` Emails config.Emails `json:"emails"` Providers []string `json:"providers"` Account config.Account `json:"account"` }
PublicConfig is the part of the configuration that will be shared with the frontend
func FromConfig ¶
func FromConfig(config config.Config) PublicConfig
FromConfig Returns a PublicConfig from the Application configuration
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 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.