Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAsymmetricKeyPathsNotSet = errors.New("expected jwt_private_key_path and jwt_public_key_path to be set for all supported asymmetric algorithms")
View Source
var ErrEmailNotConfigured = errors.New("expected smtp to be set if email support is enabled")
View Source
var ErrFacebookConfig = errors.New("expected facebook_client_id, facebook_client_secret to be set if facebook provider is enabled")
View Source
var ErrGithubConfig = errors.New("expected github_client_id, github_client_secret to be set if github providder is enabled")
View Source
var ErrGoogleConfig = errors.New("expected google_client_id, google_client_secret to be set if google provider is enabled")
View Source
var ErrInvalidCustomDataSchema = errors.New("invalid custom data schema")
View Source
var ErrParsingPrivateKey = errors.New("unable to parse private key")
View Source
var ErrParsingPublicKey = errors.New("unable to parse public key")
View Source
var ErrPhoneEmailDisabled = errors.New("can't disable email and phone at the same time")
View Source
var ErrSMSNotConfigured = errors.New("expected sms to be set if phone support is enabled")
View Source
var ErrSymmetricSecretNotSet = errors.New("expected jwt_secret to be set for all symmetric algorithms")
View Source
var ErrUnableToReadTemplate = errors.New("unable to read template")
View Source
var ErrUnsupportedAlgorithm = errors.New("unsupported algorithm")
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { AccessTokenCookieName string `json:"access_token_cookie_name"` AccessTokenCookieDomain string `json:"access_token_cookie_domain"` AdminOnlyList bool `json:"admin_only_list"` ChangeTemplate *TemplateConfig `json:"change_template"` ConfirmationTemplate *TemplateConfig `json:"confirmation_template"` DatabaseURL string `json:"database_url"` DisableEmail bool `json:"disable_email"` DisablePhone bool `json:"disable_phone"` DisableSignup bool `json:"disable_signup"` EmailRule Regexp `json:"email_rule"` Facebook SocialConfig `json:"facebook"` Google SocialConfig `json:"google"` Github SocialConfig `json:"github"` Host string `json:"host"` InstanceURL string `json:"instance_url"` InvitationTemplate *TemplateConfig `json:"invitation_template"` JWT JWTConfig `json:"jwt"` LockoutPolicy LockoutPolicy `json:"lockout_policy"` LoginHook string `json:"login_hook"` LogLevel logrus.Level `json:"log_level"` MaxConnectionPoolSize int `json:"max_connection_pool_size"` MinutesBetweenEmailChange time.Duration `json:"minutes_between_email_change"` MinutesBetweenPhoneChange time.Duration `json:"minutes_between_phone_change"` MinutesBetweenResend time.Duration `json:"minutes_between_resend"` PasswordHashCost uint8 `json:"password_hash_cost"` PasswordRule Regexp `json:"password_rule"` PhoneRule Regexp `json:"phone_rule"` Port uint16 `json:"port"` RecoveryTemplate *TemplateConfig `json:"recovery_template"` RefreshTokenCookieName string `json:"refresh_token_cookie_name"` RefreshTokenCookieDomain string `json:"refresh_token_cookie_domain"` SetAccessTokenCookie bool `json:"set_access_token_cookie"` SetRefreshTokenCookie bool `json:"set_refresh_token_cookie"` SiteURL string `json:"site_url"` SMS *SMSConfig `json:"sms"` SMTP *SMTPConfig `json:"smtp"` SocialRedirectPage string `json:"social_redirect_page"` CustomDataSchema map[string]Field `json:"custom_data_schema"` MetadataPath *JSONPath `json:"metadata_path"` AdminRoles []string `json:"admin_roles"` ReadOnlyRoles []string `json:"read_only_roles"` RolesPath JSONPath `json:"roles_path"` }
func NewDefaultConfig ¶ added in v0.8.0
func NewDefaultConfig() *Config
type Field ¶ added in v0.2.0
type JSONPath ¶ added in v0.4.0
func (*JSONPath) MarshalText ¶ added in v0.4.0
func (*JSONPath) UnmarshalText ¶ added in v0.4.0
type JWTConfig ¶
type JWTConfig struct { Aud string `json:"audience"` Alg string `json:"algorithm"` Exp time.Duration `json:"expiry"` Iss string `json:"issuer"` PrivateKeyPath string `json:"private_key_path"` PublicKeyPath string `json:"public_key_path"` Secret string `json:"secret"` Type string `json:"-"` // contains filtered or unexported fields }
func (*JWTConfig) GetDecodingKey ¶
func (c *JWTConfig) GetDecodingKey() interface{}
func (*JWTConfig) GetSigningKey ¶
func (c *JWTConfig) GetSigningKey() interface{}
type LockoutPolicy ¶
type SMSMapping ¶
type SMTPConfig ¶
type SocialConfig ¶
Click to show internal directories.
Click to hide internal directories.