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 DeviceTrustService
- type Email
- type GenerateCreationOptionsParams
- type GenerateRequestOptionsPasskeyParams
- type GenerateRequestOptionsSecurityKeyParams
- 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") ErrInvalidWebauthnCredentialMFAOnly = errors.New("this credential can be used as a second factor security key only") )
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 DeviceTrustService ¶ added in v1.3.0
type DeviceTrustService struct { Persister persistence.TrustedDevicePersister Cfg config.Config HttpContext echo.Context }
func (DeviceTrustService) CheckDeviceTrust ¶ added in v1.3.0
func (s DeviceTrustService) CheckDeviceTrust(userID uuid.UUID) bool
func (DeviceTrustService) CreateTrustedDevice ¶ added in v1.3.0
func (s DeviceTrustService) CreateTrustedDevice(userID uuid.UUID, deviceToken string) error
func (DeviceTrustService) GenerateRandomToken ¶ added in v1.3.0
func (s DeviceTrustService) GenerateRandomToken(length int) (string, error)
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 GenerateRequestOptionsPasskeyParams ¶ added in v1.2.0
type GenerateRequestOptionsPasskeyParams struct {
Tx *pop.Connection
}
type GenerateRequestOptionsSecurityKeyParams ¶ added in v1.2.0
type Passcode ¶
type Passcode interface { ValidatePasscode(ValidatePasscodeParams) (bool, error) SendPasscode(*pop.Connection, SendPasscodeParams) (*SendPasscodeResult, error) VerifyPasscodeCode(tx *pop.Connection, passcodeID uuid.UUID, passcode string) error }
func NewPasscodeService ¶
type Password ¶
type Password interface { VerifyPassword(tx *pop.Connection, userId uuid.UUID, password string) error RecoverPassword(tx *pop.Connection, userId uuid.UUID, newPassword string) error CreatePassword(tx *pop.Connection, userId uuid.UUID, newPassword string) error UpdatePassword(tx *pop.Connection, passwordCredentialModel *models.PasswordCredential, newPassword string) error }
func NewPasswordService ¶
func NewPasswordService(persister persistence.Persister) Password
type SendPasscodeParams ¶
type SendPasscodeResult ¶ added in v1.0.1
type ValidatePasscodeParams ¶
type WebauthnService ¶
type WebauthnService interface { GenerateRequestOptionsPasskey(GenerateRequestOptionsPasskeyParams) (*models.WebauthnSessionData, *protocol.CredentialAssertion, error) GenerateRequestOptionsSecurityKey(GenerateRequestOptionsSecurityKeyParams) (*models.WebauthnSessionData, *protocol.CredentialAssertion, error) VerifyAssertionResponse(VerifyAssertionResponseParams) (*models.User, error) GenerateCreationOptionsPasskey(GenerateCreationOptionsParams) (*models.WebauthnSessionData, *protocol.CredentialCreation, error) GenerateCreationOptionsSecurityKey(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.