Documentation
¶
Index ¶
- Variables
- func UserCanDoSaml(cfg config.Config, identities models.Identities) bool
- func UserCanDoThirdParty(cfg config.Config, identities models.Identities) bool
- func ValidateUsername(name string) bool
- type Email
- type GenerateCreationOptionsParams
- type GenerateRequestOptionsParams
- type Passcode
- type Password
- type SendPasscodeParams
- type SendPasscodeResult
- type ValidatePasscodeParams
- type VerifyAssertionResponseParams
- type VerifyAttestationResponseParams
- type WebauthnService
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorPasscodeInvalid = errors.New("passcode invalid") ErrorPasscodeNotFound = errors.New("passcode not found") ErrorPasscodeExpired = errors.New("passcode is expired") ErrorPasscodeMaxAttemptsReached = errors.New("the passcode was entered wrong too many times") )
View Source
var (
ErrInvalidWebauthnCredential = errors.New("this passkey cannot be used anymore")
)
View Source
var (
ErrorPasswordInvalid = errors.New("password invalid")
)
Functions ¶
func UserCanDoSaml ¶
func UserCanDoSaml(cfg config.Config, identities models.Identities) bool
func UserCanDoThirdParty ¶
func UserCanDoThirdParty(cfg config.Config, identities models.Identities) bool
func ValidateUsername ¶
Types ¶
type Email ¶
type Email struct {
// contains filtered or unexported fields
}
func (*Email) RenderBody ¶ added in v1.0.1
RenderBody renders the body with the given template. The template name must be the name of the template without the content type and the file ending. E.g. when the file is created as "email_verification_text.tmpl" then the template name is just "email_verification"
func (*Email) RenderSubject ¶ added in v1.0.1
RenderSubject renders a subject with the given template. Must be "subject_[template_name]".
type GenerateRequestOptionsParams ¶
type GenerateRequestOptionsParams struct {
Tx *pop.Connection
}
type Passcode ¶
type Passcode interface { ValidatePasscode(ValidatePasscodeParams) (bool, error) SendPasscode(SendPasscodeParams) (*SendPasscodeResult, error) VerifyPasscodeCode(tx *pop.Connection, passcodeID uuid.UUID, passcode string) error }
func NewPasscodeService ¶
type Password ¶
type Password interface { VerifyPassword(userId uuid.UUID, password string) error RecoverPassword(userId uuid.UUID, newPassword string) error CreatePassword(userId uuid.UUID, newPassword string) error UpdatePassword(passwordCredentialModel *models.PasswordCredential, newPassword string) error }
func NewPasswordService ¶
func NewPasswordService(cfg config.Config, persister persistence.Persister) Password
type SendPasscodeParams ¶
type SendPasscodeResult ¶ added in v1.0.1
type ValidatePasscodeParams ¶
type WebauthnService ¶
type WebauthnService interface { GenerateRequestOptions(GenerateRequestOptionsParams) (*models.WebauthnSessionData, *protocol.CredentialAssertion, error) VerifyAssertionResponse(VerifyAssertionResponseParams) (*models.User, error) GenerateCreationOptions(GenerateCreationOptionsParams) (*models.WebauthnSessionData, *protocol.CredentialCreation, error) VerifyAttestationResponse(VerifyAttestationResponseParams) (*webauthn.Credential, error) }
func NewWebauthnService ¶
func NewWebauthnService(cfg config.Config, persister persistence.Persister) WebauthnService
Click to show internal directories.
Click to hide internal directories.