diff --git a/session/connectors/sql.go b/session/connectors/sql.go index 4132185..5435d6c 100644 --- a/session/connectors/sql.go +++ b/session/connectors/sql.go @@ -8,7 +8,7 @@ import ( "github.com/wader/gormstore" ) -type SqlMemoryStoreConnector struct { +type SqlStoreConnector struct { SqlExtension *sql.Extension Secret string MaxAgeMs int @@ -17,7 +17,7 @@ type SqlMemoryStoreConnector struct { db *gorm.DB } -func (s SqlMemoryStoreConnector) Connect() (error, sessions.Store) { +func (s SqlStoreConnector) Connect() (error, sessions.Store) { // if no DB provided, use sqlite3 memory DB if s.SqlExtension == nil { @@ -46,7 +46,7 @@ func (s SqlMemoryStoreConnector) Connect() (error, sessions.Store) { return nil, store } -func (s SqlMemoryStoreConnector) MaxAge() int { +func (s SqlStoreConnector) MaxAge() int { if s.MaxAgeMs == 0 { return 60 * 60 * 24 * 15 // 15 days } diff --git a/session/sample/sample.application.go b/session/sample/sample.application.go index 44ebb80..00206b5 100644 --- a/session/sample/sample.application.go +++ b/session/sample/sample.application.go @@ -40,7 +40,7 @@ func main() { } // allocate session extension, with an optional custom connector - var sessionConnector session.SessionStoreConnector = &connectors.SqlMemoryStoreConnector{ + var sessionConnector session.SessionStoreConnector = &connectors.SqlStoreConnector{ Secret: "somesecret", SqlExtension: sqlController.SqlExtension, } diff --git a/user/auth/auth0/sample/sample.application.go b/user/auth/auth0/sample/sample.application.go index 3cd6ea6..85bc16b 100644 --- a/user/auth/auth0/sample/sample.application.go +++ b/user/auth/auth0/sample/sample.application.go @@ -58,7 +58,7 @@ func main() { // allocate session extension sessionExtension := session.Extension{ SessionName: "auth0", - StoreConnector: connectors.SqlMemoryStoreConnector{ + StoreConnector: connectors.SqlStoreConnector{ SqlExtension: &sqlExtension, Secret: "somesecret", }, diff --git a/user/auth/local/sample/sample.application.go b/user/auth/local/sample/sample.application.go index aede4aa..37ed153 100644 --- a/user/auth/local/sample/sample.application.go +++ b/user/auth/local/sample/sample.application.go @@ -58,7 +58,7 @@ func main() { } // allocate session extension - connector := connectors.SqlMemoryStoreConnector{ + connector := connectors.SqlStoreConnector{ SqlExtension: &sqlExtension, Secret: "dumbsecret", }