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
|
|
|
// TODO(james-d-elliott): Convert to duration notation (Both Expiration and Activity need to be strings, and default needs to be changed)
|
|
|
|
Name string `mapstructure:"name"`
|
|
|
|
Secret string `mapstructure:"secret"`
|
|
|
|
Expiration int64 `mapstructure:"expiration"` // Expiration in seconds
|
|
|
|
Inactivity int64 `mapstructure:"inactivity"` // Inactivity in seconds
|
|
|
|
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",
|
|
|
|
Expiration: 3600,
|
|
|
|
RememberMeDuration: "1M",
|
2019-04-24 21:52:08 +00:00
|
|
|
}
|