use helper from shuffle-shared to create session_token
Signed-off-by: Pascal Sthamer <pascal+github@sthamer.xyz>
This commit is contained in:
@@ -826,11 +826,8 @@ func handleInfo(resp http.ResponseWriter, request *http.Request) {
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
expiration := time.Now().Add(3600 * time.Second)
|
expiration := time.Now().Add(3600 * time.Second)
|
||||||
http.SetCookie(resp, &http.Cookie{
|
sessionCookie := shuffle.ConstructSessionCookie(userInfo.Session, expiration)
|
||||||
Name: "session_token",
|
http.SetCookie(resp, sessionCookie)
|
||||||
Value: userInfo.Session,
|
|
||||||
Expires: expiration,
|
|
||||||
})
|
|
||||||
|
|
||||||
// Updating user info if there's something wrong
|
// Updating user info if there's something wrong
|
||||||
if len(userInfo.ActiveOrg.Name) == 0 || len(userInfo.ActiveOrg.Id) == 0 {
|
if len(userInfo.ActiveOrg.Name) == 0 || len(userInfo.ActiveOrg.Id) == 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user