Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
22607d3601 | |||
a553e9e93a | |||
63f764d1c5 | |||
19ddd10164 | |||
97aae89ce9 | |||
1af505196a |
14
CHANGELOG.md
14
CHANGELOG.md
@ -1,3 +1,17 @@
|
|||||||
|
## [1.0.20](http://gitea.gitea.svc.cluster.local:3000/djpbessems/ContainerImage.SpamasaurusRex/compare/v1.0.19...v1.0.20) (2024-03-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Add more debug logging ([63f764d](http://gitea.gitea.svc.cluster.local:3000/djpbessems/ContainerImage.SpamasaurusRex/commit/63f764d1c56c5f66c15ef9cdf9139fabd4c3d8a4))
|
||||||
|
|
||||||
|
## [1.0.19](http://gitea.gitea.svc.cluster.local:3000/djpbessems/ContainerImage.SpamasaurusRex/compare/v1.0.18...v1.0.19) (2024-03-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Add error handling to session store ([1af5051](http://gitea.gitea.svc.cluster.local:3000/djpbessems/ContainerImage.SpamasaurusRex/commit/1af505196ad217b91169cdac771de2ec0a35482f))
|
||||||
|
|
||||||
## [1.0.18](http://gitea.gitea.svc.cluster.local:3000/djpbessems/ContainerImage.SpamasaurusRex/compare/v1.0.17...v1.0.18) (2024-03-10)
|
## [1.0.18](http://gitea.gitea.svc.cluster.local:3000/djpbessems/ContainerImage.SpamasaurusRex/compare/v1.0.17...v1.0.18) (2024-03-10)
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ func rootHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
log.Println(spew.Sdump(token))
|
log.Println(spew.Sdump(token))
|
||||||
w.Write([]byte("Token retrieved from session"))
|
w.Write([]byte("Token retrieved from session"))
|
||||||
} else {
|
} else {
|
||||||
|
log.Println(spew.Sdump(session))
|
||||||
url := config.AuthCodeURL("state", oauth2.AccessTypeOffline)
|
url := config.AuthCodeURL("state", oauth2.AccessTypeOffline)
|
||||||
http.Redirect(w, r, url, http.StatusFound)
|
http.Redirect(w, r, url, http.StatusFound)
|
||||||
}
|
}
|
||||||
@ -52,7 +53,12 @@ func callbackHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Store the token in the session
|
// Store the token in the session
|
||||||
session, _ := sessionStore.Get(r, "spamasaurusRex")
|
session, err := sessionStore.Get(r, "spamasaurusRex")
|
||||||
|
if err != nil {
|
||||||
|
log.Println(spew.Sdump(err))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
session.Values["token"] = token
|
session.Values["token"] = token
|
||||||
session.Save(r, w)
|
session.Save(r, w)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user