Compare commits
	
		
			5 Commits
		
	
	
		
			v1.0.20
			...
			2b61ef233d
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 2b61ef233d | |||
| d6148f289a | |||
|   | e1987287e3 | ||
| 98d2a6c3b2 | |||
| 1e0ddbc0ee | 
| @@ -1,3 +1,10 @@ | |||||||
|  | ## [1.0.21](http://gitea.gitea.svc.cluster.local:3000/djpbessems/ContainerImage.SpamasaurusRex/compare/v1.0.20...v1.0.21) (2024-03-11) | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ### Bug Fixes | ||||||
|  |  | ||||||
|  | * Add verbose debugging after session store ([1e0ddbc](http://gitea.gitea.svc.cluster.local:3000/djpbessems/ContainerImage.SpamasaurusRex/commit/1e0ddbc0eea9f97839954ac6b24c99feb4be6447)) | ||||||
|  |  | ||||||
| ## [1.0.20](http://gitea.gitea.svc.cluster.local:3000/djpbessems/ContainerImage.SpamasaurusRex/compare/v1.0.19...v1.0.20) (2024-03-11) | ## [1.0.20](http://gitea.gitea.svc.cluster.local:3000/djpbessems/ContainerImage.SpamasaurusRex/compare/v1.0.19...v1.0.20) (2024-03-11) | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -30,7 +30,12 @@ var config = oauth2.Config{ | |||||||
| var sessionStore = sessions.NewCookieStore([]byte("xDDBjhYwyndZty3exGNq2ahE8wHRCR4DfdCJCSoWXAYncfWw2UQDH63QcJ9CkrGx")) | var sessionStore = sessions.NewCookieStore([]byte("xDDBjhYwyndZty3exGNq2ahE8wHRCR4DfdCJCSoWXAYncfWw2UQDH63QcJ9CkrGx")) | ||||||
|  |  | ||||||
| func rootHandler(w http.ResponseWriter, r *http.Request) { | func rootHandler(w http.ResponseWriter, r *http.Request) { | ||||||
| 	session, _ := sessionStore.Get(r, "spamasaurusRex") | 	session, err := sessionStore.Get(r, "spamasaurusRex") | ||||||
|  | 	if err != nil { | ||||||
|  | 		log.Println(spew.Sdump(err)) | ||||||
|  | 		return | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	if token, ok := session.Values["token"]; ok { | 	if token, ok := session.Values["token"]; ok { | ||||||
| 		log.Println(spew.Sdump(token)) | 		log.Println(spew.Sdump(token)) | ||||||
| 		w.Write([]byte("Token retrieved from session")) | 		w.Write([]byte("Token retrieved from session")) | ||||||
| @@ -58,9 +63,15 @@ func callbackHandler(w http.ResponseWriter, r *http.Request) { | |||||||
| 		log.Println(spew.Sdump(err)) | 		log.Println(spew.Sdump(err)) | ||||||
| 		return | 		return | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	session.Values["token"] = token | 	session.Values["token"] = token | ||||||
| 	session.Save(r, w) |  | ||||||
|  | 	err = session.Save(r, w) | ||||||
|  | 	if err != nil { | ||||||
|  | 		log.Println(spew.Sdump(err)) | ||||||
|  | 		return | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	log.Println(spew.Sdump(session)) | ||||||
|  |  | ||||||
| 	// w.Write([]byte("Authentication successful!")) | 	// w.Write([]byte("Authentication successful!")) | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user