Add gorilla session provider
This commit is contained in:
parent
38f4c7b735
commit
9d5a2b02cc
16
session/gorilla/provider.go
Normal file
16
session/gorilla/provider.go
Normal file
@ -0,0 +1,16 @@
|
||||
package gorilla
|
||||
|
||||
import (
|
||||
"forge.cadoles.com/wpetit/goweb/service"
|
||||
"github.com/gorilla/sessions"
|
||||
)
|
||||
|
||||
// ServiceProvider returns a service.Provider for the
|
||||
// the gorilla session service implementation
|
||||
func ServiceProvider(sessionName string, store sessions.Store, defaultOptions *sessions.Options) service.Provider {
|
||||
sessionService := NewSessionService(sessionName, store, defaultOptions)
|
||||
|
||||
return func(container *service.Container) (interface{}, error) {
|
||||
return sessionService, nil
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user