Skip to content

Commit

Permalink
chore: resolve build and test issues
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed May 24, 2024
1 parent 73dd575 commit 43b7000
Show file tree
Hide file tree
Showing 205 changed files with 39,877 additions and 108 deletions.
2 changes: 1 addition & 1 deletion .schema/openapi/patches/selfservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
- "$ref": "#/components/schemas/updateLoginFlowWithLookupSecretMethod"
- "$ref": "#/components/schemas/updateLoginFlowWithCodeMethod"
- "$ref": "#/components/schemas/updateLoginFlowWithPasskeyMethod"
- "$ref": "#/components/schemas/updateLoginFlowWithTwoStepMethod"
- "$ref": "#/components/schemas/updateLoginFlowWithIdentifierFirstMethod"
- op: add
path: /components/schemas/updateLoginFlowBody/discriminator
value:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ sdk: .bin/swagger .bin/ory node_modules
-t .schema/openapi/templates/go \
-c .schema/openapi/gen.go.yml

(cd internal/client-go; go mod edit -module github.com/ory/client-go go.mod; rm -rf test api docs)
(cd internal/client-go; go mod edit -module github.com/ory/kratos/internal/httpclient go.mod; rm -rf test api docs)

make format

Expand Down
2 changes: 1 addition & 1 deletion cmd/cliclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

"github.com/spf13/pflag"

kratos "github.com/ory/client-go"
kratos "github.com/ory/kratos/internal/httpclient"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion cmd/identities/definitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package identities
import (
"strings"

kratos "github.com/ory/client-go"
kratos "github.com/ory/kratos/internal/httpclient"

"github.com/ory/x/cmdx"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/identities/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package identities
import (
"fmt"

kratos "github.com/ory/client-go"
kratos "github.com/ory/kratos/internal/httpclient"
"github.com/ory/kratos/x"
"github.com/ory/x/cmdx"
"github.com/ory/x/stringsx"
Expand Down
2 changes: 1 addition & 1 deletion cmd/identities/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"encoding/json"
"fmt"

kratos "github.com/ory/client-go"
kratos "github.com/ory/kratos/internal/httpclient"

"github.com/ory/x/cmdx"

Expand Down
2 changes: 1 addition & 1 deletion cmd/identities/import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"github.com/stretchr/testify/require"
"github.com/tidwall/gjson"

kratos "github.com/ory/client-go"
"github.com/ory/kratos/driver/config"
kratos "github.com/ory/kratos/internal/httpclient"
)

func TestImportCmd(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion driver/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ func (p *Config) SelfServiceStrategy(ctx context.Context, strategy string) *Self
// we need to forcibly set these values here:
defaultEnabled := false
switch strategy {
case "identity_discovery":
case "two_step":
defaultEnabled = p.SelfServiceLoginFlowTwoStepEnabled(ctx)
break

Check failure on line 781 in driver/config/config.go

View workflow job for this annotation

GitHub Actions / Run tests and lints

S1023: redundant break statement (gosimple)
case "code", "password", "profile":
Expand Down
3 changes: 2 additions & 1 deletion driver/registry_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ package driver
import (
"context"
"crypto/sha256"
"github.com/ory/kratos/selfservice/strategy/multistep"
"net/http"
"strings"
"sync"
"testing"
"time"

"github.com/ory/kratos/selfservice/strategy/multistep"

"github.com/cenkalti/backoff"
"github.com/dgraph-io/ristretto"
"github.com/gobuffalo/pop/v6"
Expand Down
2 changes: 1 addition & 1 deletion examples/go/identity/create/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package main
import (
"context"

ory "github.com/ory/client-go"
"github.com/ory/kratos/examples/go/pkg"
ory "github.com/ory/kratos/internal/httpclient"
"github.com/ory/kratos/x"
)

Expand Down
2 changes: 1 addition & 1 deletion examples/go/identity/get/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package main
import (
"context"

ory "github.com/ory/client-go"
"github.com/ory/kratos/examples/go/pkg"
ory "github.com/ory/kratos/internal/httpclient"
)

// If you use Open Source this would be:
Expand Down
2 changes: 1 addition & 1 deletion examples/go/identity/update/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package main
import (
"context"

ory "github.com/ory/client-go"
"github.com/ory/kratos/examples/go/pkg"
ory "github.com/ory/kratos/internal/httpclient"
"github.com/ory/kratos/x"
)

Expand Down
2 changes: 1 addition & 1 deletion examples/go/pkg/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

"github.com/ory/kratos/internal/testhelpers"

ory "github.com/ory/client-go"
ory "github.com/ory/kratos/internal/httpclient"
)

func PrintJSONPretty(v interface{}) {
Expand Down
2 changes: 1 addition & 1 deletion examples/go/pkg/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/gofrs/uuid"

ory "github.com/ory/client-go"
ory "github.com/ory/kratos/internal/httpclient"
)

func RandomCredentials() (email, password string) {
Expand Down
2 changes: 1 addition & 1 deletion examples/go/selfservice/recovery/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

ory "github.com/ory/client-go"
"github.com/ory/kratos/examples/go/pkg"
ory "github.com/ory/kratos/internal/httpclient"
"github.com/ory/kratos/internal/testhelpers"
)

Expand Down
2 changes: 1 addition & 1 deletion examples/go/selfservice/settings/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package main
import (
"testing"

ory "github.com/ory/client-go"
ory "github.com/ory/kratos/internal/httpclient"

"github.com/stretchr/testify/assert"

Expand Down
2 changes: 1 addition & 1 deletion examples/go/selfservice/verification/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

ory "github.com/ory/client-go"
"github.com/ory/kratos/examples/go/pkg"
ory "github.com/ory/kratos/internal/httpclient"
"github.com/ory/kratos/internal/testhelpers"
)

Expand Down
2 changes: 1 addition & 1 deletion identity/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const (
CredentialsTypePasskey CredentialsType = "passkey"
CredentialsTypeProfile CredentialsType = "profile"

TwoStep CredentialsType = "identity_discovery" // TODO move this somewhere else
TwoStep CredentialsType = "two_step" // TODO move this somewhere else
)

func (c CredentialsType) String() string {
Expand Down
2 changes: 2 additions & 0 deletions internal/client-go/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ docs/UiText.md
docs/UpdateIdentityBody.md
docs/UpdateLoginFlowBody.md
docs/UpdateLoginFlowWithCodeMethod.md
docs/UpdateLoginFlowWithIdentifierFirstMethod.md
docs/UpdateLoginFlowWithLookupSecretMethod.md
docs/UpdateLoginFlowWithOidcMethod.md
docs/UpdateLoginFlowWithPasskeyMethod.md
Expand Down Expand Up @@ -221,6 +222,7 @@ model_ui_text.go
model_update_identity_body.go
model_update_login_flow_body.go
model_update_login_flow_with_code_method.go
model_update_login_flow_with_identifier_first_method.go
model_update_login_flow_with_lookup_secret_method.go
model_update_login_flow_with_oidc_method.go
model_update_login_flow_with_passkey_method.go
Expand Down
1 change: 1 addition & 0 deletions internal/client-go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ Class | Method | HTTP request | Description
- [UpdateIdentityBody](docs/UpdateIdentityBody.md)
- [UpdateLoginFlowBody](docs/UpdateLoginFlowBody.md)
- [UpdateLoginFlowWithCodeMethod](docs/UpdateLoginFlowWithCodeMethod.md)
- [UpdateLoginFlowWithIdentifierFirstMethod](docs/UpdateLoginFlowWithIdentifierFirstMethod.md)
- [UpdateLoginFlowWithLookupSecretMethod](docs/UpdateLoginFlowWithLookupSecretMethod.md)
- [UpdateLoginFlowWithOidcMethod](docs/UpdateLoginFlowWithOidcMethod.md)
- [UpdateLoginFlowWithPasskeyMethod](docs/UpdateLoginFlowWithPasskeyMethod.md)
Expand Down
4 changes: 2 additions & 2 deletions internal/client-go/api_identity.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/client-go/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/ory/client-go
module github.com/ory/kratos/internal/httpclient

go 1.13

Expand Down
2 changes: 1 addition & 1 deletion internal/client-go/model_identity_credentials.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/client-go/model_login_flow.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/client-go/model_registration_flow.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/client-go/model_ui_node.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 47 additions & 7 deletions internal/client-go/model_update_login_flow_body.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 43b7000

Please sign in to comment.