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