Added debug prints for access token target

This commit is contained in:
David Allen 2024-03-11 16:04:39 -06:00
parent 0b9c1a74d0
commit d0fd0d8714
No known key found for this signature in database
GPG key ID: 1D2A29322FBB6FCB

View file

@ -135,7 +135,11 @@ func (s *Server) Login(buttons string, provider *oidc.IdentityProvider, client *
}
// try and send access code to target if set
if target != "" {
httpx.MakeHttpRequest(target, http.MethodPost, []byte(accessToken), httpx.Headers{})
fmt.Printf("Send access token to target: %s\n", target)
_, _, err := httpx.MakeHttpRequest(target, http.MethodPost, []byte(accessToken), httpx.Headers{})
if err != nil {
fmt.Printf("failed to make request: %v", err)
}
}
})
r.HandleFunc("/error", func(w http.ResponseWriter, r *http.Request) {