Skip to content

Commit

Permalink
chore: bump ory/x
Browse files Browse the repository at this point in the history
  • Loading branch information
alnr committed Feb 5, 2024
1 parent 12166b4 commit f63828e
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion courier/template/load_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func loadRemoteTemplate(ctx context.Context, d templateDependencies, url string,
b = t.([]byte)
} else {
f := fetcher.NewFetcher(fetcher.WithClient(d.HTTPClient(ctx)))
b, err = f.FetchContext(ctx, url)
b, err = f.FetchBytes(ctx, url)
if err != nil {
return nil, errors.WithStack(err)
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ require (
github.com/ory/jsonschema/v3 v3.0.8
github.com/ory/mail/v3 v3.0.0
github.com/ory/nosurf v1.2.7
github.com/ory/x v0.0.611
github.com/ory/x v0.0.613
github.com/peterhellberg/link v1.2.0
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2
github.com/pkg/errors v0.9.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -819,8 +819,8 @@ github.com/ory/nosurf v1.2.7 h1:YrHrbSensQyU6r6HT/V5+HPdVEgrOTMJiLoJABSBOp4=
github.com/ory/nosurf v1.2.7/go.mod h1:d4L3ZBa7Amv55bqxCBtCs63wSlyaiCkWVl4vKf3OUxA=
github.com/ory/sessions v1.2.2-0.20220110165800-b09c17334dc2 h1:zm6sDvHy/U9XrGpixwHiuAwpp0Ock6khSVHkrv6lQQU=
github.com/ory/sessions v1.2.2-0.20220110165800-b09c17334dc2/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM=
github.com/ory/x v0.0.611 h1:mB23kkg8EYebmKo25JYubXQZmu1l4qLFJnkwr3DnpzA=
github.com/ory/x v0.0.611/go.mod h1:uH065puz8neija0neqwIN3PmXXfDsB9VbZTZ20Znoos=
github.com/ory/x v0.0.613 h1:MHT0scH7hcrOkc3aH7qqYLzXVJkjhB0szWTwpD2lh8Q=
github.com/ory/x v0.0.613/go.mod h1:uH065puz8neija0neqwIN3PmXXfDsB9VbZTZ20Znoos=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY=
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
Expand Down
4 changes: 2 additions & 2 deletions request/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,15 @@ func (b *Builder) readTemplate(ctx context.Context) ([]byte, error) {
}

f := fetcher.NewFetcher(fetcher.WithClient(b.deps.HTTPClient(ctx)), fetcher.WithCache(b.cache, 60*time.Minute))
tpl, err := f.FetchContext(ctx, templateURI)
tpl, err := f.FetchBytes(ctx, templateURI)
if errors.Is(err, fetcher.ErrUnknownScheme) {
// legacy filepath
templateURI = "file://" + templateURI
b.deps.Logger().WithError(err).Warnf(
"support for filepaths without a 'file://' scheme will be dropped in the next release, please use %s instead in your config",
templateURI)

tpl, err = f.FetchContext(ctx, templateURI)
tpl, err = f.FetchBytes(ctx, templateURI)
}
// this handles the first error if it is a known scheme error, or the second fetch error
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion selfservice/strategy/oidc/strategy_registration.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func (s *Strategy) processRegistration(w http.ResponseWriter, r *http.Request, r
}

fetch := fetcher.NewFetcher(fetcher.WithClient(s.d.HTTPClient(r.Context())), fetcher.WithCache(jsonnetCache, 60*time.Minute))
jsonnetMapperSnippet, err := fetch.FetchContext(r.Context(), provider.Config().Mapper)
jsonnetMapperSnippet, err := fetch.FetchBytes(r.Context(), provider.Config().Mapper)
if err != nil {
return nil, s.handleError(w, r, rf, provider.Config().ID, nil, err)
}
Expand Down
2 changes: 1 addition & 1 deletion session/tokenizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (s *Tokenizer) TokenizeSession(ctx context.Context, template string, sessio
vm.ExtCode("claims", string(claimsRaw))

fetcher := fetcher.NewFetcher(fetcher.WithClient(httpClient), fetcher.WithCache(s.cache, 60*time.Minute))
jsonnet, err := fetcher.FetchContext(ctx, mapper)
jsonnet, err := fetcher.FetchBytes(ctx, mapper)
if err != nil {
return err
}
Expand Down

0 comments on commit f63828e

Please sign in to comment.