Commit 655b0a9f authored by ale's avatar ale

Fix callers of SSOWrapper

parent 42482e82
......@@ -19,6 +19,9 @@ import (
"git.autistici.org/id/go-sso/httpsso"
)
// TTL for SSO sessions on the proxy.
var proxyAuthTTL = 1 * time.Hour
// RNG for the random backend selector.
var rnd = rand.New(rand.NewSource(time.Now().UnixNano()))
......@@ -131,6 +134,7 @@ func NewProxy(config *Config) (http.Handler, error) {
config.SSODomain,
[]byte(config.SessionAuthKey),
[]byte(config.SessionEncKey),
proxyAuthTTL,
)
if err != nil {
return nil, err
......
......@@ -26,6 +26,9 @@ import (
"git.autistici.org/id/go-sso/httpsso"
)
// Lifetime of an authenticated session.
var samlAuthTTL = 1 * time.Hour
type serviceProvider struct {
// Descriptor can either be an inline XML document, or it can
// be read from a file with the syntax "@filename".
......@@ -229,7 +232,7 @@ func NewSAMLIDP(config *Config) (http.Handler, error) {
return nil, err
}
w, err := httpsso.NewSSOWrapper(config.SSOLoginServerURL, pkey, config.SSODomain, []byte(config.SessionAuthKey), []byte(config.SessionEncKey))
w, err := httpsso.NewSSOWrapper(config.SSOLoginServerURL, pkey, config.SSODomain, []byte(config.SessionAuthKey), []byte(config.SessionEncKey), samlAuthTTL)
if err != nil {
return nil, err
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment