email_hotp

package
v0.7.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SetupNonceName  = "email-hotp--setup--nonce"
	SetupNonceKey   = "email-hotp--setup--form"
	RevokeNonceName = "email-hotp--revoke--nonce"
	RevokeNonceKey  = "email-hotp--revoke--form"
	ManageNonceName = "email-hotp--manage--nonce"
	ManageNonceKey  = "email-hotp--manage--form"
)
View Source
const Tag feature.Tag = "site-auth-otp-email-hotp"

Variables

View Source
var (
	DefaultHotpDigits = 8
)

Functions

This section is empty.

Types

type CFeature

type CFeature struct {
	site.CSiteFeature[MakeFeature]
	// contains filtered or unexported fields
}

func (*CFeature) Build

func (f *CFeature) Build(b feature.Buildable) (err error)

func (*CFeature) CurrentUserFactorsReady

func (f *CFeature) CurrentUserFactorsReady(r *http.Request) (names []string)

func (*CFeature) CurrentUserFactorsReadyCount

func (f *CFeature) CurrentUserFactorsReadyCount(r *http.Request) (count int)

func (*CFeature) Init

func (f *CFeature) Init(this interface{})

func (*CFeature) IsMultiFactorBackup

func (f *CFeature) IsMultiFactorBackup() (backup bool)

func (*CFeature) Make

func (f *CFeature) Make() (feat Feature)

func (*CFeature) MakeHandleSiteSettingsPanel

func (f *CFeature) MakeHandleSiteSettingsPanel(settingsPath string, saf feature.SiteAuthFeature) (serve http.HandlerFunc)

func (*CFeature) MakeServeSiteSettingsPanel

func (f *CFeature) MakeServeSiteSettingsPanel(settingsPath string, saf feature.SiteAuthFeature) (serve http.HandlerFunc)

func (*CFeature) ProcessChallenge

func (f *CFeature) ProcessChallenge(name, challenge string, saf feature.SiteAuthFeature, claims *feature.CSiteAuthClaims, w http.ResponseWriter, r *http.Request) (handled bool, redirect string)

func (*CFeature) ProcessSetupPage

func (f *CFeature) ProcessSetupPage(saf feature.SiteAuthFeature, w http.ResponseWriter, r *http.Request) (handled bool)

func (*CFeature) ProcessVerification

func (f *CFeature) ProcessVerification(verifyTarget, name, challenge string, saf feature.SiteAuthFeature, claims *feature.CSiteAuthClaims, w http.ResponseWriter, r *http.Request) (handled bool, redirect string)

func (*CFeature) ResetUserFactors

func (f *CFeature) ResetUserFactors(r *http.Request, eid string) (err error)

func (*CFeature) ServeManagePage

func (f *CFeature) ServeManagePage(settingsPath string, saf feature.SiteAuthFeature, w http.ResponseWriter, r *http.Request) (handled bool, redirect string)

func (*CFeature) ServeRevokePage

func (f *CFeature) ServeRevokePage(settingsPath string, saf feature.SiteAuthFeature, w http.ResponseWriter, r *http.Request) (handled bool, redirect string)

func (*CFeature) SetEmailAccount

func (f *CFeature) SetEmailAccount(account string) MakeFeature

func (*CFeature) SetEmailProvider

func (f *CFeature) SetEmailProvider(tag feature.Tag) MakeFeature

func (*CFeature) SetHotpDigits added in v0.5.5

func (f *CFeature) SetHotpDigits(count int) MakeFeature

func (*CFeature) SetupSiteAuthProvider

func (f *CFeature) SetupSiteAuthProvider(saf feature.SiteAuthFeature)

func (*CFeature) SiteAuthSettingsPanel

func (f *CFeature) SiteAuthSettingsPanel(settingsPath string, saf feature.SiteAuthFeature) (serve, handle http.HandlerFunc)

func (*CFeature) SiteFeatureInfo

func (f *CFeature) SiteFeatureInfo(r *http.Request) (info *feature.CSiteFeatureInfo)

func (*CFeature) SiteFeatureMenu

func (f *CFeature) SiteFeatureMenu(r *http.Request) (m menu.Menu)

func (*CFeature) SiteMultiFactorInfo

func (f *CFeature) SiteMultiFactorInfo(r *http.Request) (info *feature.CSiteAuthMultiFactorInfo)

func (*CFeature) SiteMultiFactorKey

func (f *CFeature) SiteMultiFactorKey() (key string)

func (*CFeature) SiteMultiFactorLabel

func (f *CFeature) SiteMultiFactorLabel(printer *message.Printer) (label string)

func (*CFeature) SiteUserSetupStageHandler

func (f *CFeature) SiteUserSetupStageHandler(saf feature.SiteAuthFeature, w http.ResponseWriter, r *http.Request)

func (*CFeature) SiteUserSetupStageReady

func (f *CFeature) SiteUserSetupStageReady(eid string, r *http.Request) (ready bool)

func (*CFeature) Startup

func (f *CFeature) Startup(ctx *cli.Context) (err error)

func (*CFeature) UserActions

func (f *CFeature) UserActions() (list feature.Actions)

func (*CFeature) VerifyClaimFactor

func (f *CFeature) VerifyClaimFactor(claim *feature.CSiteAuthClaimsFactor, saf feature.SiteAuthFeature, r *http.Request) (verified bool)

type Feature

type Feature interface {
	feature.SiteFeature
	feature.SiteMultiFactorProvider
}

type MakeFeature

type MakeFeature interface {
	feature.SiteMakeFeature[MakeFeature]

	SetEmailAccount(account string) MakeFeature
	SetEmailProvider(tag feature.Tag) MakeFeature
	SetHotpDigits(count int) MakeFeature

	Make() Feature
}

func New

func New() MakeFeature

func NewTagged

func NewTagged(tag feature.Tag) MakeFeature

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL