diff --git a/session/session.go b/session/session.go index cf647521..ec5d004f 100644 --- a/session/session.go +++ b/session/session.go @@ -96,6 +96,7 @@ type ManagerConfig struct { EnableSidInHTTPHeader bool `json:"EnableSidInHTTPHeader"` SessionNameInHTTPHeader string `json:"SessionNameInHTTPHeader"` EnableSidInURLQuery bool `json:"EnableSidInURLQuery"` + SessionIDPrefix string `json:"sessionIDPrefix"` } // Manager contains Provider and its configuration. @@ -331,7 +332,7 @@ func (manager *Manager) sessionID() (string, error) { if n != len(b) || err != nil { return "", fmt.Errorf("Could not successfully read from the system CSPRNG") } - return hex.EncodeToString(b), nil + return manager.config.SessionIDPrefix + hex.EncodeToString(b), nil } // Set cookie with https.