Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { AdminConfig []model.AdminCreateArgs `json:"adminConfig"` BaseURL *jt.JSONType[*url.URL] `json:"baseURL"` Iss string `json:"iss"` JWKS JWKS `json:"jwks"` LogJSON bool `json:"logJSON"` LogLevel LogLevel `json:"logLevel"` Port uint16 `json:"port"` PreventRobots PreventRobots `json:"preventRobots"` RelativeRedirectURL *jt.JSONType[*url.URL] `json:"relativeRedirectURL"` RequestTimeout *jt.JSONType[time.Duration] `json:"requestTimeout"` RequestMaxBodyBytes int64 `json:"requestMaxBodyBytes"` SecretQueryKey string `json:"secretQueryKey"` ShutdownTimeout *jt.JSONType[time.Duration] `json:"shutdownTimeout"` Validation model.Validation `json:"validation"` }
Config is the configuration for the magiclinksdev server.
func (Config) DefaultsAndValidate ¶
DefaultsAndValidate implements the jsontype.Config interface.
type JWKS ¶
type JWKS struct {
IgnoreDefault bool `json:"ignoreDefault"`
}
JWKS is the JSON Web Key Set configuration.
func (JWKS) DefaultsAndValidate ¶
DefaultsAndValidate implements the jsontype.Config interface.
type PreventRobots ¶
type PreventRobots struct { Method PreventRobotsMethod `json:"method"` ReCAPTCHAV3 magiclink.ReCAPTCHAV3Config `json:"recaptchav3"` }
PreventRobots is the configuration for preventing robots from following magic links.
func (PreventRobots) DefaultsAndValidate ¶
func (p PreventRobots) DefaultsAndValidate() (PreventRobots, error)
DefaultsAndValidate implements the jsontype.Config interface.
type PreventRobotsMethod ¶
type PreventRobotsMethod string
PreventRobotsMethod is a set of string constants that indicate how to prevent robots from following magic links.
const ( // PreventRobotsReCAPTCHAV3 indicates that ReCAPTCHA V3 should be used to prevent robots from following magic links. PreventRobotsReCAPTCHAV3 PreventRobotsMethod = "recaptchav3" )
Click to show internal directories.
Click to hide internal directories.