2019-04-25 04:52:08 +07:00
|
|
|
package schema
|
|
|
|
|
|
|
|
// RedisSessionConfiguration represents the configuration related to redis session store.
|
|
|
|
type RedisSessionConfiguration struct {
|
2020-01-22 03:56:44 +07:00
|
|
|
Host string `mapstructure:"host"`
|
|
|
|
Port int64 `mapstructure:"port"`
|
|
|
|
Password string `mapstructure:"password"`
|
2019-04-25 04:52:08 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
// SessionConfiguration represents the configuration related to user sessions.
|
|
|
|
type SessionConfiguration struct {
|
2020-01-22 03:56:44 +07:00
|
|
|
Name string `mapstructure:"name"`
|
|
|
|
Secret string `mapstructure:"secret"`
|
2019-04-25 04:52:08 +07:00
|
|
|
// Expiration in seconds
|
2020-01-22 03:56:44 +07:00
|
|
|
Expiration int64 `mapstructure:"expiration"`
|
2019-04-25 04:52:08 +07:00
|
|
|
// Inactivity in seconds
|
2020-01-22 03:56:44 +07:00
|
|
|
Inactivity int64 `mapstructure:"inactivity"`
|
|
|
|
Domain string `mapstructure:"domain"`
|
|
|
|
Redis *RedisSessionConfiguration `mapstructure:"redis"`
|
2019-04-25 04:52:08 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
// DefaultSessionConfiguration is the default session configuration
|
|
|
|
var DefaultSessionConfiguration = SessionConfiguration{
|
|
|
|
Name: "authelia_session",
|
|
|
|
Expiration: 3600,
|
|
|
|
}
|