Compare commits

...

9 commits

Author SHA1 Message Date
David Allen
722ee4f40f
Merge pull request #14 from OpenCHAMI/allend/update-merge
Merge changes between forks and add aarch64 build
2026-03-09 13:16:05 -06:00
David Allen
0fa5ec2e6a
Merge branch 'main' into allend/update-merge 2026-03-09 13:14:50 -06:00
David Allen
8049aaff40
Merge pull request #6 from cjh1/content-type
Set content type for JSON responses
2026-01-15 14:12:57 -07:00
Chris Harris
93a1fea300
Ensure Content-Type is set to application/json
Signed-off-by: Chris Harris <cjh@lbl.gov>
2026-01-15 20:49:21 +00:00
Chris Harris
581aca14b8
Remove trailing whitespace
Signed-off-by: Chris Harris <cjh@lbl.gov>
2026-01-15 20:49:03 +00:00
Tiziano Müller
b317c061db
server: fix error reporting and logic for /keys handler
restores proper error reporting to include the host dialed, and
fixes the tautological comparison `jwks == nil` in the recovery path
to properly refetch the server config and try again as intended
2024-07-01 12:32:00 -06:00
David Allen
5541744096
Fixed token fetch from IDP 2024-06-12 14:42:47 -06:00
David Allen
8570064235
Added response body print to debug ID token 2024-06-12 14:01:24 -06:00
David Allen
2612978a98
Added verbose print to show ID and access tokens from IDP 2024-06-12 12:50:53 -06:00

View file

@ -137,6 +137,7 @@ func (s *Server) StartLogin(clients []oauth.Client, params ServerParams) error {
}
})
r.HandleFunc("/keys", func(w http.ResponseWriter, r *http.Request) {
var (
p = params.AuthProvider
jwks []byte
@ -182,6 +183,7 @@ func (s *Server) StartLogin(clients []oauth.Client, params ServerParams) error {
return
}
w.Header().Set("Content-Type", "application/json")
w.Write(jwks)
})
r.HandleFunc("/token", func(w http.ResponseWriter, r *http.Request) {
@ -217,6 +219,7 @@ func (s *Server) StartLogin(clients []oauth.Client, params ServerParams) error {
http.Redirect(w, r, "/error", http.StatusInternalServerError)
return
}
w.Header().Set("Content-Type", "application/json")
w.Write([]byte(accessToken))
}
})