Skip to content

restgo/session-mongo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mongo session store for session of restgo GoDoc

Install

go get github.com/restgo/session-mongo

Usage

app := restgo.App()

sessionOpts := `{
    "Secret"     :"secret",
    "Secure"     :false,
    "Path"       :"/",
    "HttpOnly"   :true,
    "CookieName" :"cookie-session",
    "MaxAge"     : 86400,
    "EncyptCookie": false
}`

mongoOpts := `{
    "Hosts"     :"localhost",
    "Database"  :"test",
    "Collection":"sessions",
    "Username"  :"",
    "Password"  :""
}`

app.Use(session.NewSessionManager(session_mongo.NewMongoSessionStore(mongoOpts), sessionOpts))

About

mongo session store for restgo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages