committing everything before round 2
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package auth
|
||||
|
||||
import (
|
||||
|
||||
"github.com/alexedwards/scs/v2"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
)
|
||||
|
||||
// remember, if anyone attempts to login as the system or zombie user, fail them. hard.
|
||||
|
||||
// sessionManager needs to be figured out. do i inherit that from somewhere else?
|
||||
// does it get associated with any other one like PHP's `session_open()` if i call it here?
|
||||
|
||||
|
||||
func set(writer http.ResponseWriter, request *http.Request) {
|
||||
sessionManager.Put(request.Context(), "sessionKey", "message to be passed around")
|
||||
}
|
||||
|
||||
func get(writer http.ResponseWriter, request *http.Request) String {
|
||||
return sessionManager.GetString(request.Context(), "sessionKey")
|
||||
}
|
||||
Reference in New Issue
Block a user