2019-04-24 21:52:08 +00:00
|
|
|
package schema
|
|
|
|
|
|
|
|
// RedisSessionConfiguration represents the configuration related to redis session store.
|
|
|
|
type RedisSessionConfiguration struct {
|
2020-02-28 00:14:44 +00:00
|
|
|
Host string `mapstructure:"host"`
|
|
|
|
Port int64 `mapstructure:"port"`
|
|
|
|
Password string `mapstructure:"password"`
|
|
|
|
DatabaseIndex int `mapstructure:"database_index"`
|
2019-04-24 21:52:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SessionConfiguration represents the configuration related to user sessions.
|
|
|
|
type SessionConfiguration struct {
|
2020-04-03 23:11:33 +00:00
|
|
|
Name string `mapstructure:"name"`
|
|
|
|
Secret string `mapstructure:"secret"`
|
2020-04-05 12:37:21 +00:00
|
|
|
Expiration string `mapstructure:"expiration"`
|
|
|
|
Inactivity string `mapstructure:"inactivity"`
|
2020-04-03 23:11:33 +00:00
|
|
|
RememberMeDuration string `mapstructure:"remember_me_duration"`
|
|
|
|
Domain string `mapstructure:"domain"`
|
|
|
|
Redis *RedisSessionConfiguration `mapstructure:"redis"`
|
2019-04-24 21:52:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// DefaultSessionConfiguration is the default session configuration
|
|
|
|
var DefaultSessionConfiguration = SessionConfiguration{
|
2020-04-03 23:11:33 +00:00
|
|
|
Name: "authelia_session",
|
2020-04-05 12:37:21 +00:00
|
|
|
Expiration: "1h",
|
|
|
|
Inactivity: "5m",
|
2020-04-03 23:11:33 +00:00
|
|
|
RememberMeDuration: "1M",
|
2019-04-24 21:52:08 +00:00
|
|
|
}
|