Documentation ¶
Index ¶
- Constants
- Variables
- func AllowedDomains() string
- func BaseURL(ctx *fiber.Ctx) string
- func BreakNewlines(s string) template.HTML
- func ConfigValueBool(key string) bool
- func ConfigValueString(key string) string
- func GenerateSecret(n int) (string, error)
- func GenerateSecretString(n int) (string, error)
- func HTTPErrorHandler(c *fiber.Ctx, err error) error
- func LimitReachedHandler(c *fiber.Ctx) error
- func NewToken(username, email, prefix string, storage fiber.Storage) (string, error)
- func NotFoundHandler(c *fiber.Ctx) error
- func QRCode(otptoken *ipa.OTPToken, realm string) (string, error)
- func RemoteIP(c *fiber.Ctx) string
- func SecureHeaders(c *fiber.Ctx) error
- func SetDefaults()
- func SplitSSHFP(fp string) []string
- func TimeAgo(t time.Time) string
- type Emailer
- func (e *Emailer) SendAccountVerifyEmail(user *ipa.User, ctx *fiber.Ctx) error
- func (e *Emailer) SendMFAChangedEmail(enabled bool, user *ipa.User, ctx *fiber.Ctx) error
- func (e *Emailer) SendOTPTokenUpdatedEmail(added bool, user *ipa.User, ctx *fiber.Ctx) error
- func (e *Emailer) SendPasswordChangedEmail(user *ipa.User, ctx *fiber.Ctx) error
- func (e *Emailer) SendPasswordResetEmail(user *ipa.User, ctx *fiber.Ctx) error
- func (e *Emailer) SendSSHKeyUpdatedEmail(added bool, user *ipa.User, ctx *fiber.Ctx) error
- func (e *Emailer) SendWelcomeEmail(user *ipa.User, ctx *fiber.Ctx) error
- type FakeTLSTransport
- type Metrics
- type Router
- func (r *Router) AccountCreate(c *fiber.Ctx) error
- func (r *Router) AccountSettings(c *fiber.Ctx) error
- func (r *Router) AccountVerify(c *fiber.Ctx) error
- func (r *Router) AccountVerifyResend(c *fiber.Ctx) error
- func (r *Router) Authenticate(c *fiber.Ctx) error
- func (r *Router) CSRF(c *fiber.Ctx) error
- func (r *Router) Captcha(c *fiber.Ctx) error
- func (r *Router) CheckUser(c *fiber.Ctx) error
- func (r *Router) ConsentGet(c *fiber.Ctx) error
- func (r *Router) HydraError(c *fiber.Ctx) error
- func (r *Router) Index(c *fiber.Ctx) error
- func (r *Router) Login(c *fiber.Ctx) error
- func (r *Router) LoginOAuthGet(c *fiber.Ctx) error
- func (r *Router) LoginOAuthPost(username, challenge string, c *fiber.Ctx) error
- func (r *Router) Logo(c *fiber.Ctx) error
- func (r *Router) Logout(c *fiber.Ctx) error
- func (r *Router) Metrics(c *fiber.Ctx) error
- func (r *Router) OTPTokenAdd(c *fiber.Ctx) error
- func (r *Router) OTPTokenDisable(c *fiber.Ctx) error
- func (r *Router) OTPTokenEnable(c *fiber.Ctx) error
- func (r *Router) OTPTokenList(c *fiber.Ctx) error
- func (r *Router) OTPTokenModal(c *fiber.Ctx) error
- func (r *Router) OTPTokenRemove(c *fiber.Ctx) error
- func (r *Router) OTPTokenVerify(c *fiber.Ctx) error
- func (r *Router) PasswordChange(c *fiber.Ctx) error
- func (r *Router) PasswordExpired(c *fiber.Ctx) error
- func (r *Router) PasswordForgot(c *fiber.Ctx) error
- func (r *Router) PasswordReset(c *fiber.Ctx) error
- func (r *Router) RequireHTMX(c *fiber.Ctx) error
- func (r *Router) RequireLogin(c *fiber.Ctx) error
- func (r *Router) RequireMFA(c *fiber.Ctx) error
- func (r *Router) RequireNoLogin(c *fiber.Ctx) error
- func (r *Router) SSHKeyAdd(c *fiber.Ctx) error
- func (r *Router) SSHKeyList(c *fiber.Ctx) error
- func (r *Router) SSHKeyModal(c *fiber.Ctx) error
- func (r *Router) SSHKeyRemove(c *fiber.Ctx) error
- func (r *Router) SecurityList(c *fiber.Ctx) error
- func (r *Router) SetupRoutes(app *fiber.App)
- func (r *Router) Styles(c *fiber.Ctx) error
- func (r *Router) TwoFactorDisable(c *fiber.Ctx) error
- func (r *Router) TwoFactorEnable(c *fiber.Ctx) error
- type Server
- type TemplateRenderer
- type Token
Constants ¶
View Source
const ( SessionKeyAuthenticated = "authenticated" SessionKeySID = "sid" SessionKeyUsername = "user" SessionKeyCSRF = "csrf" ContextKeyUser = "user" ContextKeyUsername = "username" ContextKeyIPAClient = "ipa" UserCategoryUnverified = "mokey-user-unverified" TokenAccountVerify = "verify" TokenPasswordReset = "reset" TokenUsedPrefix = "used-" TokenIssuedPrefix = "issued-" )
View Source
const (
DefaultPort = 80
)
Variables ¶
View Source
var ( PasswordCheckLower = regexp.MustCompile(`[a-z]`) PasswordCheckUpper = regexp.MustCompile(`[A-Z]`) PasswordCheckNumber = regexp.MustCompile(`[0-9]`) PasswordCheckMarks = regexp.MustCompile(`[^0-9a-zA-Z]`) )
View Source
var ( ErrDomainNotAllowed = errors.New("Email domain not allowed") ErrInvalidUsername = errors.New("Username is invalid. May only include letters, numbers, _, -, .") )
View Source
var Version = "dev"
Functions ¶
func AllowedDomains ¶ added in v0.6.0
func AllowedDomains() string
func BreakNewlines ¶ added in v0.6.0
func ConfigValueBool ¶ added in v0.6.0
func ConfigValueString ¶ added in v0.6.0
func GenerateSecret ¶ added in v0.6.0
func GenerateSecretString ¶ added in v0.6.0
func HTTPErrorHandler ¶
func LimitReachedHandler ¶ added in v0.6.0
func LimitReachedHandler(c *fiber.Ctx) error
func NotFoundHandler ¶ added in v0.6.0
func NotFoundHandler(c *fiber.Ctx) error
func SecureHeaders ¶ added in v0.6.0
func SecureHeaders(c *fiber.Ctx) error
func SetDefaults ¶ added in v0.6.0
func SetDefaults()
func SplitSSHFP ¶ added in v0.6.0
Types ¶
type Emailer ¶ added in v0.6.0
type Emailer struct {
// contains filtered or unexported fields
}
func NewEmailer ¶ added in v0.6.0
func (*Emailer) SendAccountVerifyEmail ¶ added in v0.6.0
func (*Emailer) SendMFAChangedEmail ¶ added in v0.6.0
func (*Emailer) SendOTPTokenUpdatedEmail ¶ added in v0.6.0
func (*Emailer) SendPasswordChangedEmail ¶ added in v0.6.0
func (*Emailer) SendPasswordResetEmail ¶ added in v0.6.0
func (*Emailer) SendSSHKeyUpdatedEmail ¶ added in v0.6.0
func (*Emailer) SendWelcomeEmail ¶ added in v0.6.0
type FakeTLSTransport ¶ added in v0.5.3
type FakeTLSTransport struct {
T http.RoundTripper
}
type Metrics ¶ added in v0.6.0
type Metrics struct {
// contains filtered or unexported fields
}
func NewMetrics ¶ added in v0.6.0
func NewMetrics() *Metrics
type Router ¶ added in v0.6.0
type Router struct {
// contains filtered or unexported fields
}
func (*Router) AccountCreate ¶ added in v0.6.0
func (*Router) AccountSettings ¶ added in v0.6.0
func (*Router) AccountVerify ¶ added in v0.6.0
func (*Router) AccountVerifyResend ¶ added in v0.6.0
func (*Router) Authenticate ¶ added in v0.6.0
func (*Router) ConsentGet ¶ added in v0.6.0
func (*Router) HydraError ¶ added in v0.6.0
func (*Router) LoginOAuthGet ¶ added in v0.6.0
func (*Router) LoginOAuthPost ¶ added in v0.6.0
func (*Router) OTPTokenAdd ¶ added in v0.6.0
func (*Router) OTPTokenDisable ¶ added in v0.6.0
func (*Router) OTPTokenEnable ¶ added in v0.6.0
func (*Router) OTPTokenList ¶ added in v0.6.0
func (*Router) OTPTokenModal ¶ added in v0.6.0
func (*Router) OTPTokenRemove ¶ added in v0.6.0
func (*Router) OTPTokenVerify ¶ added in v0.6.0
func (*Router) PasswordChange ¶ added in v0.6.0
func (*Router) PasswordExpired ¶ added in v0.6.0
func (*Router) PasswordForgot ¶ added in v0.6.0
func (*Router) PasswordReset ¶ added in v0.6.0
func (*Router) RequireHTMX ¶ added in v0.6.0
func (*Router) RequireLogin ¶ added in v0.6.0
func (*Router) RequireMFA ¶ added in v0.6.0
func (*Router) RequireNoLogin ¶ added in v0.6.0
func (*Router) SSHKeyList ¶ added in v0.6.0
func (*Router) SSHKeyModal ¶ added in v0.6.0
func (*Router) SSHKeyRemove ¶ added in v0.6.0
func (*Router) SecurityList ¶ added in v0.6.0
func (*Router) SetupRoutes ¶ added in v0.6.0
func (r *Router) SetupRoutes(app *fiber.App)
func (*Router) TwoFactorDisable ¶ added in v0.6.0
func (*Router) TwoFactorEnable ¶ added in v0.6.0
type Server ¶ added in v0.6.0
type TemplateRenderer ¶
type TemplateRenderer struct {
// contains filtered or unexported fields
}
func NewTemplateRenderer ¶
func NewTemplateRenderer() (*TemplateRenderer, error)
func (*TemplateRenderer) Load ¶ added in v0.6.0
func (t *TemplateRenderer) Load() error
Click to show internal directories.
Click to hide internal directories.