mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
fc05b973ad
* [FEATURE] Redis DB Number Selection - Allow users to specify the DB number - This is so users who use their redis for multiple purposes can have clear demarcation between their data * revert: import order * Add default/example to config template with docs * Set DB Index property name to be more clear
28 lines
1000 B
Go
28 lines
1000 B
Go
package schema
|
|
|
|
// RedisSessionConfiguration represents the configuration related to redis session store.
|
|
type RedisSessionConfiguration struct {
|
|
Host string `mapstructure:"host"`
|
|
Port int64 `mapstructure:"port"`
|
|
Password string `mapstructure:"password"`
|
|
DatabaseIndex int `mapstructure:"database_index"`
|
|
}
|
|
|
|
// SessionConfiguration represents the configuration related to user sessions.
|
|
type SessionConfiguration struct {
|
|
Name string `mapstructure:"name"`
|
|
Secret string `mapstructure:"secret"`
|
|
// Expiration in seconds
|
|
Expiration int64 `mapstructure:"expiration"`
|
|
// Inactivity in seconds
|
|
Inactivity int64 `mapstructure:"inactivity"`
|
|
Domain string `mapstructure:"domain"`
|
|
Redis *RedisSessionConfiguration `mapstructure:"redis"`
|
|
}
|
|
|
|
// DefaultSessionConfiguration is the default session configuration
|
|
var DefaultSessionConfiguration = SessionConfiguration{
|
|
Name: "authelia_session",
|
|
Expiration: 3600,
|
|
}
|