fix parse

This commit is contained in:
adlerhurst 2024-03-07 15:25:23 +01:00
parent 7069813ec7
commit 0fe7c3307f
2 changed files with 5 additions and 5 deletions

View file

@ -153,15 +153,15 @@ type clientData struct {
// If no client id can be obtained by any method, oidc.ErrInvalidClient
// is returned with ErrMissingClientID wrapped in it.
func ClientIDFromRequest(r *http.Request, p ClientProvider) (clientID string, authenticated bool, err error) {
ctx, span := tracer.Start(r.Context(), "ClientIDFromRequest")
r = r.WithContext(ctx)
defer span.End()
err = r.ParseForm()
if err != nil {
return "", false, oidc.ErrInvalidRequest().WithDescription("cannot parse form").WithParent(err)
}
ctx, span := tracer.Start(r.Context(), "ClientIDFromRequest")
r = r.WithContext(ctx)
defer span.End()
data := new(clientData)
if err = p.Decoder().Decode(data, r.Form); err != nil {
return "", false, err

View file

@ -181,7 +181,7 @@ func TestRoutes(t *testing.T) {
},
},
{
// This call will fail. A successfull test is already
// This call will fail. A successful test is already
// part of client/integration_test.go
name: "code exchange",
method: http.MethodGet,