Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ docs/cli: .bin/clidoc
clidoc .

.bin/cli: go.mod Makefile
go build -o .bin/cli -tags sqlite github.com/ory/cli
go build -o .bin/cli github.com/ory/cli
Comment thread
alnr marked this conversation as resolved.

.bin/golangci-lint-$(GOLANGCI_LINT_VERSION):
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b .bin v$(GOLANGCI_LINT_VERSION)
Expand All @@ -28,11 +28,11 @@ lint: .bin/golangci-lint-$(GOLANGCI_LINT_VERSION)

.PHONY: install
install:
go install -tags sqlite .
go install .

.PHONY: refresh
refresh:
UPDATE_SNAPSHOTS=true go test -tags sqlite,json1,refresh ./...
UPDATE_SNAPSHOTS=true go test -tags=refresh ./...

# Formats the code
.PHONY: format
Expand Down
2 changes: 1 addition & 1 deletion cmd/cloudx/oauth2/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"testing"

"github.com/gofrs/uuid/v3"
"github.com/gofrs/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/tidwall/gjson"
Expand Down
8 changes: 4 additions & 4 deletions cmd/cloudx/proxy/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

"github.com/go-jose/go-jose/v3"
"github.com/go-jose/go-jose/v3/jwt"
"github.com/gofrs/uuid/v3"
"github.com/gofrs/uuid"
"github.com/hashicorp/go-retryablehttp"
"github.com/pkg/errors"
"github.com/rs/cors"
Expand Down Expand Up @@ -376,7 +376,7 @@ func checkSession(c *retryablehttp.Client, r *http.Request, target *url.URL) (js
target.Path = path.Join(target.Path, "sessions", "whoami")
req, err := retryablehttp.NewRequest("GET", target.String(), nil)
if err != nil {
return nil, errors.WithStack(herodot.ErrInternalServerError)
return nil, errors.WithStack(herodot.ErrInternalServerError())
Comment thread
alnr marked this conversation as resolved.
}

req.Header.Set("Cookie", r.Header.Get("Cookie"))
Expand All @@ -387,13 +387,13 @@ func checkSession(c *retryablehttp.Client, r *http.Request, target *url.URL) (js

res, err := c.Do(req)
if err != nil {
return nil, errors.WithStack(herodot.ErrInternalServerError.WithReasonf("Unable to call session checker: %s", err).WithWrap(err))
return nil, errors.WithStack(herodot.ErrInternalServerError().WithReasonf("Unable to call session checker: %s", err).WithWrap(err))
}
defer res.Body.Close()

var body json.RawMessage
if err := json.NewDecoder(res.Body).Decode(&body); err != nil {
return nil, errors.WithStack(herodot.ErrInternalServerError.WithReasonf("Unable to decode session to JSON: %s", err).WithWrap(err))
return nil, errors.WithStack(herodot.ErrInternalServerError().WithReasonf("Unable to decode session to JSON: %s", err).WithWrap(err))
}

return body, nil
Expand Down
Loading
Loading