diff --git a/.schema/openapi/patches/selfservice.yaml b/.schema/openapi/patches/selfservice.yaml
index 88aca38afef4..7887c1c2da74 100644
--- a/.schema/openapi/patches/selfservice.yaml
+++ b/.schema/openapi/patches/selfservice.yaml
@@ -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:
@@ -65,7 +65,7 @@
lookup_secret: "#/components/schemas/updateLoginFlowWithLookupSecretMethod"
code: "#/components/schemas/updateLoginFlowWithCodeMethod"
passkey: "#/components/schemas/updateLoginFlowWithPasskeyMethod"
- two_step: "#/components/schemas/updateLoginFlowWithIdentifierFirstMethod"
+ identifier_first: "#/components/schemas/updateLoginFlowWithIdentifierFirstMethod"
- op: add
path: /components/schemas/loginFlowState/enum
value:
diff --git a/Makefile b/Makefile
index 7af282d469c3..0395085b9849 100644
--- a/Makefile
+++ b/Makefile
@@ -193,8 +193,8 @@ migrations-sync: .bin/ory
ory dev pop migration sync persistence/sql/migrations/templates persistence/sql/migratest/testdata
script/add-down-migrations.sh
-.PHONY: test-update-snapshots
-test-update-snapshots:
+.PHONY: test-refresh
+test-refresh:
UPDATE_SNAPSHOTS=true go test -tags sqlite,json1,refresh -short ./...
.PHONY: post-release
diff --git a/cmd/cliclient/client.go b/cmd/cliclient/client.go
index fc7a4bed451c..82a41f2aacb1 100644
--- a/cmd/cliclient/client.go
+++ b/cmd/cliclient/client.go
@@ -18,7 +18,7 @@ import (
"github.com/spf13/pflag"
- kratos "github.com/ory/client-go"
+ kratos "github.com/ory/kratos/internal/httpclient"
)
const (
diff --git a/cmd/clidoc/main.go b/cmd/clidoc/main.go
index 6ed8df8d1748..a498aa9dfca6 100644
--- a/cmd/clidoc/main.go
+++ b/cmd/clidoc/main.go
@@ -177,6 +177,8 @@ func init() {
"NewErrorValidationAddressUnknown": text.NewErrorValidationAddressUnknown(),
"NewInfoSelfServiceLoginCodeMFA": text.NewInfoSelfServiceLoginCodeMFA(),
"NewInfoSelfServiceLoginCodeMFAHint": text.NewInfoSelfServiceLoginCodeMFAHint("{maskedIdentifier}"),
+ "NewInfoLoginPassword": text.NewInfoLoginPassword(),
+ "NewErrorValidationAccountNotFound": text.NewErrorValidationAccountNotFound(),
}
}
diff --git a/cmd/identities/definitions.go b/cmd/identities/definitions.go
index 876eeba9f4a9..956266e70aa3 100644
--- a/cmd/identities/definitions.go
+++ b/cmd/identities/definitions.go
@@ -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"
)
diff --git a/cmd/identities/get.go b/cmd/identities/get.go
index a575af2920e9..677ac3bc9121 100644
--- a/cmd/identities/get.go
+++ b/cmd/identities/get.go
@@ -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"
diff --git a/cmd/identities/import.go b/cmd/identities/import.go
index 16641f919477..1de8a22de385 100644
--- a/cmd/identities/import.go
+++ b/cmd/identities/import.go
@@ -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"
diff --git a/cmd/identities/import_test.go b/cmd/identities/import_test.go
index 1e8031b906ac..8db159de9cff 100644
--- a/cmd/identities/import_test.go
+++ b/cmd/identities/import_test.go
@@ -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) {
diff --git a/driver/config/config.go b/driver/config/config.go
index d9615451777e..0c5b11ee0175 100644
--- a/driver/config/config.go
+++ b/driver/config/config.go
@@ -134,7 +134,7 @@ const (
ViperKeySelfServiceRegistrationAfter = "selfservice.flows.registration.after"
ViperKeySelfServiceRegistrationBeforeHooks = "selfservice.flows.registration.before.hooks"
ViperKeySelfServiceLoginUI = "selfservice.flows.login.ui_url"
- ViperKeySelfServiceLoginFlowTwoStepEnabled = "selfservice.flows.login.two_step.enabled"
+ ViperKeySelfServiceLoginFlowStyle = "selfservice.flows.login.style"
ViperKeySecurityAccountEnumerationMitigate = "security.account_enumeration.mitigate"
ViperKeySelfServiceLoginRequestLifespan = "selfservice.flows.login.lifespan"
ViperKeySelfServiceLoginAfter = "selfservice.flows.login.after"
@@ -776,7 +776,7 @@ func (p *Config) SelfServiceStrategy(ctx context.Context, strategy string) *Self
var err error
config, err = json.Marshal(pp.GetF(basePath+".config", config))
if err != nil {
- p.l.WithError(err).Warn("Unable to marshal self service strategy configuration.")
+ p.l.WithError(err).Warn("Unable to marshal self-service strategy configuration.")
config = json.RawMessage("{}")
}
@@ -784,12 +784,10 @@ 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":
- defaultEnabled = p.SelfServiceLoginFlowTwoStepEnabled(ctx)
- break
+ case "identifier_first":
+ defaultEnabled = p.SelfServiceLoginFlowIdentifierFirstEnabled(ctx)
case "code", "password", "profile":
defaultEnabled = true
- break
}
// Backwards compatibility for the old "passwordless_enabled" key
@@ -1619,8 +1617,13 @@ func (p *Config) PasswordMigrationHook(ctx context.Context) (hook *PasswordMigra
return hook
}
-func (p *Config) SelfServiceLoginFlowTwoStepEnabled(ctx context.Context) bool {
- return p.GetProvider(ctx).Bool(ViperKeySelfServiceLoginFlowTwoStepEnabled)
+func (p *Config) SelfServiceLoginFlowIdentifierFirstEnabled(ctx context.Context) bool {
+ switch p.GetProvider(ctx).String(ViperKeySelfServiceLoginFlowStyle) {
+ case "identifier_first":
+ return true
+ default:
+ return false
+ }
}
func (p *Config) SecurityAccountEnumerationMitigate(ctx context.Context) bool {
diff --git a/driver/registry_default.go b/driver/registry_default.go
index 0c5f59238d28..c77ab5d783f2 100644
--- a/driver/registry_default.go
+++ b/driver/registry_default.go
@@ -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/idfirst"
+
"github.com/cenkalti/backoff"
"github.com/dgraph-io/ristretto"
"github.com/gobuffalo/pop/v6"
@@ -325,7 +326,7 @@ func (m *RegistryDefault) selfServiceStrategies() []any {
passkey.NewStrategy(m),
webauthn.NewStrategy(m),
lookup.NewStrategy(m),
- multistep.NewStrategy(m),
+ idfirst.NewStrategy(m),
}
}
}
@@ -381,6 +382,7 @@ nextStrategy:
continue nextStrategy
}
}
+
if m.strategyLoginEnabled(ctx, s.ID().String()) {
loginStrategies = append(loginStrategies, s)
}
diff --git a/driver/registry_default_test.go b/driver/registry_default_test.go
index fa3e7772c62a..a52b4fc6072c 100644
--- a/driver/registry_default_test.go
+++ b/driver/registry_default_test.go
@@ -872,7 +872,7 @@ func TestDefaultRegistry_AllStrategies(t *testing.T) {
_, reg := internal.NewVeryFastRegistryWithoutDB(t)
t.Run("case=all login strategies", func(t *testing.T) {
- expects := []string{"password", "oidc", "code", "totp", "passkey", "webauthn", "lookup_secret"}
+ expects := []string{"password", "oidc", "code", "totp", "passkey", "webauthn", "lookup_secret", "identifier_first"}
s := reg.AllLoginStrategies()
require.Len(t, s, len(expects))
for k, e := range expects {
diff --git a/examples/go/pkg/common.go b/examples/go/pkg/common.go
index edb8c17e2e19..f39725103e33 100644
--- a/examples/go/pkg/common.go
+++ b/examples/go/pkg/common.go
@@ -11,11 +11,9 @@ import (
"os"
"testing"
- "github.com/ory/kratos/x"
-
- "github.com/ory/kratos/internal/testhelpers"
-
ory "github.com/ory/client-go"
+ "github.com/ory/kratos/internal/testhelpers"
+ "github.com/ory/kratos/x"
)
func PrintJSONPretty(v interface{}) {
diff --git a/examples/go/selfservice/recovery/main_test.go b/examples/go/selfservice/recovery/main_test.go
index d37a561227eb..b4ca43c511d6 100644
--- a/examples/go/selfservice/recovery/main_test.go
+++ b/examples/go/selfservice/recovery/main_test.go
@@ -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"
)
diff --git a/examples/go/selfservice/settings/main_test.go b/examples/go/selfservice/settings/main_test.go
index 12518930724a..1dd5fa8cf77c 100644
--- a/examples/go/selfservice/settings/main_test.go
+++ b/examples/go/selfservice/settings/main_test.go
@@ -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"
diff --git a/examples/go/selfservice/verification/main_test.go b/examples/go/selfservice/verification/main_test.go
index 6a6621a15657..ca9ba687fb12 100644
--- a/examples/go/selfservice/verification/main_test.go
+++ b/examples/go/selfservice/verification/main_test.go
@@ -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"
)
diff --git a/identity/credentials.go b/identity/credentials.go
index 3c7fa0f31834..3cc910c5a74e 100644
--- a/identity/credentials.go
+++ b/identity/credentials.go
@@ -88,8 +88,6 @@ const (
CredentialsTypeCodeAuth CredentialsType = "code"
CredentialsTypePasskey CredentialsType = "passkey"
CredentialsTypeProfile CredentialsType = "profile"
-
- TwoStep CredentialsType = "identity_discovery" // TODO move this somewhere else
)
func (c CredentialsType) String() string {
diff --git a/internal/client-go/.openapi-generator/FILES b/internal/client-go/.openapi-generator/FILES
index 8f05b235508f..c573997505d8 100644
--- a/internal/client-go/.openapi-generator/FILES
+++ b/internal/client-go/.openapi-generator/FILES
@@ -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
@@ -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
diff --git a/internal/client-go/README.md b/internal/client-go/README.md
index 01f9831e7520..85af88a0d079 100644
--- a/internal/client-go/README.md
+++ b/internal/client-go/README.md
@@ -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)
diff --git a/internal/client-go/model_identity_credentials.go b/internal/client-go/model_identity_credentials.go
index 7ee96800df4b..374d1d6b38c0 100644
--- a/internal/client-go/model_identity_credentials.go
+++ b/internal/client-go/model_identity_credentials.go
@@ -23,7 +23,7 @@ type IdentityCredentials struct {
CreatedAt *time.Time `json:"created_at,omitempty"`
// Identifiers represents a list of unique identifiers this credential type matches.
Identifiers []string `json:"identifiers,omitempty"`
- // Type discriminates between different types of credentials. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth passkey CredentialsTypePasskey profile CredentialsTypeProfile link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode
+ // Type discriminates between different types of credentials. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth passkey CredentialsTypePasskey profile CredentialsTypeProfile two_step TwoStep link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode
Type *string `json:"type,omitempty"`
// UpdatedAt is a helper struct field for gobuffalo.pop.
UpdatedAt *time.Time `json:"updated_at,omitempty"`
diff --git a/internal/client-go/model_login_flow.go b/internal/client-go/model_login_flow.go
index 2794adee0b83..dac443b5bbe4 100644
--- a/internal/client-go/model_login_flow.go
+++ b/internal/client-go/model_login_flow.go
@@ -18,7 +18,7 @@ import (
// LoginFlow This object represents a login flow. A login flow is initiated at the \"Initiate Login API / Browser Flow\" endpoint by a client. Once a login flow is completed successfully, a session cookie or session token will be issued.
type LoginFlow struct {
- // The active login method If set contains the login method used. If the flow is new, it is unset. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth passkey CredentialsTypePasskey profile CredentialsTypeProfile link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode
+ // The active login method If set contains the login method used. If the flow is new, it is unset. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth passkey CredentialsTypePasskey profile CredentialsTypeProfile two_step TwoStep link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode
Active *string `json:"active,omitempty"`
// CreatedAt is a helper struct field for gobuffalo.pop.
CreatedAt *time.Time `json:"created_at,omitempty"`
diff --git a/internal/client-go/model_registration_flow.go b/internal/client-go/model_registration_flow.go
index c0ba64843d3f..c5fe02951e21 100644
--- a/internal/client-go/model_registration_flow.go
+++ b/internal/client-go/model_registration_flow.go
@@ -18,7 +18,7 @@ import (
// RegistrationFlow struct for RegistrationFlow
type RegistrationFlow struct {
- // Active, if set, contains the registration method that is being used. It is initially not set. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth passkey CredentialsTypePasskey profile CredentialsTypeProfile link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode
+ // Active, if set, contains the registration method that is being used. It is initially not set. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth passkey CredentialsTypePasskey profile CredentialsTypeProfile two_step TwoStep link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode
Active *string `json:"active,omitempty"`
// ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to log in, a new flow has to be initiated.
ExpiresAt time.Time `json:"expires_at"`
diff --git a/internal/client-go/model_ui_node.go b/internal/client-go/model_ui_node.go
index e73f3c5e37d8..3582d9e85f67 100644
--- a/internal/client-go/model_ui_node.go
+++ b/internal/client-go/model_ui_node.go
@@ -18,7 +18,7 @@ import (
// UiNode Nodes are represented as HTML elements or their native UI equivalents. For example, a node can be an `` tag, or an `` but also `some plain text`.
type UiNode struct {
Attributes UiNodeAttributes `json:"attributes"`
- // Group specifies which group (e.g. password authenticator) this node belongs to. default DefaultGroup password PasswordGroup oidc OpenIDConnectGroup profile ProfileGroup link LinkGroup code CodeGroup totp TOTPGroup lookup_secret LookupGroup webauthn WebAuthnGroup passkey PasskeyGroup
+ // Group specifies which group (e.g. password authenticator) this node belongs to. default DefaultGroup password PasswordGroup oidc OpenIDConnectGroup profile ProfileGroup link LinkGroup code CodeGroup totp TOTPGroup lookup_secret LookupGroup webauthn WebAuthnGroup passkey PasskeyGroup identifier_first IdentifierFirstGroup
Group string `json:"group"`
Messages []UiText `json:"messages"`
Meta UiNodeMeta `json:"meta"`
diff --git a/internal/client-go/model_update_login_flow_body.go b/internal/client-go/model_update_login_flow_body.go
index b8bb05734e3c..f0d79322c54f 100644
--- a/internal/client-go/model_update_login_flow_body.go
+++ b/internal/client-go/model_update_login_flow_body.go
@@ -18,13 +18,14 @@ import (
// UpdateLoginFlowBody - struct for UpdateLoginFlowBody
type UpdateLoginFlowBody struct {
- UpdateLoginFlowWithCodeMethod *UpdateLoginFlowWithCodeMethod
- UpdateLoginFlowWithLookupSecretMethod *UpdateLoginFlowWithLookupSecretMethod
- UpdateLoginFlowWithOidcMethod *UpdateLoginFlowWithOidcMethod
- UpdateLoginFlowWithPasskeyMethod *UpdateLoginFlowWithPasskeyMethod
- UpdateLoginFlowWithPasswordMethod *UpdateLoginFlowWithPasswordMethod
- UpdateLoginFlowWithTotpMethod *UpdateLoginFlowWithTotpMethod
- UpdateLoginFlowWithWebAuthnMethod *UpdateLoginFlowWithWebAuthnMethod
+ UpdateLoginFlowWithCodeMethod *UpdateLoginFlowWithCodeMethod
+ UpdateLoginFlowWithIdentifierFirstMethod *UpdateLoginFlowWithIdentifierFirstMethod
+ UpdateLoginFlowWithLookupSecretMethod *UpdateLoginFlowWithLookupSecretMethod
+ UpdateLoginFlowWithOidcMethod *UpdateLoginFlowWithOidcMethod
+ UpdateLoginFlowWithPasskeyMethod *UpdateLoginFlowWithPasskeyMethod
+ UpdateLoginFlowWithPasswordMethod *UpdateLoginFlowWithPasswordMethod
+ UpdateLoginFlowWithTotpMethod *UpdateLoginFlowWithTotpMethod
+ UpdateLoginFlowWithWebAuthnMethod *UpdateLoginFlowWithWebAuthnMethod
}
// UpdateLoginFlowWithCodeMethodAsUpdateLoginFlowBody is a convenience function that returns UpdateLoginFlowWithCodeMethod wrapped in UpdateLoginFlowBody
@@ -34,6 +35,13 @@ func UpdateLoginFlowWithCodeMethodAsUpdateLoginFlowBody(v *UpdateLoginFlowWithCo
}
}
+// UpdateLoginFlowWithIdentifierFirstMethodAsUpdateLoginFlowBody is a convenience function that returns UpdateLoginFlowWithIdentifierFirstMethod wrapped in UpdateLoginFlowBody
+func UpdateLoginFlowWithIdentifierFirstMethodAsUpdateLoginFlowBody(v *UpdateLoginFlowWithIdentifierFirstMethod) UpdateLoginFlowBody {
+ return UpdateLoginFlowBody{
+ UpdateLoginFlowWithIdentifierFirstMethod: v,
+ }
+}
+
// UpdateLoginFlowWithLookupSecretMethodAsUpdateLoginFlowBody is a convenience function that returns UpdateLoginFlowWithLookupSecretMethod wrapped in UpdateLoginFlowBody
func UpdateLoginFlowWithLookupSecretMethodAsUpdateLoginFlowBody(v *UpdateLoginFlowWithLookupSecretMethod) UpdateLoginFlowBody {
return UpdateLoginFlowBody{
@@ -98,6 +106,18 @@ func (dst *UpdateLoginFlowBody) UnmarshalJSON(data []byte) error {
}
}
+ // check if the discriminator value is 'identifier_first'
+ if jsonDict["method"] == "identifier_first" {
+ // try to unmarshal JSON data into UpdateLoginFlowWithIdentifierFirstMethod
+ err = json.Unmarshal(data, &dst.UpdateLoginFlowWithIdentifierFirstMethod)
+ if err == nil {
+ return nil // data stored in dst.UpdateLoginFlowWithIdentifierFirstMethod, return on the first match
+ } else {
+ dst.UpdateLoginFlowWithIdentifierFirstMethod = nil
+ return fmt.Errorf("Failed to unmarshal UpdateLoginFlowBody as UpdateLoginFlowWithIdentifierFirstMethod: %s", err.Error())
+ }
+ }
+
// check if the discriminator value is 'lookup_secret'
if jsonDict["method"] == "lookup_secret" {
// try to unmarshal JSON data into UpdateLoginFlowWithLookupSecretMethod
@@ -182,6 +202,18 @@ func (dst *UpdateLoginFlowBody) UnmarshalJSON(data []byte) error {
}
}
+ // check if the discriminator value is 'updateLoginFlowWithIdentifierFirstMethod'
+ if jsonDict["method"] == "updateLoginFlowWithIdentifierFirstMethod" {
+ // try to unmarshal JSON data into UpdateLoginFlowWithIdentifierFirstMethod
+ err = json.Unmarshal(data, &dst.UpdateLoginFlowWithIdentifierFirstMethod)
+ if err == nil {
+ return nil // data stored in dst.UpdateLoginFlowWithIdentifierFirstMethod, return on the first match
+ } else {
+ dst.UpdateLoginFlowWithIdentifierFirstMethod = nil
+ return fmt.Errorf("Failed to unmarshal UpdateLoginFlowBody as UpdateLoginFlowWithIdentifierFirstMethod: %s", err.Error())
+ }
+ }
+
// check if the discriminator value is 'updateLoginFlowWithLookupSecretMethod'
if jsonDict["method"] == "updateLoginFlowWithLookupSecretMethod" {
// try to unmarshal JSON data into UpdateLoginFlowWithLookupSecretMethod
@@ -263,6 +295,10 @@ func (src UpdateLoginFlowBody) MarshalJSON() ([]byte, error) {
return json.Marshal(&src.UpdateLoginFlowWithCodeMethod)
}
+ if src.UpdateLoginFlowWithIdentifierFirstMethod != nil {
+ return json.Marshal(&src.UpdateLoginFlowWithIdentifierFirstMethod)
+ }
+
if src.UpdateLoginFlowWithLookupSecretMethod != nil {
return json.Marshal(&src.UpdateLoginFlowWithLookupSecretMethod)
}
@@ -299,6 +335,10 @@ func (obj *UpdateLoginFlowBody) GetActualInstance() interface{} {
return obj.UpdateLoginFlowWithCodeMethod
}
+ if obj.UpdateLoginFlowWithIdentifierFirstMethod != nil {
+ return obj.UpdateLoginFlowWithIdentifierFirstMethod
+ }
+
if obj.UpdateLoginFlowWithLookupSecretMethod != nil {
return obj.UpdateLoginFlowWithLookupSecretMethod
}
diff --git a/internal/client-go/model_update_login_flow_with_identifier_first_method.go b/internal/client-go/model_update_login_flow_with_identifier_first_method.go
new file mode 100644
index 000000000000..70cf8002990d
--- /dev/null
+++ b/internal/client-go/model_update_login_flow_with_identifier_first_method.go
@@ -0,0 +1,212 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// UpdateLoginFlowWithIdentifierFirstMethod Update Login Flow with Multi-Step Method
+type UpdateLoginFlowWithIdentifierFirstMethod struct {
+ // Sending the anti-csrf token is only required for browser login flows.
+ CsrfToken *string `json:"csrf_token,omitempty"`
+ // Identifier is the email or username of the user trying to log in.
+ Identifier string `json:"identifier"`
+ // Method should be set to \"password\" when logging in using the identifier and password strategy.
+ Method string `json:"method"`
+ // Transient data to pass along to any webhooks
+ TransientPayload map[string]interface{} `json:"transient_payload,omitempty"`
+}
+
+// NewUpdateLoginFlowWithIdentifierFirstMethod instantiates a new UpdateLoginFlowWithIdentifierFirstMethod object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewUpdateLoginFlowWithIdentifierFirstMethod(identifier string, method string) *UpdateLoginFlowWithIdentifierFirstMethod {
+ this := UpdateLoginFlowWithIdentifierFirstMethod{}
+ this.Identifier = identifier
+ this.Method = method
+ return &this
+}
+
+// NewUpdateLoginFlowWithIdentifierFirstMethodWithDefaults instantiates a new UpdateLoginFlowWithIdentifierFirstMethod object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewUpdateLoginFlowWithIdentifierFirstMethodWithDefaults() *UpdateLoginFlowWithIdentifierFirstMethod {
+ this := UpdateLoginFlowWithIdentifierFirstMethod{}
+ return &this
+}
+
+// GetCsrfToken returns the CsrfToken field value if set, zero value otherwise.
+func (o *UpdateLoginFlowWithIdentifierFirstMethod) GetCsrfToken() string {
+ if o == nil || o.CsrfToken == nil {
+ var ret string
+ return ret
+ }
+ return *o.CsrfToken
+}
+
+// GetCsrfTokenOk returns a tuple with the CsrfToken field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *UpdateLoginFlowWithIdentifierFirstMethod) GetCsrfTokenOk() (*string, bool) {
+ if o == nil || o.CsrfToken == nil {
+ return nil, false
+ }
+ return o.CsrfToken, true
+}
+
+// HasCsrfToken returns a boolean if a field has been set.
+func (o *UpdateLoginFlowWithIdentifierFirstMethod) HasCsrfToken() bool {
+ if o != nil && o.CsrfToken != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCsrfToken gets a reference to the given string and assigns it to the CsrfToken field.
+func (o *UpdateLoginFlowWithIdentifierFirstMethod) SetCsrfToken(v string) {
+ o.CsrfToken = &v
+}
+
+// GetIdentifier returns the Identifier field value
+func (o *UpdateLoginFlowWithIdentifierFirstMethod) GetIdentifier() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Identifier
+}
+
+// GetIdentifierOk returns a tuple with the Identifier field value
+// and a boolean to check if the value has been set.
+func (o *UpdateLoginFlowWithIdentifierFirstMethod) GetIdentifierOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Identifier, true
+}
+
+// SetIdentifier sets field value
+func (o *UpdateLoginFlowWithIdentifierFirstMethod) SetIdentifier(v string) {
+ o.Identifier = v
+}
+
+// GetMethod returns the Method field value
+func (o *UpdateLoginFlowWithIdentifierFirstMethod) GetMethod() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Method
+}
+
+// GetMethodOk returns a tuple with the Method field value
+// and a boolean to check if the value has been set.
+func (o *UpdateLoginFlowWithIdentifierFirstMethod) GetMethodOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Method, true
+}
+
+// SetMethod sets field value
+func (o *UpdateLoginFlowWithIdentifierFirstMethod) SetMethod(v string) {
+ o.Method = v
+}
+
+// GetTransientPayload returns the TransientPayload field value if set, zero value otherwise.
+func (o *UpdateLoginFlowWithIdentifierFirstMethod) GetTransientPayload() map[string]interface{} {
+ if o == nil || o.TransientPayload == nil {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.TransientPayload
+}
+
+// GetTransientPayloadOk returns a tuple with the TransientPayload field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *UpdateLoginFlowWithIdentifierFirstMethod) GetTransientPayloadOk() (map[string]interface{}, bool) {
+ if o == nil || o.TransientPayload == nil {
+ return nil, false
+ }
+ return o.TransientPayload, true
+}
+
+// HasTransientPayload returns a boolean if a field has been set.
+func (o *UpdateLoginFlowWithIdentifierFirstMethod) HasTransientPayload() bool {
+ if o != nil && o.TransientPayload != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetTransientPayload gets a reference to the given map[string]interface{} and assigns it to the TransientPayload field.
+func (o *UpdateLoginFlowWithIdentifierFirstMethod) SetTransientPayload(v map[string]interface{}) {
+ o.TransientPayload = v
+}
+
+func (o UpdateLoginFlowWithIdentifierFirstMethod) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.CsrfToken != nil {
+ toSerialize["csrf_token"] = o.CsrfToken
+ }
+ if true {
+ toSerialize["identifier"] = o.Identifier
+ }
+ if true {
+ toSerialize["method"] = o.Method
+ }
+ if o.TransientPayload != nil {
+ toSerialize["transient_payload"] = o.TransientPayload
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableUpdateLoginFlowWithIdentifierFirstMethod struct {
+ value *UpdateLoginFlowWithIdentifierFirstMethod
+ isSet bool
+}
+
+func (v NullableUpdateLoginFlowWithIdentifierFirstMethod) Get() *UpdateLoginFlowWithIdentifierFirstMethod {
+ return v.value
+}
+
+func (v *NullableUpdateLoginFlowWithIdentifierFirstMethod) Set(val *UpdateLoginFlowWithIdentifierFirstMethod) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableUpdateLoginFlowWithIdentifierFirstMethod) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableUpdateLoginFlowWithIdentifierFirstMethod) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableUpdateLoginFlowWithIdentifierFirstMethod(val *UpdateLoginFlowWithIdentifierFirstMethod) *NullableUpdateLoginFlowWithIdentifierFirstMethod {
+ return &NullableUpdateLoginFlowWithIdentifierFirstMethod{value: val, isSet: true}
+}
+
+func (v NullableUpdateLoginFlowWithIdentifierFirstMethod) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableUpdateLoginFlowWithIdentifierFirstMethod) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/driver.go b/internal/driver.go
index c10134347bd3..00c86108a397 100644
--- a/internal/driver.go
+++ b/internal/driver.go
@@ -42,18 +42,18 @@ func init() {
func NewConfigurationWithDefaults(t testing.TB, opts ...configx.OptionModifier) *config.Config {
configOpts := append([]configx.OptionModifier{
configx.WithValues(map[string]interface{}{
- "log.level": "error",
- config.ViperKeyDSN: dbal.NewSQLiteTestDatabase(t),
- config.ViperKeyHasherArgon2ConfigMemory: 16384,
- config.ViperKeyHasherArgon2ConfigIterations: 1,
- config.ViperKeyHasherArgon2ConfigParallelism: 1,
- config.ViperKeyHasherArgon2ConfigSaltLength: 16,
- config.ViperKeyHasherBcryptCost: 4,
- config.ViperKeyHasherArgon2ConfigKeyLength: 16,
- config.ViperKeyCourierSMTPURL: "smtp://foo:bar@baz.com/",
- config.ViperKeySelfServiceBrowserDefaultReturnTo: "https://www.ory.sh/redirect-not-set",
- config.ViperKeySecretsCipher: []string{"secret-thirty-two-character-long"},
- config.ViperKeySelfServiceLoginFlowTwoStepEnabled: false,
+ "log.level": "error",
+ config.ViperKeyDSN: dbal.NewSQLiteTestDatabase(t),
+ config.ViperKeyHasherArgon2ConfigMemory: 16384,
+ config.ViperKeyHasherArgon2ConfigIterations: 1,
+ config.ViperKeyHasherArgon2ConfigParallelism: 1,
+ config.ViperKeyHasherArgon2ConfigSaltLength: 16,
+ config.ViperKeyHasherBcryptCost: 4,
+ config.ViperKeyHasherArgon2ConfigKeyLength: 16,
+ config.ViperKeyCourierSMTPURL: "smtp://foo:bar@baz.com/",
+ config.ViperKeySelfServiceBrowserDefaultReturnTo: "https://www.ory.sh/redirect-not-set",
+ config.ViperKeySecretsCipher: []string{"secret-thirty-two-character-long"},
+ config.ViperKeySelfServiceLoginFlowStyle: "one_step",
}),
configx.SkipValidation(),
}, opts...)
diff --git a/internal/httpclient/.gitignore b/internal/httpclient/.gitignore
new file mode 100644
index 000000000000..daf913b1b347
--- /dev/null
+++ b/internal/httpclient/.gitignore
@@ -0,0 +1,24 @@
+# Compiled Object files, Static and Dynamic libs (Shared Objects)
+*.o
+*.a
+*.so
+
+# Folders
+_obj
+_test
+
+# Architecture specific extensions/prefixes
+*.[568vq]
+[568vq].out
+
+*.cgo1.go
+*.cgo2.c
+_cgo_defun.c
+_cgo_gotypes.go
+_cgo_export.*
+
+_testmain.go
+
+*.exe
+*.test
+*.prof
diff --git a/internal/httpclient/.openapi-generator-ignore b/internal/httpclient/.openapi-generator-ignore
new file mode 100644
index 000000000000..7484ee590a38
--- /dev/null
+++ b/internal/httpclient/.openapi-generator-ignore
@@ -0,0 +1,23 @@
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/internal/httpclient/.openapi-generator/FILES b/internal/httpclient/.openapi-generator/FILES
new file mode 100644
index 000000000000..c573997505d8
--- /dev/null
+++ b/internal/httpclient/.openapi-generator/FILES
@@ -0,0 +1,262 @@
+.gitignore
+.openapi-generator-ignore
+.travis.yml
+README.md
+api/openapi.yaml
+api_courier.go
+api_frontend.go
+api_identity.go
+api_metadata.go
+client.go
+configuration.go
+docs/AuthenticatorAssuranceLevel.md
+docs/BatchPatchIdentitiesResponse.md
+docs/ConsistencyRequestParameters.md
+docs/ContinueWith.md
+docs/ContinueWithRecoveryUi.md
+docs/ContinueWithRecoveryUiFlow.md
+docs/ContinueWithRedirectBrowserTo.md
+docs/ContinueWithSetOrySessionToken.md
+docs/ContinueWithSettingsUi.md
+docs/ContinueWithSettingsUiFlow.md
+docs/ContinueWithVerificationUi.md
+docs/ContinueWithVerificationUiFlow.md
+docs/CourierApi.md
+docs/CourierMessageStatus.md
+docs/CourierMessageType.md
+docs/CreateIdentityBody.md
+docs/CreateRecoveryCodeForIdentityBody.md
+docs/CreateRecoveryLinkForIdentityBody.md
+docs/DeleteMySessionsCount.md
+docs/ErrorAuthenticatorAssuranceLevelNotSatisfied.md
+docs/ErrorBrowserLocationChangeRequired.md
+docs/ErrorFlowReplaced.md
+docs/ErrorGeneric.md
+docs/FlowError.md
+docs/FrontendApi.md
+docs/GenericError.md
+docs/GetVersion200Response.md
+docs/HealthNotReadyStatus.md
+docs/HealthStatus.md
+docs/Identity.md
+docs/IdentityApi.md
+docs/IdentityCredentials.md
+docs/IdentityCredentialsCode.md
+docs/IdentityCredentialsOidc.md
+docs/IdentityCredentialsOidcProvider.md
+docs/IdentityCredentialsPassword.md
+docs/IdentityPatch.md
+docs/IdentityPatchResponse.md
+docs/IdentitySchemaContainer.md
+docs/IdentityWithCredentials.md
+docs/IdentityWithCredentialsOidc.md
+docs/IdentityWithCredentialsOidcConfig.md
+docs/IdentityWithCredentialsOidcConfigProvider.md
+docs/IdentityWithCredentialsPassword.md
+docs/IdentityWithCredentialsPasswordConfig.md
+docs/IsAlive200Response.md
+docs/IsReady503Response.md
+docs/JsonPatch.md
+docs/LoginFlow.md
+docs/LoginFlowState.md
+docs/LogoutFlow.md
+docs/Message.md
+docs/MessageDispatch.md
+docs/MetadataApi.md
+docs/NeedsPrivilegedSessionError.md
+docs/OAuth2Client.md
+docs/OAuth2ConsentRequestOpenIDConnectContext.md
+docs/OAuth2LoginRequest.md
+docs/PatchIdentitiesBody.md
+docs/PerformNativeLogoutBody.md
+docs/RecoveryCodeForIdentity.md
+docs/RecoveryFlow.md
+docs/RecoveryFlowState.md
+docs/RecoveryIdentityAddress.md
+docs/RecoveryLinkForIdentity.md
+docs/RegistrationFlow.md
+docs/RegistrationFlowState.md
+docs/SelfServiceFlowExpiredError.md
+docs/Session.md
+docs/SessionAuthenticationMethod.md
+docs/SessionDevice.md
+docs/SettingsFlow.md
+docs/SettingsFlowState.md
+docs/SuccessfulCodeExchangeResponse.md
+docs/SuccessfulNativeLogin.md
+docs/SuccessfulNativeRegistration.md
+docs/TokenPagination.md
+docs/TokenPaginationHeaders.md
+docs/UiContainer.md
+docs/UiNode.md
+docs/UiNodeAnchorAttributes.md
+docs/UiNodeAttributes.md
+docs/UiNodeImageAttributes.md
+docs/UiNodeInputAttributes.md
+docs/UiNodeMeta.md
+docs/UiNodeScriptAttributes.md
+docs/UiNodeTextAttributes.md
+docs/UiText.md
+docs/UpdateIdentityBody.md
+docs/UpdateLoginFlowBody.md
+docs/UpdateLoginFlowWithCodeMethod.md
+docs/UpdateLoginFlowWithIdentifierFirstMethod.md
+docs/UpdateLoginFlowWithLookupSecretMethod.md
+docs/UpdateLoginFlowWithOidcMethod.md
+docs/UpdateLoginFlowWithPasskeyMethod.md
+docs/UpdateLoginFlowWithPasswordMethod.md
+docs/UpdateLoginFlowWithTotpMethod.md
+docs/UpdateLoginFlowWithWebAuthnMethod.md
+docs/UpdateRecoveryFlowBody.md
+docs/UpdateRecoveryFlowWithCodeMethod.md
+docs/UpdateRecoveryFlowWithLinkMethod.md
+docs/UpdateRegistrationFlowBody.md
+docs/UpdateRegistrationFlowWithCodeMethod.md
+docs/UpdateRegistrationFlowWithOidcMethod.md
+docs/UpdateRegistrationFlowWithPasskeyMethod.md
+docs/UpdateRegistrationFlowWithPasswordMethod.md
+docs/UpdateRegistrationFlowWithProfileMethod.md
+docs/UpdateRegistrationFlowWithWebAuthnMethod.md
+docs/UpdateSettingsFlowBody.md
+docs/UpdateSettingsFlowWithLookupMethod.md
+docs/UpdateSettingsFlowWithOidcMethod.md
+docs/UpdateSettingsFlowWithPasskeyMethod.md
+docs/UpdateSettingsFlowWithPasswordMethod.md
+docs/UpdateSettingsFlowWithProfileMethod.md
+docs/UpdateSettingsFlowWithTotpMethod.md
+docs/UpdateSettingsFlowWithWebAuthnMethod.md
+docs/UpdateVerificationFlowBody.md
+docs/UpdateVerificationFlowWithCodeMethod.md
+docs/UpdateVerificationFlowWithLinkMethod.md
+docs/VerifiableIdentityAddress.md
+docs/VerificationFlow.md
+docs/VerificationFlowState.md
+docs/Version.md
+git_push.sh
+go.mod
+go.sum
+model_authenticator_assurance_level.go
+model_batch_patch_identities_response.go
+model_consistency_request_parameters.go
+model_continue_with.go
+model_continue_with_recovery_ui.go
+model_continue_with_recovery_ui_flow.go
+model_continue_with_redirect_browser_to.go
+model_continue_with_set_ory_session_token.go
+model_continue_with_settings_ui.go
+model_continue_with_settings_ui_flow.go
+model_continue_with_verification_ui.go
+model_continue_with_verification_ui_flow.go
+model_courier_message_status.go
+model_courier_message_type.go
+model_create_identity_body.go
+model_create_recovery_code_for_identity_body.go
+model_create_recovery_link_for_identity_body.go
+model_delete_my_sessions_count.go
+model_error_authenticator_assurance_level_not_satisfied.go
+model_error_browser_location_change_required.go
+model_error_flow_replaced.go
+model_error_generic.go
+model_flow_error.go
+model_generic_error.go
+model_get_version_200_response.go
+model_health_not_ready_status.go
+model_health_status.go
+model_identity.go
+model_identity_credentials.go
+model_identity_credentials_code.go
+model_identity_credentials_oidc.go
+model_identity_credentials_oidc_provider.go
+model_identity_credentials_password.go
+model_identity_patch.go
+model_identity_patch_response.go
+model_identity_schema_container.go
+model_identity_with_credentials.go
+model_identity_with_credentials_oidc.go
+model_identity_with_credentials_oidc_config.go
+model_identity_with_credentials_oidc_config_provider.go
+model_identity_with_credentials_password.go
+model_identity_with_credentials_password_config.go
+model_is_alive_200_response.go
+model_is_ready_503_response.go
+model_json_patch.go
+model_login_flow.go
+model_login_flow_state.go
+model_logout_flow.go
+model_message.go
+model_message_dispatch.go
+model_needs_privileged_session_error.go
+model_o_auth2_client.go
+model_o_auth2_consent_request_open_id_connect_context.go
+model_o_auth2_login_request.go
+model_patch_identities_body.go
+model_perform_native_logout_body.go
+model_recovery_code_for_identity.go
+model_recovery_flow.go
+model_recovery_flow_state.go
+model_recovery_identity_address.go
+model_recovery_link_for_identity.go
+model_registration_flow.go
+model_registration_flow_state.go
+model_self_service_flow_expired_error.go
+model_session.go
+model_session_authentication_method.go
+model_session_device.go
+model_settings_flow.go
+model_settings_flow_state.go
+model_successful_code_exchange_response.go
+model_successful_native_login.go
+model_successful_native_registration.go
+model_token_pagination.go
+model_token_pagination_headers.go
+model_ui_container.go
+model_ui_node.go
+model_ui_node_anchor_attributes.go
+model_ui_node_attributes.go
+model_ui_node_image_attributes.go
+model_ui_node_input_attributes.go
+model_ui_node_meta.go
+model_ui_node_script_attributes.go
+model_ui_node_text_attributes.go
+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
+model_update_login_flow_with_password_method.go
+model_update_login_flow_with_totp_method.go
+model_update_login_flow_with_web_authn_method.go
+model_update_recovery_flow_body.go
+model_update_recovery_flow_with_code_method.go
+model_update_recovery_flow_with_link_method.go
+model_update_registration_flow_body.go
+model_update_registration_flow_with_code_method.go
+model_update_registration_flow_with_oidc_method.go
+model_update_registration_flow_with_passkey_method.go
+model_update_registration_flow_with_password_method.go
+model_update_registration_flow_with_profile_method.go
+model_update_registration_flow_with_web_authn_method.go
+model_update_settings_flow_body.go
+model_update_settings_flow_with_lookup_method.go
+model_update_settings_flow_with_oidc_method.go
+model_update_settings_flow_with_passkey_method.go
+model_update_settings_flow_with_password_method.go
+model_update_settings_flow_with_profile_method.go
+model_update_settings_flow_with_totp_method.go
+model_update_settings_flow_with_web_authn_method.go
+model_update_verification_flow_body.go
+model_update_verification_flow_with_code_method.go
+model_update_verification_flow_with_link_method.go
+model_verifiable_identity_address.go
+model_verification_flow.go
+model_verification_flow_state.go
+model_version.go
+response.go
+test/api_courier_test.go
+test/api_frontend_test.go
+test/api_identity_test.go
+test/api_metadata_test.go
+utils.go
diff --git a/internal/httpclient/.openapi-generator/VERSION b/internal/httpclient/.openapi-generator/VERSION
new file mode 100644
index 000000000000..4b49d9bb63ee
--- /dev/null
+++ b/internal/httpclient/.openapi-generator/VERSION
@@ -0,0 +1 @@
+7.2.0
\ No newline at end of file
diff --git a/internal/httpclient/.travis.yml b/internal/httpclient/.travis.yml
new file mode 100644
index 000000000000..f5cb2ce9a5aa
--- /dev/null
+++ b/internal/httpclient/.travis.yml
@@ -0,0 +1,8 @@
+language: go
+
+install:
+ - go get -d -v .
+
+script:
+ - go build -v ./
+
diff --git a/internal/httpclient/README.md b/internal/httpclient/README.md
new file mode 100644
index 000000000000..85af88a0d079
--- /dev/null
+++ b/internal/httpclient/README.md
@@ -0,0 +1,292 @@
+# Go API client for client
+
+This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+
+
+## Overview
+This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
+
+- API version:
+- Package version: 1.0.0
+- Build package: org.openapitools.codegen.languages.GoClientCodegen
+
+## Installation
+
+Install the following dependencies:
+
+```shell
+go get github.com/stretchr/testify/assert
+go get golang.org/x/oauth2
+go get golang.org/x/net/context
+```
+
+Put the package under your project folder and add the following in import:
+
+```golang
+import client "github.com/ory/client-go"
+```
+
+To use a proxy, set the environment variable `HTTP_PROXY`:
+
+```golang
+os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
+```
+
+## Configuration of Server URL
+
+Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification.
+
+### Select Server Configuration
+
+For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`.
+
+```golang
+ctx := context.WithValue(context.Background(), client.ContextServerIndex, 1)
+```
+
+### Templated Server URL
+
+Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`.
+
+```golang
+ctx := context.WithValue(context.Background(), client.ContextServerVariables, map[string]string{
+ "basePath": "v2",
+})
+```
+
+Note, enum values are always validated and all unused variables are silently ignored.
+
+### URLs Configuration per Operation
+
+Each operation can use different server URL defined using `OperationServers` map in the `Configuration`.
+An operation is uniquely identifield by `"{classname}Service.{nickname}"` string.
+Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.
+
+```
+ctx := context.WithValue(context.Background(), client.ContextOperationServerIndices, map[string]int{
+ "{classname}Service.{nickname}": 2,
+})
+ctx = context.WithValue(context.Background(), client.ContextOperationServerVariables, map[string]map[string]string{
+ "{classname}Service.{nickname}": {
+ "port": "8443",
+ },
+})
+```
+
+## Documentation for API Endpoints
+
+All URIs are relative to *http://localhost*
+
+Class | Method | HTTP request | Description
+------------ | ------------- | ------------- | -------------
+*CourierApi* | [**GetCourierMessage**](docs/CourierApi.md#getcouriermessage) | **Get** /admin/courier/messages/{id} | Get a Message
+*CourierApi* | [**ListCourierMessages**](docs/CourierApi.md#listcouriermessages) | **Get** /admin/courier/messages | List Messages
+*FrontendApi* | [**CreateBrowserLoginFlow**](docs/FrontendApi.md#createbrowserloginflow) | **Get** /self-service/login/browser | Create Login Flow for Browsers
+*FrontendApi* | [**CreateBrowserLogoutFlow**](docs/FrontendApi.md#createbrowserlogoutflow) | **Get** /self-service/logout/browser | Create a Logout URL for Browsers
+*FrontendApi* | [**CreateBrowserRecoveryFlow**](docs/FrontendApi.md#createbrowserrecoveryflow) | **Get** /self-service/recovery/browser | Create Recovery Flow for Browsers
+*FrontendApi* | [**CreateBrowserRegistrationFlow**](docs/FrontendApi.md#createbrowserregistrationflow) | **Get** /self-service/registration/browser | Create Registration Flow for Browsers
+*FrontendApi* | [**CreateBrowserSettingsFlow**](docs/FrontendApi.md#createbrowsersettingsflow) | **Get** /self-service/settings/browser | Create Settings Flow for Browsers
+*FrontendApi* | [**CreateBrowserVerificationFlow**](docs/FrontendApi.md#createbrowserverificationflow) | **Get** /self-service/verification/browser | Create Verification Flow for Browser Clients
+*FrontendApi* | [**CreateNativeLoginFlow**](docs/FrontendApi.md#createnativeloginflow) | **Get** /self-service/login/api | Create Login Flow for Native Apps
+*FrontendApi* | [**CreateNativeRecoveryFlow**](docs/FrontendApi.md#createnativerecoveryflow) | **Get** /self-service/recovery/api | Create Recovery Flow for Native Apps
+*FrontendApi* | [**CreateNativeRegistrationFlow**](docs/FrontendApi.md#createnativeregistrationflow) | **Get** /self-service/registration/api | Create Registration Flow for Native Apps
+*FrontendApi* | [**CreateNativeSettingsFlow**](docs/FrontendApi.md#createnativesettingsflow) | **Get** /self-service/settings/api | Create Settings Flow for Native Apps
+*FrontendApi* | [**CreateNativeVerificationFlow**](docs/FrontendApi.md#createnativeverificationflow) | **Get** /self-service/verification/api | Create Verification Flow for Native Apps
+*FrontendApi* | [**DisableMyOtherSessions**](docs/FrontendApi.md#disablemyothersessions) | **Delete** /sessions | Disable my other sessions
+*FrontendApi* | [**DisableMySession**](docs/FrontendApi.md#disablemysession) | **Delete** /sessions/{id} | Disable one of my sessions
+*FrontendApi* | [**ExchangeSessionToken**](docs/FrontendApi.md#exchangesessiontoken) | **Get** /sessions/token-exchange | Exchange Session Token
+*FrontendApi* | [**GetFlowError**](docs/FrontendApi.md#getflowerror) | **Get** /self-service/errors | Get User-Flow Errors
+*FrontendApi* | [**GetLoginFlow**](docs/FrontendApi.md#getloginflow) | **Get** /self-service/login/flows | Get Login Flow
+*FrontendApi* | [**GetRecoveryFlow**](docs/FrontendApi.md#getrecoveryflow) | **Get** /self-service/recovery/flows | Get Recovery Flow
+*FrontendApi* | [**GetRegistrationFlow**](docs/FrontendApi.md#getregistrationflow) | **Get** /self-service/registration/flows | Get Registration Flow
+*FrontendApi* | [**GetSettingsFlow**](docs/FrontendApi.md#getsettingsflow) | **Get** /self-service/settings/flows | Get Settings Flow
+*FrontendApi* | [**GetVerificationFlow**](docs/FrontendApi.md#getverificationflow) | **Get** /self-service/verification/flows | Get Verification Flow
+*FrontendApi* | [**GetWebAuthnJavaScript**](docs/FrontendApi.md#getwebauthnjavascript) | **Get** /.well-known/ory/webauthn.js | Get WebAuthn JavaScript
+*FrontendApi* | [**ListMySessions**](docs/FrontendApi.md#listmysessions) | **Get** /sessions | Get My Active Sessions
+*FrontendApi* | [**PerformNativeLogout**](docs/FrontendApi.md#performnativelogout) | **Delete** /self-service/logout/api | Perform Logout for Native Apps
+*FrontendApi* | [**ToSession**](docs/FrontendApi.md#tosession) | **Get** /sessions/whoami | Check Who the Current HTTP Session Belongs To
+*FrontendApi* | [**UpdateLoginFlow**](docs/FrontendApi.md#updateloginflow) | **Post** /self-service/login | Submit a Login Flow
+*FrontendApi* | [**UpdateLogoutFlow**](docs/FrontendApi.md#updatelogoutflow) | **Get** /self-service/logout | Update Logout Flow
+*FrontendApi* | [**UpdateRecoveryFlow**](docs/FrontendApi.md#updaterecoveryflow) | **Post** /self-service/recovery | Update Recovery Flow
+*FrontendApi* | [**UpdateRegistrationFlow**](docs/FrontendApi.md#updateregistrationflow) | **Post** /self-service/registration | Update Registration Flow
+*FrontendApi* | [**UpdateSettingsFlow**](docs/FrontendApi.md#updatesettingsflow) | **Post** /self-service/settings | Complete Settings Flow
+*FrontendApi* | [**UpdateVerificationFlow**](docs/FrontendApi.md#updateverificationflow) | **Post** /self-service/verification | Complete Verification Flow
+*IdentityApi* | [**BatchPatchIdentities**](docs/IdentityApi.md#batchpatchidentities) | **Patch** /admin/identities | Create multiple identities
+*IdentityApi* | [**CreateIdentity**](docs/IdentityApi.md#createidentity) | **Post** /admin/identities | Create an Identity
+*IdentityApi* | [**CreateRecoveryCodeForIdentity**](docs/IdentityApi.md#createrecoverycodeforidentity) | **Post** /admin/recovery/code | Create a Recovery Code
+*IdentityApi* | [**CreateRecoveryLinkForIdentity**](docs/IdentityApi.md#createrecoverylinkforidentity) | **Post** /admin/recovery/link | Create a Recovery Link
+*IdentityApi* | [**DeleteIdentity**](docs/IdentityApi.md#deleteidentity) | **Delete** /admin/identities/{id} | Delete an Identity
+*IdentityApi* | [**DeleteIdentityCredentials**](docs/IdentityApi.md#deleteidentitycredentials) | **Delete** /admin/identities/{id}/credentials/{type} | Delete a credential for a specific identity
+*IdentityApi* | [**DeleteIdentitySessions**](docs/IdentityApi.md#deleteidentitysessions) | **Delete** /admin/identities/{id}/sessions | Delete & Invalidate an Identity's Sessions
+*IdentityApi* | [**DisableSession**](docs/IdentityApi.md#disablesession) | **Delete** /admin/sessions/{id} | Deactivate a Session
+*IdentityApi* | [**ExtendSession**](docs/IdentityApi.md#extendsession) | **Patch** /admin/sessions/{id}/extend | Extend a Session
+*IdentityApi* | [**GetIdentity**](docs/IdentityApi.md#getidentity) | **Get** /admin/identities/{id} | Get an Identity
+*IdentityApi* | [**GetIdentitySchema**](docs/IdentityApi.md#getidentityschema) | **Get** /schemas/{id} | Get Identity JSON Schema
+*IdentityApi* | [**GetSession**](docs/IdentityApi.md#getsession) | **Get** /admin/sessions/{id} | Get Session
+*IdentityApi* | [**ListIdentities**](docs/IdentityApi.md#listidentities) | **Get** /admin/identities | List Identities
+*IdentityApi* | [**ListIdentitySchemas**](docs/IdentityApi.md#listidentityschemas) | **Get** /schemas | Get all Identity Schemas
+*IdentityApi* | [**ListIdentitySessions**](docs/IdentityApi.md#listidentitysessions) | **Get** /admin/identities/{id}/sessions | List an Identity's Sessions
+*IdentityApi* | [**ListSessions**](docs/IdentityApi.md#listsessions) | **Get** /admin/sessions | List All Sessions
+*IdentityApi* | [**PatchIdentity**](docs/IdentityApi.md#patchidentity) | **Patch** /admin/identities/{id} | Patch an Identity
+*IdentityApi* | [**UpdateIdentity**](docs/IdentityApi.md#updateidentity) | **Put** /admin/identities/{id} | Update an Identity
+*MetadataApi* | [**GetVersion**](docs/MetadataApi.md#getversion) | **Get** /version | Return Running Software Version.
+*MetadataApi* | [**IsAlive**](docs/MetadataApi.md#isalive) | **Get** /health/alive | Check HTTP Server Status
+*MetadataApi* | [**IsReady**](docs/MetadataApi.md#isready) | **Get** /health/ready | Check HTTP Server and Database Status
+
+
+## Documentation For Models
+
+ - [AuthenticatorAssuranceLevel](docs/AuthenticatorAssuranceLevel.md)
+ - [BatchPatchIdentitiesResponse](docs/BatchPatchIdentitiesResponse.md)
+ - [ConsistencyRequestParameters](docs/ConsistencyRequestParameters.md)
+ - [ContinueWith](docs/ContinueWith.md)
+ - [ContinueWithRecoveryUi](docs/ContinueWithRecoveryUi.md)
+ - [ContinueWithRecoveryUiFlow](docs/ContinueWithRecoveryUiFlow.md)
+ - [ContinueWithRedirectBrowserTo](docs/ContinueWithRedirectBrowserTo.md)
+ - [ContinueWithSetOrySessionToken](docs/ContinueWithSetOrySessionToken.md)
+ - [ContinueWithSettingsUi](docs/ContinueWithSettingsUi.md)
+ - [ContinueWithSettingsUiFlow](docs/ContinueWithSettingsUiFlow.md)
+ - [ContinueWithVerificationUi](docs/ContinueWithVerificationUi.md)
+ - [ContinueWithVerificationUiFlow](docs/ContinueWithVerificationUiFlow.md)
+ - [CourierMessageStatus](docs/CourierMessageStatus.md)
+ - [CourierMessageType](docs/CourierMessageType.md)
+ - [CreateIdentityBody](docs/CreateIdentityBody.md)
+ - [CreateRecoveryCodeForIdentityBody](docs/CreateRecoveryCodeForIdentityBody.md)
+ - [CreateRecoveryLinkForIdentityBody](docs/CreateRecoveryLinkForIdentityBody.md)
+ - [DeleteMySessionsCount](docs/DeleteMySessionsCount.md)
+ - [ErrorAuthenticatorAssuranceLevelNotSatisfied](docs/ErrorAuthenticatorAssuranceLevelNotSatisfied.md)
+ - [ErrorBrowserLocationChangeRequired](docs/ErrorBrowserLocationChangeRequired.md)
+ - [ErrorFlowReplaced](docs/ErrorFlowReplaced.md)
+ - [ErrorGeneric](docs/ErrorGeneric.md)
+ - [FlowError](docs/FlowError.md)
+ - [GenericError](docs/GenericError.md)
+ - [GetVersion200Response](docs/GetVersion200Response.md)
+ - [HealthNotReadyStatus](docs/HealthNotReadyStatus.md)
+ - [HealthStatus](docs/HealthStatus.md)
+ - [Identity](docs/Identity.md)
+ - [IdentityCredentials](docs/IdentityCredentials.md)
+ - [IdentityCredentialsCode](docs/IdentityCredentialsCode.md)
+ - [IdentityCredentialsOidc](docs/IdentityCredentialsOidc.md)
+ - [IdentityCredentialsOidcProvider](docs/IdentityCredentialsOidcProvider.md)
+ - [IdentityCredentialsPassword](docs/IdentityCredentialsPassword.md)
+ - [IdentityPatch](docs/IdentityPatch.md)
+ - [IdentityPatchResponse](docs/IdentityPatchResponse.md)
+ - [IdentitySchemaContainer](docs/IdentitySchemaContainer.md)
+ - [IdentityWithCredentials](docs/IdentityWithCredentials.md)
+ - [IdentityWithCredentialsOidc](docs/IdentityWithCredentialsOidc.md)
+ - [IdentityWithCredentialsOidcConfig](docs/IdentityWithCredentialsOidcConfig.md)
+ - [IdentityWithCredentialsOidcConfigProvider](docs/IdentityWithCredentialsOidcConfigProvider.md)
+ - [IdentityWithCredentialsPassword](docs/IdentityWithCredentialsPassword.md)
+ - [IdentityWithCredentialsPasswordConfig](docs/IdentityWithCredentialsPasswordConfig.md)
+ - [IsAlive200Response](docs/IsAlive200Response.md)
+ - [IsReady503Response](docs/IsReady503Response.md)
+ - [JsonPatch](docs/JsonPatch.md)
+ - [LoginFlow](docs/LoginFlow.md)
+ - [LoginFlowState](docs/LoginFlowState.md)
+ - [LogoutFlow](docs/LogoutFlow.md)
+ - [Message](docs/Message.md)
+ - [MessageDispatch](docs/MessageDispatch.md)
+ - [NeedsPrivilegedSessionError](docs/NeedsPrivilegedSessionError.md)
+ - [OAuth2Client](docs/OAuth2Client.md)
+ - [OAuth2ConsentRequestOpenIDConnectContext](docs/OAuth2ConsentRequestOpenIDConnectContext.md)
+ - [OAuth2LoginRequest](docs/OAuth2LoginRequest.md)
+ - [PatchIdentitiesBody](docs/PatchIdentitiesBody.md)
+ - [PerformNativeLogoutBody](docs/PerformNativeLogoutBody.md)
+ - [RecoveryCodeForIdentity](docs/RecoveryCodeForIdentity.md)
+ - [RecoveryFlow](docs/RecoveryFlow.md)
+ - [RecoveryFlowState](docs/RecoveryFlowState.md)
+ - [RecoveryIdentityAddress](docs/RecoveryIdentityAddress.md)
+ - [RecoveryLinkForIdentity](docs/RecoveryLinkForIdentity.md)
+ - [RegistrationFlow](docs/RegistrationFlow.md)
+ - [RegistrationFlowState](docs/RegistrationFlowState.md)
+ - [SelfServiceFlowExpiredError](docs/SelfServiceFlowExpiredError.md)
+ - [Session](docs/Session.md)
+ - [SessionAuthenticationMethod](docs/SessionAuthenticationMethod.md)
+ - [SessionDevice](docs/SessionDevice.md)
+ - [SettingsFlow](docs/SettingsFlow.md)
+ - [SettingsFlowState](docs/SettingsFlowState.md)
+ - [SuccessfulCodeExchangeResponse](docs/SuccessfulCodeExchangeResponse.md)
+ - [SuccessfulNativeLogin](docs/SuccessfulNativeLogin.md)
+ - [SuccessfulNativeRegistration](docs/SuccessfulNativeRegistration.md)
+ - [TokenPagination](docs/TokenPagination.md)
+ - [TokenPaginationHeaders](docs/TokenPaginationHeaders.md)
+ - [UiContainer](docs/UiContainer.md)
+ - [UiNode](docs/UiNode.md)
+ - [UiNodeAnchorAttributes](docs/UiNodeAnchorAttributes.md)
+ - [UiNodeAttributes](docs/UiNodeAttributes.md)
+ - [UiNodeImageAttributes](docs/UiNodeImageAttributes.md)
+ - [UiNodeInputAttributes](docs/UiNodeInputAttributes.md)
+ - [UiNodeMeta](docs/UiNodeMeta.md)
+ - [UiNodeScriptAttributes](docs/UiNodeScriptAttributes.md)
+ - [UiNodeTextAttributes](docs/UiNodeTextAttributes.md)
+ - [UiText](docs/UiText.md)
+ - [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)
+ - [UpdateLoginFlowWithPasswordMethod](docs/UpdateLoginFlowWithPasswordMethod.md)
+ - [UpdateLoginFlowWithTotpMethod](docs/UpdateLoginFlowWithTotpMethod.md)
+ - [UpdateLoginFlowWithWebAuthnMethod](docs/UpdateLoginFlowWithWebAuthnMethod.md)
+ - [UpdateRecoveryFlowBody](docs/UpdateRecoveryFlowBody.md)
+ - [UpdateRecoveryFlowWithCodeMethod](docs/UpdateRecoveryFlowWithCodeMethod.md)
+ - [UpdateRecoveryFlowWithLinkMethod](docs/UpdateRecoveryFlowWithLinkMethod.md)
+ - [UpdateRegistrationFlowBody](docs/UpdateRegistrationFlowBody.md)
+ - [UpdateRegistrationFlowWithCodeMethod](docs/UpdateRegistrationFlowWithCodeMethod.md)
+ - [UpdateRegistrationFlowWithOidcMethod](docs/UpdateRegistrationFlowWithOidcMethod.md)
+ - [UpdateRegistrationFlowWithPasskeyMethod](docs/UpdateRegistrationFlowWithPasskeyMethod.md)
+ - [UpdateRegistrationFlowWithPasswordMethod](docs/UpdateRegistrationFlowWithPasswordMethod.md)
+ - [UpdateRegistrationFlowWithProfileMethod](docs/UpdateRegistrationFlowWithProfileMethod.md)
+ - [UpdateRegistrationFlowWithWebAuthnMethod](docs/UpdateRegistrationFlowWithWebAuthnMethod.md)
+ - [UpdateSettingsFlowBody](docs/UpdateSettingsFlowBody.md)
+ - [UpdateSettingsFlowWithLookupMethod](docs/UpdateSettingsFlowWithLookupMethod.md)
+ - [UpdateSettingsFlowWithOidcMethod](docs/UpdateSettingsFlowWithOidcMethod.md)
+ - [UpdateSettingsFlowWithPasskeyMethod](docs/UpdateSettingsFlowWithPasskeyMethod.md)
+ - [UpdateSettingsFlowWithPasswordMethod](docs/UpdateSettingsFlowWithPasswordMethod.md)
+ - [UpdateSettingsFlowWithProfileMethod](docs/UpdateSettingsFlowWithProfileMethod.md)
+ - [UpdateSettingsFlowWithTotpMethod](docs/UpdateSettingsFlowWithTotpMethod.md)
+ - [UpdateSettingsFlowWithWebAuthnMethod](docs/UpdateSettingsFlowWithWebAuthnMethod.md)
+ - [UpdateVerificationFlowBody](docs/UpdateVerificationFlowBody.md)
+ - [UpdateVerificationFlowWithCodeMethod](docs/UpdateVerificationFlowWithCodeMethod.md)
+ - [UpdateVerificationFlowWithLinkMethod](docs/UpdateVerificationFlowWithLinkMethod.md)
+ - [VerifiableIdentityAddress](docs/VerifiableIdentityAddress.md)
+ - [VerificationFlow](docs/VerificationFlow.md)
+ - [VerificationFlowState](docs/VerificationFlowState.md)
+ - [Version](docs/Version.md)
+
+
+## Documentation For Authorization
+
+
+
+### oryAccessToken
+
+- **Type**: API key
+- **API key parameter name**: Authorization
+- **Location**: HTTP header
+
+Note, each API key must be added to a map of `map[string]APIKey` where the key is: Authorization and passed in as the auth context for each request.
+
+
+## Documentation for Utility Methods
+
+Due to the fact that model structure members are all pointers, this package contains
+a number of utility functions to easily obtain pointers to values of basic types.
+Each of these functions takes a value of the given basic type and returns a pointer to it:
+
+* `PtrBool`
+* `PtrInt`
+* `PtrInt32`
+* `PtrInt64`
+* `PtrFloat`
+* `PtrFloat32`
+* `PtrFloat64`
+* `PtrString`
+* `PtrTime`
+
+## Author
+
+office@ory.sh
+
diff --git a/internal/httpclient/api_courier.go b/internal/httpclient/api_courier.go
new file mode 100644
index 000000000000..91bcc08025eb
--- /dev/null
+++ b/internal/httpclient/api_courier.go
@@ -0,0 +1,362 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "bytes"
+ "context"
+ "io"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// Linger please
+var (
+ _ context.Context
+)
+
+type CourierApi interface {
+
+ /*
+ * GetCourierMessage Get a Message
+ * Gets a specific messages by the given ID.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param id MessageID is the ID of the message.
+ * @return CourierApiApiGetCourierMessageRequest
+ */
+ GetCourierMessage(ctx context.Context, id string) CourierApiApiGetCourierMessageRequest
+
+ /*
+ * GetCourierMessageExecute executes the request
+ * @return Message
+ */
+ GetCourierMessageExecute(r CourierApiApiGetCourierMessageRequest) (*Message, *http.Response, error)
+
+ /*
+ * ListCourierMessages List Messages
+ * Lists all messages by given status and recipient.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return CourierApiApiListCourierMessagesRequest
+ */
+ ListCourierMessages(ctx context.Context) CourierApiApiListCourierMessagesRequest
+
+ /*
+ * ListCourierMessagesExecute executes the request
+ * @return []Message
+ */
+ ListCourierMessagesExecute(r CourierApiApiListCourierMessagesRequest) ([]Message, *http.Response, error)
+}
+
+// CourierApiService CourierApi service
+type CourierApiService service
+
+type CourierApiApiGetCourierMessageRequest struct {
+ ctx context.Context
+ ApiService CourierApi
+ id string
+}
+
+func (r CourierApiApiGetCourierMessageRequest) Execute() (*Message, *http.Response, error) {
+ return r.ApiService.GetCourierMessageExecute(r)
+}
+
+/*
+ * GetCourierMessage Get a Message
+ * Gets a specific messages by the given ID.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param id MessageID is the ID of the message.
+ * @return CourierApiApiGetCourierMessageRequest
+ */
+func (a *CourierApiService) GetCourierMessage(ctx context.Context, id string) CourierApiApiGetCourierMessageRequest {
+ return CourierApiApiGetCourierMessageRequest{
+ ApiService: a,
+ ctx: ctx,
+ id: id,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return Message
+ */
+func (a *CourierApiService) GetCourierMessageExecute(r CourierApiApiGetCourierMessageRequest) (*Message, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *Message
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CourierApiService.GetCourierMessage")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/admin/courier/messages/{id}"
+ localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
+ if apiKey, ok := auth["oryAccessToken"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type CourierApiApiListCourierMessagesRequest struct {
+ ctx context.Context
+ ApiService CourierApi
+ pageSize *int64
+ pageToken *string
+ status *CourierMessageStatus
+ recipient *string
+}
+
+func (r CourierApiApiListCourierMessagesRequest) PageSize(pageSize int64) CourierApiApiListCourierMessagesRequest {
+ r.pageSize = &pageSize
+ return r
+}
+func (r CourierApiApiListCourierMessagesRequest) PageToken(pageToken string) CourierApiApiListCourierMessagesRequest {
+ r.pageToken = &pageToken
+ return r
+}
+func (r CourierApiApiListCourierMessagesRequest) Status(status CourierMessageStatus) CourierApiApiListCourierMessagesRequest {
+ r.status = &status
+ return r
+}
+func (r CourierApiApiListCourierMessagesRequest) Recipient(recipient string) CourierApiApiListCourierMessagesRequest {
+ r.recipient = &recipient
+ return r
+}
+
+func (r CourierApiApiListCourierMessagesRequest) Execute() ([]Message, *http.Response, error) {
+ return r.ApiService.ListCourierMessagesExecute(r)
+}
+
+/*
+ * ListCourierMessages List Messages
+ * Lists all messages by given status and recipient.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return CourierApiApiListCourierMessagesRequest
+ */
+func (a *CourierApiService) ListCourierMessages(ctx context.Context) CourierApiApiListCourierMessagesRequest {
+ return CourierApiApiListCourierMessagesRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return []Message
+ */
+func (a *CourierApiService) ListCourierMessagesExecute(r CourierApiApiListCourierMessagesRequest) ([]Message, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue []Message
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CourierApiService.ListCourierMessages")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/admin/courier/messages"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.pageSize != nil {
+ localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, ""))
+ }
+ if r.pageToken != nil {
+ localVarQueryParams.Add("page_token", parameterToString(*r.pageToken, ""))
+ }
+ if r.status != nil {
+ localVarQueryParams.Add("status", parameterToString(*r.status, ""))
+ }
+ if r.recipient != nil {
+ localVarQueryParams.Add("recipient", parameterToString(*r.recipient, ""))
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
+ if apiKey, ok := auth["oryAccessToken"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
diff --git a/internal/httpclient/api_frontend.go b/internal/httpclient/api_frontend.go
new file mode 100644
index 000000000000..cfb87b55902a
--- /dev/null
+++ b/internal/httpclient/api_frontend.go
@@ -0,0 +1,5863 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "bytes"
+ "context"
+ "io"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// Linger please
+var (
+ _ context.Context
+)
+
+type FrontendApi interface {
+
+ /*
+ * CreateBrowserLoginFlow Create Login Flow for Browsers
+ * This endpoint initializes a browser-based user login flow. This endpoint will set the appropriate
+ cookies and anti-CSRF measures required for browser-based flows.
+
+ If this endpoint is opened as a link in the browser, it will be redirected to
+ `selfservice.flows.login.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session
+ exists already, the browser will be redirected to `urls.default_redirect_url` unless the query parameter
+ `?refresh=true` was set.
+
+ If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the
+ case of an error, the `error.id` of the JSON response body can be one of:
+
+ `session_already_available`: The user is already signed in.
+ `session_aal1_required`: Multi-factor auth (e.g. 2fa) was requested but the user has no session yet.
+ `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
+ `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!
+
+ The optional query parameter login_challenge is set when using Kratos with
+ Hydra in an OAuth2 flow. See the oauth2_provider.url configuration
+ option.
+
+ This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed.
+
+ More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiCreateBrowserLoginFlowRequest
+ */
+ CreateBrowserLoginFlow(ctx context.Context) FrontendApiApiCreateBrowserLoginFlowRequest
+
+ /*
+ * CreateBrowserLoginFlowExecute executes the request
+ * @return LoginFlow
+ */
+ CreateBrowserLoginFlowExecute(r FrontendApiApiCreateBrowserLoginFlowRequest) (*LoginFlow, *http.Response, error)
+
+ /*
+ * CreateBrowserLogoutFlow Create a Logout URL for Browsers
+ * This endpoint initializes a browser-based user logout flow and a URL which can be used to log out the user.
+
+ This endpoint is NOT INTENDED for API clients and only works
+ with browsers (Chrome, Firefox, ...). For API clients you can
+ call the `/self-service/logout/api` URL directly with the Ory Session Token.
+
+ The URL is only valid for the currently signed in user. If no user is signed in, this endpoint returns
+ a 401 error.
+
+ When calling this endpoint from a backend, please ensure to properly forward the HTTP cookies.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiCreateBrowserLogoutFlowRequest
+ */
+ CreateBrowserLogoutFlow(ctx context.Context) FrontendApiApiCreateBrowserLogoutFlowRequest
+
+ /*
+ * CreateBrowserLogoutFlowExecute executes the request
+ * @return LogoutFlow
+ */
+ CreateBrowserLogoutFlowExecute(r FrontendApiApiCreateBrowserLogoutFlowRequest) (*LogoutFlow, *http.Response, error)
+
+ /*
+ * CreateBrowserRecoveryFlow Create Recovery Flow for Browsers
+ * This endpoint initializes a browser-based account recovery flow. Once initialized, the browser will be redirected to
+ `selfservice.flows.recovery.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session
+ exists, the browser is returned to the configured return URL.
+
+ If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects
+ or a 400 bad request error if the user is already authenticated.
+
+ This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed.
+
+ More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiCreateBrowserRecoveryFlowRequest
+ */
+ CreateBrowserRecoveryFlow(ctx context.Context) FrontendApiApiCreateBrowserRecoveryFlowRequest
+
+ /*
+ * CreateBrowserRecoveryFlowExecute executes the request
+ * @return RecoveryFlow
+ */
+ CreateBrowserRecoveryFlowExecute(r FrontendApiApiCreateBrowserRecoveryFlowRequest) (*RecoveryFlow, *http.Response, error)
+
+ /*
+ * CreateBrowserRegistrationFlow Create Registration Flow for Browsers
+ * This endpoint initializes a browser-based user registration flow. This endpoint will set the appropriate
+ cookies and anti-CSRF measures required for browser-based flows.
+
+ If this endpoint is opened as a link in the browser, it will be redirected to
+ `selfservice.flows.registration.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session
+ exists already, the browser will be redirected to `urls.default_redirect_url`.
+
+ If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the
+ case of an error, the `error.id` of the JSON response body can be one of:
+
+ `session_already_available`: The user is already signed in.
+ `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
+ `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!
+
+ If this endpoint is called via an AJAX request, the response contains the registration flow without a redirect.
+
+ This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed.
+
+ More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiCreateBrowserRegistrationFlowRequest
+ */
+ CreateBrowserRegistrationFlow(ctx context.Context) FrontendApiApiCreateBrowserRegistrationFlowRequest
+
+ /*
+ * CreateBrowserRegistrationFlowExecute executes the request
+ * @return RegistrationFlow
+ */
+ CreateBrowserRegistrationFlowExecute(r FrontendApiApiCreateBrowserRegistrationFlowRequest) (*RegistrationFlow, *http.Response, error)
+
+ /*
+ * CreateBrowserSettingsFlow Create Settings Flow for Browsers
+ * This endpoint initializes a browser-based user settings flow. Once initialized, the browser will be redirected to
+ `selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid
+ Ory Kratos Session Cookie is included in the request, a login flow will be initialized.
+
+ If this endpoint is opened as a link in the browser, it will be redirected to
+ `selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid user session
+ was set, the browser will be redirected to the login endpoint.
+
+ If this endpoint is called via an AJAX request, the response contains the settings flow without any redirects
+ or a 401 forbidden error if no valid session was set.
+
+ Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator
+ Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn
+ credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user
+ to sign in with the second factor (happens automatically for server-side browser flows) or change the configuration.
+
+ If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the
+ case of an error, the `error.id` of the JSON response body can be one of:
+
+ `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
+ `session_inactive`: No Ory Session was found - sign in a user first.
+ `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!
+
+ This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed.
+
+ More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiCreateBrowserSettingsFlowRequest
+ */
+ CreateBrowserSettingsFlow(ctx context.Context) FrontendApiApiCreateBrowserSettingsFlowRequest
+
+ /*
+ * CreateBrowserSettingsFlowExecute executes the request
+ * @return SettingsFlow
+ */
+ CreateBrowserSettingsFlowExecute(r FrontendApiApiCreateBrowserSettingsFlowRequest) (*SettingsFlow, *http.Response, error)
+
+ /*
+ * CreateBrowserVerificationFlow Create Verification Flow for Browser Clients
+ * This endpoint initializes a browser-based account verification flow. Once initialized, the browser will be redirected to
+ `selfservice.flows.verification.ui_url` with the flow ID set as the query parameter `?flow=`.
+
+ If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects.
+
+ This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...).
+
+ More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiCreateBrowserVerificationFlowRequest
+ */
+ CreateBrowserVerificationFlow(ctx context.Context) FrontendApiApiCreateBrowserVerificationFlowRequest
+
+ /*
+ * CreateBrowserVerificationFlowExecute executes the request
+ * @return VerificationFlow
+ */
+ CreateBrowserVerificationFlowExecute(r FrontendApiApiCreateBrowserVerificationFlowRequest) (*VerificationFlow, *http.Response, error)
+
+ /*
+ * CreateNativeLoginFlow Create Login Flow for Native Apps
+ * This endpoint initiates a login flow for native apps that do not use a browser, such as mobile devices, smart TVs, and so on.
+
+ If a valid provided session cookie or session token is provided, a 400 Bad Request error
+ will be returned unless the URL query parameter `?refresh=true` is set.
+
+ To fetch an existing login flow call `/self-service/login/flows?flow=`.
+
+ You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server
+ Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make
+ you vulnerable to a variety of CSRF attacks, including CSRF login attacks.
+
+ In the case of an error, the `error.id` of the JSON response body can be one of:
+
+ `session_already_available`: The user is already signed in.
+ `session_aal1_required`: Multi-factor auth (e.g. 2fa) was requested but the user has no session yet.
+ `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
+
+ This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...).
+
+ More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiCreateNativeLoginFlowRequest
+ */
+ CreateNativeLoginFlow(ctx context.Context) FrontendApiApiCreateNativeLoginFlowRequest
+
+ /*
+ * CreateNativeLoginFlowExecute executes the request
+ * @return LoginFlow
+ */
+ CreateNativeLoginFlowExecute(r FrontendApiApiCreateNativeLoginFlowRequest) (*LoginFlow, *http.Response, error)
+
+ /*
+ * CreateNativeRecoveryFlow Create Recovery Flow for Native Apps
+ * This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on.
+
+ If a valid provided session cookie or session token is provided, a 400 Bad Request error.
+
+ On an existing recovery flow, use the `getRecoveryFlow` API endpoint.
+
+ You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server
+ Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make
+ you vulnerable to a variety of CSRF attacks.
+
+ This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...).
+
+ More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiCreateNativeRecoveryFlowRequest
+ */
+ CreateNativeRecoveryFlow(ctx context.Context) FrontendApiApiCreateNativeRecoveryFlowRequest
+
+ /*
+ * CreateNativeRecoveryFlowExecute executes the request
+ * @return RecoveryFlow
+ */
+ CreateNativeRecoveryFlowExecute(r FrontendApiApiCreateNativeRecoveryFlowRequest) (*RecoveryFlow, *http.Response, error)
+
+ /*
+ * CreateNativeRegistrationFlow Create Registration Flow for Native Apps
+ * This endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on.
+
+ If a valid provided session cookie or session token is provided, a 400 Bad Request error
+ will be returned unless the URL query parameter `?refresh=true` is set.
+
+ To fetch an existing registration flow call `/self-service/registration/flows?flow=`.
+
+ You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server
+ Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make
+ you vulnerable to a variety of CSRF attacks.
+
+ In the case of an error, the `error.id` of the JSON response body can be one of:
+
+ `session_already_available`: The user is already signed in.
+ `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
+
+ This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...).
+
+ More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiCreateNativeRegistrationFlowRequest
+ */
+ CreateNativeRegistrationFlow(ctx context.Context) FrontendApiApiCreateNativeRegistrationFlowRequest
+
+ /*
+ * CreateNativeRegistrationFlowExecute executes the request
+ * @return RegistrationFlow
+ */
+ CreateNativeRegistrationFlowExecute(r FrontendApiApiCreateNativeRegistrationFlowRequest) (*RegistrationFlow, *http.Response, error)
+
+ /*
+ * CreateNativeSettingsFlow Create Settings Flow for Native Apps
+ * This endpoint initiates a settings flow for API clients such as mobile devices, smart TVs, and so on.
+ You must provide a valid Ory Kratos Session Token for this endpoint to respond with HTTP 200 OK.
+
+ To fetch an existing settings flow call `/self-service/settings/flows?flow=`.
+
+ You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server
+ Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make
+ you vulnerable to a variety of CSRF attacks.
+
+ Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator
+ Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn
+ credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user
+ to sign in with the second factor or change the configuration.
+
+ In the case of an error, the `error.id` of the JSON response body can be one of:
+
+ `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
+ `session_inactive`: No Ory Session was found - sign in a user first.
+
+ This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...).
+
+ More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiCreateNativeSettingsFlowRequest
+ */
+ CreateNativeSettingsFlow(ctx context.Context) FrontendApiApiCreateNativeSettingsFlowRequest
+
+ /*
+ * CreateNativeSettingsFlowExecute executes the request
+ * @return SettingsFlow
+ */
+ CreateNativeSettingsFlowExecute(r FrontendApiApiCreateNativeSettingsFlowRequest) (*SettingsFlow, *http.Response, error)
+
+ /*
+ * CreateNativeVerificationFlow Create Verification Flow for Native Apps
+ * This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on.
+
+ To fetch an existing verification flow call `/self-service/verification/flows?flow=`.
+
+ You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server
+ Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make
+ you vulnerable to a variety of CSRF attacks.
+
+ This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...).
+
+ More information can be found at [Ory Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiCreateNativeVerificationFlowRequest
+ */
+ CreateNativeVerificationFlow(ctx context.Context) FrontendApiApiCreateNativeVerificationFlowRequest
+
+ /*
+ * CreateNativeVerificationFlowExecute executes the request
+ * @return VerificationFlow
+ */
+ CreateNativeVerificationFlowExecute(r FrontendApiApiCreateNativeVerificationFlowRequest) (*VerificationFlow, *http.Response, error)
+
+ /*
+ * DisableMyOtherSessions Disable my other sessions
+ * Calling this endpoint invalidates all except the current session that belong to the logged-in user.
+ Session data are not deleted.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiDisableMyOtherSessionsRequest
+ */
+ DisableMyOtherSessions(ctx context.Context) FrontendApiApiDisableMyOtherSessionsRequest
+
+ /*
+ * DisableMyOtherSessionsExecute executes the request
+ * @return DeleteMySessionsCount
+ */
+ DisableMyOtherSessionsExecute(r FrontendApiApiDisableMyOtherSessionsRequest) (*DeleteMySessionsCount, *http.Response, error)
+
+ /*
+ * DisableMySession Disable one of my sessions
+ * Calling this endpoint invalidates the specified session. The current session cannot be revoked.
+ Session data are not deleted.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @param id ID is the session's ID.
+ * @return FrontendApiApiDisableMySessionRequest
+ */
+ DisableMySession(ctx context.Context, id string) FrontendApiApiDisableMySessionRequest
+
+ /*
+ * DisableMySessionExecute executes the request
+ */
+ DisableMySessionExecute(r FrontendApiApiDisableMySessionRequest) (*http.Response, error)
+
+ /*
+ * ExchangeSessionToken Exchange Session Token
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiExchangeSessionTokenRequest
+ */
+ ExchangeSessionToken(ctx context.Context) FrontendApiApiExchangeSessionTokenRequest
+
+ /*
+ * ExchangeSessionTokenExecute executes the request
+ * @return SuccessfulNativeLogin
+ */
+ ExchangeSessionTokenExecute(r FrontendApiApiExchangeSessionTokenRequest) (*SuccessfulNativeLogin, *http.Response, error)
+
+ /*
+ * GetFlowError Get User-Flow Errors
+ * This endpoint returns the error associated with a user-facing self service errors.
+
+ This endpoint supports stub values to help you implement the error UI:
+
+ `?id=stub:500` - returns a stub 500 (Internal Server Error) error.
+
+ More information can be found at [Ory Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiGetFlowErrorRequest
+ */
+ GetFlowError(ctx context.Context) FrontendApiApiGetFlowErrorRequest
+
+ /*
+ * GetFlowErrorExecute executes the request
+ * @return FlowError
+ */
+ GetFlowErrorExecute(r FrontendApiApiGetFlowErrorRequest) (*FlowError, *http.Response, error)
+
+ /*
+ * GetLoginFlow Get Login Flow
+ * This endpoint returns a login flow's context with, for example, error details and other information.
+
+ Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header.
+ For AJAX requests you must ensure that cookies are included in the request or requests will fail.
+
+ If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain
+ and you need to forward the incoming HTTP Cookie header to this endpoint:
+
+ ```js
+ pseudo-code example
+ router.get('/login', async function (req, res) {
+ const flow = await client.getLoginFlow(req.header('cookie'), req.query['flow'])
+
+ res.render('login', flow)
+ })
+ ```
+
+ This request may fail due to several reasons. The `error.id` can be one of:
+
+ `session_already_available`: The user is already signed in.
+ `self_service_flow_expired`: The flow is expired and you should request a new one.
+
+ More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiGetLoginFlowRequest
+ */
+ GetLoginFlow(ctx context.Context) FrontendApiApiGetLoginFlowRequest
+
+ /*
+ * GetLoginFlowExecute executes the request
+ * @return LoginFlow
+ */
+ GetLoginFlowExecute(r FrontendApiApiGetLoginFlowRequest) (*LoginFlow, *http.Response, error)
+
+ /*
+ * GetRecoveryFlow Get Recovery Flow
+ * This endpoint returns a recovery flow's context with, for example, error details and other information.
+
+ Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header.
+ For AJAX requests you must ensure that cookies are included in the request or requests will fail.
+
+ If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain
+ and you need to forward the incoming HTTP Cookie header to this endpoint:
+
+ ```js
+ pseudo-code example
+ router.get('/recovery', async function (req, res) {
+ const flow = await client.getRecoveryFlow(req.header('Cookie'), req.query['flow'])
+
+ res.render('recovery', flow)
+ })
+ ```
+
+ More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiGetRecoveryFlowRequest
+ */
+ GetRecoveryFlow(ctx context.Context) FrontendApiApiGetRecoveryFlowRequest
+
+ /*
+ * GetRecoveryFlowExecute executes the request
+ * @return RecoveryFlow
+ */
+ GetRecoveryFlowExecute(r FrontendApiApiGetRecoveryFlowRequest) (*RecoveryFlow, *http.Response, error)
+
+ /*
+ * GetRegistrationFlow Get Registration Flow
+ * This endpoint returns a registration flow's context with, for example, error details and other information.
+
+ Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header.
+ For AJAX requests you must ensure that cookies are included in the request or requests will fail.
+
+ If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain
+ and you need to forward the incoming HTTP Cookie header to this endpoint:
+
+ ```js
+ pseudo-code example
+ router.get('/registration', async function (req, res) {
+ const flow = await client.getRegistrationFlow(req.header('cookie'), req.query['flow'])
+
+ res.render('registration', flow)
+ })
+ ```
+
+ This request may fail due to several reasons. The `error.id` can be one of:
+
+ `session_already_available`: The user is already signed in.
+ `self_service_flow_expired`: The flow is expired and you should request a new one.
+
+ More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiGetRegistrationFlowRequest
+ */
+ GetRegistrationFlow(ctx context.Context) FrontendApiApiGetRegistrationFlowRequest
+
+ /*
+ * GetRegistrationFlowExecute executes the request
+ * @return RegistrationFlow
+ */
+ GetRegistrationFlowExecute(r FrontendApiApiGetRegistrationFlowRequest) (*RegistrationFlow, *http.Response, error)
+
+ /*
+ * GetSettingsFlow Get Settings Flow
+ * When accessing this endpoint through Ory Kratos' Public API you must ensure that either the Ory Kratos Session Cookie
+ or the Ory Kratos Session Token are set.
+
+ Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator
+ Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn
+ credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user
+ to sign in with the second factor or change the configuration.
+
+ You can access this endpoint without credentials when using Ory Kratos' Admin API.
+
+ If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the
+ case of an error, the `error.id` of the JSON response body can be one of:
+
+ `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
+ `session_inactive`: No Ory Session was found - sign in a user first.
+ `security_identity_mismatch`: The flow was interrupted with `session_refresh_required` but apparently some other
+ identity logged in instead.
+
+ More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiGetSettingsFlowRequest
+ */
+ GetSettingsFlow(ctx context.Context) FrontendApiApiGetSettingsFlowRequest
+
+ /*
+ * GetSettingsFlowExecute executes the request
+ * @return SettingsFlow
+ */
+ GetSettingsFlowExecute(r FrontendApiApiGetSettingsFlowRequest) (*SettingsFlow, *http.Response, error)
+
+ /*
+ * GetVerificationFlow Get Verification Flow
+ * This endpoint returns a verification flow's context with, for example, error details and other information.
+
+ Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header.
+ For AJAX requests you must ensure that cookies are included in the request or requests will fail.
+
+ If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain
+ and you need to forward the incoming HTTP Cookie header to this endpoint:
+
+ ```js
+ pseudo-code example
+ router.get('/recovery', async function (req, res) {
+ const flow = await client.getVerificationFlow(req.header('cookie'), req.query['flow'])
+
+ res.render('verification', flow)
+ })
+ ```
+
+ More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiGetVerificationFlowRequest
+ */
+ GetVerificationFlow(ctx context.Context) FrontendApiApiGetVerificationFlowRequest
+
+ /*
+ * GetVerificationFlowExecute executes the request
+ * @return VerificationFlow
+ */
+ GetVerificationFlowExecute(r FrontendApiApiGetVerificationFlowRequest) (*VerificationFlow, *http.Response, error)
+
+ /*
+ * GetWebAuthnJavaScript Get WebAuthn JavaScript
+ * This endpoint provides JavaScript which is needed in order to perform WebAuthn login and registration.
+
+ If you are building a JavaScript Browser App (e.g. in ReactJS or AngularJS) you will need to load this file:
+
+ ```html
+
+ ```
+
+ More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiGetWebAuthnJavaScriptRequest
+ */
+ GetWebAuthnJavaScript(ctx context.Context) FrontendApiApiGetWebAuthnJavaScriptRequest
+
+ /*
+ * GetWebAuthnJavaScriptExecute executes the request
+ * @return string
+ */
+ GetWebAuthnJavaScriptExecute(r FrontendApiApiGetWebAuthnJavaScriptRequest) (string, *http.Response, error)
+
+ /*
+ * ListMySessions Get My Active Sessions
+ * This endpoints returns all other active sessions that belong to the logged-in user.
+ The current session can be retrieved by calling the `/sessions/whoami` endpoint.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiListMySessionsRequest
+ */
+ ListMySessions(ctx context.Context) FrontendApiApiListMySessionsRequest
+
+ /*
+ * ListMySessionsExecute executes the request
+ * @return []Session
+ */
+ ListMySessionsExecute(r FrontendApiApiListMySessionsRequest) ([]Session, *http.Response, error)
+
+ /*
+ * PerformNativeLogout Perform Logout for Native Apps
+ * Use this endpoint to log out an identity using an Ory Session Token. If the Ory Session Token was successfully
+ revoked, the server returns a 204 No Content response. A 204 No Content response is also sent when
+ the Ory Session Token has been revoked already before.
+
+ If the Ory Session Token is malformed or does not exist a 403 Forbidden response will be returned.
+
+ This endpoint does not remove any HTTP
+ Cookies - use the Browser-Based Self-Service Logout Flow instead.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiPerformNativeLogoutRequest
+ */
+ PerformNativeLogout(ctx context.Context) FrontendApiApiPerformNativeLogoutRequest
+
+ /*
+ * PerformNativeLogoutExecute executes the request
+ */
+ PerformNativeLogoutExecute(r FrontendApiApiPerformNativeLogoutRequest) (*http.Response, error)
+
+ /*
+ * ToSession Check Who the Current HTTP Session Belongs To
+ * Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated.
+ Returns a session object in the body or 401 if the credentials are invalid or no credentials were sent.
+ When the request it successful it adds the user ID to the 'X-Kratos-Authenticated-Identity-Id' header
+ in the response.
+
+ If you call this endpoint from a server-side application, you must forward the HTTP Cookie Header to this endpoint:
+
+ ```js
+ pseudo-code example
+ router.get('/protected-endpoint', async function (req, res) {
+ const session = await client.toSession(undefined, req.header('cookie'))
+
+ console.log(session)
+ })
+ ```
+
+ When calling this endpoint from a non-browser application (e.g. mobile app) you must include the session token:
+
+ ```js
+ pseudo-code example
+ ...
+ const session = await client.toSession("the-session-token")
+
+ console.log(session)
+ ```
+
+ When using a token template, the token is included in the `tokenized` field of the session.
+
+ ```js
+ pseudo-code example
+ ...
+ const session = await client.toSession("the-session-token", { tokenize_as: "example-jwt-template" })
+
+ console.log(session.tokenized) // The JWT
+ ```
+
+ Depending on your configuration this endpoint might return a 403 status code if the session has a lower Authenticator
+ Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn
+ credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user
+ to sign in with the second factor or change the configuration.
+
+ This endpoint is useful for:
+
+ AJAX calls. Remember to send credentials and set up CORS correctly!
+ Reverse proxies and API Gateways
+ Server-side calls - use the `X-Session-Token` header!
+
+ This endpoint authenticates users by checking:
+
+ if the `Cookie` HTTP header was set containing an Ory Kratos Session Cookie;
+ if the `Authorization: bearer ` HTTP header was set with a valid Ory Kratos Session Token;
+ if the `X-Session-Token` HTTP header was set with a valid Ory Kratos Session Token.
+
+ If none of these headers are set or the cookie or token are invalid, the endpoint returns a HTTP 401 status code.
+
+ As explained above, this request may fail due to several reasons. The `error.id` can be one of:
+
+ `session_inactive`: No active session was found in the request (e.g. no Ory Session Cookie / Ory Session Token).
+ `session_aal2_required`: An active session was found but it does not fulfil the Authenticator Assurance Level, implying that the session must (e.g.) authenticate the second factor.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiToSessionRequest
+ */
+ ToSession(ctx context.Context) FrontendApiApiToSessionRequest
+
+ /*
+ * ToSessionExecute executes the request
+ * @return Session
+ */
+ ToSessionExecute(r FrontendApiApiToSessionRequest) (*Session, *http.Response, error)
+
+ /*
+ * UpdateLoginFlow Submit a Login Flow
+ * Use this endpoint to complete a login flow. This endpoint
+ behaves differently for API and browser flows.
+
+ API flows expect `application/json` to be sent in the body and responds with
+ HTTP 200 and a application/json body with the session token on success;
+ HTTP 410 if the original flow expired with the appropriate error messages set and optionally a `use_flow_id` parameter in the body;
+ HTTP 400 on form validation errors.
+
+ Browser flows expect a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond with
+ a HTTP 303 redirect to the post/after login URL or the `return_to` value if it was set and if the login succeeded;
+ a HTTP 303 redirect to the login UI URL with the flow ID containing the validation errors otherwise.
+
+ Browser flows with an accept header of `application/json` will not redirect but instead respond with
+ HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success;
+ HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set;
+ HTTP 400 on form validation errors.
+
+ If this endpoint is called with `Accept: application/json` in the header, the response contains the flow without a redirect. In the
+ case of an error, the `error.id` of the JSON response body can be one of:
+
+ `session_already_available`: The user is already signed in.
+ `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
+ `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!
+ `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL.
+ Most likely used in Social Sign In flows.
+
+ More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiUpdateLoginFlowRequest
+ */
+ UpdateLoginFlow(ctx context.Context) FrontendApiApiUpdateLoginFlowRequest
+
+ /*
+ * UpdateLoginFlowExecute executes the request
+ * @return SuccessfulNativeLogin
+ */
+ UpdateLoginFlowExecute(r FrontendApiApiUpdateLoginFlowRequest) (*SuccessfulNativeLogin, *http.Response, error)
+
+ /*
+ * UpdateLogoutFlow Update Logout Flow
+ * This endpoint logs out an identity in a self-service manner.
+
+ If the `Accept` HTTP header is not set to `application/json`, the browser will be redirected (HTTP 303 See Other)
+ to the `return_to` parameter of the initial request or fall back to `urls.default_return_to`.
+
+ If the `Accept` HTTP header is set to `application/json`, a 204 No Content response
+ will be sent on successful logout instead.
+
+ This endpoint is NOT INTENDED for API clients and only works
+ with browsers (Chrome, Firefox, ...). For API clients you can
+ call the `/self-service/logout/api` URL directly with the Ory Session Token.
+
+ More information can be found at [Ory Kratos User Logout Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-logout).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiUpdateLogoutFlowRequest
+ */
+ UpdateLogoutFlow(ctx context.Context) FrontendApiApiUpdateLogoutFlowRequest
+
+ /*
+ * UpdateLogoutFlowExecute executes the request
+ */
+ UpdateLogoutFlowExecute(r FrontendApiApiUpdateLogoutFlowRequest) (*http.Response, error)
+
+ /*
+ * UpdateRecoveryFlow Update Recovery Flow
+ * Use this endpoint to update a recovery flow. This endpoint
+ behaves differently for API and browser flows and has several states:
+
+ `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent
+ and works with API- and Browser-initiated flows.
+ For API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid.
+ and a HTTP 303 See Other redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired).
+ For Browser clients without HTTP Header `Accept` or with `Accept: text/*` it returns a HTTP 303 See Other redirect to the Recovery UI URL with the Recovery Flow ID appended.
+ `sent_email` is the success state after `choose_method` for the `link` method and allows the user to request another recovery email. It
+ works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state.
+ `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow ("sending a recovery link")
+ does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL
+ (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with
+ a new Recovery Flow ID which contains an error message that the recovery link was invalid.
+
+ More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiUpdateRecoveryFlowRequest
+ */
+ UpdateRecoveryFlow(ctx context.Context) FrontendApiApiUpdateRecoveryFlowRequest
+
+ /*
+ * UpdateRecoveryFlowExecute executes the request
+ * @return RecoveryFlow
+ */
+ UpdateRecoveryFlowExecute(r FrontendApiApiUpdateRecoveryFlowRequest) (*RecoveryFlow, *http.Response, error)
+
+ /*
+ * UpdateRegistrationFlow Update Registration Flow
+ * Use this endpoint to complete a registration flow by sending an identity's traits and password. This endpoint
+ behaves differently for API and browser flows.
+
+ API flows expect `application/json` to be sent in the body and respond with
+ HTTP 200 and a application/json body with the created identity success - if the session hook is configured the
+ `session` and `session_token` will also be included;
+ HTTP 410 if the original flow expired with the appropriate error messages set and optionally a `use_flow_id` parameter in the body;
+ HTTP 400 on form validation errors.
+
+ Browser flows expect a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond with
+ a HTTP 303 redirect to the post/after registration URL or the `return_to` value if it was set and if the registration succeeded;
+ a HTTP 303 redirect to the registration UI URL with the flow ID containing the validation errors otherwise.
+
+ Browser flows with an accept header of `application/json` will not redirect but instead respond with
+ HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success;
+ HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set;
+ HTTP 400 on form validation errors.
+
+ If this endpoint is called with `Accept: application/json` in the header, the response contains the flow without a redirect. In the
+ case of an error, the `error.id` of the JSON response body can be one of:
+
+ `session_already_available`: The user is already signed in.
+ `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
+ `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!
+ `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL.
+ Most likely used in Social Sign In flows.
+
+ More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiUpdateRegistrationFlowRequest
+ */
+ UpdateRegistrationFlow(ctx context.Context) FrontendApiApiUpdateRegistrationFlowRequest
+
+ /*
+ * UpdateRegistrationFlowExecute executes the request
+ * @return SuccessfulNativeRegistration
+ */
+ UpdateRegistrationFlowExecute(r FrontendApiApiUpdateRegistrationFlowRequest) (*SuccessfulNativeRegistration, *http.Response, error)
+
+ /*
+ * UpdateSettingsFlow Complete Settings Flow
+ * Use this endpoint to complete a settings flow by sending an identity's updated password. This endpoint
+ behaves differently for API and browser flows.
+
+ API-initiated flows expect `application/json` to be sent in the body and respond with
+ HTTP 200 and an application/json body with the session token on success;
+ HTTP 303 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set;
+ HTTP 400 on form validation errors.
+ HTTP 401 when the endpoint is called without a valid session token.
+ HTTP 403 when `selfservice.flows.settings.privileged_session_max_age` was reached or the session's AAL is too low.
+ Implies that the user needs to re-authenticate.
+
+ Browser flows without HTTP Header `Accept` or with `Accept: text/*` respond with
+ a HTTP 303 redirect to the post/after settings URL or the `return_to` value if it was set and if the flow succeeded;
+ a HTTP 303 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise.
+ a HTTP 303 redirect to the login endpoint when `selfservice.flows.settings.privileged_session_max_age` was reached or the session's AAL is too low.
+
+ Browser flows with HTTP Header `Accept: application/json` respond with
+ HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success;
+ HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set;
+ HTTP 401 when the endpoint is called without a valid session cookie.
+ HTTP 403 when the page is accessed without a session cookie or the session's AAL is too low.
+ HTTP 400 on form validation errors.
+
+ Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator
+ Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn
+ credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user
+ to sign in with the second factor (happens automatically for server-side browser flows) or change the configuration.
+
+ If this endpoint is called with a `Accept: application/json` HTTP header, the response contains the flow without a redirect. In the
+ case of an error, the `error.id` of the JSON response body can be one of:
+
+ `session_refresh_required`: The identity requested to change something that needs a privileged session. Redirect
+ the identity to the login init endpoint with query parameters `?refresh=true&return_to=`,
+ or initiate a refresh login flow otherwise.
+ `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
+ `session_inactive`: No Ory Session was found - sign in a user first.
+ `security_identity_mismatch`: The flow was interrupted with `session_refresh_required` but apparently some other
+ identity logged in instead.
+ `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!
+ `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL.
+ Most likely used in Social Sign In flows.
+
+ More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiUpdateSettingsFlowRequest
+ */
+ UpdateSettingsFlow(ctx context.Context) FrontendApiApiUpdateSettingsFlowRequest
+
+ /*
+ * UpdateSettingsFlowExecute executes the request
+ * @return SettingsFlow
+ */
+ UpdateSettingsFlowExecute(r FrontendApiApiUpdateSettingsFlowRequest) (*SettingsFlow, *http.Response, error)
+
+ /*
+ * UpdateVerificationFlow Complete Verification Flow
+ * Use this endpoint to complete a verification flow. This endpoint
+ behaves differently for API and browser flows and has several states:
+
+ `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent
+ and works with API- and Browser-initiated flows.
+ For API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid
+ and a HTTP 303 See Other redirect with a fresh verification flow if the flow was otherwise invalid (e.g. expired).
+ For Browser clients without HTTP Header `Accept` or with `Accept: text/*` it returns a HTTP 303 See Other redirect to the Verification UI URL with the Verification Flow ID appended.
+ `sent_email` is the success state after `choose_method` when using the `link` method and allows the user to request another verification email. It
+ works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state.
+ `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow ("sending a verification link")
+ does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL
+ (if the link was valid) and instructs the user to update their password, or a redirect to the Verification UI URL with
+ a new Verification Flow ID which contains an error message that the verification link was invalid.
+
+ More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation).
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiUpdateVerificationFlowRequest
+ */
+ UpdateVerificationFlow(ctx context.Context) FrontendApiApiUpdateVerificationFlowRequest
+
+ /*
+ * UpdateVerificationFlowExecute executes the request
+ * @return VerificationFlow
+ */
+ UpdateVerificationFlowExecute(r FrontendApiApiUpdateVerificationFlowRequest) (*VerificationFlow, *http.Response, error)
+}
+
+// FrontendApiService FrontendApi service
+type FrontendApiService service
+
+type FrontendApiApiCreateBrowserLoginFlowRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ refresh *bool
+ aal *string
+ returnTo *string
+ cookie *string
+ loginChallenge *string
+ organization *string
+ via *string
+}
+
+func (r FrontendApiApiCreateBrowserLoginFlowRequest) Refresh(refresh bool) FrontendApiApiCreateBrowserLoginFlowRequest {
+ r.refresh = &refresh
+ return r
+}
+func (r FrontendApiApiCreateBrowserLoginFlowRequest) Aal(aal string) FrontendApiApiCreateBrowserLoginFlowRequest {
+ r.aal = &aal
+ return r
+}
+func (r FrontendApiApiCreateBrowserLoginFlowRequest) ReturnTo(returnTo string) FrontendApiApiCreateBrowserLoginFlowRequest {
+ r.returnTo = &returnTo
+ return r
+}
+func (r FrontendApiApiCreateBrowserLoginFlowRequest) Cookie(cookie string) FrontendApiApiCreateBrowserLoginFlowRequest {
+ r.cookie = &cookie
+ return r
+}
+func (r FrontendApiApiCreateBrowserLoginFlowRequest) LoginChallenge(loginChallenge string) FrontendApiApiCreateBrowserLoginFlowRequest {
+ r.loginChallenge = &loginChallenge
+ return r
+}
+func (r FrontendApiApiCreateBrowserLoginFlowRequest) Organization(organization string) FrontendApiApiCreateBrowserLoginFlowRequest {
+ r.organization = &organization
+ return r
+}
+func (r FrontendApiApiCreateBrowserLoginFlowRequest) Via(via string) FrontendApiApiCreateBrowserLoginFlowRequest {
+ r.via = &via
+ return r
+}
+
+func (r FrontendApiApiCreateBrowserLoginFlowRequest) Execute() (*LoginFlow, *http.Response, error) {
+ return r.ApiService.CreateBrowserLoginFlowExecute(r)
+}
+
+/*
+ - CreateBrowserLoginFlow Create Login Flow for Browsers
+ - This endpoint initializes a browser-based user login flow. This endpoint will set the appropriate
+
+cookies and anti-CSRF measures required for browser-based flows.
+
+If this endpoint is opened as a link in the browser, it will be redirected to
+`selfservice.flows.login.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session
+exists already, the browser will be redirected to `urls.default_redirect_url` unless the query parameter
+`?refresh=true` was set.
+
+If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the
+case of an error, the `error.id` of the JSON response body can be one of:
+
+`session_already_available`: The user is already signed in.
+`session_aal1_required`: Multi-factor auth (e.g. 2fa) was requested but the user has no session yet.
+`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
+`security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!
+
+The optional query parameter login_challenge is set when using Kratos with
+Hydra in an OAuth2 flow. See the oauth2_provider.url configuration
+option.
+
+This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed.
+
+More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiCreateBrowserLoginFlowRequest
+*/
+func (a *FrontendApiService) CreateBrowserLoginFlow(ctx context.Context) FrontendApiApiCreateBrowserLoginFlowRequest {
+ return FrontendApiApiCreateBrowserLoginFlowRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return LoginFlow
+ */
+func (a *FrontendApiService) CreateBrowserLoginFlowExecute(r FrontendApiApiCreateBrowserLoginFlowRequest) (*LoginFlow, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *LoginFlow
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.CreateBrowserLoginFlow")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/self-service/login/browser"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.refresh != nil {
+ localVarQueryParams.Add("refresh", parameterToString(*r.refresh, ""))
+ }
+ if r.aal != nil {
+ localVarQueryParams.Add("aal", parameterToString(*r.aal, ""))
+ }
+ if r.returnTo != nil {
+ localVarQueryParams.Add("return_to", parameterToString(*r.returnTo, ""))
+ }
+ if r.loginChallenge != nil {
+ localVarQueryParams.Add("login_challenge", parameterToString(*r.loginChallenge, ""))
+ }
+ if r.organization != nil {
+ localVarQueryParams.Add("organization", parameterToString(*r.organization, ""))
+ }
+ if r.via != nil {
+ localVarQueryParams.Add("via", parameterToString(*r.via, ""))
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.cookie != nil {
+ localVarHeaderParams["Cookie"] = parameterToString(*r.cookie, "")
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiCreateBrowserLogoutFlowRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ cookie *string
+ returnTo *string
+}
+
+func (r FrontendApiApiCreateBrowserLogoutFlowRequest) Cookie(cookie string) FrontendApiApiCreateBrowserLogoutFlowRequest {
+ r.cookie = &cookie
+ return r
+}
+func (r FrontendApiApiCreateBrowserLogoutFlowRequest) ReturnTo(returnTo string) FrontendApiApiCreateBrowserLogoutFlowRequest {
+ r.returnTo = &returnTo
+ return r
+}
+
+func (r FrontendApiApiCreateBrowserLogoutFlowRequest) Execute() (*LogoutFlow, *http.Response, error) {
+ return r.ApiService.CreateBrowserLogoutFlowExecute(r)
+}
+
+/*
+ - CreateBrowserLogoutFlow Create a Logout URL for Browsers
+ - This endpoint initializes a browser-based user logout flow and a URL which can be used to log out the user.
+
+This endpoint is NOT INTENDED for API clients and only works
+with browsers (Chrome, Firefox, ...). For API clients you can
+call the `/self-service/logout/api` URL directly with the Ory Session Token.
+
+The URL is only valid for the currently signed in user. If no user is signed in, this endpoint returns
+a 401 error.
+
+When calling this endpoint from a backend, please ensure to properly forward the HTTP cookies.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiCreateBrowserLogoutFlowRequest
+*/
+func (a *FrontendApiService) CreateBrowserLogoutFlow(ctx context.Context) FrontendApiApiCreateBrowserLogoutFlowRequest {
+ return FrontendApiApiCreateBrowserLogoutFlowRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return LogoutFlow
+ */
+func (a *FrontendApiService) CreateBrowserLogoutFlowExecute(r FrontendApiApiCreateBrowserLogoutFlowRequest) (*LogoutFlow, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *LogoutFlow
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.CreateBrowserLogoutFlow")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/self-service/logout/browser"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.returnTo != nil {
+ localVarQueryParams.Add("return_to", parameterToString(*r.returnTo, ""))
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.cookie != nil {
+ localVarHeaderParams["cookie"] = parameterToString(*r.cookie, "")
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiCreateBrowserRecoveryFlowRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ returnTo *string
+}
+
+func (r FrontendApiApiCreateBrowserRecoveryFlowRequest) ReturnTo(returnTo string) FrontendApiApiCreateBrowserRecoveryFlowRequest {
+ r.returnTo = &returnTo
+ return r
+}
+
+func (r FrontendApiApiCreateBrowserRecoveryFlowRequest) Execute() (*RecoveryFlow, *http.Response, error) {
+ return r.ApiService.CreateBrowserRecoveryFlowExecute(r)
+}
+
+/*
+ - CreateBrowserRecoveryFlow Create Recovery Flow for Browsers
+ - This endpoint initializes a browser-based account recovery flow. Once initialized, the browser will be redirected to
+
+`selfservice.flows.recovery.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session
+exists, the browser is returned to the configured return URL.
+
+If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects
+or a 400 bad request error if the user is already authenticated.
+
+This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed.
+
+More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiCreateBrowserRecoveryFlowRequest
+*/
+func (a *FrontendApiService) CreateBrowserRecoveryFlow(ctx context.Context) FrontendApiApiCreateBrowserRecoveryFlowRequest {
+ return FrontendApiApiCreateBrowserRecoveryFlowRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return RecoveryFlow
+ */
+func (a *FrontendApiService) CreateBrowserRecoveryFlowExecute(r FrontendApiApiCreateBrowserRecoveryFlowRequest) (*RecoveryFlow, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *RecoveryFlow
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.CreateBrowserRecoveryFlow")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/self-service/recovery/browser"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.returnTo != nil {
+ localVarQueryParams.Add("return_to", parameterToString(*r.returnTo, ""))
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiCreateBrowserRegistrationFlowRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ returnTo *string
+ loginChallenge *string
+ afterVerificationReturnTo *string
+ organization *string
+}
+
+func (r FrontendApiApiCreateBrowserRegistrationFlowRequest) ReturnTo(returnTo string) FrontendApiApiCreateBrowserRegistrationFlowRequest {
+ r.returnTo = &returnTo
+ return r
+}
+func (r FrontendApiApiCreateBrowserRegistrationFlowRequest) LoginChallenge(loginChallenge string) FrontendApiApiCreateBrowserRegistrationFlowRequest {
+ r.loginChallenge = &loginChallenge
+ return r
+}
+func (r FrontendApiApiCreateBrowserRegistrationFlowRequest) AfterVerificationReturnTo(afterVerificationReturnTo string) FrontendApiApiCreateBrowserRegistrationFlowRequest {
+ r.afterVerificationReturnTo = &afterVerificationReturnTo
+ return r
+}
+func (r FrontendApiApiCreateBrowserRegistrationFlowRequest) Organization(organization string) FrontendApiApiCreateBrowserRegistrationFlowRequest {
+ r.organization = &organization
+ return r
+}
+
+func (r FrontendApiApiCreateBrowserRegistrationFlowRequest) Execute() (*RegistrationFlow, *http.Response, error) {
+ return r.ApiService.CreateBrowserRegistrationFlowExecute(r)
+}
+
+/*
+ - CreateBrowserRegistrationFlow Create Registration Flow for Browsers
+ - This endpoint initializes a browser-based user registration flow. This endpoint will set the appropriate
+
+cookies and anti-CSRF measures required for browser-based flows.
+
+If this endpoint is opened as a link in the browser, it will be redirected to
+`selfservice.flows.registration.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session
+exists already, the browser will be redirected to `urls.default_redirect_url`.
+
+If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the
+case of an error, the `error.id` of the JSON response body can be one of:
+
+`session_already_available`: The user is already signed in.
+`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
+`security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!
+
+If this endpoint is called via an AJAX request, the response contains the registration flow without a redirect.
+
+This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed.
+
+More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiCreateBrowserRegistrationFlowRequest
+*/
+func (a *FrontendApiService) CreateBrowserRegistrationFlow(ctx context.Context) FrontendApiApiCreateBrowserRegistrationFlowRequest {
+ return FrontendApiApiCreateBrowserRegistrationFlowRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return RegistrationFlow
+ */
+func (a *FrontendApiService) CreateBrowserRegistrationFlowExecute(r FrontendApiApiCreateBrowserRegistrationFlowRequest) (*RegistrationFlow, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *RegistrationFlow
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.CreateBrowserRegistrationFlow")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/self-service/registration/browser"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.returnTo != nil {
+ localVarQueryParams.Add("return_to", parameterToString(*r.returnTo, ""))
+ }
+ if r.loginChallenge != nil {
+ localVarQueryParams.Add("login_challenge", parameterToString(*r.loginChallenge, ""))
+ }
+ if r.afterVerificationReturnTo != nil {
+ localVarQueryParams.Add("after_verification_return_to", parameterToString(*r.afterVerificationReturnTo, ""))
+ }
+ if r.organization != nil {
+ localVarQueryParams.Add("organization", parameterToString(*r.organization, ""))
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiCreateBrowserSettingsFlowRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ returnTo *string
+ cookie *string
+}
+
+func (r FrontendApiApiCreateBrowserSettingsFlowRequest) ReturnTo(returnTo string) FrontendApiApiCreateBrowserSettingsFlowRequest {
+ r.returnTo = &returnTo
+ return r
+}
+func (r FrontendApiApiCreateBrowserSettingsFlowRequest) Cookie(cookie string) FrontendApiApiCreateBrowserSettingsFlowRequest {
+ r.cookie = &cookie
+ return r
+}
+
+func (r FrontendApiApiCreateBrowserSettingsFlowRequest) Execute() (*SettingsFlow, *http.Response, error) {
+ return r.ApiService.CreateBrowserSettingsFlowExecute(r)
+}
+
+/*
+ - CreateBrowserSettingsFlow Create Settings Flow for Browsers
+ - This endpoint initializes a browser-based user settings flow. Once initialized, the browser will be redirected to
+
+`selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid
+Ory Kratos Session Cookie is included in the request, a login flow will be initialized.
+
+If this endpoint is opened as a link in the browser, it will be redirected to
+`selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid user session
+was set, the browser will be redirected to the login endpoint.
+
+If this endpoint is called via an AJAX request, the response contains the settings flow without any redirects
+or a 401 forbidden error if no valid session was set.
+
+Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator
+Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn
+credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user
+to sign in with the second factor (happens automatically for server-side browser flows) or change the configuration.
+
+If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the
+case of an error, the `error.id` of the JSON response body can be one of:
+
+`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
+`session_inactive`: No Ory Session was found - sign in a user first.
+`security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!
+
+This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed.
+
+More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiCreateBrowserSettingsFlowRequest
+*/
+func (a *FrontendApiService) CreateBrowserSettingsFlow(ctx context.Context) FrontendApiApiCreateBrowserSettingsFlowRequest {
+ return FrontendApiApiCreateBrowserSettingsFlowRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return SettingsFlow
+ */
+func (a *FrontendApiService) CreateBrowserSettingsFlowExecute(r FrontendApiApiCreateBrowserSettingsFlowRequest) (*SettingsFlow, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *SettingsFlow
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.CreateBrowserSettingsFlow")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/self-service/settings/browser"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.returnTo != nil {
+ localVarQueryParams.Add("return_to", parameterToString(*r.returnTo, ""))
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.cookie != nil {
+ localVarHeaderParams["Cookie"] = parameterToString(*r.cookie, "")
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiCreateBrowserVerificationFlowRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ returnTo *string
+}
+
+func (r FrontendApiApiCreateBrowserVerificationFlowRequest) ReturnTo(returnTo string) FrontendApiApiCreateBrowserVerificationFlowRequest {
+ r.returnTo = &returnTo
+ return r
+}
+
+func (r FrontendApiApiCreateBrowserVerificationFlowRequest) Execute() (*VerificationFlow, *http.Response, error) {
+ return r.ApiService.CreateBrowserVerificationFlowExecute(r)
+}
+
+/*
+ - CreateBrowserVerificationFlow Create Verification Flow for Browser Clients
+ - This endpoint initializes a browser-based account verification flow. Once initialized, the browser will be redirected to
+
+`selfservice.flows.verification.ui_url` with the flow ID set as the query parameter `?flow=`.
+
+If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects.
+
+This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...).
+
+More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation).
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiCreateBrowserVerificationFlowRequest
+*/
+func (a *FrontendApiService) CreateBrowserVerificationFlow(ctx context.Context) FrontendApiApiCreateBrowserVerificationFlowRequest {
+ return FrontendApiApiCreateBrowserVerificationFlowRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return VerificationFlow
+ */
+func (a *FrontendApiService) CreateBrowserVerificationFlowExecute(r FrontendApiApiCreateBrowserVerificationFlowRequest) (*VerificationFlow, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *VerificationFlow
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.CreateBrowserVerificationFlow")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/self-service/verification/browser"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.returnTo != nil {
+ localVarQueryParams.Add("return_to", parameterToString(*r.returnTo, ""))
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiCreateNativeLoginFlowRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ refresh *bool
+ aal *string
+ xSessionToken *string
+ returnSessionTokenExchangeCode *bool
+ returnTo *string
+ via *string
+}
+
+func (r FrontendApiApiCreateNativeLoginFlowRequest) Refresh(refresh bool) FrontendApiApiCreateNativeLoginFlowRequest {
+ r.refresh = &refresh
+ return r
+}
+func (r FrontendApiApiCreateNativeLoginFlowRequest) Aal(aal string) FrontendApiApiCreateNativeLoginFlowRequest {
+ r.aal = &aal
+ return r
+}
+func (r FrontendApiApiCreateNativeLoginFlowRequest) XSessionToken(xSessionToken string) FrontendApiApiCreateNativeLoginFlowRequest {
+ r.xSessionToken = &xSessionToken
+ return r
+}
+func (r FrontendApiApiCreateNativeLoginFlowRequest) ReturnSessionTokenExchangeCode(returnSessionTokenExchangeCode bool) FrontendApiApiCreateNativeLoginFlowRequest {
+ r.returnSessionTokenExchangeCode = &returnSessionTokenExchangeCode
+ return r
+}
+func (r FrontendApiApiCreateNativeLoginFlowRequest) ReturnTo(returnTo string) FrontendApiApiCreateNativeLoginFlowRequest {
+ r.returnTo = &returnTo
+ return r
+}
+func (r FrontendApiApiCreateNativeLoginFlowRequest) Via(via string) FrontendApiApiCreateNativeLoginFlowRequest {
+ r.via = &via
+ return r
+}
+
+func (r FrontendApiApiCreateNativeLoginFlowRequest) Execute() (*LoginFlow, *http.Response, error) {
+ return r.ApiService.CreateNativeLoginFlowExecute(r)
+}
+
+/*
+ - CreateNativeLoginFlow Create Login Flow for Native Apps
+ - This endpoint initiates a login flow for native apps that do not use a browser, such as mobile devices, smart TVs, and so on.
+
+If a valid provided session cookie or session token is provided, a 400 Bad Request error
+will be returned unless the URL query parameter `?refresh=true` is set.
+
+To fetch an existing login flow call `/self-service/login/flows?flow=`.
+
+You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server
+Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make
+you vulnerable to a variety of CSRF attacks, including CSRF login attacks.
+
+In the case of an error, the `error.id` of the JSON response body can be one of:
+
+`session_already_available`: The user is already signed in.
+`session_aal1_required`: Multi-factor auth (e.g. 2fa) was requested but the user has no session yet.
+`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
+
+This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...).
+
+More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiCreateNativeLoginFlowRequest
+*/
+func (a *FrontendApiService) CreateNativeLoginFlow(ctx context.Context) FrontendApiApiCreateNativeLoginFlowRequest {
+ return FrontendApiApiCreateNativeLoginFlowRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return LoginFlow
+ */
+func (a *FrontendApiService) CreateNativeLoginFlowExecute(r FrontendApiApiCreateNativeLoginFlowRequest) (*LoginFlow, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *LoginFlow
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.CreateNativeLoginFlow")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/self-service/login/api"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.refresh != nil {
+ localVarQueryParams.Add("refresh", parameterToString(*r.refresh, ""))
+ }
+ if r.aal != nil {
+ localVarQueryParams.Add("aal", parameterToString(*r.aal, ""))
+ }
+ if r.returnSessionTokenExchangeCode != nil {
+ localVarQueryParams.Add("return_session_token_exchange_code", parameterToString(*r.returnSessionTokenExchangeCode, ""))
+ }
+ if r.returnTo != nil {
+ localVarQueryParams.Add("return_to", parameterToString(*r.returnTo, ""))
+ }
+ if r.via != nil {
+ localVarQueryParams.Add("via", parameterToString(*r.via, ""))
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.xSessionToken != nil {
+ localVarHeaderParams["X-Session-Token"] = parameterToString(*r.xSessionToken, "")
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiCreateNativeRecoveryFlowRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+}
+
+func (r FrontendApiApiCreateNativeRecoveryFlowRequest) Execute() (*RecoveryFlow, *http.Response, error) {
+ return r.ApiService.CreateNativeRecoveryFlowExecute(r)
+}
+
+/*
+ - CreateNativeRecoveryFlow Create Recovery Flow for Native Apps
+ - This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on.
+
+If a valid provided session cookie or session token is provided, a 400 Bad Request error.
+
+On an existing recovery flow, use the `getRecoveryFlow` API endpoint.
+
+You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server
+Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make
+you vulnerable to a variety of CSRF attacks.
+
+This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...).
+
+More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiCreateNativeRecoveryFlowRequest
+*/
+func (a *FrontendApiService) CreateNativeRecoveryFlow(ctx context.Context) FrontendApiApiCreateNativeRecoveryFlowRequest {
+ return FrontendApiApiCreateNativeRecoveryFlowRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return RecoveryFlow
+ */
+func (a *FrontendApiService) CreateNativeRecoveryFlowExecute(r FrontendApiApiCreateNativeRecoveryFlowRequest) (*RecoveryFlow, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *RecoveryFlow
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.CreateNativeRecoveryFlow")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/self-service/recovery/api"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiCreateNativeRegistrationFlowRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ returnSessionTokenExchangeCode *bool
+ returnTo *string
+}
+
+func (r FrontendApiApiCreateNativeRegistrationFlowRequest) ReturnSessionTokenExchangeCode(returnSessionTokenExchangeCode bool) FrontendApiApiCreateNativeRegistrationFlowRequest {
+ r.returnSessionTokenExchangeCode = &returnSessionTokenExchangeCode
+ return r
+}
+func (r FrontendApiApiCreateNativeRegistrationFlowRequest) ReturnTo(returnTo string) FrontendApiApiCreateNativeRegistrationFlowRequest {
+ r.returnTo = &returnTo
+ return r
+}
+
+func (r FrontendApiApiCreateNativeRegistrationFlowRequest) Execute() (*RegistrationFlow, *http.Response, error) {
+ return r.ApiService.CreateNativeRegistrationFlowExecute(r)
+}
+
+/*
+ - CreateNativeRegistrationFlow Create Registration Flow for Native Apps
+ - This endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on.
+
+If a valid provided session cookie or session token is provided, a 400 Bad Request error
+will be returned unless the URL query parameter `?refresh=true` is set.
+
+To fetch an existing registration flow call `/self-service/registration/flows?flow=`.
+
+You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server
+Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make
+you vulnerable to a variety of CSRF attacks.
+
+In the case of an error, the `error.id` of the JSON response body can be one of:
+
+`session_already_available`: The user is already signed in.
+`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
+
+This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...).
+
+More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiCreateNativeRegistrationFlowRequest
+*/
+func (a *FrontendApiService) CreateNativeRegistrationFlow(ctx context.Context) FrontendApiApiCreateNativeRegistrationFlowRequest {
+ return FrontendApiApiCreateNativeRegistrationFlowRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return RegistrationFlow
+ */
+func (a *FrontendApiService) CreateNativeRegistrationFlowExecute(r FrontendApiApiCreateNativeRegistrationFlowRequest) (*RegistrationFlow, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *RegistrationFlow
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.CreateNativeRegistrationFlow")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/self-service/registration/api"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.returnSessionTokenExchangeCode != nil {
+ localVarQueryParams.Add("return_session_token_exchange_code", parameterToString(*r.returnSessionTokenExchangeCode, ""))
+ }
+ if r.returnTo != nil {
+ localVarQueryParams.Add("return_to", parameterToString(*r.returnTo, ""))
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiCreateNativeSettingsFlowRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ xSessionToken *string
+}
+
+func (r FrontendApiApiCreateNativeSettingsFlowRequest) XSessionToken(xSessionToken string) FrontendApiApiCreateNativeSettingsFlowRequest {
+ r.xSessionToken = &xSessionToken
+ return r
+}
+
+func (r FrontendApiApiCreateNativeSettingsFlowRequest) Execute() (*SettingsFlow, *http.Response, error) {
+ return r.ApiService.CreateNativeSettingsFlowExecute(r)
+}
+
+/*
+ - CreateNativeSettingsFlow Create Settings Flow for Native Apps
+ - This endpoint initiates a settings flow for API clients such as mobile devices, smart TVs, and so on.
+
+You must provide a valid Ory Kratos Session Token for this endpoint to respond with HTTP 200 OK.
+
+To fetch an existing settings flow call `/self-service/settings/flows?flow=`.
+
+You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server
+Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make
+you vulnerable to a variety of CSRF attacks.
+
+Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator
+Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn
+credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user
+to sign in with the second factor or change the configuration.
+
+In the case of an error, the `error.id` of the JSON response body can be one of:
+
+`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
+`session_inactive`: No Ory Session was found - sign in a user first.
+
+This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...).
+
+More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiCreateNativeSettingsFlowRequest
+*/
+func (a *FrontendApiService) CreateNativeSettingsFlow(ctx context.Context) FrontendApiApiCreateNativeSettingsFlowRequest {
+ return FrontendApiApiCreateNativeSettingsFlowRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return SettingsFlow
+ */
+func (a *FrontendApiService) CreateNativeSettingsFlowExecute(r FrontendApiApiCreateNativeSettingsFlowRequest) (*SettingsFlow, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *SettingsFlow
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.CreateNativeSettingsFlow")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/self-service/settings/api"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.xSessionToken != nil {
+ localVarHeaderParams["X-Session-Token"] = parameterToString(*r.xSessionToken, "")
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiCreateNativeVerificationFlowRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+}
+
+func (r FrontendApiApiCreateNativeVerificationFlowRequest) Execute() (*VerificationFlow, *http.Response, error) {
+ return r.ApiService.CreateNativeVerificationFlowExecute(r)
+}
+
+/*
+ - CreateNativeVerificationFlow Create Verification Flow for Native Apps
+ - This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on.
+
+To fetch an existing verification flow call `/self-service/verification/flows?flow=`.
+
+You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server
+Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make
+you vulnerable to a variety of CSRF attacks.
+
+This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...).
+
+More information can be found at [Ory Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation).
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiCreateNativeVerificationFlowRequest
+*/
+func (a *FrontendApiService) CreateNativeVerificationFlow(ctx context.Context) FrontendApiApiCreateNativeVerificationFlowRequest {
+ return FrontendApiApiCreateNativeVerificationFlowRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return VerificationFlow
+ */
+func (a *FrontendApiService) CreateNativeVerificationFlowExecute(r FrontendApiApiCreateNativeVerificationFlowRequest) (*VerificationFlow, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *VerificationFlow
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.CreateNativeVerificationFlow")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/self-service/verification/api"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiDisableMyOtherSessionsRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ xSessionToken *string
+ cookie *string
+}
+
+func (r FrontendApiApiDisableMyOtherSessionsRequest) XSessionToken(xSessionToken string) FrontendApiApiDisableMyOtherSessionsRequest {
+ r.xSessionToken = &xSessionToken
+ return r
+}
+func (r FrontendApiApiDisableMyOtherSessionsRequest) Cookie(cookie string) FrontendApiApiDisableMyOtherSessionsRequest {
+ r.cookie = &cookie
+ return r
+}
+
+func (r FrontendApiApiDisableMyOtherSessionsRequest) Execute() (*DeleteMySessionsCount, *http.Response, error) {
+ return r.ApiService.DisableMyOtherSessionsExecute(r)
+}
+
+/*
+ - DisableMyOtherSessions Disable my other sessions
+ - Calling this endpoint invalidates all except the current session that belong to the logged-in user.
+
+Session data are not deleted.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiDisableMyOtherSessionsRequest
+*/
+func (a *FrontendApiService) DisableMyOtherSessions(ctx context.Context) FrontendApiApiDisableMyOtherSessionsRequest {
+ return FrontendApiApiDisableMyOtherSessionsRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return DeleteMySessionsCount
+ */
+func (a *FrontendApiService) DisableMyOtherSessionsExecute(r FrontendApiApiDisableMyOtherSessionsRequest) (*DeleteMySessionsCount, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodDelete
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *DeleteMySessionsCount
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.DisableMyOtherSessions")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/sessions"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.xSessionToken != nil {
+ localVarHeaderParams["X-Session-Token"] = parameterToString(*r.xSessionToken, "")
+ }
+ if r.cookie != nil {
+ localVarHeaderParams["Cookie"] = parameterToString(*r.cookie, "")
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiDisableMySessionRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ id string
+ xSessionToken *string
+ cookie *string
+}
+
+func (r FrontendApiApiDisableMySessionRequest) XSessionToken(xSessionToken string) FrontendApiApiDisableMySessionRequest {
+ r.xSessionToken = &xSessionToken
+ return r
+}
+func (r FrontendApiApiDisableMySessionRequest) Cookie(cookie string) FrontendApiApiDisableMySessionRequest {
+ r.cookie = &cookie
+ return r
+}
+
+func (r FrontendApiApiDisableMySessionRequest) Execute() (*http.Response, error) {
+ return r.ApiService.DisableMySessionExecute(r)
+}
+
+/*
+ - DisableMySession Disable one of my sessions
+ - Calling this endpoint invalidates the specified session. The current session cannot be revoked.
+
+Session data are not deleted.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @param id ID is the session's ID.
+ - @return FrontendApiApiDisableMySessionRequest
+*/
+func (a *FrontendApiService) DisableMySession(ctx context.Context, id string) FrontendApiApiDisableMySessionRequest {
+ return FrontendApiApiDisableMySessionRequest{
+ ApiService: a,
+ ctx: ctx,
+ id: id,
+ }
+}
+
+/*
+ * Execute executes the request
+ */
+func (a *FrontendApiService) DisableMySessionExecute(r FrontendApiApiDisableMySessionRequest) (*http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodDelete
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.DisableMySession")
+ if err != nil {
+ return nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/sessions/{id}"
+ localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.xSessionToken != nil {
+ localVarHeaderParams["X-Session-Token"] = parameterToString(*r.xSessionToken, "")
+ }
+ if r.cookie != nil {
+ localVarHeaderParams["Cookie"] = parameterToString(*r.cookie, "")
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarHTTPResponse, newErr
+ }
+
+ return localVarHTTPResponse, nil
+}
+
+type FrontendApiApiExchangeSessionTokenRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ initCode *string
+ returnToCode *string
+}
+
+func (r FrontendApiApiExchangeSessionTokenRequest) InitCode(initCode string) FrontendApiApiExchangeSessionTokenRequest {
+ r.initCode = &initCode
+ return r
+}
+func (r FrontendApiApiExchangeSessionTokenRequest) ReturnToCode(returnToCode string) FrontendApiApiExchangeSessionTokenRequest {
+ r.returnToCode = &returnToCode
+ return r
+}
+
+func (r FrontendApiApiExchangeSessionTokenRequest) Execute() (*SuccessfulNativeLogin, *http.Response, error) {
+ return r.ApiService.ExchangeSessionTokenExecute(r)
+}
+
+/*
+ * ExchangeSessionToken Exchange Session Token
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return FrontendApiApiExchangeSessionTokenRequest
+ */
+func (a *FrontendApiService) ExchangeSessionToken(ctx context.Context) FrontendApiApiExchangeSessionTokenRequest {
+ return FrontendApiApiExchangeSessionTokenRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return SuccessfulNativeLogin
+ */
+func (a *FrontendApiService) ExchangeSessionTokenExecute(r FrontendApiApiExchangeSessionTokenRequest) (*SuccessfulNativeLogin, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *SuccessfulNativeLogin
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.ExchangeSessionToken")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/sessions/token-exchange"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.initCode == nil {
+ return localVarReturnValue, nil, reportError("initCode is required and must be specified")
+ }
+ if r.returnToCode == nil {
+ return localVarReturnValue, nil, reportError("returnToCode is required and must be specified")
+ }
+
+ localVarQueryParams.Add("init_code", parameterToString(*r.initCode, ""))
+ localVarQueryParams.Add("return_to_code", parameterToString(*r.returnToCode, ""))
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 410 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiGetFlowErrorRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ id *string
+}
+
+func (r FrontendApiApiGetFlowErrorRequest) Id(id string) FrontendApiApiGetFlowErrorRequest {
+ r.id = &id
+ return r
+}
+
+func (r FrontendApiApiGetFlowErrorRequest) Execute() (*FlowError, *http.Response, error) {
+ return r.ApiService.GetFlowErrorExecute(r)
+}
+
+/*
+ - GetFlowError Get User-Flow Errors
+ - This endpoint returns the error associated with a user-facing self service errors.
+
+This endpoint supports stub values to help you implement the error UI:
+
+`?id=stub:500` - returns a stub 500 (Internal Server Error) error.
+
+More information can be found at [Ory Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiGetFlowErrorRequest
+*/
+func (a *FrontendApiService) GetFlowError(ctx context.Context) FrontendApiApiGetFlowErrorRequest {
+ return FrontendApiApiGetFlowErrorRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return FlowError
+ */
+func (a *FrontendApiService) GetFlowErrorExecute(r FrontendApiApiGetFlowErrorRequest) (*FlowError, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *FlowError
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.GetFlowError")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/self-service/errors"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.id == nil {
+ return localVarReturnValue, nil, reportError("id is required and must be specified")
+ }
+
+ localVarQueryParams.Add("id", parameterToString(*r.id, ""))
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 500 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiGetLoginFlowRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ id *string
+ cookie *string
+}
+
+func (r FrontendApiApiGetLoginFlowRequest) Id(id string) FrontendApiApiGetLoginFlowRequest {
+ r.id = &id
+ return r
+}
+func (r FrontendApiApiGetLoginFlowRequest) Cookie(cookie string) FrontendApiApiGetLoginFlowRequest {
+ r.cookie = &cookie
+ return r
+}
+
+func (r FrontendApiApiGetLoginFlowRequest) Execute() (*LoginFlow, *http.Response, error) {
+ return r.ApiService.GetLoginFlowExecute(r)
+}
+
+/*
+ - GetLoginFlow Get Login Flow
+ - This endpoint returns a login flow's context with, for example, error details and other information.
+
+Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header.
+For AJAX requests you must ensure that cookies are included in the request or requests will fail.
+
+If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain
+and you need to forward the incoming HTTP Cookie header to this endpoint:
+
+```js
+pseudo-code example
+router.get('/login', async function (req, res) {
+const flow = await client.getLoginFlow(req.header('cookie'), req.query['flow'])
+
+res.render('login', flow)
+})
+```
+
+This request may fail due to several reasons. The `error.id` can be one of:
+
+`session_already_available`: The user is already signed in.
+`self_service_flow_expired`: The flow is expired and you should request a new one.
+
+More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiGetLoginFlowRequest
+*/
+func (a *FrontendApiService) GetLoginFlow(ctx context.Context) FrontendApiApiGetLoginFlowRequest {
+ return FrontendApiApiGetLoginFlowRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return LoginFlow
+ */
+func (a *FrontendApiService) GetLoginFlowExecute(r FrontendApiApiGetLoginFlowRequest) (*LoginFlow, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *LoginFlow
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.GetLoginFlow")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/self-service/login/flows"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.id == nil {
+ return localVarReturnValue, nil, reportError("id is required and must be specified")
+ }
+
+ localVarQueryParams.Add("id", parameterToString(*r.id, ""))
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.cookie != nil {
+ localVarHeaderParams["Cookie"] = parameterToString(*r.cookie, "")
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 410 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiGetRecoveryFlowRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ id *string
+ cookie *string
+}
+
+func (r FrontendApiApiGetRecoveryFlowRequest) Id(id string) FrontendApiApiGetRecoveryFlowRequest {
+ r.id = &id
+ return r
+}
+func (r FrontendApiApiGetRecoveryFlowRequest) Cookie(cookie string) FrontendApiApiGetRecoveryFlowRequest {
+ r.cookie = &cookie
+ return r
+}
+
+func (r FrontendApiApiGetRecoveryFlowRequest) Execute() (*RecoveryFlow, *http.Response, error) {
+ return r.ApiService.GetRecoveryFlowExecute(r)
+}
+
+/*
+ - GetRecoveryFlow Get Recovery Flow
+ - This endpoint returns a recovery flow's context with, for example, error details and other information.
+
+Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header.
+For AJAX requests you must ensure that cookies are included in the request or requests will fail.
+
+If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain
+and you need to forward the incoming HTTP Cookie header to this endpoint:
+
+```js
+pseudo-code example
+router.get('/recovery', async function (req, res) {
+const flow = await client.getRecoveryFlow(req.header('Cookie'), req.query['flow'])
+
+res.render('recovery', flow)
+})
+```
+
+More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiGetRecoveryFlowRequest
+*/
+func (a *FrontendApiService) GetRecoveryFlow(ctx context.Context) FrontendApiApiGetRecoveryFlowRequest {
+ return FrontendApiApiGetRecoveryFlowRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return RecoveryFlow
+ */
+func (a *FrontendApiService) GetRecoveryFlowExecute(r FrontendApiApiGetRecoveryFlowRequest) (*RecoveryFlow, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *RecoveryFlow
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.GetRecoveryFlow")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/self-service/recovery/flows"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.id == nil {
+ return localVarReturnValue, nil, reportError("id is required and must be specified")
+ }
+
+ localVarQueryParams.Add("id", parameterToString(*r.id, ""))
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.cookie != nil {
+ localVarHeaderParams["Cookie"] = parameterToString(*r.cookie, "")
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 410 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiGetRegistrationFlowRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ id *string
+ cookie *string
+}
+
+func (r FrontendApiApiGetRegistrationFlowRequest) Id(id string) FrontendApiApiGetRegistrationFlowRequest {
+ r.id = &id
+ return r
+}
+func (r FrontendApiApiGetRegistrationFlowRequest) Cookie(cookie string) FrontendApiApiGetRegistrationFlowRequest {
+ r.cookie = &cookie
+ return r
+}
+
+func (r FrontendApiApiGetRegistrationFlowRequest) Execute() (*RegistrationFlow, *http.Response, error) {
+ return r.ApiService.GetRegistrationFlowExecute(r)
+}
+
+/*
+ - GetRegistrationFlow Get Registration Flow
+ - This endpoint returns a registration flow's context with, for example, error details and other information.
+
+Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header.
+For AJAX requests you must ensure that cookies are included in the request or requests will fail.
+
+If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain
+and you need to forward the incoming HTTP Cookie header to this endpoint:
+
+```js
+pseudo-code example
+router.get('/registration', async function (req, res) {
+const flow = await client.getRegistrationFlow(req.header('cookie'), req.query['flow'])
+
+res.render('registration', flow)
+})
+```
+
+This request may fail due to several reasons. The `error.id` can be one of:
+
+`session_already_available`: The user is already signed in.
+`self_service_flow_expired`: The flow is expired and you should request a new one.
+
+More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiGetRegistrationFlowRequest
+*/
+func (a *FrontendApiService) GetRegistrationFlow(ctx context.Context) FrontendApiApiGetRegistrationFlowRequest {
+ return FrontendApiApiGetRegistrationFlowRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return RegistrationFlow
+ */
+func (a *FrontendApiService) GetRegistrationFlowExecute(r FrontendApiApiGetRegistrationFlowRequest) (*RegistrationFlow, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *RegistrationFlow
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.GetRegistrationFlow")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/self-service/registration/flows"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.id == nil {
+ return localVarReturnValue, nil, reportError("id is required and must be specified")
+ }
+
+ localVarQueryParams.Add("id", parameterToString(*r.id, ""))
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.cookie != nil {
+ localVarHeaderParams["Cookie"] = parameterToString(*r.cookie, "")
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 410 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiGetSettingsFlowRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ id *string
+ xSessionToken *string
+ cookie *string
+}
+
+func (r FrontendApiApiGetSettingsFlowRequest) Id(id string) FrontendApiApiGetSettingsFlowRequest {
+ r.id = &id
+ return r
+}
+func (r FrontendApiApiGetSettingsFlowRequest) XSessionToken(xSessionToken string) FrontendApiApiGetSettingsFlowRequest {
+ r.xSessionToken = &xSessionToken
+ return r
+}
+func (r FrontendApiApiGetSettingsFlowRequest) Cookie(cookie string) FrontendApiApiGetSettingsFlowRequest {
+ r.cookie = &cookie
+ return r
+}
+
+func (r FrontendApiApiGetSettingsFlowRequest) Execute() (*SettingsFlow, *http.Response, error) {
+ return r.ApiService.GetSettingsFlowExecute(r)
+}
+
+/*
+ - GetSettingsFlow Get Settings Flow
+ - When accessing this endpoint through Ory Kratos' Public API you must ensure that either the Ory Kratos Session Cookie
+
+or the Ory Kratos Session Token are set.
+
+Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator
+Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn
+credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user
+to sign in with the second factor or change the configuration.
+
+You can access this endpoint without credentials when using Ory Kratos' Admin API.
+
+If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the
+case of an error, the `error.id` of the JSON response body can be one of:
+
+`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
+`session_inactive`: No Ory Session was found - sign in a user first.
+`security_identity_mismatch`: The flow was interrupted with `session_refresh_required` but apparently some other
+identity logged in instead.
+
+More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiGetSettingsFlowRequest
+*/
+func (a *FrontendApiService) GetSettingsFlow(ctx context.Context) FrontendApiApiGetSettingsFlowRequest {
+ return FrontendApiApiGetSettingsFlowRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return SettingsFlow
+ */
+func (a *FrontendApiService) GetSettingsFlowExecute(r FrontendApiApiGetSettingsFlowRequest) (*SettingsFlow, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *SettingsFlow
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.GetSettingsFlow")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/self-service/settings/flows"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.id == nil {
+ return localVarReturnValue, nil, reportError("id is required and must be specified")
+ }
+
+ localVarQueryParams.Add("id", parameterToString(*r.id, ""))
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.xSessionToken != nil {
+ localVarHeaderParams["X-Session-Token"] = parameterToString(*r.xSessionToken, "")
+ }
+ if r.cookie != nil {
+ localVarHeaderParams["Cookie"] = parameterToString(*r.cookie, "")
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 410 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiGetVerificationFlowRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ id *string
+ cookie *string
+}
+
+func (r FrontendApiApiGetVerificationFlowRequest) Id(id string) FrontendApiApiGetVerificationFlowRequest {
+ r.id = &id
+ return r
+}
+func (r FrontendApiApiGetVerificationFlowRequest) Cookie(cookie string) FrontendApiApiGetVerificationFlowRequest {
+ r.cookie = &cookie
+ return r
+}
+
+func (r FrontendApiApiGetVerificationFlowRequest) Execute() (*VerificationFlow, *http.Response, error) {
+ return r.ApiService.GetVerificationFlowExecute(r)
+}
+
+/*
+ - GetVerificationFlow Get Verification Flow
+ - This endpoint returns a verification flow's context with, for example, error details and other information.
+
+Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header.
+For AJAX requests you must ensure that cookies are included in the request or requests will fail.
+
+If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain
+and you need to forward the incoming HTTP Cookie header to this endpoint:
+
+```js
+pseudo-code example
+router.get('/recovery', async function (req, res) {
+const flow = await client.getVerificationFlow(req.header('cookie'), req.query['flow'])
+
+res.render('verification', flow)
+})
+```
+
+More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation).
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiGetVerificationFlowRequest
+*/
+func (a *FrontendApiService) GetVerificationFlow(ctx context.Context) FrontendApiApiGetVerificationFlowRequest {
+ return FrontendApiApiGetVerificationFlowRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return VerificationFlow
+ */
+func (a *FrontendApiService) GetVerificationFlowExecute(r FrontendApiApiGetVerificationFlowRequest) (*VerificationFlow, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *VerificationFlow
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.GetVerificationFlow")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/self-service/verification/flows"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.id == nil {
+ return localVarReturnValue, nil, reportError("id is required and must be specified")
+ }
+
+ localVarQueryParams.Add("id", parameterToString(*r.id, ""))
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.cookie != nil {
+ localVarHeaderParams["cookie"] = parameterToString(*r.cookie, "")
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiGetWebAuthnJavaScriptRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+}
+
+func (r FrontendApiApiGetWebAuthnJavaScriptRequest) Execute() (string, *http.Response, error) {
+ return r.ApiService.GetWebAuthnJavaScriptExecute(r)
+}
+
+/*
+ - GetWebAuthnJavaScript Get WebAuthn JavaScript
+ - This endpoint provides JavaScript which is needed in order to perform WebAuthn login and registration.
+
+If you are building a JavaScript Browser App (e.g. in ReactJS or AngularJS) you will need to load this file:
+
+```html
+
+```
+
+More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiGetWebAuthnJavaScriptRequest
+*/
+func (a *FrontendApiService) GetWebAuthnJavaScript(ctx context.Context) FrontendApiApiGetWebAuthnJavaScriptRequest {
+ return FrontendApiApiGetWebAuthnJavaScriptRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return string
+ */
+func (a *FrontendApiService) GetWebAuthnJavaScriptExecute(r FrontendApiApiGetWebAuthnJavaScriptRequest) (string, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue string
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.GetWebAuthnJavaScript")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/.well-known/ory/webauthn.js"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiListMySessionsRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ perPage *int64
+ page *int64
+ pageSize *int64
+ pageToken *string
+ xSessionToken *string
+ cookie *string
+}
+
+func (r FrontendApiApiListMySessionsRequest) PerPage(perPage int64) FrontendApiApiListMySessionsRequest {
+ r.perPage = &perPage
+ return r
+}
+func (r FrontendApiApiListMySessionsRequest) Page(page int64) FrontendApiApiListMySessionsRequest {
+ r.page = &page
+ return r
+}
+func (r FrontendApiApiListMySessionsRequest) PageSize(pageSize int64) FrontendApiApiListMySessionsRequest {
+ r.pageSize = &pageSize
+ return r
+}
+func (r FrontendApiApiListMySessionsRequest) PageToken(pageToken string) FrontendApiApiListMySessionsRequest {
+ r.pageToken = &pageToken
+ return r
+}
+func (r FrontendApiApiListMySessionsRequest) XSessionToken(xSessionToken string) FrontendApiApiListMySessionsRequest {
+ r.xSessionToken = &xSessionToken
+ return r
+}
+func (r FrontendApiApiListMySessionsRequest) Cookie(cookie string) FrontendApiApiListMySessionsRequest {
+ r.cookie = &cookie
+ return r
+}
+
+func (r FrontendApiApiListMySessionsRequest) Execute() ([]Session, *http.Response, error) {
+ return r.ApiService.ListMySessionsExecute(r)
+}
+
+/*
+ - ListMySessions Get My Active Sessions
+ - This endpoints returns all other active sessions that belong to the logged-in user.
+
+The current session can be retrieved by calling the `/sessions/whoami` endpoint.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiListMySessionsRequest
+*/
+func (a *FrontendApiService) ListMySessions(ctx context.Context) FrontendApiApiListMySessionsRequest {
+ return FrontendApiApiListMySessionsRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return []Session
+ */
+func (a *FrontendApiService) ListMySessionsExecute(r FrontendApiApiListMySessionsRequest) ([]Session, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue []Session
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.ListMySessions")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/sessions"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.perPage != nil {
+ localVarQueryParams.Add("per_page", parameterToString(*r.perPage, ""))
+ }
+ if r.page != nil {
+ localVarQueryParams.Add("page", parameterToString(*r.page, ""))
+ }
+ if r.pageSize != nil {
+ localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, ""))
+ }
+ if r.pageToken != nil {
+ localVarQueryParams.Add("page_token", parameterToString(*r.pageToken, ""))
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.xSessionToken != nil {
+ localVarHeaderParams["X-Session-Token"] = parameterToString(*r.xSessionToken, "")
+ }
+ if r.cookie != nil {
+ localVarHeaderParams["Cookie"] = parameterToString(*r.cookie, "")
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiPerformNativeLogoutRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ performNativeLogoutBody *PerformNativeLogoutBody
+}
+
+func (r FrontendApiApiPerformNativeLogoutRequest) PerformNativeLogoutBody(performNativeLogoutBody PerformNativeLogoutBody) FrontendApiApiPerformNativeLogoutRequest {
+ r.performNativeLogoutBody = &performNativeLogoutBody
+ return r
+}
+
+func (r FrontendApiApiPerformNativeLogoutRequest) Execute() (*http.Response, error) {
+ return r.ApiService.PerformNativeLogoutExecute(r)
+}
+
+/*
+ - PerformNativeLogout Perform Logout for Native Apps
+ - Use this endpoint to log out an identity using an Ory Session Token. If the Ory Session Token was successfully
+
+revoked, the server returns a 204 No Content response. A 204 No Content response is also sent when
+the Ory Session Token has been revoked already before.
+
+If the Ory Session Token is malformed or does not exist a 403 Forbidden response will be returned.
+
+This endpoint does not remove any HTTP
+Cookies - use the Browser-Based Self-Service Logout Flow instead.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiPerformNativeLogoutRequest
+*/
+func (a *FrontendApiService) PerformNativeLogout(ctx context.Context) FrontendApiApiPerformNativeLogoutRequest {
+ return FrontendApiApiPerformNativeLogoutRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ */
+func (a *FrontendApiService) PerformNativeLogoutExecute(r FrontendApiApiPerformNativeLogoutRequest) (*http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodDelete
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.PerformNativeLogout")
+ if err != nil {
+ return nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/self-service/logout/api"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.performNativeLogoutBody == nil {
+ return nil, reportError("performNativeLogoutBody is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ // body params
+ localVarPostBody = r.performNativeLogoutBody
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarHTTPResponse, newErr
+ }
+
+ return localVarHTTPResponse, nil
+}
+
+type FrontendApiApiToSessionRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ xSessionToken *string
+ cookie *string
+ tokenizeAs *string
+}
+
+func (r FrontendApiApiToSessionRequest) XSessionToken(xSessionToken string) FrontendApiApiToSessionRequest {
+ r.xSessionToken = &xSessionToken
+ return r
+}
+func (r FrontendApiApiToSessionRequest) Cookie(cookie string) FrontendApiApiToSessionRequest {
+ r.cookie = &cookie
+ return r
+}
+func (r FrontendApiApiToSessionRequest) TokenizeAs(tokenizeAs string) FrontendApiApiToSessionRequest {
+ r.tokenizeAs = &tokenizeAs
+ return r
+}
+
+func (r FrontendApiApiToSessionRequest) Execute() (*Session, *http.Response, error) {
+ return r.ApiService.ToSessionExecute(r)
+}
+
+/*
+ - ToSession Check Who the Current HTTP Session Belongs To
+ - Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated.
+
+Returns a session object in the body or 401 if the credentials are invalid or no credentials were sent.
+When the request it successful it adds the user ID to the 'X-Kratos-Authenticated-Identity-Id' header
+in the response.
+
+If you call this endpoint from a server-side application, you must forward the HTTP Cookie Header to this endpoint:
+
+```js
+pseudo-code example
+router.get('/protected-endpoint', async function (req, res) {
+const session = await client.toSession(undefined, req.header('cookie'))
+
+console.log(session)
+})
+```
+
+When calling this endpoint from a non-browser application (e.g. mobile app) you must include the session token:
+
+```js
+pseudo-code example
+...
+const session = await client.toSession("the-session-token")
+
+console.log(session)
+```
+
+When using a token template, the token is included in the `tokenized` field of the session.
+
+```js
+pseudo-code example
+...
+const session = await client.toSession("the-session-token", { tokenize_as: "example-jwt-template" })
+
+console.log(session.tokenized) // The JWT
+```
+
+Depending on your configuration this endpoint might return a 403 status code if the session has a lower Authenticator
+Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn
+credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user
+to sign in with the second factor or change the configuration.
+
+This endpoint is useful for:
+
+AJAX calls. Remember to send credentials and set up CORS correctly!
+Reverse proxies and API Gateways
+Server-side calls - use the `X-Session-Token` header!
+
+This endpoint authenticates users by checking:
+
+if the `Cookie` HTTP header was set containing an Ory Kratos Session Cookie;
+if the `Authorization: bearer ` HTTP header was set with a valid Ory Kratos Session Token;
+if the `X-Session-Token` HTTP header was set with a valid Ory Kratos Session Token.
+
+If none of these headers are set or the cookie or token are invalid, the endpoint returns a HTTP 401 status code.
+
+As explained above, this request may fail due to several reasons. The `error.id` can be one of:
+
+`session_inactive`: No active session was found in the request (e.g. no Ory Session Cookie / Ory Session Token).
+`session_aal2_required`: An active session was found but it does not fulfil the Authenticator Assurance Level, implying that the session must (e.g.) authenticate the second factor.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiToSessionRequest
+*/
+func (a *FrontendApiService) ToSession(ctx context.Context) FrontendApiApiToSessionRequest {
+ return FrontendApiApiToSessionRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return Session
+ */
+func (a *FrontendApiService) ToSessionExecute(r FrontendApiApiToSessionRequest) (*Session, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *Session
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.ToSession")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/sessions/whoami"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.tokenizeAs != nil {
+ localVarQueryParams.Add("tokenize_as", parameterToString(*r.tokenizeAs, ""))
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.xSessionToken != nil {
+ localVarHeaderParams["X-Session-Token"] = parameterToString(*r.xSessionToken, "")
+ }
+ if r.cookie != nil {
+ localVarHeaderParams["Cookie"] = parameterToString(*r.cookie, "")
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiUpdateLoginFlowRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ flow *string
+ updateLoginFlowBody *UpdateLoginFlowBody
+ xSessionToken *string
+ cookie *string
+}
+
+func (r FrontendApiApiUpdateLoginFlowRequest) Flow(flow string) FrontendApiApiUpdateLoginFlowRequest {
+ r.flow = &flow
+ return r
+}
+func (r FrontendApiApiUpdateLoginFlowRequest) UpdateLoginFlowBody(updateLoginFlowBody UpdateLoginFlowBody) FrontendApiApiUpdateLoginFlowRequest {
+ r.updateLoginFlowBody = &updateLoginFlowBody
+ return r
+}
+func (r FrontendApiApiUpdateLoginFlowRequest) XSessionToken(xSessionToken string) FrontendApiApiUpdateLoginFlowRequest {
+ r.xSessionToken = &xSessionToken
+ return r
+}
+func (r FrontendApiApiUpdateLoginFlowRequest) Cookie(cookie string) FrontendApiApiUpdateLoginFlowRequest {
+ r.cookie = &cookie
+ return r
+}
+
+func (r FrontendApiApiUpdateLoginFlowRequest) Execute() (*SuccessfulNativeLogin, *http.Response, error) {
+ return r.ApiService.UpdateLoginFlowExecute(r)
+}
+
+/*
+ - UpdateLoginFlow Submit a Login Flow
+ - Use this endpoint to complete a login flow. This endpoint
+
+behaves differently for API and browser flows.
+
+API flows expect `application/json` to be sent in the body and responds with
+HTTP 200 and a application/json body with the session token on success;
+HTTP 410 if the original flow expired with the appropriate error messages set and optionally a `use_flow_id` parameter in the body;
+HTTP 400 on form validation errors.
+
+Browser flows expect a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond with
+a HTTP 303 redirect to the post/after login URL or the `return_to` value if it was set and if the login succeeded;
+a HTTP 303 redirect to the login UI URL with the flow ID containing the validation errors otherwise.
+
+Browser flows with an accept header of `application/json` will not redirect but instead respond with
+HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success;
+HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set;
+HTTP 400 on form validation errors.
+
+If this endpoint is called with `Accept: application/json` in the header, the response contains the flow without a redirect. In the
+case of an error, the `error.id` of the JSON response body can be one of:
+
+`session_already_available`: The user is already signed in.
+`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
+`security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!
+`browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL.
+Most likely used in Social Sign In flows.
+
+More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiUpdateLoginFlowRequest
+*/
+func (a *FrontendApiService) UpdateLoginFlow(ctx context.Context) FrontendApiApiUpdateLoginFlowRequest {
+ return FrontendApiApiUpdateLoginFlowRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return SuccessfulNativeLogin
+ */
+func (a *FrontendApiService) UpdateLoginFlowExecute(r FrontendApiApiUpdateLoginFlowRequest) (*SuccessfulNativeLogin, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPost
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *SuccessfulNativeLogin
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.UpdateLoginFlow")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/self-service/login"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.flow == nil {
+ return localVarReturnValue, nil, reportError("flow is required and must be specified")
+ }
+ if r.updateLoginFlowBody == nil {
+ return localVarReturnValue, nil, reportError("updateLoginFlowBody is required and must be specified")
+ }
+
+ localVarQueryParams.Add("flow", parameterToString(*r.flow, ""))
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.xSessionToken != nil {
+ localVarHeaderParams["X-Session-Token"] = parameterToString(*r.xSessionToken, "")
+ }
+ if r.cookie != nil {
+ localVarHeaderParams["Cookie"] = parameterToString(*r.cookie, "")
+ }
+ // body params
+ localVarPostBody = r.updateLoginFlowBody
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v LoginFlow
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 410 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 422 {
+ var v ErrorBrowserLocationChangeRequired
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiUpdateLogoutFlowRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ token *string
+ returnTo *string
+ cookie *string
+}
+
+func (r FrontendApiApiUpdateLogoutFlowRequest) Token(token string) FrontendApiApiUpdateLogoutFlowRequest {
+ r.token = &token
+ return r
+}
+func (r FrontendApiApiUpdateLogoutFlowRequest) ReturnTo(returnTo string) FrontendApiApiUpdateLogoutFlowRequest {
+ r.returnTo = &returnTo
+ return r
+}
+func (r FrontendApiApiUpdateLogoutFlowRequest) Cookie(cookie string) FrontendApiApiUpdateLogoutFlowRequest {
+ r.cookie = &cookie
+ return r
+}
+
+func (r FrontendApiApiUpdateLogoutFlowRequest) Execute() (*http.Response, error) {
+ return r.ApiService.UpdateLogoutFlowExecute(r)
+}
+
+/*
+ - UpdateLogoutFlow Update Logout Flow
+ - This endpoint logs out an identity in a self-service manner.
+
+If the `Accept` HTTP header is not set to `application/json`, the browser will be redirected (HTTP 303 See Other)
+to the `return_to` parameter of the initial request or fall back to `urls.default_return_to`.
+
+If the `Accept` HTTP header is set to `application/json`, a 204 No Content response
+will be sent on successful logout instead.
+
+This endpoint is NOT INTENDED for API clients and only works
+with browsers (Chrome, Firefox, ...). For API clients you can
+call the `/self-service/logout/api` URL directly with the Ory Session Token.
+
+More information can be found at [Ory Kratos User Logout Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-logout).
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiUpdateLogoutFlowRequest
+*/
+func (a *FrontendApiService) UpdateLogoutFlow(ctx context.Context) FrontendApiApiUpdateLogoutFlowRequest {
+ return FrontendApiApiUpdateLogoutFlowRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ */
+func (a *FrontendApiService) UpdateLogoutFlowExecute(r FrontendApiApiUpdateLogoutFlowRequest) (*http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.UpdateLogoutFlow")
+ if err != nil {
+ return nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/self-service/logout"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ if r.token != nil {
+ localVarQueryParams.Add("token", parameterToString(*r.token, ""))
+ }
+ if r.returnTo != nil {
+ localVarQueryParams.Add("return_to", parameterToString(*r.returnTo, ""))
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.cookie != nil {
+ localVarHeaderParams["Cookie"] = parameterToString(*r.cookie, "")
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarHTTPResponse, newErr
+ }
+
+ return localVarHTTPResponse, nil
+}
+
+type FrontendApiApiUpdateRecoveryFlowRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ flow *string
+ updateRecoveryFlowBody *UpdateRecoveryFlowBody
+ token *string
+ cookie *string
+}
+
+func (r FrontendApiApiUpdateRecoveryFlowRequest) Flow(flow string) FrontendApiApiUpdateRecoveryFlowRequest {
+ r.flow = &flow
+ return r
+}
+func (r FrontendApiApiUpdateRecoveryFlowRequest) UpdateRecoveryFlowBody(updateRecoveryFlowBody UpdateRecoveryFlowBody) FrontendApiApiUpdateRecoveryFlowRequest {
+ r.updateRecoveryFlowBody = &updateRecoveryFlowBody
+ return r
+}
+func (r FrontendApiApiUpdateRecoveryFlowRequest) Token(token string) FrontendApiApiUpdateRecoveryFlowRequest {
+ r.token = &token
+ return r
+}
+func (r FrontendApiApiUpdateRecoveryFlowRequest) Cookie(cookie string) FrontendApiApiUpdateRecoveryFlowRequest {
+ r.cookie = &cookie
+ return r
+}
+
+func (r FrontendApiApiUpdateRecoveryFlowRequest) Execute() (*RecoveryFlow, *http.Response, error) {
+ return r.ApiService.UpdateRecoveryFlowExecute(r)
+}
+
+/*
+ - UpdateRecoveryFlow Update Recovery Flow
+ - Use this endpoint to update a recovery flow. This endpoint
+
+behaves differently for API and browser flows and has several states:
+
+`choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent
+and works with API- and Browser-initiated flows.
+For API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid.
+and a HTTP 303 See Other redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired).
+For Browser clients without HTTP Header `Accept` or with `Accept: text/*` it returns a HTTP 303 See Other redirect to the Recovery UI URL with the Recovery Flow ID appended.
+`sent_email` is the success state after `choose_method` for the `link` method and allows the user to request another recovery email. It
+works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state.
+`passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow ("sending a recovery link")
+does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL
+(if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with
+a new Recovery Flow ID which contains an error message that the recovery link was invalid.
+
+More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiUpdateRecoveryFlowRequest
+*/
+func (a *FrontendApiService) UpdateRecoveryFlow(ctx context.Context) FrontendApiApiUpdateRecoveryFlowRequest {
+ return FrontendApiApiUpdateRecoveryFlowRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return RecoveryFlow
+ */
+func (a *FrontendApiService) UpdateRecoveryFlowExecute(r FrontendApiApiUpdateRecoveryFlowRequest) (*RecoveryFlow, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPost
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *RecoveryFlow
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.UpdateRecoveryFlow")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/self-service/recovery"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.flow == nil {
+ return localVarReturnValue, nil, reportError("flow is required and must be specified")
+ }
+ if r.updateRecoveryFlowBody == nil {
+ return localVarReturnValue, nil, reportError("updateRecoveryFlowBody is required and must be specified")
+ }
+
+ localVarQueryParams.Add("flow", parameterToString(*r.flow, ""))
+ if r.token != nil {
+ localVarQueryParams.Add("token", parameterToString(*r.token, ""))
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.cookie != nil {
+ localVarHeaderParams["Cookie"] = parameterToString(*r.cookie, "")
+ }
+ // body params
+ localVarPostBody = r.updateRecoveryFlowBody
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v RecoveryFlow
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 410 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 422 {
+ var v ErrorBrowserLocationChangeRequired
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiUpdateRegistrationFlowRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ flow *string
+ updateRegistrationFlowBody *UpdateRegistrationFlowBody
+ cookie *string
+}
+
+func (r FrontendApiApiUpdateRegistrationFlowRequest) Flow(flow string) FrontendApiApiUpdateRegistrationFlowRequest {
+ r.flow = &flow
+ return r
+}
+func (r FrontendApiApiUpdateRegistrationFlowRequest) UpdateRegistrationFlowBody(updateRegistrationFlowBody UpdateRegistrationFlowBody) FrontendApiApiUpdateRegistrationFlowRequest {
+ r.updateRegistrationFlowBody = &updateRegistrationFlowBody
+ return r
+}
+func (r FrontendApiApiUpdateRegistrationFlowRequest) Cookie(cookie string) FrontendApiApiUpdateRegistrationFlowRequest {
+ r.cookie = &cookie
+ return r
+}
+
+func (r FrontendApiApiUpdateRegistrationFlowRequest) Execute() (*SuccessfulNativeRegistration, *http.Response, error) {
+ return r.ApiService.UpdateRegistrationFlowExecute(r)
+}
+
+/*
+ - UpdateRegistrationFlow Update Registration Flow
+ - Use this endpoint to complete a registration flow by sending an identity's traits and password. This endpoint
+
+behaves differently for API and browser flows.
+
+API flows expect `application/json` to be sent in the body and respond with
+HTTP 200 and a application/json body with the created identity success - if the session hook is configured the
+`session` and `session_token` will also be included;
+HTTP 410 if the original flow expired with the appropriate error messages set and optionally a `use_flow_id` parameter in the body;
+HTTP 400 on form validation errors.
+
+Browser flows expect a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond with
+a HTTP 303 redirect to the post/after registration URL or the `return_to` value if it was set and if the registration succeeded;
+a HTTP 303 redirect to the registration UI URL with the flow ID containing the validation errors otherwise.
+
+Browser flows with an accept header of `application/json` will not redirect but instead respond with
+HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success;
+HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set;
+HTTP 400 on form validation errors.
+
+If this endpoint is called with `Accept: application/json` in the header, the response contains the flow without a redirect. In the
+case of an error, the `error.id` of the JSON response body can be one of:
+
+`session_already_available`: The user is already signed in.
+`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
+`security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!
+`browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL.
+Most likely used in Social Sign In flows.
+
+More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiUpdateRegistrationFlowRequest
+*/
+func (a *FrontendApiService) UpdateRegistrationFlow(ctx context.Context) FrontendApiApiUpdateRegistrationFlowRequest {
+ return FrontendApiApiUpdateRegistrationFlowRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return SuccessfulNativeRegistration
+ */
+func (a *FrontendApiService) UpdateRegistrationFlowExecute(r FrontendApiApiUpdateRegistrationFlowRequest) (*SuccessfulNativeRegistration, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPost
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *SuccessfulNativeRegistration
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.UpdateRegistrationFlow")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/self-service/registration"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.flow == nil {
+ return localVarReturnValue, nil, reportError("flow is required and must be specified")
+ }
+ if r.updateRegistrationFlowBody == nil {
+ return localVarReturnValue, nil, reportError("updateRegistrationFlowBody is required and must be specified")
+ }
+
+ localVarQueryParams.Add("flow", parameterToString(*r.flow, ""))
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.cookie != nil {
+ localVarHeaderParams["Cookie"] = parameterToString(*r.cookie, "")
+ }
+ // body params
+ localVarPostBody = r.updateRegistrationFlowBody
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v RegistrationFlow
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 410 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 422 {
+ var v ErrorBrowserLocationChangeRequired
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiUpdateSettingsFlowRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ flow *string
+ updateSettingsFlowBody *UpdateSettingsFlowBody
+ xSessionToken *string
+ cookie *string
+}
+
+func (r FrontendApiApiUpdateSettingsFlowRequest) Flow(flow string) FrontendApiApiUpdateSettingsFlowRequest {
+ r.flow = &flow
+ return r
+}
+func (r FrontendApiApiUpdateSettingsFlowRequest) UpdateSettingsFlowBody(updateSettingsFlowBody UpdateSettingsFlowBody) FrontendApiApiUpdateSettingsFlowRequest {
+ r.updateSettingsFlowBody = &updateSettingsFlowBody
+ return r
+}
+func (r FrontendApiApiUpdateSettingsFlowRequest) XSessionToken(xSessionToken string) FrontendApiApiUpdateSettingsFlowRequest {
+ r.xSessionToken = &xSessionToken
+ return r
+}
+func (r FrontendApiApiUpdateSettingsFlowRequest) Cookie(cookie string) FrontendApiApiUpdateSettingsFlowRequest {
+ r.cookie = &cookie
+ return r
+}
+
+func (r FrontendApiApiUpdateSettingsFlowRequest) Execute() (*SettingsFlow, *http.Response, error) {
+ return r.ApiService.UpdateSettingsFlowExecute(r)
+}
+
+/*
+ - UpdateSettingsFlow Complete Settings Flow
+ - Use this endpoint to complete a settings flow by sending an identity's updated password. This endpoint
+
+behaves differently for API and browser flows.
+
+API-initiated flows expect `application/json` to be sent in the body and respond with
+HTTP 200 and an application/json body with the session token on success;
+HTTP 303 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set;
+HTTP 400 on form validation errors.
+HTTP 401 when the endpoint is called without a valid session token.
+HTTP 403 when `selfservice.flows.settings.privileged_session_max_age` was reached or the session's AAL is too low.
+Implies that the user needs to re-authenticate.
+
+Browser flows without HTTP Header `Accept` or with `Accept: text/*` respond with
+a HTTP 303 redirect to the post/after settings URL or the `return_to` value if it was set and if the flow succeeded;
+a HTTP 303 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise.
+a HTTP 303 redirect to the login endpoint when `selfservice.flows.settings.privileged_session_max_age` was reached or the session's AAL is too low.
+
+Browser flows with HTTP Header `Accept: application/json` respond with
+HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success;
+HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set;
+HTTP 401 when the endpoint is called without a valid session cookie.
+HTTP 403 when the page is accessed without a session cookie or the session's AAL is too low.
+HTTP 400 on form validation errors.
+
+Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator
+Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn
+credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user
+to sign in with the second factor (happens automatically for server-side browser flows) or change the configuration.
+
+If this endpoint is called with a `Accept: application/json` HTTP header, the response contains the flow without a redirect. In the
+case of an error, the `error.id` of the JSON response body can be one of:
+
+`session_refresh_required`: The identity requested to change something that needs a privileged session. Redirect
+the identity to the login init endpoint with query parameters `?refresh=true&return_to=`,
+or initiate a refresh login flow otherwise.
+`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
+`session_inactive`: No Ory Session was found - sign in a user first.
+`security_identity_mismatch`: The flow was interrupted with `session_refresh_required` but apparently some other
+identity logged in instead.
+`security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!
+`browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL.
+Most likely used in Social Sign In flows.
+
+More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiUpdateSettingsFlowRequest
+*/
+func (a *FrontendApiService) UpdateSettingsFlow(ctx context.Context) FrontendApiApiUpdateSettingsFlowRequest {
+ return FrontendApiApiUpdateSettingsFlowRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return SettingsFlow
+ */
+func (a *FrontendApiService) UpdateSettingsFlowExecute(r FrontendApiApiUpdateSettingsFlowRequest) (*SettingsFlow, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPost
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *SettingsFlow
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.UpdateSettingsFlow")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/self-service/settings"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.flow == nil {
+ return localVarReturnValue, nil, reportError("flow is required and must be specified")
+ }
+ if r.updateSettingsFlowBody == nil {
+ return localVarReturnValue, nil, reportError("updateSettingsFlowBody is required and must be specified")
+ }
+
+ localVarQueryParams.Add("flow", parameterToString(*r.flow, ""))
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.xSessionToken != nil {
+ localVarHeaderParams["X-Session-Token"] = parameterToString(*r.xSessionToken, "")
+ }
+ if r.cookie != nil {
+ localVarHeaderParams["Cookie"] = parameterToString(*r.cookie, "")
+ }
+ // body params
+ localVarPostBody = r.updateSettingsFlowBody
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v SettingsFlow
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 401 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 410 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 422 {
+ var v ErrorBrowserLocationChangeRequired
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type FrontendApiApiUpdateVerificationFlowRequest struct {
+ ctx context.Context
+ ApiService FrontendApi
+ flow *string
+ updateVerificationFlowBody *UpdateVerificationFlowBody
+ token *string
+ cookie *string
+}
+
+func (r FrontendApiApiUpdateVerificationFlowRequest) Flow(flow string) FrontendApiApiUpdateVerificationFlowRequest {
+ r.flow = &flow
+ return r
+}
+func (r FrontendApiApiUpdateVerificationFlowRequest) UpdateVerificationFlowBody(updateVerificationFlowBody UpdateVerificationFlowBody) FrontendApiApiUpdateVerificationFlowRequest {
+ r.updateVerificationFlowBody = &updateVerificationFlowBody
+ return r
+}
+func (r FrontendApiApiUpdateVerificationFlowRequest) Token(token string) FrontendApiApiUpdateVerificationFlowRequest {
+ r.token = &token
+ return r
+}
+func (r FrontendApiApiUpdateVerificationFlowRequest) Cookie(cookie string) FrontendApiApiUpdateVerificationFlowRequest {
+ r.cookie = &cookie
+ return r
+}
+
+func (r FrontendApiApiUpdateVerificationFlowRequest) Execute() (*VerificationFlow, *http.Response, error) {
+ return r.ApiService.UpdateVerificationFlowExecute(r)
+}
+
+/*
+ - UpdateVerificationFlow Complete Verification Flow
+ - Use this endpoint to complete a verification flow. This endpoint
+
+behaves differently for API and browser flows and has several states:
+
+`choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent
+and works with API- and Browser-initiated flows.
+For API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid
+and a HTTP 303 See Other redirect with a fresh verification flow if the flow was otherwise invalid (e.g. expired).
+For Browser clients without HTTP Header `Accept` or with `Accept: text/*` it returns a HTTP 303 See Other redirect to the Verification UI URL with the Verification Flow ID appended.
+`sent_email` is the success state after `choose_method` when using the `link` method and allows the user to request another verification email. It
+works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state.
+`passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow ("sending a verification link")
+does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL
+(if the link was valid) and instructs the user to update their password, or a redirect to the Verification UI URL with
+a new Verification Flow ID which contains an error message that the verification link was invalid.
+
+More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation).
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return FrontendApiApiUpdateVerificationFlowRequest
+*/
+func (a *FrontendApiService) UpdateVerificationFlow(ctx context.Context) FrontendApiApiUpdateVerificationFlowRequest {
+ return FrontendApiApiUpdateVerificationFlowRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return VerificationFlow
+ */
+func (a *FrontendApiService) UpdateVerificationFlowExecute(r FrontendApiApiUpdateVerificationFlowRequest) (*VerificationFlow, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodPost
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *VerificationFlow
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FrontendApiService.UpdateVerificationFlow")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/self-service/verification"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if r.flow == nil {
+ return localVarReturnValue, nil, reportError("flow is required and must be specified")
+ }
+ if r.updateVerificationFlowBody == nil {
+ return localVarReturnValue, nil, reportError("updateVerificationFlowBody is required and must be specified")
+ }
+
+ localVarQueryParams.Add("flow", parameterToString(*r.flow, ""))
+ if r.token != nil {
+ localVarQueryParams.Add("token", parameterToString(*r.token, ""))
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.cookie != nil {
+ localVarHeaderParams["Cookie"] = parameterToString(*r.cookie, "")
+ }
+ // body params
+ localVarPostBody = r.updateVerificationFlowBody
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v VerificationFlow
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 410 {
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v ErrorGeneric
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
diff --git a/internal/httpclient/api_metadata.go b/internal/httpclient/api_metadata.go
new file mode 100644
index 000000000000..e5ac1a854d5d
--- /dev/null
+++ b/internal/httpclient/api_metadata.go
@@ -0,0 +1,442 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "bytes"
+ "context"
+ "io"
+ "net/http"
+ "net/url"
+)
+
+// Linger please
+var (
+ _ context.Context
+)
+
+type MetadataApi interface {
+
+ /*
+ * GetVersion Return Running Software Version.
+ * This endpoint returns the version of Ory Kratos.
+
+ If the service supports TLS Edge Termination, this endpoint does not require the
+ `X-Forwarded-Proto` header to be set.
+
+ Be aware that if you are running multiple nodes of this service, the version will never
+ refer to the cluster state, only to a single instance.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return MetadataApiApiGetVersionRequest
+ */
+ GetVersion(ctx context.Context) MetadataApiApiGetVersionRequest
+
+ /*
+ * GetVersionExecute executes the request
+ * @return GetVersion200Response
+ */
+ GetVersionExecute(r MetadataApiApiGetVersionRequest) (*GetVersion200Response, *http.Response, error)
+
+ /*
+ * IsAlive Check HTTP Server Status
+ * This endpoint returns a HTTP 200 status code when Ory Kratos is accepting incoming
+ HTTP requests. This status does currently not include checks whether the database connection is working.
+
+ If the service supports TLS Edge Termination, this endpoint does not require the
+ `X-Forwarded-Proto` header to be set.
+
+ Be aware that if you are running multiple nodes of this service, the health status will never
+ refer to the cluster state, only to a single instance.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return MetadataApiApiIsAliveRequest
+ */
+ IsAlive(ctx context.Context) MetadataApiApiIsAliveRequest
+
+ /*
+ * IsAliveExecute executes the request
+ * @return IsAlive200Response
+ */
+ IsAliveExecute(r MetadataApiApiIsAliveRequest) (*IsAlive200Response, *http.Response, error)
+
+ /*
+ * IsReady Check HTTP Server and Database Status
+ * This endpoint returns a HTTP 200 status code when Ory Kratos is up running and the environment dependencies (e.g.
+ the database) are responsive as well.
+
+ If the service supports TLS Edge Termination, this endpoint does not require the
+ `X-Forwarded-Proto` header to be set.
+
+ Be aware that if you are running multiple nodes of Ory Kratos, the health status will never
+ refer to the cluster state, only to a single instance.
+ * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ * @return MetadataApiApiIsReadyRequest
+ */
+ IsReady(ctx context.Context) MetadataApiApiIsReadyRequest
+
+ /*
+ * IsReadyExecute executes the request
+ * @return IsAlive200Response
+ */
+ IsReadyExecute(r MetadataApiApiIsReadyRequest) (*IsAlive200Response, *http.Response, error)
+}
+
+// MetadataApiService MetadataApi service
+type MetadataApiService service
+
+type MetadataApiApiGetVersionRequest struct {
+ ctx context.Context
+ ApiService MetadataApi
+}
+
+func (r MetadataApiApiGetVersionRequest) Execute() (*GetVersion200Response, *http.Response, error) {
+ return r.ApiService.GetVersionExecute(r)
+}
+
+/*
+ - GetVersion Return Running Software Version.
+ - This endpoint returns the version of Ory Kratos.
+
+If the service supports TLS Edge Termination, this endpoint does not require the
+`X-Forwarded-Proto` header to be set.
+
+Be aware that if you are running multiple nodes of this service, the version will never
+refer to the cluster state, only to a single instance.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return MetadataApiApiGetVersionRequest
+*/
+func (a *MetadataApiService) GetVersion(ctx context.Context) MetadataApiApiGetVersionRequest {
+ return MetadataApiApiGetVersionRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return GetVersion200Response
+ */
+func (a *MetadataApiService) GetVersionExecute(r MetadataApiApiGetVersionRequest) (*GetVersion200Response, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *GetVersion200Response
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetadataApiService.GetVersion")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/version"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type MetadataApiApiIsAliveRequest struct {
+ ctx context.Context
+ ApiService MetadataApi
+}
+
+func (r MetadataApiApiIsAliveRequest) Execute() (*IsAlive200Response, *http.Response, error) {
+ return r.ApiService.IsAliveExecute(r)
+}
+
+/*
+ - IsAlive Check HTTP Server Status
+ - This endpoint returns a HTTP 200 status code when Ory Kratos is accepting incoming
+
+HTTP requests. This status does currently not include checks whether the database connection is working.
+
+If the service supports TLS Edge Termination, this endpoint does not require the
+`X-Forwarded-Proto` header to be set.
+
+Be aware that if you are running multiple nodes of this service, the health status will never
+refer to the cluster state, only to a single instance.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return MetadataApiApiIsAliveRequest
+*/
+func (a *MetadataApiService) IsAlive(ctx context.Context) MetadataApiApiIsAliveRequest {
+ return MetadataApiApiIsAliveRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return IsAlive200Response
+ */
+func (a *MetadataApiService) IsAliveExecute(r MetadataApiApiIsAliveRequest) (*IsAlive200Response, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *IsAlive200Response
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetadataApiService.IsAlive")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/health/alive"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ var v string
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
+
+type MetadataApiApiIsReadyRequest struct {
+ ctx context.Context
+ ApiService MetadataApi
+}
+
+func (r MetadataApiApiIsReadyRequest) Execute() (*IsAlive200Response, *http.Response, error) {
+ return r.ApiService.IsReadyExecute(r)
+}
+
+/*
+ - IsReady Check HTTP Server and Database Status
+ - This endpoint returns a HTTP 200 status code when Ory Kratos is up running and the environment dependencies (e.g.
+
+the database) are responsive as well.
+
+If the service supports TLS Edge Termination, this endpoint does not require the
+`X-Forwarded-Proto` header to be set.
+
+Be aware that if you are running multiple nodes of Ory Kratos, the health status will never
+refer to the cluster state, only to a single instance.
+ - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ - @return MetadataApiApiIsReadyRequest
+*/
+func (a *MetadataApiService) IsReady(ctx context.Context) MetadataApiApiIsReadyRequest {
+ return MetadataApiApiIsReadyRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+/*
+ * Execute executes the request
+ * @return IsAlive200Response
+ */
+func (a *MetadataApiService) IsReadyExecute(r MetadataApiApiIsReadyRequest) (*IsAlive200Response, *http.Response, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ localVarFormFileName string
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue *IsAlive200Response
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetadataApiService.IsReady")
+ if err != nil {
+ return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
+ }
+
+ localVarPath := localBasePath + "/health/ready"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, err := a.client.callAPI(req)
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(io.LimitReader(localVarHTTPResponse.Body, 1024*1024))
+ localVarHTTPResponse.Body.Close()
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarHTTPResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHTTPResponse.Status,
+ }
+ if localVarHTTPResponse.StatusCode == 503 {
+ var v IsReady503Response
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ var v string
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := &GenericOpenAPIError{
+ body: localVarBody,
+ error: err.Error(),
+ }
+ return localVarReturnValue, localVarHTTPResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHTTPResponse, nil
+}
diff --git a/internal/httpclient/client.go b/internal/httpclient/client.go
new file mode 100644
index 000000000000..949a0e51ab35
--- /dev/null
+++ b/internal/httpclient/client.go
@@ -0,0 +1,550 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "encoding/xml"
+ "errors"
+ "fmt"
+ "io"
+ "log"
+ "mime/multipart"
+ "net/http"
+ "net/http/httputil"
+ "net/url"
+ "os"
+ "path/filepath"
+ "reflect"
+ "regexp"
+ "strconv"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "golang.org/x/oauth2"
+)
+
+var (
+ jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`)
+ xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`)
+)
+
+// APIClient manages communication with the Ory Identities API API v
+// In most cases there should be only one, shared, APIClient.
+type APIClient struct {
+ cfg *Configuration
+ common service // Reuse a single struct instead of allocating one for each service on the heap.
+
+ // API Services
+
+ CourierApi CourierApi
+
+ FrontendApi FrontendApi
+
+ IdentityApi IdentityApi
+
+ MetadataApi MetadataApi
+}
+
+type service struct {
+ client *APIClient
+}
+
+// NewAPIClient creates a new API client. Requires a userAgent string describing your application.
+// optionally a custom http.Client to allow for advanced features such as caching.
+func NewAPIClient(cfg *Configuration) *APIClient {
+ if cfg.HTTPClient == nil {
+ cfg.HTTPClient = http.DefaultClient
+ }
+
+ c := &APIClient{}
+ c.cfg = cfg
+ c.common.client = c
+
+ // API Services
+ c.CourierApi = (*CourierApiService)(&c.common)
+ c.FrontendApi = (*FrontendApiService)(&c.common)
+ c.IdentityApi = (*IdentityApiService)(&c.common)
+ c.MetadataApi = (*MetadataApiService)(&c.common)
+
+ return c
+}
+
+func atoi(in string) (int, error) {
+ return strconv.Atoi(in)
+}
+
+// selectHeaderContentType select a content type from the available list.
+func selectHeaderContentType(contentTypes []string) string {
+ if len(contentTypes) == 0 {
+ return ""
+ }
+ if contains(contentTypes, "application/json") {
+ return "application/json"
+ }
+ return contentTypes[0] // use the first content type specified in 'consumes'
+}
+
+// selectHeaderAccept join all accept types and return
+func selectHeaderAccept(accepts []string) string {
+ if len(accepts) == 0 {
+ return ""
+ }
+
+ if contains(accepts, "application/json") {
+ return "application/json"
+ }
+
+ return strings.Join(accepts, ",")
+}
+
+// contains is a case insenstive match, finding needle in a haystack
+func contains(haystack []string, needle string) bool {
+ for _, a := range haystack {
+ if strings.ToLower(a) == strings.ToLower(needle) {
+ return true
+ }
+ }
+ return false
+}
+
+// Verify optional parameters are of the correct type.
+func typeCheckParameter(obj interface{}, expected string, name string) error {
+ // Make sure there is an object.
+ if obj == nil {
+ return nil
+ }
+
+ // Check the type is as expected.
+ if reflect.TypeOf(obj).String() != expected {
+ return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String())
+ }
+ return nil
+}
+
+// parameterToString convert interface{} parameters to string, using a delimiter if format is provided.
+func parameterToString(obj interface{}, collectionFormat string) string {
+ var delimiter string
+
+ switch collectionFormat {
+ case "pipes":
+ delimiter = "|"
+ case "ssv":
+ delimiter = " "
+ case "tsv":
+ delimiter = "\t"
+ case "csv":
+ delimiter = ","
+ }
+
+ if reflect.TypeOf(obj).Kind() == reflect.Slice {
+ return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]")
+ } else if t, ok := obj.(time.Time); ok {
+ return t.Format(time.RFC3339)
+ }
+
+ return fmt.Sprintf("%v", obj)
+}
+
+// helper for converting interface{} parameters to json strings
+func parameterToJson(obj interface{}) (string, error) {
+ jsonBuf, err := json.Marshal(obj)
+ if err != nil {
+ return "", err
+ }
+ return string(jsonBuf), err
+}
+
+// callAPI do the request.
+func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
+ if c.cfg.Debug {
+ dump, err := httputil.DumpRequestOut(request, true)
+ if err != nil {
+ return nil, err
+ }
+ log.Printf("\n%s\n", string(dump))
+ }
+
+ resp, err := c.cfg.HTTPClient.Do(request)
+ if err != nil {
+ return resp, err
+ }
+
+ if c.cfg.Debug {
+ dump, err := httputil.DumpResponse(resp, true)
+ if err != nil {
+ return resp, err
+ }
+ log.Printf("\n%s\n", string(dump))
+ }
+ return resp, err
+}
+
+// Allow modification of underlying config for alternate implementations and testing
+// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
+func (c *APIClient) GetConfig() *Configuration {
+ return c.cfg
+}
+
+// prepareRequest build the request
+func (c *APIClient) prepareRequest(
+ ctx context.Context,
+ path string, method string,
+ postBody interface{},
+ headerParams map[string]string,
+ queryParams url.Values,
+ formParams url.Values,
+ formFileName string,
+ fileName string,
+ fileBytes []byte) (localVarRequest *http.Request, err error) {
+
+ var body *bytes.Buffer
+
+ // Detect postBody type and post.
+ if postBody != nil {
+ contentType := headerParams["Content-Type"]
+ if contentType == "" {
+ contentType = detectContentType(postBody)
+ headerParams["Content-Type"] = contentType
+ }
+
+ body, err = setBody(postBody, contentType)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ // add form parameters and file if available.
+ if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") {
+ if body != nil {
+ return nil, errors.New("Cannot specify postBody and multipart form at the same time.")
+ }
+ body = &bytes.Buffer{}
+ w := multipart.NewWriter(body)
+
+ for k, v := range formParams {
+ for _, iv := range v {
+ if strings.HasPrefix(k, "@") { // file
+ err = addFile(w, k[1:], iv)
+ if err != nil {
+ return nil, err
+ }
+ } else { // form value
+ w.WriteField(k, iv)
+ }
+ }
+ }
+ if len(fileBytes) > 0 && fileName != "" {
+ w.Boundary()
+ //_, fileNm := filepath.Split(fileName)
+ part, err := w.CreateFormFile(formFileName, filepath.Base(fileName))
+ if err != nil {
+ return nil, err
+ }
+ _, err = part.Write(fileBytes)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ // Set the Boundary in the Content-Type
+ headerParams["Content-Type"] = w.FormDataContentType()
+
+ // Set Content-Length
+ headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
+ w.Close()
+ }
+
+ if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 {
+ if body != nil {
+ return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.")
+ }
+ body = &bytes.Buffer{}
+ body.WriteString(formParams.Encode())
+ // Set Content-Length
+ headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
+ }
+
+ // Setup path and query parameters
+ url, err := url.Parse(path)
+ if err != nil {
+ return nil, err
+ }
+
+ // Override request host, if applicable
+ if c.cfg.Host != "" {
+ url.Host = c.cfg.Host
+ }
+
+ // Override request scheme, if applicable
+ if c.cfg.Scheme != "" {
+ url.Scheme = c.cfg.Scheme
+ }
+
+ // Adding Query Param
+ query := url.Query()
+ for k, v := range queryParams {
+ for _, iv := range v {
+ query.Add(k, iv)
+ }
+ }
+
+ // Encode the parameters.
+ url.RawQuery = query.Encode()
+
+ // Generate a new request
+ if body != nil {
+ localVarRequest, err = http.NewRequest(method, url.String(), body)
+ } else {
+ localVarRequest, err = http.NewRequest(method, url.String(), nil)
+ }
+ if err != nil {
+ return nil, err
+ }
+
+ // add header parameters, if any
+ if len(headerParams) > 0 {
+ headers := http.Header{}
+ for h, v := range headerParams {
+ headers.Set(h, v)
+ }
+ localVarRequest.Header = headers
+ }
+
+ // Add the user agent to the request.
+ localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent)
+
+ if ctx != nil {
+ // add context to the request
+ localVarRequest = localVarRequest.WithContext(ctx)
+
+ // Walk through any authentication.
+
+ // OAuth2 authentication
+ if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok {
+ // We were able to grab an oauth2 token from the context
+ var latestToken *oauth2.Token
+ if latestToken, err = tok.Token(); err != nil {
+ return nil, err
+ }
+
+ latestToken.SetAuthHeader(localVarRequest)
+ }
+
+ // Basic HTTP Authentication
+ if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok {
+ localVarRequest.SetBasicAuth(auth.UserName, auth.Password)
+ }
+
+ // AccessToken Authentication
+ if auth, ok := ctx.Value(ContextAccessToken).(string); ok {
+ localVarRequest.Header.Add("Authorization", "Bearer "+auth)
+ }
+
+ }
+
+ for header, value := range c.cfg.DefaultHeader {
+ localVarRequest.Header.Add(header, value)
+ }
+ return localVarRequest, nil
+}
+
+func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) {
+ if len(b) == 0 {
+ return nil
+ }
+ if s, ok := v.(*string); ok {
+ *s = string(b)
+ return nil
+ }
+ if xmlCheck.MatchString(contentType) {
+ if err = xml.Unmarshal(b, v); err != nil {
+ return err
+ }
+ return nil
+ }
+ if jsonCheck.MatchString(contentType) {
+ if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas
+ if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined
+ if err = unmarshalObj.UnmarshalJSON(b); err != nil {
+ return err
+ }
+ } else {
+ return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined")
+ }
+ } else if err = json.Unmarshal(b, v); err != nil { // simple model
+ return err
+ }
+ return nil
+ }
+ return errors.New("undefined response type")
+}
+
+// Add a file to the multipart request
+func addFile(w *multipart.Writer, fieldName, path string) error {
+ file, err := os.Open(path)
+ if err != nil {
+ return err
+ }
+ defer file.Close()
+
+ part, err := w.CreateFormFile(fieldName, filepath.Base(path))
+ if err != nil {
+ return err
+ }
+ _, err = io.Copy(part, file)
+
+ return err
+}
+
+// Prevent trying to import "fmt"
+func reportError(format string, a ...interface{}) error {
+ return fmt.Errorf(format, a...)
+}
+
+// Prevent trying to import "bytes"
+func newStrictDecoder(data []byte) *json.Decoder {
+ dec := json.NewDecoder(bytes.NewBuffer(data))
+ dec.DisallowUnknownFields()
+ return dec
+}
+
+// Set request body from an interface{}
+func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) {
+ if bodyBuf == nil {
+ bodyBuf = &bytes.Buffer{}
+ }
+
+ if reader, ok := body.(io.Reader); ok {
+ _, err = bodyBuf.ReadFrom(reader)
+ } else if b, ok := body.([]byte); ok {
+ _, err = bodyBuf.Write(b)
+ } else if s, ok := body.(string); ok {
+ _, err = bodyBuf.WriteString(s)
+ } else if s, ok := body.(*string); ok {
+ _, err = bodyBuf.WriteString(*s)
+ } else if jsonCheck.MatchString(contentType) {
+ err = json.NewEncoder(bodyBuf).Encode(body)
+ } else if xmlCheck.MatchString(contentType) {
+ err = xml.NewEncoder(bodyBuf).Encode(body)
+ }
+
+ if err != nil {
+ return nil, err
+ }
+
+ if bodyBuf.Len() == 0 {
+ err = fmt.Errorf("Invalid body type %s\n", contentType)
+ return nil, err
+ }
+ return bodyBuf, nil
+}
+
+// detectContentType method is used to figure out `Request.Body` content type for request header
+func detectContentType(body interface{}) string {
+ contentType := "text/plain; charset=utf-8"
+ kind := reflect.TypeOf(body).Kind()
+
+ switch kind {
+ case reflect.Struct, reflect.Map, reflect.Ptr:
+ contentType = "application/json; charset=utf-8"
+ case reflect.String:
+ contentType = "text/plain; charset=utf-8"
+ default:
+ if b, ok := body.([]byte); ok {
+ contentType = http.DetectContentType(b)
+ } else if kind == reflect.Slice {
+ contentType = "application/json; charset=utf-8"
+ }
+ }
+
+ return contentType
+}
+
+// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go
+type cacheControl map[string]string
+
+func parseCacheControl(headers http.Header) cacheControl {
+ cc := cacheControl{}
+ ccHeader := headers.Get("Cache-Control")
+ for _, part := range strings.Split(ccHeader, ",") {
+ part = strings.Trim(part, " ")
+ if part == "" {
+ continue
+ }
+ if strings.ContainsRune(part, '=') {
+ keyval := strings.Split(part, "=")
+ cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",")
+ } else {
+ cc[part] = ""
+ }
+ }
+ return cc
+}
+
+// CacheExpires helper function to determine remaining time before repeating a request.
+func CacheExpires(r *http.Response) time.Time {
+ // Figure out when the cache expires.
+ var expires time.Time
+ now, err := time.Parse(time.RFC1123, r.Header.Get("date"))
+ if err != nil {
+ return time.Now()
+ }
+ respCacheControl := parseCacheControl(r.Header)
+
+ if maxAge, ok := respCacheControl["max-age"]; ok {
+ lifetime, err := time.ParseDuration(maxAge + "s")
+ if err != nil {
+ expires = now
+ } else {
+ expires = now.Add(lifetime)
+ }
+ } else {
+ expiresHeader := r.Header.Get("Expires")
+ if expiresHeader != "" {
+ expires, err = time.Parse(time.RFC1123, expiresHeader)
+ if err != nil {
+ expires = now
+ }
+ }
+ }
+ return expires
+}
+
+func strlen(s string) int {
+ return utf8.RuneCountInString(s)
+}
+
+// GenericOpenAPIError Provides access to the body, error and model on returned errors.
+type GenericOpenAPIError struct {
+ body []byte
+ error string
+ model interface{}
+}
+
+// Error returns non-empty string if there was an error.
+func (e GenericOpenAPIError) Error() string {
+ return e.error
+}
+
+// Body returns the raw bytes of the response
+func (e GenericOpenAPIError) Body() []byte {
+ return e.body
+}
+
+// Model returns the unpacked model of the error
+func (e GenericOpenAPIError) Model() interface{} {
+ return e.model
+}
diff --git a/internal/httpclient/configuration.go b/internal/httpclient/configuration.go
new file mode 100644
index 000000000000..4c5de2bb48b3
--- /dev/null
+++ b/internal/httpclient/configuration.go
@@ -0,0 +1,230 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "context"
+ "fmt"
+ "net/http"
+ "strings"
+)
+
+// contextKeys are used to identify the type of value in the context.
+// Since these are string, it is possible to get a short description of the
+// context key for logging and debugging using key.String().
+
+type contextKey string
+
+func (c contextKey) String() string {
+ return "auth " + string(c)
+}
+
+var (
+ // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
+ ContextOAuth2 = contextKey("token")
+
+ // ContextBasicAuth takes BasicAuth as authentication for the request.
+ ContextBasicAuth = contextKey("basic")
+
+ // ContextAccessToken takes a string oauth2 access token as authentication for the request.
+ ContextAccessToken = contextKey("accesstoken")
+
+ // ContextAPIKeys takes a string apikey as authentication for the request
+ ContextAPIKeys = contextKey("apiKeys")
+
+ // ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request.
+ ContextHttpSignatureAuth = contextKey("httpsignature")
+
+ // ContextServerIndex uses a server configuration from the index.
+ ContextServerIndex = contextKey("serverIndex")
+
+ // ContextOperationServerIndices uses a server configuration from the index mapping.
+ ContextOperationServerIndices = contextKey("serverOperationIndices")
+
+ // ContextServerVariables overrides a server configuration variables.
+ ContextServerVariables = contextKey("serverVariables")
+
+ // ContextOperationServerVariables overrides a server configuration variables using operation specific values.
+ ContextOperationServerVariables = contextKey("serverOperationVariables")
+)
+
+// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
+type BasicAuth struct {
+ UserName string `json:"userName,omitempty"`
+ Password string `json:"password,omitempty"`
+}
+
+// APIKey provides API key based authentication to a request passed via context using ContextAPIKey
+type APIKey struct {
+ Key string
+ Prefix string
+}
+
+// ServerVariable stores the information about a server variable
+type ServerVariable struct {
+ Description string
+ DefaultValue string
+ EnumValues []string
+}
+
+// ServerConfiguration stores the information about a server
+type ServerConfiguration struct {
+ URL string
+ Description string
+ Variables map[string]ServerVariable
+}
+
+// ServerConfigurations stores multiple ServerConfiguration items
+type ServerConfigurations []ServerConfiguration
+
+// Configuration stores the configuration of the API client
+type Configuration struct {
+ Host string `json:"host,omitempty"`
+ Scheme string `json:"scheme,omitempty"`
+ DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
+ UserAgent string `json:"userAgent,omitempty"`
+ Debug bool `json:"debug,omitempty"`
+ Servers ServerConfigurations
+ OperationServers map[string]ServerConfigurations
+ HTTPClient *http.Client
+}
+
+// NewConfiguration returns a new Configuration object
+func NewConfiguration() *Configuration {
+ cfg := &Configuration{
+ DefaultHeader: make(map[string]string),
+ UserAgent: "OpenAPI-Generator/1.0.0/go",
+ Debug: false,
+ Servers: ServerConfigurations{
+ {
+ URL: "",
+ Description: "No description provided",
+ },
+ },
+ OperationServers: map[string]ServerConfigurations{},
+ }
+ return cfg
+}
+
+// AddDefaultHeader adds a new HTTP header to the default header in the request
+func (c *Configuration) AddDefaultHeader(key string, value string) {
+ c.DefaultHeader[key] = value
+}
+
+// URL formats template on a index using given variables
+func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) {
+ if index < 0 || len(sc) <= index {
+ return "", fmt.Errorf("Index %v out of range %v", index, len(sc)-1)
+ }
+ server := sc[index]
+ url := server.URL
+
+ // go through variables and replace placeholders
+ for name, variable := range server.Variables {
+ if value, ok := variables[name]; ok {
+ found := bool(len(variable.EnumValues) == 0)
+ for _, enumValue := range variable.EnumValues {
+ if value == enumValue {
+ found = true
+ }
+ }
+ if !found {
+ return "", fmt.Errorf("The variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues)
+ }
+ url = strings.Replace(url, "{"+name+"}", value, -1)
+ } else {
+ url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1)
+ }
+ }
+ return url, nil
+}
+
+// ServerURL returns URL based on server settings
+func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) {
+ return c.Servers.URL(index, variables)
+}
+
+func getServerIndex(ctx context.Context) (int, error) {
+ si := ctx.Value(ContextServerIndex)
+ if si != nil {
+ if index, ok := si.(int); ok {
+ return index, nil
+ }
+ return 0, reportError("Invalid type %T should be int", si)
+ }
+ return 0, nil
+}
+
+func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) {
+ osi := ctx.Value(ContextOperationServerIndices)
+ if osi != nil {
+ if operationIndices, ok := osi.(map[string]int); !ok {
+ return 0, reportError("Invalid type %T should be map[string]int", osi)
+ } else {
+ index, ok := operationIndices[endpoint]
+ if ok {
+ return index, nil
+ }
+ }
+ }
+ return getServerIndex(ctx)
+}
+
+func getServerVariables(ctx context.Context) (map[string]string, error) {
+ sv := ctx.Value(ContextServerVariables)
+ if sv != nil {
+ if variables, ok := sv.(map[string]string); ok {
+ return variables, nil
+ }
+ return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv)
+ }
+ return nil, nil
+}
+
+func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) {
+ osv := ctx.Value(ContextOperationServerVariables)
+ if osv != nil {
+ if operationVariables, ok := osv.(map[string]map[string]string); !ok {
+ return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv)
+ } else {
+ variables, ok := operationVariables[endpoint]
+ if ok {
+ return variables, nil
+ }
+ }
+ }
+ return getServerVariables(ctx)
+}
+
+// ServerURLWithContext returns a new server URL given an endpoint
+func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) {
+ sc, ok := c.OperationServers[endpoint]
+ if !ok {
+ sc = c.Servers
+ }
+
+ if ctx == nil {
+ return sc.URL(0, nil)
+ }
+
+ index, err := getServerOperationIndex(ctx, endpoint)
+ if err != nil {
+ return "", err
+ }
+
+ variables, err := getServerOperationVariables(ctx, endpoint)
+ if err != nil {
+ return "", err
+ }
+
+ return sc.URL(index, variables)
+}
diff --git a/internal/httpclient/git_push.sh b/internal/httpclient/git_push.sh
new file mode 100644
index 000000000000..ba5bdb84d95d
--- /dev/null
+++ b/internal/httpclient/git_push.sh
@@ -0,0 +1,58 @@
+#!/bin/sh
+# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
+#
+# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
+
+git_user_id=$1
+git_repo_id=$2
+release_note=$3
+git_host=$4
+
+if [ "$git_host" = "" ]; then
+ git_host="github.com"
+ echo "[INFO] No command line input provided. Set \$git_host to $git_host"
+fi
+
+if [ "$git_user_id" = "" ]; then
+ git_user_id="ory"
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
+fi
+
+if [ "$git_repo_id" = "" ]; then
+ git_repo_id="client-go"
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
+fi
+
+if [ "$release_note" = "" ]; then
+ release_note="Minor update"
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
+fi
+
+# Initialize the local directory as a Git repository
+git init
+
+# Adds the files in the local repository and stages them for commit.
+git add .
+
+# Commits the tracked changes and prepares them to be pushed to a remote repository.
+git commit -m "$release_note"
+
+# Sets the new remote
+git_remote=`git remote`
+if [ "$git_remote" = "" ]; then # git remote not defined
+
+ if [ "$GIT_TOKEN" = "" ]; then
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
+ git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
+ else
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
+ fi
+
+fi
+
+git pull origin master
+
+# Pushes (Forces) the changes in the local repository up to the remote repository
+echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
+git push origin master 2>&1 | grep -v 'To https'
+
diff --git a/internal/httpclient/model_authenticator_assurance_level.go b/internal/httpclient/model_authenticator_assurance_level.go
new file mode 100644
index 000000000000..e6def4dfe3d8
--- /dev/null
+++ b/internal/httpclient/model_authenticator_assurance_level.go
@@ -0,0 +1,86 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// AuthenticatorAssuranceLevel The authenticator assurance level can be one of \"aal1\", \"aal2\", or \"aal3\". A higher number means that it is harder for an attacker to compromise the account. Generally, \"aal1\" implies that one authentication factor was used while AAL2 implies that two factors (e.g. password + TOTP) have been used. To learn more about these levels please head over to: https://www.ory.sh/kratos/docs/concepts/credentials
+type AuthenticatorAssuranceLevel string
+
+// List of authenticatorAssuranceLevel
+const (
+ AUTHENTICATORASSURANCELEVEL_AAL0 AuthenticatorAssuranceLevel = "aal0"
+ AUTHENTICATORASSURANCELEVEL_AAL1 AuthenticatorAssuranceLevel = "aal1"
+ AUTHENTICATORASSURANCELEVEL_AAL2 AuthenticatorAssuranceLevel = "aal2"
+ AUTHENTICATORASSURANCELEVEL_AAL3 AuthenticatorAssuranceLevel = "aal3"
+)
+
+func (v *AuthenticatorAssuranceLevel) UnmarshalJSON(src []byte) error {
+ var value string
+ err := json.Unmarshal(src, &value)
+ if err != nil {
+ return err
+ }
+ enumTypeValue := AuthenticatorAssuranceLevel(value)
+ for _, existing := range []AuthenticatorAssuranceLevel{"aal0", "aal1", "aal2", "aal3"} {
+ if existing == enumTypeValue {
+ *v = enumTypeValue
+ return nil
+ }
+ }
+
+ return fmt.Errorf("%+v is not a valid AuthenticatorAssuranceLevel", value)
+}
+
+// Ptr returns reference to authenticatorAssuranceLevel value
+func (v AuthenticatorAssuranceLevel) Ptr() *AuthenticatorAssuranceLevel {
+ return &v
+}
+
+type NullableAuthenticatorAssuranceLevel struct {
+ value *AuthenticatorAssuranceLevel
+ isSet bool
+}
+
+func (v NullableAuthenticatorAssuranceLevel) Get() *AuthenticatorAssuranceLevel {
+ return v.value
+}
+
+func (v *NullableAuthenticatorAssuranceLevel) Set(val *AuthenticatorAssuranceLevel) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableAuthenticatorAssuranceLevel) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableAuthenticatorAssuranceLevel) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableAuthenticatorAssuranceLevel(val *AuthenticatorAssuranceLevel) *NullableAuthenticatorAssuranceLevel {
+ return &NullableAuthenticatorAssuranceLevel{value: val, isSet: true}
+}
+
+func (v NullableAuthenticatorAssuranceLevel) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableAuthenticatorAssuranceLevel) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_batch_patch_identities_response.go b/internal/httpclient/model_batch_patch_identities_response.go
new file mode 100644
index 000000000000..4ddeea9f7898
--- /dev/null
+++ b/internal/httpclient/model_batch_patch_identities_response.go
@@ -0,0 +1,115 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// BatchPatchIdentitiesResponse Patch identities response
+type BatchPatchIdentitiesResponse struct {
+ // The patch responses for the individual identities.
+ Identities []IdentityPatchResponse `json:"identities,omitempty"`
+}
+
+// NewBatchPatchIdentitiesResponse instantiates a new BatchPatchIdentitiesResponse object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewBatchPatchIdentitiesResponse() *BatchPatchIdentitiesResponse {
+ this := BatchPatchIdentitiesResponse{}
+ return &this
+}
+
+// NewBatchPatchIdentitiesResponseWithDefaults instantiates a new BatchPatchIdentitiesResponse object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewBatchPatchIdentitiesResponseWithDefaults() *BatchPatchIdentitiesResponse {
+ this := BatchPatchIdentitiesResponse{}
+ return &this
+}
+
+// GetIdentities returns the Identities field value if set, zero value otherwise.
+func (o *BatchPatchIdentitiesResponse) GetIdentities() []IdentityPatchResponse {
+ if o == nil || o.Identities == nil {
+ var ret []IdentityPatchResponse
+ return ret
+ }
+ return o.Identities
+}
+
+// GetIdentitiesOk returns a tuple with the Identities field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BatchPatchIdentitiesResponse) GetIdentitiesOk() ([]IdentityPatchResponse, bool) {
+ if o == nil || o.Identities == nil {
+ return nil, false
+ }
+ return o.Identities, true
+}
+
+// HasIdentities returns a boolean if a field has been set.
+func (o *BatchPatchIdentitiesResponse) HasIdentities() bool {
+ if o != nil && o.Identities != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetIdentities gets a reference to the given []IdentityPatchResponse and assigns it to the Identities field.
+func (o *BatchPatchIdentitiesResponse) SetIdentities(v []IdentityPatchResponse) {
+ o.Identities = v
+}
+
+func (o BatchPatchIdentitiesResponse) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Identities != nil {
+ toSerialize["identities"] = o.Identities
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableBatchPatchIdentitiesResponse struct {
+ value *BatchPatchIdentitiesResponse
+ isSet bool
+}
+
+func (v NullableBatchPatchIdentitiesResponse) Get() *BatchPatchIdentitiesResponse {
+ return v.value
+}
+
+func (v *NullableBatchPatchIdentitiesResponse) Set(val *BatchPatchIdentitiesResponse) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableBatchPatchIdentitiesResponse) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableBatchPatchIdentitiesResponse) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableBatchPatchIdentitiesResponse(val *BatchPatchIdentitiesResponse) *NullableBatchPatchIdentitiesResponse {
+ return &NullableBatchPatchIdentitiesResponse{value: val, isSet: true}
+}
+
+func (v NullableBatchPatchIdentitiesResponse) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableBatchPatchIdentitiesResponse) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_consistency_request_parameters.go b/internal/httpclient/model_consistency_request_parameters.go
new file mode 100644
index 000000000000..6c48a4d6bb47
--- /dev/null
+++ b/internal/httpclient/model_consistency_request_parameters.go
@@ -0,0 +1,115 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// ConsistencyRequestParameters Control API consistency guarantees
+type ConsistencyRequestParameters struct {
+ // Read Consistency Level (preview) The read consistency level determines the consistency guarantee for reads: strong (slow): The read is guaranteed to return the most recent data committed at the start of the read. eventual (very fast): The result will return data that is about 4.8 seconds old. The default consistency guarantee can be changed in the Ory Network Console or using the Ory CLI with `ory patch project --replace '/previews/default_read_consistency_level=\"strong\"'`. Setting the default consistency level to `eventual` may cause regressions in the future as we add consistency controls to more APIs. Currently, the following APIs will be affected by this setting: `GET /admin/identities` This feature is in preview and only available in Ory Network. ConsistencyLevelUnset ConsistencyLevelUnset is the unset / default consistency level. strong ConsistencyLevelStrong ConsistencyLevelStrong is the strong consistency level. eventual ConsistencyLevelEventual ConsistencyLevelEventual is the eventual consistency level using follower read timestamps.
+ Consistency *string `json:"consistency,omitempty"`
+}
+
+// NewConsistencyRequestParameters instantiates a new ConsistencyRequestParameters object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewConsistencyRequestParameters() *ConsistencyRequestParameters {
+ this := ConsistencyRequestParameters{}
+ return &this
+}
+
+// NewConsistencyRequestParametersWithDefaults instantiates a new ConsistencyRequestParameters object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewConsistencyRequestParametersWithDefaults() *ConsistencyRequestParameters {
+ this := ConsistencyRequestParameters{}
+ return &this
+}
+
+// GetConsistency returns the Consistency field value if set, zero value otherwise.
+func (o *ConsistencyRequestParameters) GetConsistency() string {
+ if o == nil || o.Consistency == nil {
+ var ret string
+ return ret
+ }
+ return *o.Consistency
+}
+
+// GetConsistencyOk returns a tuple with the Consistency field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ConsistencyRequestParameters) GetConsistencyOk() (*string, bool) {
+ if o == nil || o.Consistency == nil {
+ return nil, false
+ }
+ return o.Consistency, true
+}
+
+// HasConsistency returns a boolean if a field has been set.
+func (o *ConsistencyRequestParameters) HasConsistency() bool {
+ if o != nil && o.Consistency != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetConsistency gets a reference to the given string and assigns it to the Consistency field.
+func (o *ConsistencyRequestParameters) SetConsistency(v string) {
+ o.Consistency = &v
+}
+
+func (o ConsistencyRequestParameters) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Consistency != nil {
+ toSerialize["consistency"] = o.Consistency
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableConsistencyRequestParameters struct {
+ value *ConsistencyRequestParameters
+ isSet bool
+}
+
+func (v NullableConsistencyRequestParameters) Get() *ConsistencyRequestParameters {
+ return v.value
+}
+
+func (v *NullableConsistencyRequestParameters) Set(val *ConsistencyRequestParameters) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableConsistencyRequestParameters) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableConsistencyRequestParameters) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableConsistencyRequestParameters(val *ConsistencyRequestParameters) *NullableConsistencyRequestParameters {
+ return &NullableConsistencyRequestParameters{value: val, isSet: true}
+}
+
+func (v NullableConsistencyRequestParameters) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableConsistencyRequestParameters) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_continue_with.go b/internal/httpclient/model_continue_with.go
new file mode 100644
index 000000000000..6fb1056836e6
--- /dev/null
+++ b/internal/httpclient/model_continue_with.go
@@ -0,0 +1,284 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// ContinueWith - struct for ContinueWith
+type ContinueWith struct {
+ ContinueWithRecoveryUi *ContinueWithRecoveryUi
+ ContinueWithRedirectBrowserTo *ContinueWithRedirectBrowserTo
+ ContinueWithSetOrySessionToken *ContinueWithSetOrySessionToken
+ ContinueWithSettingsUi *ContinueWithSettingsUi
+ ContinueWithVerificationUi *ContinueWithVerificationUi
+}
+
+// ContinueWithRecoveryUiAsContinueWith is a convenience function that returns ContinueWithRecoveryUi wrapped in ContinueWith
+func ContinueWithRecoveryUiAsContinueWith(v *ContinueWithRecoveryUi) ContinueWith {
+ return ContinueWith{
+ ContinueWithRecoveryUi: v,
+ }
+}
+
+// ContinueWithRedirectBrowserToAsContinueWith is a convenience function that returns ContinueWithRedirectBrowserTo wrapped in ContinueWith
+func ContinueWithRedirectBrowserToAsContinueWith(v *ContinueWithRedirectBrowserTo) ContinueWith {
+ return ContinueWith{
+ ContinueWithRedirectBrowserTo: v,
+ }
+}
+
+// ContinueWithSetOrySessionTokenAsContinueWith is a convenience function that returns ContinueWithSetOrySessionToken wrapped in ContinueWith
+func ContinueWithSetOrySessionTokenAsContinueWith(v *ContinueWithSetOrySessionToken) ContinueWith {
+ return ContinueWith{
+ ContinueWithSetOrySessionToken: v,
+ }
+}
+
+// ContinueWithSettingsUiAsContinueWith is a convenience function that returns ContinueWithSettingsUi wrapped in ContinueWith
+func ContinueWithSettingsUiAsContinueWith(v *ContinueWithSettingsUi) ContinueWith {
+ return ContinueWith{
+ ContinueWithSettingsUi: v,
+ }
+}
+
+// ContinueWithVerificationUiAsContinueWith is a convenience function that returns ContinueWithVerificationUi wrapped in ContinueWith
+func ContinueWithVerificationUiAsContinueWith(v *ContinueWithVerificationUi) ContinueWith {
+ return ContinueWith{
+ ContinueWithVerificationUi: v,
+ }
+}
+
+// Unmarshal JSON data into one of the pointers in the struct
+func (dst *ContinueWith) UnmarshalJSON(data []byte) error {
+ var err error
+ // use discriminator value to speed up the lookup
+ var jsonDict map[string]interface{}
+ err = newStrictDecoder(data).Decode(&jsonDict)
+ if err != nil {
+ return fmt.Errorf("Failed to unmarshal JSON into map for the discrimintor lookup.")
+ }
+
+ // check if the discriminator value is 'redirect_browser_to'
+ if jsonDict["action"] == "redirect_browser_to" {
+ // try to unmarshal JSON data into ContinueWithRedirectBrowserTo
+ err = json.Unmarshal(data, &dst.ContinueWithRedirectBrowserTo)
+ if err == nil {
+ return nil // data stored in dst.ContinueWithRedirectBrowserTo, return on the first match
+ } else {
+ dst.ContinueWithRedirectBrowserTo = nil
+ return fmt.Errorf("Failed to unmarshal ContinueWith as ContinueWithRedirectBrowserTo: %s", err.Error())
+ }
+ }
+
+ // check if the discriminator value is 'set_ory_session_token'
+ if jsonDict["action"] == "set_ory_session_token" {
+ // try to unmarshal JSON data into ContinueWithSetOrySessionToken
+ err = json.Unmarshal(data, &dst.ContinueWithSetOrySessionToken)
+ if err == nil {
+ return nil // data stored in dst.ContinueWithSetOrySessionToken, return on the first match
+ } else {
+ dst.ContinueWithSetOrySessionToken = nil
+ return fmt.Errorf("Failed to unmarshal ContinueWith as ContinueWithSetOrySessionToken: %s", err.Error())
+ }
+ }
+
+ // check if the discriminator value is 'show_recovery_ui'
+ if jsonDict["action"] == "show_recovery_ui" {
+ // try to unmarshal JSON data into ContinueWithRecoveryUi
+ err = json.Unmarshal(data, &dst.ContinueWithRecoveryUi)
+ if err == nil {
+ return nil // data stored in dst.ContinueWithRecoveryUi, return on the first match
+ } else {
+ dst.ContinueWithRecoveryUi = nil
+ return fmt.Errorf("Failed to unmarshal ContinueWith as ContinueWithRecoveryUi: %s", err.Error())
+ }
+ }
+
+ // check if the discriminator value is 'show_settings_ui'
+ if jsonDict["action"] == "show_settings_ui" {
+ // try to unmarshal JSON data into ContinueWithSettingsUi
+ err = json.Unmarshal(data, &dst.ContinueWithSettingsUi)
+ if err == nil {
+ return nil // data stored in dst.ContinueWithSettingsUi, return on the first match
+ } else {
+ dst.ContinueWithSettingsUi = nil
+ return fmt.Errorf("Failed to unmarshal ContinueWith as ContinueWithSettingsUi: %s", err.Error())
+ }
+ }
+
+ // check if the discriminator value is 'show_verification_ui'
+ if jsonDict["action"] == "show_verification_ui" {
+ // try to unmarshal JSON data into ContinueWithVerificationUi
+ err = json.Unmarshal(data, &dst.ContinueWithVerificationUi)
+ if err == nil {
+ return nil // data stored in dst.ContinueWithVerificationUi, return on the first match
+ } else {
+ dst.ContinueWithVerificationUi = nil
+ return fmt.Errorf("Failed to unmarshal ContinueWith as ContinueWithVerificationUi: %s", err.Error())
+ }
+ }
+
+ // check if the discriminator value is 'continueWithRecoveryUi'
+ if jsonDict["action"] == "continueWithRecoveryUi" {
+ // try to unmarshal JSON data into ContinueWithRecoveryUi
+ err = json.Unmarshal(data, &dst.ContinueWithRecoveryUi)
+ if err == nil {
+ return nil // data stored in dst.ContinueWithRecoveryUi, return on the first match
+ } else {
+ dst.ContinueWithRecoveryUi = nil
+ return fmt.Errorf("Failed to unmarshal ContinueWith as ContinueWithRecoveryUi: %s", err.Error())
+ }
+ }
+
+ // check if the discriminator value is 'continueWithRedirectBrowserTo'
+ if jsonDict["action"] == "continueWithRedirectBrowserTo" {
+ // try to unmarshal JSON data into ContinueWithRedirectBrowserTo
+ err = json.Unmarshal(data, &dst.ContinueWithRedirectBrowserTo)
+ if err == nil {
+ return nil // data stored in dst.ContinueWithRedirectBrowserTo, return on the first match
+ } else {
+ dst.ContinueWithRedirectBrowserTo = nil
+ return fmt.Errorf("Failed to unmarshal ContinueWith as ContinueWithRedirectBrowserTo: %s", err.Error())
+ }
+ }
+
+ // check if the discriminator value is 'continueWithSetOrySessionToken'
+ if jsonDict["action"] == "continueWithSetOrySessionToken" {
+ // try to unmarshal JSON data into ContinueWithSetOrySessionToken
+ err = json.Unmarshal(data, &dst.ContinueWithSetOrySessionToken)
+ if err == nil {
+ return nil // data stored in dst.ContinueWithSetOrySessionToken, return on the first match
+ } else {
+ dst.ContinueWithSetOrySessionToken = nil
+ return fmt.Errorf("Failed to unmarshal ContinueWith as ContinueWithSetOrySessionToken: %s", err.Error())
+ }
+ }
+
+ // check if the discriminator value is 'continueWithSettingsUi'
+ if jsonDict["action"] == "continueWithSettingsUi" {
+ // try to unmarshal JSON data into ContinueWithSettingsUi
+ err = json.Unmarshal(data, &dst.ContinueWithSettingsUi)
+ if err == nil {
+ return nil // data stored in dst.ContinueWithSettingsUi, return on the first match
+ } else {
+ dst.ContinueWithSettingsUi = nil
+ return fmt.Errorf("Failed to unmarshal ContinueWith as ContinueWithSettingsUi: %s", err.Error())
+ }
+ }
+
+ // check if the discriminator value is 'continueWithVerificationUi'
+ if jsonDict["action"] == "continueWithVerificationUi" {
+ // try to unmarshal JSON data into ContinueWithVerificationUi
+ err = json.Unmarshal(data, &dst.ContinueWithVerificationUi)
+ if err == nil {
+ return nil // data stored in dst.ContinueWithVerificationUi, return on the first match
+ } else {
+ dst.ContinueWithVerificationUi = nil
+ return fmt.Errorf("Failed to unmarshal ContinueWith as ContinueWithVerificationUi: %s", err.Error())
+ }
+ }
+
+ return nil
+}
+
+// Marshal data from the first non-nil pointers in the struct to JSON
+func (src ContinueWith) MarshalJSON() ([]byte, error) {
+ if src.ContinueWithRecoveryUi != nil {
+ return json.Marshal(&src.ContinueWithRecoveryUi)
+ }
+
+ if src.ContinueWithRedirectBrowserTo != nil {
+ return json.Marshal(&src.ContinueWithRedirectBrowserTo)
+ }
+
+ if src.ContinueWithSetOrySessionToken != nil {
+ return json.Marshal(&src.ContinueWithSetOrySessionToken)
+ }
+
+ if src.ContinueWithSettingsUi != nil {
+ return json.Marshal(&src.ContinueWithSettingsUi)
+ }
+
+ if src.ContinueWithVerificationUi != nil {
+ return json.Marshal(&src.ContinueWithVerificationUi)
+ }
+
+ return nil, nil // no data in oneOf schemas
+}
+
+// Get the actual instance
+func (obj *ContinueWith) GetActualInstance() interface{} {
+ if obj == nil {
+ return nil
+ }
+ if obj.ContinueWithRecoveryUi != nil {
+ return obj.ContinueWithRecoveryUi
+ }
+
+ if obj.ContinueWithRedirectBrowserTo != nil {
+ return obj.ContinueWithRedirectBrowserTo
+ }
+
+ if obj.ContinueWithSetOrySessionToken != nil {
+ return obj.ContinueWithSetOrySessionToken
+ }
+
+ if obj.ContinueWithSettingsUi != nil {
+ return obj.ContinueWithSettingsUi
+ }
+
+ if obj.ContinueWithVerificationUi != nil {
+ return obj.ContinueWithVerificationUi
+ }
+
+ // all schemas are nil
+ return nil
+}
+
+type NullableContinueWith struct {
+ value *ContinueWith
+ isSet bool
+}
+
+func (v NullableContinueWith) Get() *ContinueWith {
+ return v.value
+}
+
+func (v *NullableContinueWith) Set(val *ContinueWith) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableContinueWith) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableContinueWith) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableContinueWith(val *ContinueWith) *NullableContinueWith {
+ return &NullableContinueWith{value: val, isSet: true}
+}
+
+func (v NullableContinueWith) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableContinueWith) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_continue_with_recovery_ui.go b/internal/httpclient/model_continue_with_recovery_ui.go
new file mode 100644
index 000000000000..93682bf90beb
--- /dev/null
+++ b/internal/httpclient/model_continue_with_recovery_ui.go
@@ -0,0 +1,137 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// ContinueWithRecoveryUi Indicates, that the UI flow could be continued by showing a recovery ui
+type ContinueWithRecoveryUi struct {
+ // Action will always be `show_recovery_ui` show_recovery_ui ContinueWithActionShowRecoveryUIString
+ Action string `json:"action"`
+ Flow ContinueWithRecoveryUiFlow `json:"flow"`
+}
+
+// NewContinueWithRecoveryUi instantiates a new ContinueWithRecoveryUi object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewContinueWithRecoveryUi(action string, flow ContinueWithRecoveryUiFlow) *ContinueWithRecoveryUi {
+ this := ContinueWithRecoveryUi{}
+ this.Action = action
+ this.Flow = flow
+ return &this
+}
+
+// NewContinueWithRecoveryUiWithDefaults instantiates a new ContinueWithRecoveryUi object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewContinueWithRecoveryUiWithDefaults() *ContinueWithRecoveryUi {
+ this := ContinueWithRecoveryUi{}
+ return &this
+}
+
+// GetAction returns the Action field value
+func (o *ContinueWithRecoveryUi) GetAction() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Action
+}
+
+// GetActionOk returns a tuple with the Action field value
+// and a boolean to check if the value has been set.
+func (o *ContinueWithRecoveryUi) GetActionOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Action, true
+}
+
+// SetAction sets field value
+func (o *ContinueWithRecoveryUi) SetAction(v string) {
+ o.Action = v
+}
+
+// GetFlow returns the Flow field value
+func (o *ContinueWithRecoveryUi) GetFlow() ContinueWithRecoveryUiFlow {
+ if o == nil {
+ var ret ContinueWithRecoveryUiFlow
+ return ret
+ }
+
+ return o.Flow
+}
+
+// GetFlowOk returns a tuple with the Flow field value
+// and a boolean to check if the value has been set.
+func (o *ContinueWithRecoveryUi) GetFlowOk() (*ContinueWithRecoveryUiFlow, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Flow, true
+}
+
+// SetFlow sets field value
+func (o *ContinueWithRecoveryUi) SetFlow(v ContinueWithRecoveryUiFlow) {
+ o.Flow = v
+}
+
+func (o ContinueWithRecoveryUi) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if true {
+ toSerialize["action"] = o.Action
+ }
+ if true {
+ toSerialize["flow"] = o.Flow
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableContinueWithRecoveryUi struct {
+ value *ContinueWithRecoveryUi
+ isSet bool
+}
+
+func (v NullableContinueWithRecoveryUi) Get() *ContinueWithRecoveryUi {
+ return v.value
+}
+
+func (v *NullableContinueWithRecoveryUi) Set(val *ContinueWithRecoveryUi) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableContinueWithRecoveryUi) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableContinueWithRecoveryUi) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableContinueWithRecoveryUi(val *ContinueWithRecoveryUi) *NullableContinueWithRecoveryUi {
+ return &NullableContinueWithRecoveryUi{value: val, isSet: true}
+}
+
+func (v NullableContinueWithRecoveryUi) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableContinueWithRecoveryUi) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_continue_with_recovery_ui_flow.go b/internal/httpclient/model_continue_with_recovery_ui_flow.go
new file mode 100644
index 000000000000..251725a73c3b
--- /dev/null
+++ b/internal/httpclient/model_continue_with_recovery_ui_flow.go
@@ -0,0 +1,145 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// ContinueWithRecoveryUiFlow struct for ContinueWithRecoveryUiFlow
+type ContinueWithRecoveryUiFlow struct {
+ // The ID of the recovery flow
+ Id string `json:"id"`
+ // The URL of the recovery flow If this value is set, redirect the user's browser to this URL. This value is typically unset for native clients / API flows.
+ Url *string `json:"url,omitempty"`
+}
+
+// NewContinueWithRecoveryUiFlow instantiates a new ContinueWithRecoveryUiFlow object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewContinueWithRecoveryUiFlow(id string) *ContinueWithRecoveryUiFlow {
+ this := ContinueWithRecoveryUiFlow{}
+ this.Id = id
+ return &this
+}
+
+// NewContinueWithRecoveryUiFlowWithDefaults instantiates a new ContinueWithRecoveryUiFlow object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewContinueWithRecoveryUiFlowWithDefaults() *ContinueWithRecoveryUiFlow {
+ this := ContinueWithRecoveryUiFlow{}
+ return &this
+}
+
+// GetId returns the Id field value
+func (o *ContinueWithRecoveryUiFlow) GetId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value
+// and a boolean to check if the value has been set.
+func (o *ContinueWithRecoveryUiFlow) GetIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Id, true
+}
+
+// SetId sets field value
+func (o *ContinueWithRecoveryUiFlow) SetId(v string) {
+ o.Id = v
+}
+
+// GetUrl returns the Url field value if set, zero value otherwise.
+func (o *ContinueWithRecoveryUiFlow) GetUrl() string {
+ if o == nil || o.Url == nil {
+ var ret string
+ return ret
+ }
+ return *o.Url
+}
+
+// GetUrlOk returns a tuple with the Url field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ContinueWithRecoveryUiFlow) GetUrlOk() (*string, bool) {
+ if o == nil || o.Url == nil {
+ return nil, false
+ }
+ return o.Url, true
+}
+
+// HasUrl returns a boolean if a field has been set.
+func (o *ContinueWithRecoveryUiFlow) HasUrl() bool {
+ if o != nil && o.Url != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetUrl gets a reference to the given string and assigns it to the Url field.
+func (o *ContinueWithRecoveryUiFlow) SetUrl(v string) {
+ o.Url = &v
+}
+
+func (o ContinueWithRecoveryUiFlow) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if true {
+ toSerialize["id"] = o.Id
+ }
+ if o.Url != nil {
+ toSerialize["url"] = o.Url
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableContinueWithRecoveryUiFlow struct {
+ value *ContinueWithRecoveryUiFlow
+ isSet bool
+}
+
+func (v NullableContinueWithRecoveryUiFlow) Get() *ContinueWithRecoveryUiFlow {
+ return v.value
+}
+
+func (v *NullableContinueWithRecoveryUiFlow) Set(val *ContinueWithRecoveryUiFlow) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableContinueWithRecoveryUiFlow) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableContinueWithRecoveryUiFlow) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableContinueWithRecoveryUiFlow(val *ContinueWithRecoveryUiFlow) *NullableContinueWithRecoveryUiFlow {
+ return &NullableContinueWithRecoveryUiFlow{value: val, isSet: true}
+}
+
+func (v NullableContinueWithRecoveryUiFlow) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableContinueWithRecoveryUiFlow) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_continue_with_redirect_browser_to.go b/internal/httpclient/model_continue_with_redirect_browser_to.go
new file mode 100644
index 000000000000..20c3e4f3c562
--- /dev/null
+++ b/internal/httpclient/model_continue_with_redirect_browser_to.go
@@ -0,0 +1,138 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// ContinueWithRedirectBrowserTo Indicates, that the UI flow could be continued by showing a recovery ui
+type ContinueWithRedirectBrowserTo struct {
+ // Action will always be `redirect_browser_to` redirect_browser_to ContinueWithActionRedirectBrowserToString
+ Action string `json:"action"`
+ // The URL to redirect the browser to
+ RedirectBrowserTo string `json:"redirect_browser_to"`
+}
+
+// NewContinueWithRedirectBrowserTo instantiates a new ContinueWithRedirectBrowserTo object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewContinueWithRedirectBrowserTo(action string, redirectBrowserTo string) *ContinueWithRedirectBrowserTo {
+ this := ContinueWithRedirectBrowserTo{}
+ this.Action = action
+ this.RedirectBrowserTo = redirectBrowserTo
+ return &this
+}
+
+// NewContinueWithRedirectBrowserToWithDefaults instantiates a new ContinueWithRedirectBrowserTo object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewContinueWithRedirectBrowserToWithDefaults() *ContinueWithRedirectBrowserTo {
+ this := ContinueWithRedirectBrowserTo{}
+ return &this
+}
+
+// GetAction returns the Action field value
+func (o *ContinueWithRedirectBrowserTo) GetAction() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Action
+}
+
+// GetActionOk returns a tuple with the Action field value
+// and a boolean to check if the value has been set.
+func (o *ContinueWithRedirectBrowserTo) GetActionOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Action, true
+}
+
+// SetAction sets field value
+func (o *ContinueWithRedirectBrowserTo) SetAction(v string) {
+ o.Action = v
+}
+
+// GetRedirectBrowserTo returns the RedirectBrowserTo field value
+func (o *ContinueWithRedirectBrowserTo) GetRedirectBrowserTo() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.RedirectBrowserTo
+}
+
+// GetRedirectBrowserToOk returns a tuple with the RedirectBrowserTo field value
+// and a boolean to check if the value has been set.
+func (o *ContinueWithRedirectBrowserTo) GetRedirectBrowserToOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.RedirectBrowserTo, true
+}
+
+// SetRedirectBrowserTo sets field value
+func (o *ContinueWithRedirectBrowserTo) SetRedirectBrowserTo(v string) {
+ o.RedirectBrowserTo = v
+}
+
+func (o ContinueWithRedirectBrowserTo) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if true {
+ toSerialize["action"] = o.Action
+ }
+ if true {
+ toSerialize["redirect_browser_to"] = o.RedirectBrowserTo
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableContinueWithRedirectBrowserTo struct {
+ value *ContinueWithRedirectBrowserTo
+ isSet bool
+}
+
+func (v NullableContinueWithRedirectBrowserTo) Get() *ContinueWithRedirectBrowserTo {
+ return v.value
+}
+
+func (v *NullableContinueWithRedirectBrowserTo) Set(val *ContinueWithRedirectBrowserTo) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableContinueWithRedirectBrowserTo) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableContinueWithRedirectBrowserTo) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableContinueWithRedirectBrowserTo(val *ContinueWithRedirectBrowserTo) *NullableContinueWithRedirectBrowserTo {
+ return &NullableContinueWithRedirectBrowserTo{value: val, isSet: true}
+}
+
+func (v NullableContinueWithRedirectBrowserTo) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableContinueWithRedirectBrowserTo) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_continue_with_set_ory_session_token.go b/internal/httpclient/model_continue_with_set_ory_session_token.go
new file mode 100644
index 000000000000..e091665d0d00
--- /dev/null
+++ b/internal/httpclient/model_continue_with_set_ory_session_token.go
@@ -0,0 +1,138 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// ContinueWithSetOrySessionToken Indicates that a session was issued, and the application should use this token for authenticated requests
+type ContinueWithSetOrySessionToken struct {
+ // Action will always be `set_ory_session_token` set_ory_session_token ContinueWithActionSetOrySessionTokenString
+ Action string `json:"action"`
+ // Token is the token of the session
+ OrySessionToken string `json:"ory_session_token"`
+}
+
+// NewContinueWithSetOrySessionToken instantiates a new ContinueWithSetOrySessionToken object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewContinueWithSetOrySessionToken(action string, orySessionToken string) *ContinueWithSetOrySessionToken {
+ this := ContinueWithSetOrySessionToken{}
+ this.Action = action
+ this.OrySessionToken = orySessionToken
+ return &this
+}
+
+// NewContinueWithSetOrySessionTokenWithDefaults instantiates a new ContinueWithSetOrySessionToken object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewContinueWithSetOrySessionTokenWithDefaults() *ContinueWithSetOrySessionToken {
+ this := ContinueWithSetOrySessionToken{}
+ return &this
+}
+
+// GetAction returns the Action field value
+func (o *ContinueWithSetOrySessionToken) GetAction() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Action
+}
+
+// GetActionOk returns a tuple with the Action field value
+// and a boolean to check if the value has been set.
+func (o *ContinueWithSetOrySessionToken) GetActionOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Action, true
+}
+
+// SetAction sets field value
+func (o *ContinueWithSetOrySessionToken) SetAction(v string) {
+ o.Action = v
+}
+
+// GetOrySessionToken returns the OrySessionToken field value
+func (o *ContinueWithSetOrySessionToken) GetOrySessionToken() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.OrySessionToken
+}
+
+// GetOrySessionTokenOk returns a tuple with the OrySessionToken field value
+// and a boolean to check if the value has been set.
+func (o *ContinueWithSetOrySessionToken) GetOrySessionTokenOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.OrySessionToken, true
+}
+
+// SetOrySessionToken sets field value
+func (o *ContinueWithSetOrySessionToken) SetOrySessionToken(v string) {
+ o.OrySessionToken = v
+}
+
+func (o ContinueWithSetOrySessionToken) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if true {
+ toSerialize["action"] = o.Action
+ }
+ if true {
+ toSerialize["ory_session_token"] = o.OrySessionToken
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableContinueWithSetOrySessionToken struct {
+ value *ContinueWithSetOrySessionToken
+ isSet bool
+}
+
+func (v NullableContinueWithSetOrySessionToken) Get() *ContinueWithSetOrySessionToken {
+ return v.value
+}
+
+func (v *NullableContinueWithSetOrySessionToken) Set(val *ContinueWithSetOrySessionToken) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableContinueWithSetOrySessionToken) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableContinueWithSetOrySessionToken) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableContinueWithSetOrySessionToken(val *ContinueWithSetOrySessionToken) *NullableContinueWithSetOrySessionToken {
+ return &NullableContinueWithSetOrySessionToken{value: val, isSet: true}
+}
+
+func (v NullableContinueWithSetOrySessionToken) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableContinueWithSetOrySessionToken) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_continue_with_settings_ui.go b/internal/httpclient/model_continue_with_settings_ui.go
new file mode 100644
index 000000000000..eb843d966c16
--- /dev/null
+++ b/internal/httpclient/model_continue_with_settings_ui.go
@@ -0,0 +1,137 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// ContinueWithSettingsUi Indicates, that the UI flow could be continued by showing a settings ui
+type ContinueWithSettingsUi struct {
+ // Action will always be `show_settings_ui` show_settings_ui ContinueWithActionShowSettingsUIString
+ Action string `json:"action"`
+ Flow ContinueWithSettingsUiFlow `json:"flow"`
+}
+
+// NewContinueWithSettingsUi instantiates a new ContinueWithSettingsUi object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewContinueWithSettingsUi(action string, flow ContinueWithSettingsUiFlow) *ContinueWithSettingsUi {
+ this := ContinueWithSettingsUi{}
+ this.Action = action
+ this.Flow = flow
+ return &this
+}
+
+// NewContinueWithSettingsUiWithDefaults instantiates a new ContinueWithSettingsUi object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewContinueWithSettingsUiWithDefaults() *ContinueWithSettingsUi {
+ this := ContinueWithSettingsUi{}
+ return &this
+}
+
+// GetAction returns the Action field value
+func (o *ContinueWithSettingsUi) GetAction() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Action
+}
+
+// GetActionOk returns a tuple with the Action field value
+// and a boolean to check if the value has been set.
+func (o *ContinueWithSettingsUi) GetActionOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Action, true
+}
+
+// SetAction sets field value
+func (o *ContinueWithSettingsUi) SetAction(v string) {
+ o.Action = v
+}
+
+// GetFlow returns the Flow field value
+func (o *ContinueWithSettingsUi) GetFlow() ContinueWithSettingsUiFlow {
+ if o == nil {
+ var ret ContinueWithSettingsUiFlow
+ return ret
+ }
+
+ return o.Flow
+}
+
+// GetFlowOk returns a tuple with the Flow field value
+// and a boolean to check if the value has been set.
+func (o *ContinueWithSettingsUi) GetFlowOk() (*ContinueWithSettingsUiFlow, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Flow, true
+}
+
+// SetFlow sets field value
+func (o *ContinueWithSettingsUi) SetFlow(v ContinueWithSettingsUiFlow) {
+ o.Flow = v
+}
+
+func (o ContinueWithSettingsUi) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if true {
+ toSerialize["action"] = o.Action
+ }
+ if true {
+ toSerialize["flow"] = o.Flow
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableContinueWithSettingsUi struct {
+ value *ContinueWithSettingsUi
+ isSet bool
+}
+
+func (v NullableContinueWithSettingsUi) Get() *ContinueWithSettingsUi {
+ return v.value
+}
+
+func (v *NullableContinueWithSettingsUi) Set(val *ContinueWithSettingsUi) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableContinueWithSettingsUi) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableContinueWithSettingsUi) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableContinueWithSettingsUi(val *ContinueWithSettingsUi) *NullableContinueWithSettingsUi {
+ return &NullableContinueWithSettingsUi{value: val, isSet: true}
+}
+
+func (v NullableContinueWithSettingsUi) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableContinueWithSettingsUi) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_continue_with_settings_ui_flow.go b/internal/httpclient/model_continue_with_settings_ui_flow.go
new file mode 100644
index 000000000000..d6e9b9441f99
--- /dev/null
+++ b/internal/httpclient/model_continue_with_settings_ui_flow.go
@@ -0,0 +1,145 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// ContinueWithSettingsUiFlow struct for ContinueWithSettingsUiFlow
+type ContinueWithSettingsUiFlow struct {
+ // The ID of the settings flow
+ Id string `json:"id"`
+ // The URL of the settings flow If this value is set, redirect the user's browser to this URL. This value is typically unset for native clients / API flows.
+ Url *string `json:"url,omitempty"`
+}
+
+// NewContinueWithSettingsUiFlow instantiates a new ContinueWithSettingsUiFlow object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewContinueWithSettingsUiFlow(id string) *ContinueWithSettingsUiFlow {
+ this := ContinueWithSettingsUiFlow{}
+ this.Id = id
+ return &this
+}
+
+// NewContinueWithSettingsUiFlowWithDefaults instantiates a new ContinueWithSettingsUiFlow object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewContinueWithSettingsUiFlowWithDefaults() *ContinueWithSettingsUiFlow {
+ this := ContinueWithSettingsUiFlow{}
+ return &this
+}
+
+// GetId returns the Id field value
+func (o *ContinueWithSettingsUiFlow) GetId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value
+// and a boolean to check if the value has been set.
+func (o *ContinueWithSettingsUiFlow) GetIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Id, true
+}
+
+// SetId sets field value
+func (o *ContinueWithSettingsUiFlow) SetId(v string) {
+ o.Id = v
+}
+
+// GetUrl returns the Url field value if set, zero value otherwise.
+func (o *ContinueWithSettingsUiFlow) GetUrl() string {
+ if o == nil || o.Url == nil {
+ var ret string
+ return ret
+ }
+ return *o.Url
+}
+
+// GetUrlOk returns a tuple with the Url field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ContinueWithSettingsUiFlow) GetUrlOk() (*string, bool) {
+ if o == nil || o.Url == nil {
+ return nil, false
+ }
+ return o.Url, true
+}
+
+// HasUrl returns a boolean if a field has been set.
+func (o *ContinueWithSettingsUiFlow) HasUrl() bool {
+ if o != nil && o.Url != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetUrl gets a reference to the given string and assigns it to the Url field.
+func (o *ContinueWithSettingsUiFlow) SetUrl(v string) {
+ o.Url = &v
+}
+
+func (o ContinueWithSettingsUiFlow) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if true {
+ toSerialize["id"] = o.Id
+ }
+ if o.Url != nil {
+ toSerialize["url"] = o.Url
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableContinueWithSettingsUiFlow struct {
+ value *ContinueWithSettingsUiFlow
+ isSet bool
+}
+
+func (v NullableContinueWithSettingsUiFlow) Get() *ContinueWithSettingsUiFlow {
+ return v.value
+}
+
+func (v *NullableContinueWithSettingsUiFlow) Set(val *ContinueWithSettingsUiFlow) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableContinueWithSettingsUiFlow) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableContinueWithSettingsUiFlow) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableContinueWithSettingsUiFlow(val *ContinueWithSettingsUiFlow) *NullableContinueWithSettingsUiFlow {
+ return &NullableContinueWithSettingsUiFlow{value: val, isSet: true}
+}
+
+func (v NullableContinueWithSettingsUiFlow) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableContinueWithSettingsUiFlow) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_continue_with_verification_ui.go b/internal/httpclient/model_continue_with_verification_ui.go
new file mode 100644
index 000000000000..38ca91116469
--- /dev/null
+++ b/internal/httpclient/model_continue_with_verification_ui.go
@@ -0,0 +1,137 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// ContinueWithVerificationUi Indicates, that the UI flow could be continued by showing a verification ui
+type ContinueWithVerificationUi struct {
+ // Action will always be `show_verification_ui` show_verification_ui ContinueWithActionShowVerificationUIString
+ Action string `json:"action"`
+ Flow ContinueWithVerificationUiFlow `json:"flow"`
+}
+
+// NewContinueWithVerificationUi instantiates a new ContinueWithVerificationUi object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewContinueWithVerificationUi(action string, flow ContinueWithVerificationUiFlow) *ContinueWithVerificationUi {
+ this := ContinueWithVerificationUi{}
+ this.Action = action
+ this.Flow = flow
+ return &this
+}
+
+// NewContinueWithVerificationUiWithDefaults instantiates a new ContinueWithVerificationUi object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewContinueWithVerificationUiWithDefaults() *ContinueWithVerificationUi {
+ this := ContinueWithVerificationUi{}
+ return &this
+}
+
+// GetAction returns the Action field value
+func (o *ContinueWithVerificationUi) GetAction() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Action
+}
+
+// GetActionOk returns a tuple with the Action field value
+// and a boolean to check if the value has been set.
+func (o *ContinueWithVerificationUi) GetActionOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Action, true
+}
+
+// SetAction sets field value
+func (o *ContinueWithVerificationUi) SetAction(v string) {
+ o.Action = v
+}
+
+// GetFlow returns the Flow field value
+func (o *ContinueWithVerificationUi) GetFlow() ContinueWithVerificationUiFlow {
+ if o == nil {
+ var ret ContinueWithVerificationUiFlow
+ return ret
+ }
+
+ return o.Flow
+}
+
+// GetFlowOk returns a tuple with the Flow field value
+// and a boolean to check if the value has been set.
+func (o *ContinueWithVerificationUi) GetFlowOk() (*ContinueWithVerificationUiFlow, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Flow, true
+}
+
+// SetFlow sets field value
+func (o *ContinueWithVerificationUi) SetFlow(v ContinueWithVerificationUiFlow) {
+ o.Flow = v
+}
+
+func (o ContinueWithVerificationUi) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if true {
+ toSerialize["action"] = o.Action
+ }
+ if true {
+ toSerialize["flow"] = o.Flow
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableContinueWithVerificationUi struct {
+ value *ContinueWithVerificationUi
+ isSet bool
+}
+
+func (v NullableContinueWithVerificationUi) Get() *ContinueWithVerificationUi {
+ return v.value
+}
+
+func (v *NullableContinueWithVerificationUi) Set(val *ContinueWithVerificationUi) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableContinueWithVerificationUi) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableContinueWithVerificationUi) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableContinueWithVerificationUi(val *ContinueWithVerificationUi) *NullableContinueWithVerificationUi {
+ return &NullableContinueWithVerificationUi{value: val, isSet: true}
+}
+
+func (v NullableContinueWithVerificationUi) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableContinueWithVerificationUi) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_continue_with_verification_ui_flow.go b/internal/httpclient/model_continue_with_verification_ui_flow.go
new file mode 100644
index 000000000000..3c73a0761339
--- /dev/null
+++ b/internal/httpclient/model_continue_with_verification_ui_flow.go
@@ -0,0 +1,175 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// ContinueWithVerificationUiFlow struct for ContinueWithVerificationUiFlow
+type ContinueWithVerificationUiFlow struct {
+ // The ID of the verification flow
+ Id string `json:"id"`
+ // The URL of the verification flow If this value is set, redirect the user's browser to this URL. This value is typically unset for native clients / API flows.
+ Url *string `json:"url,omitempty"`
+ // The address that should be verified in this flow
+ VerifiableAddress string `json:"verifiable_address"`
+}
+
+// NewContinueWithVerificationUiFlow instantiates a new ContinueWithVerificationUiFlow object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewContinueWithVerificationUiFlow(id string, verifiableAddress string) *ContinueWithVerificationUiFlow {
+ this := ContinueWithVerificationUiFlow{}
+ this.Id = id
+ this.VerifiableAddress = verifiableAddress
+ return &this
+}
+
+// NewContinueWithVerificationUiFlowWithDefaults instantiates a new ContinueWithVerificationUiFlow object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewContinueWithVerificationUiFlowWithDefaults() *ContinueWithVerificationUiFlow {
+ this := ContinueWithVerificationUiFlow{}
+ return &this
+}
+
+// GetId returns the Id field value
+func (o *ContinueWithVerificationUiFlow) GetId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value
+// and a boolean to check if the value has been set.
+func (o *ContinueWithVerificationUiFlow) GetIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Id, true
+}
+
+// SetId sets field value
+func (o *ContinueWithVerificationUiFlow) SetId(v string) {
+ o.Id = v
+}
+
+// GetUrl returns the Url field value if set, zero value otherwise.
+func (o *ContinueWithVerificationUiFlow) GetUrl() string {
+ if o == nil || o.Url == nil {
+ var ret string
+ return ret
+ }
+ return *o.Url
+}
+
+// GetUrlOk returns a tuple with the Url field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ContinueWithVerificationUiFlow) GetUrlOk() (*string, bool) {
+ if o == nil || o.Url == nil {
+ return nil, false
+ }
+ return o.Url, true
+}
+
+// HasUrl returns a boolean if a field has been set.
+func (o *ContinueWithVerificationUiFlow) HasUrl() bool {
+ if o != nil && o.Url != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetUrl gets a reference to the given string and assigns it to the Url field.
+func (o *ContinueWithVerificationUiFlow) SetUrl(v string) {
+ o.Url = &v
+}
+
+// GetVerifiableAddress returns the VerifiableAddress field value
+func (o *ContinueWithVerificationUiFlow) GetVerifiableAddress() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.VerifiableAddress
+}
+
+// GetVerifiableAddressOk returns a tuple with the VerifiableAddress field value
+// and a boolean to check if the value has been set.
+func (o *ContinueWithVerificationUiFlow) GetVerifiableAddressOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.VerifiableAddress, true
+}
+
+// SetVerifiableAddress sets field value
+func (o *ContinueWithVerificationUiFlow) SetVerifiableAddress(v string) {
+ o.VerifiableAddress = v
+}
+
+func (o ContinueWithVerificationUiFlow) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if true {
+ toSerialize["id"] = o.Id
+ }
+ if o.Url != nil {
+ toSerialize["url"] = o.Url
+ }
+ if true {
+ toSerialize["verifiable_address"] = o.VerifiableAddress
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableContinueWithVerificationUiFlow struct {
+ value *ContinueWithVerificationUiFlow
+ isSet bool
+}
+
+func (v NullableContinueWithVerificationUiFlow) Get() *ContinueWithVerificationUiFlow {
+ return v.value
+}
+
+func (v *NullableContinueWithVerificationUiFlow) Set(val *ContinueWithVerificationUiFlow) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableContinueWithVerificationUiFlow) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableContinueWithVerificationUiFlow) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableContinueWithVerificationUiFlow(val *ContinueWithVerificationUiFlow) *NullableContinueWithVerificationUiFlow {
+ return &NullableContinueWithVerificationUiFlow{value: val, isSet: true}
+}
+
+func (v NullableContinueWithVerificationUiFlow) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableContinueWithVerificationUiFlow) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_courier_message_status.go b/internal/httpclient/model_courier_message_status.go
new file mode 100644
index 000000000000..0ea66ef9de23
--- /dev/null
+++ b/internal/httpclient/model_courier_message_status.go
@@ -0,0 +1,86 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// CourierMessageStatus A Message's Status
+type CourierMessageStatus string
+
+// List of courierMessageStatus
+const (
+ COURIERMESSAGESTATUS_QUEUED CourierMessageStatus = "queued"
+ COURIERMESSAGESTATUS_SENT CourierMessageStatus = "sent"
+ COURIERMESSAGESTATUS_PROCESSING CourierMessageStatus = "processing"
+ COURIERMESSAGESTATUS_ABANDONED CourierMessageStatus = "abandoned"
+)
+
+func (v *CourierMessageStatus) UnmarshalJSON(src []byte) error {
+ var value string
+ err := json.Unmarshal(src, &value)
+ if err != nil {
+ return err
+ }
+ enumTypeValue := CourierMessageStatus(value)
+ for _, existing := range []CourierMessageStatus{"queued", "sent", "processing", "abandoned"} {
+ if existing == enumTypeValue {
+ *v = enumTypeValue
+ return nil
+ }
+ }
+
+ return fmt.Errorf("%+v is not a valid CourierMessageStatus", value)
+}
+
+// Ptr returns reference to courierMessageStatus value
+func (v CourierMessageStatus) Ptr() *CourierMessageStatus {
+ return &v
+}
+
+type NullableCourierMessageStatus struct {
+ value *CourierMessageStatus
+ isSet bool
+}
+
+func (v NullableCourierMessageStatus) Get() *CourierMessageStatus {
+ return v.value
+}
+
+func (v *NullableCourierMessageStatus) Set(val *CourierMessageStatus) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableCourierMessageStatus) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableCourierMessageStatus) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableCourierMessageStatus(val *CourierMessageStatus) *NullableCourierMessageStatus {
+ return &NullableCourierMessageStatus{value: val, isSet: true}
+}
+
+func (v NullableCourierMessageStatus) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableCourierMessageStatus) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_courier_message_type.go b/internal/httpclient/model_courier_message_type.go
new file mode 100644
index 000000000000..9b6811c116d5
--- /dev/null
+++ b/internal/httpclient/model_courier_message_type.go
@@ -0,0 +1,84 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// CourierMessageType It can either be `email` or `phone`
+type CourierMessageType string
+
+// List of courierMessageType
+const (
+ COURIERMESSAGETYPE_EMAIL CourierMessageType = "email"
+ COURIERMESSAGETYPE_PHONE CourierMessageType = "phone"
+)
+
+func (v *CourierMessageType) UnmarshalJSON(src []byte) error {
+ var value string
+ err := json.Unmarshal(src, &value)
+ if err != nil {
+ return err
+ }
+ enumTypeValue := CourierMessageType(value)
+ for _, existing := range []CourierMessageType{"email", "phone"} {
+ if existing == enumTypeValue {
+ *v = enumTypeValue
+ return nil
+ }
+ }
+
+ return fmt.Errorf("%+v is not a valid CourierMessageType", value)
+}
+
+// Ptr returns reference to courierMessageType value
+func (v CourierMessageType) Ptr() *CourierMessageType {
+ return &v
+}
+
+type NullableCourierMessageType struct {
+ value *CourierMessageType
+ isSet bool
+}
+
+func (v NullableCourierMessageType) Get() *CourierMessageType {
+ return v.value
+}
+
+func (v *NullableCourierMessageType) Set(val *CourierMessageType) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableCourierMessageType) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableCourierMessageType) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableCourierMessageType(val *CourierMessageType) *NullableCourierMessageType {
+ return &NullableCourierMessageType{value: val, isSet: true}
+}
+
+func (v NullableCourierMessageType) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableCourierMessageType) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_create_identity_body.go b/internal/httpclient/model_create_identity_body.go
new file mode 100644
index 000000000000..177317c62d2e
--- /dev/null
+++ b/internal/httpclient/model_create_identity_body.go
@@ -0,0 +1,361 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// CreateIdentityBody Create Identity Body
+type CreateIdentityBody struct {
+ Credentials *IdentityWithCredentials `json:"credentials,omitempty"`
+ // Store metadata about the user which is only accessible through admin APIs such as `GET /admin/identities/`.
+ MetadataAdmin interface{} `json:"metadata_admin,omitempty"`
+ // Store metadata about the identity which the identity itself can see when calling for example the session endpoint. Do not store sensitive information (e.g. credit score) about the identity in this field.
+ MetadataPublic interface{} `json:"metadata_public,omitempty"`
+ // RecoveryAddresses contains all the addresses that can be used to recover an identity. Use this structure to import recovery addresses for an identity. Please keep in mind that the address needs to be represented in the Identity Schema or this field will be overwritten on the next identity update.
+ RecoveryAddresses []RecoveryIdentityAddress `json:"recovery_addresses,omitempty"`
+ // SchemaID is the ID of the JSON Schema to be used for validating the identity's traits.
+ SchemaId string `json:"schema_id"`
+ // State is the identity's state. active StateActive inactive StateInactive
+ State *string `json:"state,omitempty"`
+ // Traits represent an identity's traits. The identity is able to create, modify, and delete traits in a self-service manner. The input will always be validated against the JSON Schema defined in `schema_url`.
+ Traits map[string]interface{} `json:"traits"`
+ // VerifiableAddresses contains all the addresses that can be verified by the user. Use this structure to import verified addresses for an identity. Please keep in mind that the address needs to be represented in the Identity Schema or this field will be overwritten on the next identity update.
+ VerifiableAddresses []VerifiableIdentityAddress `json:"verifiable_addresses,omitempty"`
+}
+
+// NewCreateIdentityBody instantiates a new CreateIdentityBody object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewCreateIdentityBody(schemaId string, traits map[string]interface{}) *CreateIdentityBody {
+ this := CreateIdentityBody{}
+ this.SchemaId = schemaId
+ this.Traits = traits
+ return &this
+}
+
+// NewCreateIdentityBodyWithDefaults instantiates a new CreateIdentityBody object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewCreateIdentityBodyWithDefaults() *CreateIdentityBody {
+ this := CreateIdentityBody{}
+ return &this
+}
+
+// GetCredentials returns the Credentials field value if set, zero value otherwise.
+func (o *CreateIdentityBody) GetCredentials() IdentityWithCredentials {
+ if o == nil || o.Credentials == nil {
+ var ret IdentityWithCredentials
+ return ret
+ }
+ return *o.Credentials
+}
+
+// GetCredentialsOk returns a tuple with the Credentials field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateIdentityBody) GetCredentialsOk() (*IdentityWithCredentials, bool) {
+ if o == nil || o.Credentials == nil {
+ return nil, false
+ }
+ return o.Credentials, true
+}
+
+// HasCredentials returns a boolean if a field has been set.
+func (o *CreateIdentityBody) HasCredentials() bool {
+ if o != nil && o.Credentials != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCredentials gets a reference to the given IdentityWithCredentials and assigns it to the Credentials field.
+func (o *CreateIdentityBody) SetCredentials(v IdentityWithCredentials) {
+ o.Credentials = &v
+}
+
+// GetMetadataAdmin returns the MetadataAdmin field value if set, zero value otherwise (both if not set or set to explicit null).
+func (o *CreateIdentityBody) GetMetadataAdmin() interface{} {
+ if o == nil {
+ var ret interface{}
+ return ret
+ }
+ return o.MetadataAdmin
+}
+
+// GetMetadataAdminOk returns a tuple with the MetadataAdmin field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+// NOTE: If the value is an explicit nil, `nil, true` will be returned
+func (o *CreateIdentityBody) GetMetadataAdminOk() (*interface{}, bool) {
+ if o == nil || o.MetadataAdmin == nil {
+ return nil, false
+ }
+ return &o.MetadataAdmin, true
+}
+
+// HasMetadataAdmin returns a boolean if a field has been set.
+func (o *CreateIdentityBody) HasMetadataAdmin() bool {
+ if o != nil && o.MetadataAdmin != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetMetadataAdmin gets a reference to the given interface{} and assigns it to the MetadataAdmin field.
+func (o *CreateIdentityBody) SetMetadataAdmin(v interface{}) {
+ o.MetadataAdmin = v
+}
+
+// GetMetadataPublic returns the MetadataPublic field value if set, zero value otherwise (both if not set or set to explicit null).
+func (o *CreateIdentityBody) GetMetadataPublic() interface{} {
+ if o == nil {
+ var ret interface{}
+ return ret
+ }
+ return o.MetadataPublic
+}
+
+// GetMetadataPublicOk returns a tuple with the MetadataPublic field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+// NOTE: If the value is an explicit nil, `nil, true` will be returned
+func (o *CreateIdentityBody) GetMetadataPublicOk() (*interface{}, bool) {
+ if o == nil || o.MetadataPublic == nil {
+ return nil, false
+ }
+ return &o.MetadataPublic, true
+}
+
+// HasMetadataPublic returns a boolean if a field has been set.
+func (o *CreateIdentityBody) HasMetadataPublic() bool {
+ if o != nil && o.MetadataPublic != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetMetadataPublic gets a reference to the given interface{} and assigns it to the MetadataPublic field.
+func (o *CreateIdentityBody) SetMetadataPublic(v interface{}) {
+ o.MetadataPublic = v
+}
+
+// GetRecoveryAddresses returns the RecoveryAddresses field value if set, zero value otherwise.
+func (o *CreateIdentityBody) GetRecoveryAddresses() []RecoveryIdentityAddress {
+ if o == nil || o.RecoveryAddresses == nil {
+ var ret []RecoveryIdentityAddress
+ return ret
+ }
+ return o.RecoveryAddresses
+}
+
+// GetRecoveryAddressesOk returns a tuple with the RecoveryAddresses field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateIdentityBody) GetRecoveryAddressesOk() ([]RecoveryIdentityAddress, bool) {
+ if o == nil || o.RecoveryAddresses == nil {
+ return nil, false
+ }
+ return o.RecoveryAddresses, true
+}
+
+// HasRecoveryAddresses returns a boolean if a field has been set.
+func (o *CreateIdentityBody) HasRecoveryAddresses() bool {
+ if o != nil && o.RecoveryAddresses != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetRecoveryAddresses gets a reference to the given []RecoveryIdentityAddress and assigns it to the RecoveryAddresses field.
+func (o *CreateIdentityBody) SetRecoveryAddresses(v []RecoveryIdentityAddress) {
+ o.RecoveryAddresses = v
+}
+
+// GetSchemaId returns the SchemaId field value
+func (o *CreateIdentityBody) GetSchemaId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.SchemaId
+}
+
+// GetSchemaIdOk returns a tuple with the SchemaId field value
+// and a boolean to check if the value has been set.
+func (o *CreateIdentityBody) GetSchemaIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.SchemaId, true
+}
+
+// SetSchemaId sets field value
+func (o *CreateIdentityBody) SetSchemaId(v string) {
+ o.SchemaId = v
+}
+
+// GetState returns the State field value if set, zero value otherwise.
+func (o *CreateIdentityBody) GetState() string {
+ if o == nil || o.State == nil {
+ var ret string
+ return ret
+ }
+ return *o.State
+}
+
+// GetStateOk returns a tuple with the State field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateIdentityBody) GetStateOk() (*string, bool) {
+ if o == nil || o.State == nil {
+ return nil, false
+ }
+ return o.State, true
+}
+
+// HasState returns a boolean if a field has been set.
+func (o *CreateIdentityBody) HasState() bool {
+ if o != nil && o.State != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetState gets a reference to the given string and assigns it to the State field.
+func (o *CreateIdentityBody) SetState(v string) {
+ o.State = &v
+}
+
+// GetTraits returns the Traits field value
+func (o *CreateIdentityBody) GetTraits() map[string]interface{} {
+ if o == nil {
+ var ret map[string]interface{}
+ return ret
+ }
+
+ return o.Traits
+}
+
+// GetTraitsOk returns a tuple with the Traits field value
+// and a boolean to check if the value has been set.
+func (o *CreateIdentityBody) GetTraitsOk() (map[string]interface{}, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return o.Traits, true
+}
+
+// SetTraits sets field value
+func (o *CreateIdentityBody) SetTraits(v map[string]interface{}) {
+ o.Traits = v
+}
+
+// GetVerifiableAddresses returns the VerifiableAddresses field value if set, zero value otherwise.
+func (o *CreateIdentityBody) GetVerifiableAddresses() []VerifiableIdentityAddress {
+ if o == nil || o.VerifiableAddresses == nil {
+ var ret []VerifiableIdentityAddress
+ return ret
+ }
+ return o.VerifiableAddresses
+}
+
+// GetVerifiableAddressesOk returns a tuple with the VerifiableAddresses field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateIdentityBody) GetVerifiableAddressesOk() ([]VerifiableIdentityAddress, bool) {
+ if o == nil || o.VerifiableAddresses == nil {
+ return nil, false
+ }
+ return o.VerifiableAddresses, true
+}
+
+// HasVerifiableAddresses returns a boolean if a field has been set.
+func (o *CreateIdentityBody) HasVerifiableAddresses() bool {
+ if o != nil && o.VerifiableAddresses != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetVerifiableAddresses gets a reference to the given []VerifiableIdentityAddress and assigns it to the VerifiableAddresses field.
+func (o *CreateIdentityBody) SetVerifiableAddresses(v []VerifiableIdentityAddress) {
+ o.VerifiableAddresses = v
+}
+
+func (o CreateIdentityBody) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Credentials != nil {
+ toSerialize["credentials"] = o.Credentials
+ }
+ if o.MetadataAdmin != nil {
+ toSerialize["metadata_admin"] = o.MetadataAdmin
+ }
+ if o.MetadataPublic != nil {
+ toSerialize["metadata_public"] = o.MetadataPublic
+ }
+ if o.RecoveryAddresses != nil {
+ toSerialize["recovery_addresses"] = o.RecoveryAddresses
+ }
+ if true {
+ toSerialize["schema_id"] = o.SchemaId
+ }
+ if o.State != nil {
+ toSerialize["state"] = o.State
+ }
+ if true {
+ toSerialize["traits"] = o.Traits
+ }
+ if o.VerifiableAddresses != nil {
+ toSerialize["verifiable_addresses"] = o.VerifiableAddresses
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableCreateIdentityBody struct {
+ value *CreateIdentityBody
+ isSet bool
+}
+
+func (v NullableCreateIdentityBody) Get() *CreateIdentityBody {
+ return v.value
+}
+
+func (v *NullableCreateIdentityBody) Set(val *CreateIdentityBody) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableCreateIdentityBody) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableCreateIdentityBody) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableCreateIdentityBody(val *CreateIdentityBody) *NullableCreateIdentityBody {
+ return &NullableCreateIdentityBody{value: val, isSet: true}
+}
+
+func (v NullableCreateIdentityBody) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableCreateIdentityBody) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_create_recovery_link_for_identity_body.go b/internal/httpclient/model_create_recovery_link_for_identity_body.go
new file mode 100644
index 000000000000..2db109d221bf
--- /dev/null
+++ b/internal/httpclient/model_create_recovery_link_for_identity_body.go
@@ -0,0 +1,145 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// CreateRecoveryLinkForIdentityBody Create Recovery Link for Identity Request Body
+type CreateRecoveryLinkForIdentityBody struct {
+ // Link Expires In The recovery link will expire after that amount of time has passed. Defaults to the configuration value of `selfservice.methods.code.config.lifespan`.
+ ExpiresIn *string `json:"expires_in,omitempty"`
+ // Identity to Recover The identity's ID you wish to recover.
+ IdentityId string `json:"identity_id"`
+}
+
+// NewCreateRecoveryLinkForIdentityBody instantiates a new CreateRecoveryLinkForIdentityBody object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewCreateRecoveryLinkForIdentityBody(identityId string) *CreateRecoveryLinkForIdentityBody {
+ this := CreateRecoveryLinkForIdentityBody{}
+ this.IdentityId = identityId
+ return &this
+}
+
+// NewCreateRecoveryLinkForIdentityBodyWithDefaults instantiates a new CreateRecoveryLinkForIdentityBody object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewCreateRecoveryLinkForIdentityBodyWithDefaults() *CreateRecoveryLinkForIdentityBody {
+ this := CreateRecoveryLinkForIdentityBody{}
+ return &this
+}
+
+// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise.
+func (o *CreateRecoveryLinkForIdentityBody) GetExpiresIn() string {
+ if o == nil || o.ExpiresIn == nil {
+ var ret string
+ return ret
+ }
+ return *o.ExpiresIn
+}
+
+// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateRecoveryLinkForIdentityBody) GetExpiresInOk() (*string, bool) {
+ if o == nil || o.ExpiresIn == nil {
+ return nil, false
+ }
+ return o.ExpiresIn, true
+}
+
+// HasExpiresIn returns a boolean if a field has been set.
+func (o *CreateRecoveryLinkForIdentityBody) HasExpiresIn() bool {
+ if o != nil && o.ExpiresIn != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetExpiresIn gets a reference to the given string and assigns it to the ExpiresIn field.
+func (o *CreateRecoveryLinkForIdentityBody) SetExpiresIn(v string) {
+ o.ExpiresIn = &v
+}
+
+// GetIdentityId returns the IdentityId field value
+func (o *CreateRecoveryLinkForIdentityBody) GetIdentityId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.IdentityId
+}
+
+// GetIdentityIdOk returns a tuple with the IdentityId field value
+// and a boolean to check if the value has been set.
+func (o *CreateRecoveryLinkForIdentityBody) GetIdentityIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.IdentityId, true
+}
+
+// SetIdentityId sets field value
+func (o *CreateRecoveryLinkForIdentityBody) SetIdentityId(v string) {
+ o.IdentityId = v
+}
+
+func (o CreateRecoveryLinkForIdentityBody) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.ExpiresIn != nil {
+ toSerialize["expires_in"] = o.ExpiresIn
+ }
+ if true {
+ toSerialize["identity_id"] = o.IdentityId
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableCreateRecoveryLinkForIdentityBody struct {
+ value *CreateRecoveryLinkForIdentityBody
+ isSet bool
+}
+
+func (v NullableCreateRecoveryLinkForIdentityBody) Get() *CreateRecoveryLinkForIdentityBody {
+ return v.value
+}
+
+func (v *NullableCreateRecoveryLinkForIdentityBody) Set(val *CreateRecoveryLinkForIdentityBody) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableCreateRecoveryLinkForIdentityBody) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableCreateRecoveryLinkForIdentityBody) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableCreateRecoveryLinkForIdentityBody(val *CreateRecoveryLinkForIdentityBody) *NullableCreateRecoveryLinkForIdentityBody {
+ return &NullableCreateRecoveryLinkForIdentityBody{value: val, isSet: true}
+}
+
+func (v NullableCreateRecoveryLinkForIdentityBody) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableCreateRecoveryLinkForIdentityBody) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_delete_my_sessions_count.go b/internal/httpclient/model_delete_my_sessions_count.go
new file mode 100644
index 000000000000..253834fbff63
--- /dev/null
+++ b/internal/httpclient/model_delete_my_sessions_count.go
@@ -0,0 +1,115 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// DeleteMySessionsCount Deleted Session Count
+type DeleteMySessionsCount struct {
+ // The number of sessions that were revoked.
+ Count *int64 `json:"count,omitempty"`
+}
+
+// NewDeleteMySessionsCount instantiates a new DeleteMySessionsCount object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewDeleteMySessionsCount() *DeleteMySessionsCount {
+ this := DeleteMySessionsCount{}
+ return &this
+}
+
+// NewDeleteMySessionsCountWithDefaults instantiates a new DeleteMySessionsCount object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewDeleteMySessionsCountWithDefaults() *DeleteMySessionsCount {
+ this := DeleteMySessionsCount{}
+ return &this
+}
+
+// GetCount returns the Count field value if set, zero value otherwise.
+func (o *DeleteMySessionsCount) GetCount() int64 {
+ if o == nil || o.Count == nil {
+ var ret int64
+ return ret
+ }
+ return *o.Count
+}
+
+// GetCountOk returns a tuple with the Count field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DeleteMySessionsCount) GetCountOk() (*int64, bool) {
+ if o == nil || o.Count == nil {
+ return nil, false
+ }
+ return o.Count, true
+}
+
+// HasCount returns a boolean if a field has been set.
+func (o *DeleteMySessionsCount) HasCount() bool {
+ if o != nil && o.Count != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCount gets a reference to the given int64 and assigns it to the Count field.
+func (o *DeleteMySessionsCount) SetCount(v int64) {
+ o.Count = &v
+}
+
+func (o DeleteMySessionsCount) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Count != nil {
+ toSerialize["count"] = o.Count
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableDeleteMySessionsCount struct {
+ value *DeleteMySessionsCount
+ isSet bool
+}
+
+func (v NullableDeleteMySessionsCount) Get() *DeleteMySessionsCount {
+ return v.value
+}
+
+func (v *NullableDeleteMySessionsCount) Set(val *DeleteMySessionsCount) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableDeleteMySessionsCount) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableDeleteMySessionsCount) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableDeleteMySessionsCount(val *DeleteMySessionsCount) *NullableDeleteMySessionsCount {
+ return &NullableDeleteMySessionsCount{value: val, isSet: true}
+}
+
+func (v NullableDeleteMySessionsCount) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableDeleteMySessionsCount) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_error_authenticator_assurance_level_not_satisfied.go b/internal/httpclient/model_error_authenticator_assurance_level_not_satisfied.go
new file mode 100644
index 000000000000..b7b29bea8b3a
--- /dev/null
+++ b/internal/httpclient/model_error_authenticator_assurance_level_not_satisfied.go
@@ -0,0 +1,151 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// ErrorAuthenticatorAssuranceLevelNotSatisfied struct for ErrorAuthenticatorAssuranceLevelNotSatisfied
+type ErrorAuthenticatorAssuranceLevelNotSatisfied struct {
+ Error *GenericError `json:"error,omitempty"`
+ // Points to where to redirect the user to next.
+ RedirectBrowserTo *string `json:"redirect_browser_to,omitempty"`
+}
+
+// NewErrorAuthenticatorAssuranceLevelNotSatisfied instantiates a new ErrorAuthenticatorAssuranceLevelNotSatisfied object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewErrorAuthenticatorAssuranceLevelNotSatisfied() *ErrorAuthenticatorAssuranceLevelNotSatisfied {
+ this := ErrorAuthenticatorAssuranceLevelNotSatisfied{}
+ return &this
+}
+
+// NewErrorAuthenticatorAssuranceLevelNotSatisfiedWithDefaults instantiates a new ErrorAuthenticatorAssuranceLevelNotSatisfied object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewErrorAuthenticatorAssuranceLevelNotSatisfiedWithDefaults() *ErrorAuthenticatorAssuranceLevelNotSatisfied {
+ this := ErrorAuthenticatorAssuranceLevelNotSatisfied{}
+ return &this
+}
+
+// GetError returns the Error field value if set, zero value otherwise.
+func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetError() GenericError {
+ if o == nil || o.Error == nil {
+ var ret GenericError
+ return ret
+ }
+ return *o.Error
+}
+
+// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetErrorOk() (*GenericError, bool) {
+ if o == nil || o.Error == nil {
+ return nil, false
+ }
+ return o.Error, true
+}
+
+// HasError returns a boolean if a field has been set.
+func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) HasError() bool {
+ if o != nil && o.Error != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetError gets a reference to the given GenericError and assigns it to the Error field.
+func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) SetError(v GenericError) {
+ o.Error = &v
+}
+
+// GetRedirectBrowserTo returns the RedirectBrowserTo field value if set, zero value otherwise.
+func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetRedirectBrowserTo() string {
+ if o == nil || o.RedirectBrowserTo == nil {
+ var ret string
+ return ret
+ }
+ return *o.RedirectBrowserTo
+}
+
+// GetRedirectBrowserToOk returns a tuple with the RedirectBrowserTo field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetRedirectBrowserToOk() (*string, bool) {
+ if o == nil || o.RedirectBrowserTo == nil {
+ return nil, false
+ }
+ return o.RedirectBrowserTo, true
+}
+
+// HasRedirectBrowserTo returns a boolean if a field has been set.
+func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) HasRedirectBrowserTo() bool {
+ if o != nil && o.RedirectBrowserTo != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetRedirectBrowserTo gets a reference to the given string and assigns it to the RedirectBrowserTo field.
+func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) SetRedirectBrowserTo(v string) {
+ o.RedirectBrowserTo = &v
+}
+
+func (o ErrorAuthenticatorAssuranceLevelNotSatisfied) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Error != nil {
+ toSerialize["error"] = o.Error
+ }
+ if o.RedirectBrowserTo != nil {
+ toSerialize["redirect_browser_to"] = o.RedirectBrowserTo
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableErrorAuthenticatorAssuranceLevelNotSatisfied struct {
+ value *ErrorAuthenticatorAssuranceLevelNotSatisfied
+ isSet bool
+}
+
+func (v NullableErrorAuthenticatorAssuranceLevelNotSatisfied) Get() *ErrorAuthenticatorAssuranceLevelNotSatisfied {
+ return v.value
+}
+
+func (v *NullableErrorAuthenticatorAssuranceLevelNotSatisfied) Set(val *ErrorAuthenticatorAssuranceLevelNotSatisfied) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableErrorAuthenticatorAssuranceLevelNotSatisfied) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableErrorAuthenticatorAssuranceLevelNotSatisfied) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableErrorAuthenticatorAssuranceLevelNotSatisfied(val *ErrorAuthenticatorAssuranceLevelNotSatisfied) *NullableErrorAuthenticatorAssuranceLevelNotSatisfied {
+ return &NullableErrorAuthenticatorAssuranceLevelNotSatisfied{value: val, isSet: true}
+}
+
+func (v NullableErrorAuthenticatorAssuranceLevelNotSatisfied) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableErrorAuthenticatorAssuranceLevelNotSatisfied) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_error_browser_location_change_required.go b/internal/httpclient/model_error_browser_location_change_required.go
new file mode 100644
index 000000000000..4fdf23795557
--- /dev/null
+++ b/internal/httpclient/model_error_browser_location_change_required.go
@@ -0,0 +1,151 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// ErrorBrowserLocationChangeRequired struct for ErrorBrowserLocationChangeRequired
+type ErrorBrowserLocationChangeRequired struct {
+ Error *ErrorGeneric `json:"error,omitempty"`
+ // Points to where to redirect the user to next.
+ RedirectBrowserTo *string `json:"redirect_browser_to,omitempty"`
+}
+
+// NewErrorBrowserLocationChangeRequired instantiates a new ErrorBrowserLocationChangeRequired object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewErrorBrowserLocationChangeRequired() *ErrorBrowserLocationChangeRequired {
+ this := ErrorBrowserLocationChangeRequired{}
+ return &this
+}
+
+// NewErrorBrowserLocationChangeRequiredWithDefaults instantiates a new ErrorBrowserLocationChangeRequired object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewErrorBrowserLocationChangeRequiredWithDefaults() *ErrorBrowserLocationChangeRequired {
+ this := ErrorBrowserLocationChangeRequired{}
+ return &this
+}
+
+// GetError returns the Error field value if set, zero value otherwise.
+func (o *ErrorBrowserLocationChangeRequired) GetError() ErrorGeneric {
+ if o == nil || o.Error == nil {
+ var ret ErrorGeneric
+ return ret
+ }
+ return *o.Error
+}
+
+// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ErrorBrowserLocationChangeRequired) GetErrorOk() (*ErrorGeneric, bool) {
+ if o == nil || o.Error == nil {
+ return nil, false
+ }
+ return o.Error, true
+}
+
+// HasError returns a boolean if a field has been set.
+func (o *ErrorBrowserLocationChangeRequired) HasError() bool {
+ if o != nil && o.Error != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetError gets a reference to the given ErrorGeneric and assigns it to the Error field.
+func (o *ErrorBrowserLocationChangeRequired) SetError(v ErrorGeneric) {
+ o.Error = &v
+}
+
+// GetRedirectBrowserTo returns the RedirectBrowserTo field value if set, zero value otherwise.
+func (o *ErrorBrowserLocationChangeRequired) GetRedirectBrowserTo() string {
+ if o == nil || o.RedirectBrowserTo == nil {
+ var ret string
+ return ret
+ }
+ return *o.RedirectBrowserTo
+}
+
+// GetRedirectBrowserToOk returns a tuple with the RedirectBrowserTo field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ErrorBrowserLocationChangeRequired) GetRedirectBrowserToOk() (*string, bool) {
+ if o == nil || o.RedirectBrowserTo == nil {
+ return nil, false
+ }
+ return o.RedirectBrowserTo, true
+}
+
+// HasRedirectBrowserTo returns a boolean if a field has been set.
+func (o *ErrorBrowserLocationChangeRequired) HasRedirectBrowserTo() bool {
+ if o != nil && o.RedirectBrowserTo != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetRedirectBrowserTo gets a reference to the given string and assigns it to the RedirectBrowserTo field.
+func (o *ErrorBrowserLocationChangeRequired) SetRedirectBrowserTo(v string) {
+ o.RedirectBrowserTo = &v
+}
+
+func (o ErrorBrowserLocationChangeRequired) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Error != nil {
+ toSerialize["error"] = o.Error
+ }
+ if o.RedirectBrowserTo != nil {
+ toSerialize["redirect_browser_to"] = o.RedirectBrowserTo
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableErrorBrowserLocationChangeRequired struct {
+ value *ErrorBrowserLocationChangeRequired
+ isSet bool
+}
+
+func (v NullableErrorBrowserLocationChangeRequired) Get() *ErrorBrowserLocationChangeRequired {
+ return v.value
+}
+
+func (v *NullableErrorBrowserLocationChangeRequired) Set(val *ErrorBrowserLocationChangeRequired) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableErrorBrowserLocationChangeRequired) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableErrorBrowserLocationChangeRequired) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableErrorBrowserLocationChangeRequired(val *ErrorBrowserLocationChangeRequired) *NullableErrorBrowserLocationChangeRequired {
+ return &NullableErrorBrowserLocationChangeRequired{value: val, isSet: true}
+}
+
+func (v NullableErrorBrowserLocationChangeRequired) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableErrorBrowserLocationChangeRequired) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_error_flow_replaced.go b/internal/httpclient/model_error_flow_replaced.go
new file mode 100644
index 000000000000..856423abc1ad
--- /dev/null
+++ b/internal/httpclient/model_error_flow_replaced.go
@@ -0,0 +1,151 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// ErrorFlowReplaced Is sent when a flow is replaced by a different flow of the same class
+type ErrorFlowReplaced struct {
+ Error *GenericError `json:"error,omitempty"`
+ // The flow ID that should be used for the new flow as it contains the correct messages.
+ UseFlowId *string `json:"use_flow_id,omitempty"`
+}
+
+// NewErrorFlowReplaced instantiates a new ErrorFlowReplaced object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewErrorFlowReplaced() *ErrorFlowReplaced {
+ this := ErrorFlowReplaced{}
+ return &this
+}
+
+// NewErrorFlowReplacedWithDefaults instantiates a new ErrorFlowReplaced object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewErrorFlowReplacedWithDefaults() *ErrorFlowReplaced {
+ this := ErrorFlowReplaced{}
+ return &this
+}
+
+// GetError returns the Error field value if set, zero value otherwise.
+func (o *ErrorFlowReplaced) GetError() GenericError {
+ if o == nil || o.Error == nil {
+ var ret GenericError
+ return ret
+ }
+ return *o.Error
+}
+
+// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ErrorFlowReplaced) GetErrorOk() (*GenericError, bool) {
+ if o == nil || o.Error == nil {
+ return nil, false
+ }
+ return o.Error, true
+}
+
+// HasError returns a boolean if a field has been set.
+func (o *ErrorFlowReplaced) HasError() bool {
+ if o != nil && o.Error != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetError gets a reference to the given GenericError and assigns it to the Error field.
+func (o *ErrorFlowReplaced) SetError(v GenericError) {
+ o.Error = &v
+}
+
+// GetUseFlowId returns the UseFlowId field value if set, zero value otherwise.
+func (o *ErrorFlowReplaced) GetUseFlowId() string {
+ if o == nil || o.UseFlowId == nil {
+ var ret string
+ return ret
+ }
+ return *o.UseFlowId
+}
+
+// GetUseFlowIdOk returns a tuple with the UseFlowId field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ErrorFlowReplaced) GetUseFlowIdOk() (*string, bool) {
+ if o == nil || o.UseFlowId == nil {
+ return nil, false
+ }
+ return o.UseFlowId, true
+}
+
+// HasUseFlowId returns a boolean if a field has been set.
+func (o *ErrorFlowReplaced) HasUseFlowId() bool {
+ if o != nil && o.UseFlowId != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetUseFlowId gets a reference to the given string and assigns it to the UseFlowId field.
+func (o *ErrorFlowReplaced) SetUseFlowId(v string) {
+ o.UseFlowId = &v
+}
+
+func (o ErrorFlowReplaced) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Error != nil {
+ toSerialize["error"] = o.Error
+ }
+ if o.UseFlowId != nil {
+ toSerialize["use_flow_id"] = o.UseFlowId
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableErrorFlowReplaced struct {
+ value *ErrorFlowReplaced
+ isSet bool
+}
+
+func (v NullableErrorFlowReplaced) Get() *ErrorFlowReplaced {
+ return v.value
+}
+
+func (v *NullableErrorFlowReplaced) Set(val *ErrorFlowReplaced) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableErrorFlowReplaced) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableErrorFlowReplaced) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableErrorFlowReplaced(val *ErrorFlowReplaced) *NullableErrorFlowReplaced {
+ return &NullableErrorFlowReplaced{value: val, isSet: true}
+}
+
+func (v NullableErrorFlowReplaced) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableErrorFlowReplaced) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_error_generic.go b/internal/httpclient/model_error_generic.go
new file mode 100644
index 000000000000..f58c90015a42
--- /dev/null
+++ b/internal/httpclient/model_error_generic.go
@@ -0,0 +1,107 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// ErrorGeneric The standard Ory JSON API error format.
+type ErrorGeneric struct {
+ Error GenericError `json:"error"`
+}
+
+// NewErrorGeneric instantiates a new ErrorGeneric object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewErrorGeneric(error_ GenericError) *ErrorGeneric {
+ this := ErrorGeneric{}
+ this.Error = error_
+ return &this
+}
+
+// NewErrorGenericWithDefaults instantiates a new ErrorGeneric object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewErrorGenericWithDefaults() *ErrorGeneric {
+ this := ErrorGeneric{}
+ return &this
+}
+
+// GetError returns the Error field value
+func (o *ErrorGeneric) GetError() GenericError {
+ if o == nil {
+ var ret GenericError
+ return ret
+ }
+
+ return o.Error
+}
+
+// GetErrorOk returns a tuple with the Error field value
+// and a boolean to check if the value has been set.
+func (o *ErrorGeneric) GetErrorOk() (*GenericError, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Error, true
+}
+
+// SetError sets field value
+func (o *ErrorGeneric) SetError(v GenericError) {
+ o.Error = v
+}
+
+func (o ErrorGeneric) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if true {
+ toSerialize["error"] = o.Error
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableErrorGeneric struct {
+ value *ErrorGeneric
+ isSet bool
+}
+
+func (v NullableErrorGeneric) Get() *ErrorGeneric {
+ return v.value
+}
+
+func (v *NullableErrorGeneric) Set(val *ErrorGeneric) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableErrorGeneric) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableErrorGeneric) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableErrorGeneric(val *ErrorGeneric) *NullableErrorGeneric {
+ return &NullableErrorGeneric{value: val, isSet: true}
+}
+
+func (v NullableErrorGeneric) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableErrorGeneric) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_flow_error.go b/internal/httpclient/model_flow_error.go
new file mode 100644
index 000000000000..e0e8e7ab37c5
--- /dev/null
+++ b/internal/httpclient/model_flow_error.go
@@ -0,0 +1,219 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "time"
+)
+
+// FlowError struct for FlowError
+type FlowError struct {
+ // CreatedAt is a helper struct field for gobuffalo.pop.
+ CreatedAt *time.Time `json:"created_at,omitempty"`
+ Error map[string]interface{} `json:"error,omitempty"`
+ // ID of the error container.
+ Id string `json:"id"`
+ // UpdatedAt is a helper struct field for gobuffalo.pop.
+ UpdatedAt *time.Time `json:"updated_at,omitempty"`
+}
+
+// NewFlowError instantiates a new FlowError object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewFlowError(id string) *FlowError {
+ this := FlowError{}
+ this.Id = id
+ return &this
+}
+
+// NewFlowErrorWithDefaults instantiates a new FlowError object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewFlowErrorWithDefaults() *FlowError {
+ this := FlowError{}
+ return &this
+}
+
+// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
+func (o *FlowError) GetCreatedAt() time.Time {
+ if o == nil || o.CreatedAt == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.CreatedAt
+}
+
+// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *FlowError) GetCreatedAtOk() (*time.Time, bool) {
+ if o == nil || o.CreatedAt == nil {
+ return nil, false
+ }
+ return o.CreatedAt, true
+}
+
+// HasCreatedAt returns a boolean if a field has been set.
+func (o *FlowError) HasCreatedAt() bool {
+ if o != nil && o.CreatedAt != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
+func (o *FlowError) SetCreatedAt(v time.Time) {
+ o.CreatedAt = &v
+}
+
+// GetError returns the Error field value if set, zero value otherwise.
+func (o *FlowError) GetError() map[string]interface{} {
+ if o == nil || o.Error == nil {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.Error
+}
+
+// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *FlowError) GetErrorOk() (map[string]interface{}, bool) {
+ if o == nil || o.Error == nil {
+ return nil, false
+ }
+ return o.Error, true
+}
+
+// HasError returns a boolean if a field has been set.
+func (o *FlowError) HasError() bool {
+ if o != nil && o.Error != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetError gets a reference to the given map[string]interface{} and assigns it to the Error field.
+func (o *FlowError) SetError(v map[string]interface{}) {
+ o.Error = v
+}
+
+// GetId returns the Id field value
+func (o *FlowError) GetId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value
+// and a boolean to check if the value has been set.
+func (o *FlowError) GetIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Id, true
+}
+
+// SetId sets field value
+func (o *FlowError) SetId(v string) {
+ o.Id = v
+}
+
+// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
+func (o *FlowError) GetUpdatedAt() time.Time {
+ if o == nil || o.UpdatedAt == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.UpdatedAt
+}
+
+// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *FlowError) GetUpdatedAtOk() (*time.Time, bool) {
+ if o == nil || o.UpdatedAt == nil {
+ return nil, false
+ }
+ return o.UpdatedAt, true
+}
+
+// HasUpdatedAt returns a boolean if a field has been set.
+func (o *FlowError) HasUpdatedAt() bool {
+ if o != nil && o.UpdatedAt != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
+func (o *FlowError) SetUpdatedAt(v time.Time) {
+ o.UpdatedAt = &v
+}
+
+func (o FlowError) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.CreatedAt != nil {
+ toSerialize["created_at"] = o.CreatedAt
+ }
+ if o.Error != nil {
+ toSerialize["error"] = o.Error
+ }
+ if true {
+ toSerialize["id"] = o.Id
+ }
+ if o.UpdatedAt != nil {
+ toSerialize["updated_at"] = o.UpdatedAt
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableFlowError struct {
+ value *FlowError
+ isSet bool
+}
+
+func (v NullableFlowError) Get() *FlowError {
+ return v.value
+}
+
+func (v *NullableFlowError) Set(val *FlowError) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableFlowError) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableFlowError) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableFlowError(val *FlowError) *NullableFlowError {
+ return &NullableFlowError{value: val, isSet: true}
+}
+
+func (v NullableFlowError) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableFlowError) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_generic_error.go b/internal/httpclient/model_generic_error.go
new file mode 100644
index 000000000000..fb93065ad37a
--- /dev/null
+++ b/internal/httpclient/model_generic_error.go
@@ -0,0 +1,367 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// GenericError struct for GenericError
+type GenericError struct {
+ // The status code
+ Code *int64 `json:"code,omitempty"`
+ // Debug information This field is often not exposed to protect against leaking sensitive information.
+ Debug *string `json:"debug,omitempty"`
+ // Further error details
+ Details map[string]interface{} `json:"details,omitempty"`
+ // The error ID Useful when trying to identify various errors in application logic.
+ Id *string `json:"id,omitempty"`
+ // Error message The error's message.
+ Message string `json:"message"`
+ // A human-readable reason for the error
+ Reason *string `json:"reason,omitempty"`
+ // The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID.
+ Request *string `json:"request,omitempty"`
+ // The status description
+ Status *string `json:"status,omitempty"`
+}
+
+// NewGenericError instantiates a new GenericError object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewGenericError(message string) *GenericError {
+ this := GenericError{}
+ this.Message = message
+ return &this
+}
+
+// NewGenericErrorWithDefaults instantiates a new GenericError object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewGenericErrorWithDefaults() *GenericError {
+ this := GenericError{}
+ return &this
+}
+
+// GetCode returns the Code field value if set, zero value otherwise.
+func (o *GenericError) GetCode() int64 {
+ if o == nil || o.Code == nil {
+ var ret int64
+ return ret
+ }
+ return *o.Code
+}
+
+// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GenericError) GetCodeOk() (*int64, bool) {
+ if o == nil || o.Code == nil {
+ return nil, false
+ }
+ return o.Code, true
+}
+
+// HasCode returns a boolean if a field has been set.
+func (o *GenericError) HasCode() bool {
+ if o != nil && o.Code != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCode gets a reference to the given int64 and assigns it to the Code field.
+func (o *GenericError) SetCode(v int64) {
+ o.Code = &v
+}
+
+// GetDebug returns the Debug field value if set, zero value otherwise.
+func (o *GenericError) GetDebug() string {
+ if o == nil || o.Debug == nil {
+ var ret string
+ return ret
+ }
+ return *o.Debug
+}
+
+// GetDebugOk returns a tuple with the Debug field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GenericError) GetDebugOk() (*string, bool) {
+ if o == nil || o.Debug == nil {
+ return nil, false
+ }
+ return o.Debug, true
+}
+
+// HasDebug returns a boolean if a field has been set.
+func (o *GenericError) HasDebug() bool {
+ if o != nil && o.Debug != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetDebug gets a reference to the given string and assigns it to the Debug field.
+func (o *GenericError) SetDebug(v string) {
+ o.Debug = &v
+}
+
+// GetDetails returns the Details field value if set, zero value otherwise.
+func (o *GenericError) GetDetails() map[string]interface{} {
+ if o == nil || o.Details == nil {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.Details
+}
+
+// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GenericError) GetDetailsOk() (map[string]interface{}, bool) {
+ if o == nil || o.Details == nil {
+ return nil, false
+ }
+ return o.Details, true
+}
+
+// HasDetails returns a boolean if a field has been set.
+func (o *GenericError) HasDetails() bool {
+ if o != nil && o.Details != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetDetails gets a reference to the given map[string]interface{} and assigns it to the Details field.
+func (o *GenericError) SetDetails(v map[string]interface{}) {
+ o.Details = v
+}
+
+// GetId returns the Id field value if set, zero value otherwise.
+func (o *GenericError) GetId() string {
+ if o == nil || o.Id == nil {
+ var ret string
+ return ret
+ }
+ return *o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GenericError) GetIdOk() (*string, bool) {
+ if o == nil || o.Id == nil {
+ return nil, false
+ }
+ return o.Id, true
+}
+
+// HasId returns a boolean if a field has been set.
+func (o *GenericError) HasId() bool {
+ if o != nil && o.Id != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetId gets a reference to the given string and assigns it to the Id field.
+func (o *GenericError) SetId(v string) {
+ o.Id = &v
+}
+
+// GetMessage returns the Message field value
+func (o *GenericError) GetMessage() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Message
+}
+
+// GetMessageOk returns a tuple with the Message field value
+// and a boolean to check if the value has been set.
+func (o *GenericError) GetMessageOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Message, true
+}
+
+// SetMessage sets field value
+func (o *GenericError) SetMessage(v string) {
+ o.Message = v
+}
+
+// GetReason returns the Reason field value if set, zero value otherwise.
+func (o *GenericError) GetReason() string {
+ if o == nil || o.Reason == nil {
+ var ret string
+ return ret
+ }
+ return *o.Reason
+}
+
+// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GenericError) GetReasonOk() (*string, bool) {
+ if o == nil || o.Reason == nil {
+ return nil, false
+ }
+ return o.Reason, true
+}
+
+// HasReason returns a boolean if a field has been set.
+func (o *GenericError) HasReason() bool {
+ if o != nil && o.Reason != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetReason gets a reference to the given string and assigns it to the Reason field.
+func (o *GenericError) SetReason(v string) {
+ o.Reason = &v
+}
+
+// GetRequest returns the Request field value if set, zero value otherwise.
+func (o *GenericError) GetRequest() string {
+ if o == nil || o.Request == nil {
+ var ret string
+ return ret
+ }
+ return *o.Request
+}
+
+// GetRequestOk returns a tuple with the Request field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GenericError) GetRequestOk() (*string, bool) {
+ if o == nil || o.Request == nil {
+ return nil, false
+ }
+ return o.Request, true
+}
+
+// HasRequest returns a boolean if a field has been set.
+func (o *GenericError) HasRequest() bool {
+ if o != nil && o.Request != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetRequest gets a reference to the given string and assigns it to the Request field.
+func (o *GenericError) SetRequest(v string) {
+ o.Request = &v
+}
+
+// GetStatus returns the Status field value if set, zero value otherwise.
+func (o *GenericError) GetStatus() string {
+ if o == nil || o.Status == nil {
+ var ret string
+ return ret
+ }
+ return *o.Status
+}
+
+// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GenericError) GetStatusOk() (*string, bool) {
+ if o == nil || o.Status == nil {
+ return nil, false
+ }
+ return o.Status, true
+}
+
+// HasStatus returns a boolean if a field has been set.
+func (o *GenericError) HasStatus() bool {
+ if o != nil && o.Status != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetStatus gets a reference to the given string and assigns it to the Status field.
+func (o *GenericError) SetStatus(v string) {
+ o.Status = &v
+}
+
+func (o GenericError) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Code != nil {
+ toSerialize["code"] = o.Code
+ }
+ if o.Debug != nil {
+ toSerialize["debug"] = o.Debug
+ }
+ if o.Details != nil {
+ toSerialize["details"] = o.Details
+ }
+ if o.Id != nil {
+ toSerialize["id"] = o.Id
+ }
+ if true {
+ toSerialize["message"] = o.Message
+ }
+ if o.Reason != nil {
+ toSerialize["reason"] = o.Reason
+ }
+ if o.Request != nil {
+ toSerialize["request"] = o.Request
+ }
+ if o.Status != nil {
+ toSerialize["status"] = o.Status
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableGenericError struct {
+ value *GenericError
+ isSet bool
+}
+
+func (v NullableGenericError) Get() *GenericError {
+ return v.value
+}
+
+func (v *NullableGenericError) Set(val *GenericError) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableGenericError) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableGenericError) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableGenericError(val *GenericError) *NullableGenericError {
+ return &NullableGenericError{value: val, isSet: true}
+}
+
+func (v NullableGenericError) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableGenericError) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_get_version_200_response.go b/internal/httpclient/model_get_version_200_response.go
new file mode 100644
index 000000000000..7dc519c5fd9f
--- /dev/null
+++ b/internal/httpclient/model_get_version_200_response.go
@@ -0,0 +1,108 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// GetVersion200Response struct for GetVersion200Response
+type GetVersion200Response struct {
+ // The version of Ory Kratos.
+ Version string `json:"version"`
+}
+
+// NewGetVersion200Response instantiates a new GetVersion200Response object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewGetVersion200Response(version string) *GetVersion200Response {
+ this := GetVersion200Response{}
+ this.Version = version
+ return &this
+}
+
+// NewGetVersion200ResponseWithDefaults instantiates a new GetVersion200Response object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewGetVersion200ResponseWithDefaults() *GetVersion200Response {
+ this := GetVersion200Response{}
+ return &this
+}
+
+// GetVersion returns the Version field value
+func (o *GetVersion200Response) GetVersion() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Version
+}
+
+// GetVersionOk returns a tuple with the Version field value
+// and a boolean to check if the value has been set.
+func (o *GetVersion200Response) GetVersionOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Version, true
+}
+
+// SetVersion sets field value
+func (o *GetVersion200Response) SetVersion(v string) {
+ o.Version = v
+}
+
+func (o GetVersion200Response) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if true {
+ toSerialize["version"] = o.Version
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableGetVersion200Response struct {
+ value *GetVersion200Response
+ isSet bool
+}
+
+func (v NullableGetVersion200Response) Get() *GetVersion200Response {
+ return v.value
+}
+
+func (v *NullableGetVersion200Response) Set(val *GetVersion200Response) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableGetVersion200Response) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableGetVersion200Response) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableGetVersion200Response(val *GetVersion200Response) *NullableGetVersion200Response {
+ return &NullableGetVersion200Response{value: val, isSet: true}
+}
+
+func (v NullableGetVersion200Response) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableGetVersion200Response) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_health_not_ready_status.go b/internal/httpclient/model_health_not_ready_status.go
new file mode 100644
index 000000000000..5ffd294a39e3
--- /dev/null
+++ b/internal/httpclient/model_health_not_ready_status.go
@@ -0,0 +1,115 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// HealthNotReadyStatus struct for HealthNotReadyStatus
+type HealthNotReadyStatus struct {
+ // Errors contains a list of errors that caused the not ready status.
+ Errors *map[string]string `json:"errors,omitempty"`
+}
+
+// NewHealthNotReadyStatus instantiates a new HealthNotReadyStatus object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewHealthNotReadyStatus() *HealthNotReadyStatus {
+ this := HealthNotReadyStatus{}
+ return &this
+}
+
+// NewHealthNotReadyStatusWithDefaults instantiates a new HealthNotReadyStatus object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewHealthNotReadyStatusWithDefaults() *HealthNotReadyStatus {
+ this := HealthNotReadyStatus{}
+ return &this
+}
+
+// GetErrors returns the Errors field value if set, zero value otherwise.
+func (o *HealthNotReadyStatus) GetErrors() map[string]string {
+ if o == nil || o.Errors == nil {
+ var ret map[string]string
+ return ret
+ }
+ return *o.Errors
+}
+
+// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *HealthNotReadyStatus) GetErrorsOk() (*map[string]string, bool) {
+ if o == nil || o.Errors == nil {
+ return nil, false
+ }
+ return o.Errors, true
+}
+
+// HasErrors returns a boolean if a field has been set.
+func (o *HealthNotReadyStatus) HasErrors() bool {
+ if o != nil && o.Errors != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetErrors gets a reference to the given map[string]string and assigns it to the Errors field.
+func (o *HealthNotReadyStatus) SetErrors(v map[string]string) {
+ o.Errors = &v
+}
+
+func (o HealthNotReadyStatus) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Errors != nil {
+ toSerialize["errors"] = o.Errors
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableHealthNotReadyStatus struct {
+ value *HealthNotReadyStatus
+ isSet bool
+}
+
+func (v NullableHealthNotReadyStatus) Get() *HealthNotReadyStatus {
+ return v.value
+}
+
+func (v *NullableHealthNotReadyStatus) Set(val *HealthNotReadyStatus) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableHealthNotReadyStatus) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableHealthNotReadyStatus) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableHealthNotReadyStatus(val *HealthNotReadyStatus) *NullableHealthNotReadyStatus {
+ return &NullableHealthNotReadyStatus{value: val, isSet: true}
+}
+
+func (v NullableHealthNotReadyStatus) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableHealthNotReadyStatus) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_health_status.go b/internal/httpclient/model_health_status.go
new file mode 100644
index 000000000000..8f7cd48ce896
--- /dev/null
+++ b/internal/httpclient/model_health_status.go
@@ -0,0 +1,115 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// HealthStatus struct for HealthStatus
+type HealthStatus struct {
+ // Status always contains \"ok\".
+ Status *string `json:"status,omitempty"`
+}
+
+// NewHealthStatus instantiates a new HealthStatus object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewHealthStatus() *HealthStatus {
+ this := HealthStatus{}
+ return &this
+}
+
+// NewHealthStatusWithDefaults instantiates a new HealthStatus object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewHealthStatusWithDefaults() *HealthStatus {
+ this := HealthStatus{}
+ return &this
+}
+
+// GetStatus returns the Status field value if set, zero value otherwise.
+func (o *HealthStatus) GetStatus() string {
+ if o == nil || o.Status == nil {
+ var ret string
+ return ret
+ }
+ return *o.Status
+}
+
+// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *HealthStatus) GetStatusOk() (*string, bool) {
+ if o == nil || o.Status == nil {
+ return nil, false
+ }
+ return o.Status, true
+}
+
+// HasStatus returns a boolean if a field has been set.
+func (o *HealthStatus) HasStatus() bool {
+ if o != nil && o.Status != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetStatus gets a reference to the given string and assigns it to the Status field.
+func (o *HealthStatus) SetStatus(v string) {
+ o.Status = &v
+}
+
+func (o HealthStatus) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Status != nil {
+ toSerialize["status"] = o.Status
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableHealthStatus struct {
+ value *HealthStatus
+ isSet bool
+}
+
+func (v NullableHealthStatus) Get() *HealthStatus {
+ return v.value
+}
+
+func (v *NullableHealthStatus) Set(val *HealthStatus) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableHealthStatus) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableHealthStatus) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableHealthStatus(val *HealthStatus) *NullableHealthStatus {
+ return &NullableHealthStatus{value: val, isSet: true}
+}
+
+func (v NullableHealthStatus) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableHealthStatus) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_identity.go b/internal/httpclient/model_identity.go
new file mode 100644
index 000000000000..cd939965877d
--- /dev/null
+++ b/internal/httpclient/model_identity.go
@@ -0,0 +1,582 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "time"
+)
+
+// Identity An [identity](https://www.ory.sh/docs/kratos/concepts/identity-user-model) represents a (human) user in Ory.
+type Identity struct {
+ // CreatedAt is a helper struct field for gobuffalo.pop.
+ CreatedAt *time.Time `json:"created_at,omitempty"`
+ // Credentials represents all credentials that can be used for authenticating this identity.
+ Credentials *map[string]IdentityCredentials `json:"credentials,omitempty"`
+ // ID is the identity's unique identifier. The Identity ID can not be changed and can not be chosen. This ensures future compatibility and optimization for distributed stores such as CockroachDB.
+ Id string `json:"id"`
+ // NullJSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger and is NULLable-
+ MetadataAdmin interface{} `json:"metadata_admin,omitempty"`
+ // NullJSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger and is NULLable-
+ MetadataPublic interface{} `json:"metadata_public,omitempty"`
+ OrganizationId NullableString `json:"organization_id,omitempty"`
+ // RecoveryAddresses contains all the addresses that can be used to recover an identity.
+ RecoveryAddresses []RecoveryIdentityAddress `json:"recovery_addresses,omitempty"`
+ // SchemaID is the ID of the JSON Schema to be used for validating the identity's traits.
+ SchemaId string `json:"schema_id"`
+ // SchemaURL is the URL of the endpoint where the identity's traits schema can be fetched from. format: url
+ SchemaUrl string `json:"schema_url"`
+ // State is the identity's state. This value has currently no effect. active StateActive inactive StateInactive
+ State *string `json:"state,omitempty"`
+ StateChangedAt *time.Time `json:"state_changed_at,omitempty"`
+ // Traits represent an identity's traits. The identity is able to create, modify, and delete traits in a self-service manner. The input will always be validated against the JSON Schema defined in `schema_url`.
+ Traits interface{} `json:"traits"`
+ // UpdatedAt is a helper struct field for gobuffalo.pop.
+ UpdatedAt *time.Time `json:"updated_at,omitempty"`
+ // VerifiableAddresses contains all the addresses that can be verified by the user.
+ VerifiableAddresses []VerifiableIdentityAddress `json:"verifiable_addresses,omitempty"`
+}
+
+// NewIdentity instantiates a new Identity object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewIdentity(id string, schemaId string, schemaUrl string, traits interface{}) *Identity {
+ this := Identity{}
+ this.Id = id
+ this.SchemaId = schemaId
+ this.SchemaUrl = schemaUrl
+ this.Traits = traits
+ return &this
+}
+
+// NewIdentityWithDefaults instantiates a new Identity object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewIdentityWithDefaults() *Identity {
+ this := Identity{}
+ return &this
+}
+
+// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
+func (o *Identity) GetCreatedAt() time.Time {
+ if o == nil || o.CreatedAt == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.CreatedAt
+}
+
+// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Identity) GetCreatedAtOk() (*time.Time, bool) {
+ if o == nil || o.CreatedAt == nil {
+ return nil, false
+ }
+ return o.CreatedAt, true
+}
+
+// HasCreatedAt returns a boolean if a field has been set.
+func (o *Identity) HasCreatedAt() bool {
+ if o != nil && o.CreatedAt != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
+func (o *Identity) SetCreatedAt(v time.Time) {
+ o.CreatedAt = &v
+}
+
+// GetCredentials returns the Credentials field value if set, zero value otherwise.
+func (o *Identity) GetCredentials() map[string]IdentityCredentials {
+ if o == nil || o.Credentials == nil {
+ var ret map[string]IdentityCredentials
+ return ret
+ }
+ return *o.Credentials
+}
+
+// GetCredentialsOk returns a tuple with the Credentials field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Identity) GetCredentialsOk() (*map[string]IdentityCredentials, bool) {
+ if o == nil || o.Credentials == nil {
+ return nil, false
+ }
+ return o.Credentials, true
+}
+
+// HasCredentials returns a boolean if a field has been set.
+func (o *Identity) HasCredentials() bool {
+ if o != nil && o.Credentials != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCredentials gets a reference to the given map[string]IdentityCredentials and assigns it to the Credentials field.
+func (o *Identity) SetCredentials(v map[string]IdentityCredentials) {
+ o.Credentials = &v
+}
+
+// GetId returns the Id field value
+func (o *Identity) GetId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value
+// and a boolean to check if the value has been set.
+func (o *Identity) GetIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Id, true
+}
+
+// SetId sets field value
+func (o *Identity) SetId(v string) {
+ o.Id = v
+}
+
+// GetMetadataAdmin returns the MetadataAdmin field value if set, zero value otherwise (both if not set or set to explicit null).
+func (o *Identity) GetMetadataAdmin() interface{} {
+ if o == nil {
+ var ret interface{}
+ return ret
+ }
+ return o.MetadataAdmin
+}
+
+// GetMetadataAdminOk returns a tuple with the MetadataAdmin field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+// NOTE: If the value is an explicit nil, `nil, true` will be returned
+func (o *Identity) GetMetadataAdminOk() (*interface{}, bool) {
+ if o == nil || o.MetadataAdmin == nil {
+ return nil, false
+ }
+ return &o.MetadataAdmin, true
+}
+
+// HasMetadataAdmin returns a boolean if a field has been set.
+func (o *Identity) HasMetadataAdmin() bool {
+ if o != nil && o.MetadataAdmin != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetMetadataAdmin gets a reference to the given interface{} and assigns it to the MetadataAdmin field.
+func (o *Identity) SetMetadataAdmin(v interface{}) {
+ o.MetadataAdmin = v
+}
+
+// GetMetadataPublic returns the MetadataPublic field value if set, zero value otherwise (both if not set or set to explicit null).
+func (o *Identity) GetMetadataPublic() interface{} {
+ if o == nil {
+ var ret interface{}
+ return ret
+ }
+ return o.MetadataPublic
+}
+
+// GetMetadataPublicOk returns a tuple with the MetadataPublic field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+// NOTE: If the value is an explicit nil, `nil, true` will be returned
+func (o *Identity) GetMetadataPublicOk() (*interface{}, bool) {
+ if o == nil || o.MetadataPublic == nil {
+ return nil, false
+ }
+ return &o.MetadataPublic, true
+}
+
+// HasMetadataPublic returns a boolean if a field has been set.
+func (o *Identity) HasMetadataPublic() bool {
+ if o != nil && o.MetadataPublic != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetMetadataPublic gets a reference to the given interface{} and assigns it to the MetadataPublic field.
+func (o *Identity) SetMetadataPublic(v interface{}) {
+ o.MetadataPublic = v
+}
+
+// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise (both if not set or set to explicit null).
+func (o *Identity) GetOrganizationId() string {
+ if o == nil || o.OrganizationId.Get() == nil {
+ var ret string
+ return ret
+ }
+ return *o.OrganizationId.Get()
+}
+
+// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+// NOTE: If the value is an explicit nil, `nil, true` will be returned
+func (o *Identity) GetOrganizationIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return o.OrganizationId.Get(), o.OrganizationId.IsSet()
+}
+
+// HasOrganizationId returns a boolean if a field has been set.
+func (o *Identity) HasOrganizationId() bool {
+ if o != nil && o.OrganizationId.IsSet() {
+ return true
+ }
+
+ return false
+}
+
+// SetOrganizationId gets a reference to the given NullableString and assigns it to the OrganizationId field.
+func (o *Identity) SetOrganizationId(v string) {
+ o.OrganizationId.Set(&v)
+}
+
+// SetOrganizationIdNil sets the value for OrganizationId to be an explicit nil
+func (o *Identity) SetOrganizationIdNil() {
+ o.OrganizationId.Set(nil)
+}
+
+// UnsetOrganizationId ensures that no value is present for OrganizationId, not even an explicit nil
+func (o *Identity) UnsetOrganizationId() {
+ o.OrganizationId.Unset()
+}
+
+// GetRecoveryAddresses returns the RecoveryAddresses field value if set, zero value otherwise.
+func (o *Identity) GetRecoveryAddresses() []RecoveryIdentityAddress {
+ if o == nil || o.RecoveryAddresses == nil {
+ var ret []RecoveryIdentityAddress
+ return ret
+ }
+ return o.RecoveryAddresses
+}
+
+// GetRecoveryAddressesOk returns a tuple with the RecoveryAddresses field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Identity) GetRecoveryAddressesOk() ([]RecoveryIdentityAddress, bool) {
+ if o == nil || o.RecoveryAddresses == nil {
+ return nil, false
+ }
+ return o.RecoveryAddresses, true
+}
+
+// HasRecoveryAddresses returns a boolean if a field has been set.
+func (o *Identity) HasRecoveryAddresses() bool {
+ if o != nil && o.RecoveryAddresses != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetRecoveryAddresses gets a reference to the given []RecoveryIdentityAddress and assigns it to the RecoveryAddresses field.
+func (o *Identity) SetRecoveryAddresses(v []RecoveryIdentityAddress) {
+ o.RecoveryAddresses = v
+}
+
+// GetSchemaId returns the SchemaId field value
+func (o *Identity) GetSchemaId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.SchemaId
+}
+
+// GetSchemaIdOk returns a tuple with the SchemaId field value
+// and a boolean to check if the value has been set.
+func (o *Identity) GetSchemaIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.SchemaId, true
+}
+
+// SetSchemaId sets field value
+func (o *Identity) SetSchemaId(v string) {
+ o.SchemaId = v
+}
+
+// GetSchemaUrl returns the SchemaUrl field value
+func (o *Identity) GetSchemaUrl() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.SchemaUrl
+}
+
+// GetSchemaUrlOk returns a tuple with the SchemaUrl field value
+// and a boolean to check if the value has been set.
+func (o *Identity) GetSchemaUrlOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.SchemaUrl, true
+}
+
+// SetSchemaUrl sets field value
+func (o *Identity) SetSchemaUrl(v string) {
+ o.SchemaUrl = v
+}
+
+// GetState returns the State field value if set, zero value otherwise.
+func (o *Identity) GetState() string {
+ if o == nil || o.State == nil {
+ var ret string
+ return ret
+ }
+ return *o.State
+}
+
+// GetStateOk returns a tuple with the State field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Identity) GetStateOk() (*string, bool) {
+ if o == nil || o.State == nil {
+ return nil, false
+ }
+ return o.State, true
+}
+
+// HasState returns a boolean if a field has been set.
+func (o *Identity) HasState() bool {
+ if o != nil && o.State != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetState gets a reference to the given string and assigns it to the State field.
+func (o *Identity) SetState(v string) {
+ o.State = &v
+}
+
+// GetStateChangedAt returns the StateChangedAt field value if set, zero value otherwise.
+func (o *Identity) GetStateChangedAt() time.Time {
+ if o == nil || o.StateChangedAt == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.StateChangedAt
+}
+
+// GetStateChangedAtOk returns a tuple with the StateChangedAt field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Identity) GetStateChangedAtOk() (*time.Time, bool) {
+ if o == nil || o.StateChangedAt == nil {
+ return nil, false
+ }
+ return o.StateChangedAt, true
+}
+
+// HasStateChangedAt returns a boolean if a field has been set.
+func (o *Identity) HasStateChangedAt() bool {
+ if o != nil && o.StateChangedAt != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetStateChangedAt gets a reference to the given time.Time and assigns it to the StateChangedAt field.
+func (o *Identity) SetStateChangedAt(v time.Time) {
+ o.StateChangedAt = &v
+}
+
+// GetTraits returns the Traits field value
+// If the value is explicit nil, the zero value for interface{} will be returned
+func (o *Identity) GetTraits() interface{} {
+ if o == nil {
+ var ret interface{}
+ return ret
+ }
+
+ return o.Traits
+}
+
+// GetTraitsOk returns a tuple with the Traits field value
+// and a boolean to check if the value has been set.
+// NOTE: If the value is an explicit nil, `nil, true` will be returned
+func (o *Identity) GetTraitsOk() (*interface{}, bool) {
+ if o == nil || o.Traits == nil {
+ return nil, false
+ }
+ return &o.Traits, true
+}
+
+// SetTraits sets field value
+func (o *Identity) SetTraits(v interface{}) {
+ o.Traits = v
+}
+
+// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
+func (o *Identity) GetUpdatedAt() time.Time {
+ if o == nil || o.UpdatedAt == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.UpdatedAt
+}
+
+// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Identity) GetUpdatedAtOk() (*time.Time, bool) {
+ if o == nil || o.UpdatedAt == nil {
+ return nil, false
+ }
+ return o.UpdatedAt, true
+}
+
+// HasUpdatedAt returns a boolean if a field has been set.
+func (o *Identity) HasUpdatedAt() bool {
+ if o != nil && o.UpdatedAt != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
+func (o *Identity) SetUpdatedAt(v time.Time) {
+ o.UpdatedAt = &v
+}
+
+// GetVerifiableAddresses returns the VerifiableAddresses field value if set, zero value otherwise.
+func (o *Identity) GetVerifiableAddresses() []VerifiableIdentityAddress {
+ if o == nil || o.VerifiableAddresses == nil {
+ var ret []VerifiableIdentityAddress
+ return ret
+ }
+ return o.VerifiableAddresses
+}
+
+// GetVerifiableAddressesOk returns a tuple with the VerifiableAddresses field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Identity) GetVerifiableAddressesOk() ([]VerifiableIdentityAddress, bool) {
+ if o == nil || o.VerifiableAddresses == nil {
+ return nil, false
+ }
+ return o.VerifiableAddresses, true
+}
+
+// HasVerifiableAddresses returns a boolean if a field has been set.
+func (o *Identity) HasVerifiableAddresses() bool {
+ if o != nil && o.VerifiableAddresses != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetVerifiableAddresses gets a reference to the given []VerifiableIdentityAddress and assigns it to the VerifiableAddresses field.
+func (o *Identity) SetVerifiableAddresses(v []VerifiableIdentityAddress) {
+ o.VerifiableAddresses = v
+}
+
+func (o Identity) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.CreatedAt != nil {
+ toSerialize["created_at"] = o.CreatedAt
+ }
+ if o.Credentials != nil {
+ toSerialize["credentials"] = o.Credentials
+ }
+ if true {
+ toSerialize["id"] = o.Id
+ }
+ if o.MetadataAdmin != nil {
+ toSerialize["metadata_admin"] = o.MetadataAdmin
+ }
+ if o.MetadataPublic != nil {
+ toSerialize["metadata_public"] = o.MetadataPublic
+ }
+ if o.OrganizationId.IsSet() {
+ toSerialize["organization_id"] = o.OrganizationId.Get()
+ }
+ if o.RecoveryAddresses != nil {
+ toSerialize["recovery_addresses"] = o.RecoveryAddresses
+ }
+ if true {
+ toSerialize["schema_id"] = o.SchemaId
+ }
+ if true {
+ toSerialize["schema_url"] = o.SchemaUrl
+ }
+ if o.State != nil {
+ toSerialize["state"] = o.State
+ }
+ if o.StateChangedAt != nil {
+ toSerialize["state_changed_at"] = o.StateChangedAt
+ }
+ if o.Traits != nil {
+ toSerialize["traits"] = o.Traits
+ }
+ if o.UpdatedAt != nil {
+ toSerialize["updated_at"] = o.UpdatedAt
+ }
+ if o.VerifiableAddresses != nil {
+ toSerialize["verifiable_addresses"] = o.VerifiableAddresses
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableIdentity struct {
+ value *Identity
+ isSet bool
+}
+
+func (v NullableIdentity) Get() *Identity {
+ return v.value
+}
+
+func (v *NullableIdentity) Set(val *Identity) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableIdentity) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableIdentity) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableIdentity(val *Identity) *NullableIdentity {
+ return &NullableIdentity{value: val, isSet: true}
+}
+
+func (v NullableIdentity) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableIdentity) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_identity_credentials.go b/internal/httpclient/model_identity_credentials.go
new file mode 100644
index 000000000000..374d1d6b38c0
--- /dev/null
+++ b/internal/httpclient/model_identity_credentials.go
@@ -0,0 +1,300 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "time"
+)
+
+// IdentityCredentials Credentials represents a specific credential type
+type IdentityCredentials struct {
+ Config map[string]interface{} `json:"config,omitempty"`
+ // CreatedAt is a helper struct field for gobuffalo.pop.
+ CreatedAt *time.Time `json:"created_at,omitempty"`
+ // Identifiers represents a list of unique identifiers this credential type matches.
+ Identifiers []string `json:"identifiers,omitempty"`
+ // Type discriminates between different types of credentials. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth passkey CredentialsTypePasskey profile CredentialsTypeProfile two_step TwoStep link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode
+ Type *string `json:"type,omitempty"`
+ // UpdatedAt is a helper struct field for gobuffalo.pop.
+ UpdatedAt *time.Time `json:"updated_at,omitempty"`
+ // Version refers to the version of the credential. Useful when changing the config schema.
+ Version *int64 `json:"version,omitempty"`
+}
+
+// NewIdentityCredentials instantiates a new IdentityCredentials object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewIdentityCredentials() *IdentityCredentials {
+ this := IdentityCredentials{}
+ return &this
+}
+
+// NewIdentityCredentialsWithDefaults instantiates a new IdentityCredentials object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewIdentityCredentialsWithDefaults() *IdentityCredentials {
+ this := IdentityCredentials{}
+ return &this
+}
+
+// GetConfig returns the Config field value if set, zero value otherwise.
+func (o *IdentityCredentials) GetConfig() map[string]interface{} {
+ if o == nil || o.Config == nil {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.Config
+}
+
+// GetConfigOk returns a tuple with the Config field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityCredentials) GetConfigOk() (map[string]interface{}, bool) {
+ if o == nil || o.Config == nil {
+ return nil, false
+ }
+ return o.Config, true
+}
+
+// HasConfig returns a boolean if a field has been set.
+func (o *IdentityCredentials) HasConfig() bool {
+ if o != nil && o.Config != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetConfig gets a reference to the given map[string]interface{} and assigns it to the Config field.
+func (o *IdentityCredentials) SetConfig(v map[string]interface{}) {
+ o.Config = v
+}
+
+// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
+func (o *IdentityCredentials) GetCreatedAt() time.Time {
+ if o == nil || o.CreatedAt == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.CreatedAt
+}
+
+// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityCredentials) GetCreatedAtOk() (*time.Time, bool) {
+ if o == nil || o.CreatedAt == nil {
+ return nil, false
+ }
+ return o.CreatedAt, true
+}
+
+// HasCreatedAt returns a boolean if a field has been set.
+func (o *IdentityCredentials) HasCreatedAt() bool {
+ if o != nil && o.CreatedAt != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
+func (o *IdentityCredentials) SetCreatedAt(v time.Time) {
+ o.CreatedAt = &v
+}
+
+// GetIdentifiers returns the Identifiers field value if set, zero value otherwise.
+func (o *IdentityCredentials) GetIdentifiers() []string {
+ if o == nil || o.Identifiers == nil {
+ var ret []string
+ return ret
+ }
+ return o.Identifiers
+}
+
+// GetIdentifiersOk returns a tuple with the Identifiers field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityCredentials) GetIdentifiersOk() ([]string, bool) {
+ if o == nil || o.Identifiers == nil {
+ return nil, false
+ }
+ return o.Identifiers, true
+}
+
+// HasIdentifiers returns a boolean if a field has been set.
+func (o *IdentityCredentials) HasIdentifiers() bool {
+ if o != nil && o.Identifiers != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetIdentifiers gets a reference to the given []string and assigns it to the Identifiers field.
+func (o *IdentityCredentials) SetIdentifiers(v []string) {
+ o.Identifiers = v
+}
+
+// GetType returns the Type field value if set, zero value otherwise.
+func (o *IdentityCredentials) GetType() string {
+ if o == nil || o.Type == nil {
+ var ret string
+ return ret
+ }
+ return *o.Type
+}
+
+// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityCredentials) GetTypeOk() (*string, bool) {
+ if o == nil || o.Type == nil {
+ return nil, false
+ }
+ return o.Type, true
+}
+
+// HasType returns a boolean if a field has been set.
+func (o *IdentityCredentials) HasType() bool {
+ if o != nil && o.Type != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetType gets a reference to the given string and assigns it to the Type field.
+func (o *IdentityCredentials) SetType(v string) {
+ o.Type = &v
+}
+
+// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
+func (o *IdentityCredentials) GetUpdatedAt() time.Time {
+ if o == nil || o.UpdatedAt == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.UpdatedAt
+}
+
+// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityCredentials) GetUpdatedAtOk() (*time.Time, bool) {
+ if o == nil || o.UpdatedAt == nil {
+ return nil, false
+ }
+ return o.UpdatedAt, true
+}
+
+// HasUpdatedAt returns a boolean if a field has been set.
+func (o *IdentityCredentials) HasUpdatedAt() bool {
+ if o != nil && o.UpdatedAt != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
+func (o *IdentityCredentials) SetUpdatedAt(v time.Time) {
+ o.UpdatedAt = &v
+}
+
+// GetVersion returns the Version field value if set, zero value otherwise.
+func (o *IdentityCredentials) GetVersion() int64 {
+ if o == nil || o.Version == nil {
+ var ret int64
+ return ret
+ }
+ return *o.Version
+}
+
+// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityCredentials) GetVersionOk() (*int64, bool) {
+ if o == nil || o.Version == nil {
+ return nil, false
+ }
+ return o.Version, true
+}
+
+// HasVersion returns a boolean if a field has been set.
+func (o *IdentityCredentials) HasVersion() bool {
+ if o != nil && o.Version != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetVersion gets a reference to the given int64 and assigns it to the Version field.
+func (o *IdentityCredentials) SetVersion(v int64) {
+ o.Version = &v
+}
+
+func (o IdentityCredentials) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Config != nil {
+ toSerialize["config"] = o.Config
+ }
+ if o.CreatedAt != nil {
+ toSerialize["created_at"] = o.CreatedAt
+ }
+ if o.Identifiers != nil {
+ toSerialize["identifiers"] = o.Identifiers
+ }
+ if o.Type != nil {
+ toSerialize["type"] = o.Type
+ }
+ if o.UpdatedAt != nil {
+ toSerialize["updated_at"] = o.UpdatedAt
+ }
+ if o.Version != nil {
+ toSerialize["version"] = o.Version
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableIdentityCredentials struct {
+ value *IdentityCredentials
+ isSet bool
+}
+
+func (v NullableIdentityCredentials) Get() *IdentityCredentials {
+ return v.value
+}
+
+func (v *NullableIdentityCredentials) Set(val *IdentityCredentials) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableIdentityCredentials) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableIdentityCredentials) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableIdentityCredentials(val *IdentityCredentials) *NullableIdentityCredentials {
+ return &NullableIdentityCredentials{value: val, isSet: true}
+}
+
+func (v NullableIdentityCredentials) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableIdentityCredentials) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_identity_credentials_code.go b/internal/httpclient/model_identity_credentials_code.go
new file mode 100644
index 000000000000..75857f31c272
--- /dev/null
+++ b/internal/httpclient/model_identity_credentials_code.go
@@ -0,0 +1,163 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "time"
+)
+
+// IdentityCredentialsCode CredentialsCode represents a one time login/registration code
+type IdentityCredentialsCode struct {
+ // The type of the address for this code
+ AddressType *string `json:"address_type,omitempty"`
+ UsedAt NullableTime `json:"used_at,omitempty"`
+}
+
+// NewIdentityCredentialsCode instantiates a new IdentityCredentialsCode object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewIdentityCredentialsCode() *IdentityCredentialsCode {
+ this := IdentityCredentialsCode{}
+ return &this
+}
+
+// NewIdentityCredentialsCodeWithDefaults instantiates a new IdentityCredentialsCode object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewIdentityCredentialsCodeWithDefaults() *IdentityCredentialsCode {
+ this := IdentityCredentialsCode{}
+ return &this
+}
+
+// GetAddressType returns the AddressType field value if set, zero value otherwise.
+func (o *IdentityCredentialsCode) GetAddressType() string {
+ if o == nil || o.AddressType == nil {
+ var ret string
+ return ret
+ }
+ return *o.AddressType
+}
+
+// GetAddressTypeOk returns a tuple with the AddressType field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityCredentialsCode) GetAddressTypeOk() (*string, bool) {
+ if o == nil || o.AddressType == nil {
+ return nil, false
+ }
+ return o.AddressType, true
+}
+
+// HasAddressType returns a boolean if a field has been set.
+func (o *IdentityCredentialsCode) HasAddressType() bool {
+ if o != nil && o.AddressType != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetAddressType gets a reference to the given string and assigns it to the AddressType field.
+func (o *IdentityCredentialsCode) SetAddressType(v string) {
+ o.AddressType = &v
+}
+
+// GetUsedAt returns the UsedAt field value if set, zero value otherwise (both if not set or set to explicit null).
+func (o *IdentityCredentialsCode) GetUsedAt() time.Time {
+ if o == nil || o.UsedAt.Get() == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.UsedAt.Get()
+}
+
+// GetUsedAtOk returns a tuple with the UsedAt field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+// NOTE: If the value is an explicit nil, `nil, true` will be returned
+func (o *IdentityCredentialsCode) GetUsedAtOk() (*time.Time, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return o.UsedAt.Get(), o.UsedAt.IsSet()
+}
+
+// HasUsedAt returns a boolean if a field has been set.
+func (o *IdentityCredentialsCode) HasUsedAt() bool {
+ if o != nil && o.UsedAt.IsSet() {
+ return true
+ }
+
+ return false
+}
+
+// SetUsedAt gets a reference to the given NullableTime and assigns it to the UsedAt field.
+func (o *IdentityCredentialsCode) SetUsedAt(v time.Time) {
+ o.UsedAt.Set(&v)
+}
+
+// SetUsedAtNil sets the value for UsedAt to be an explicit nil
+func (o *IdentityCredentialsCode) SetUsedAtNil() {
+ o.UsedAt.Set(nil)
+}
+
+// UnsetUsedAt ensures that no value is present for UsedAt, not even an explicit nil
+func (o *IdentityCredentialsCode) UnsetUsedAt() {
+ o.UsedAt.Unset()
+}
+
+func (o IdentityCredentialsCode) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.AddressType != nil {
+ toSerialize["address_type"] = o.AddressType
+ }
+ if o.UsedAt.IsSet() {
+ toSerialize["used_at"] = o.UsedAt.Get()
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableIdentityCredentialsCode struct {
+ value *IdentityCredentialsCode
+ isSet bool
+}
+
+func (v NullableIdentityCredentialsCode) Get() *IdentityCredentialsCode {
+ return v.value
+}
+
+func (v *NullableIdentityCredentialsCode) Set(val *IdentityCredentialsCode) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableIdentityCredentialsCode) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableIdentityCredentialsCode) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableIdentityCredentialsCode(val *IdentityCredentialsCode) *NullableIdentityCredentialsCode {
+ return &NullableIdentityCredentialsCode{value: val, isSet: true}
+}
+
+func (v NullableIdentityCredentialsCode) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableIdentityCredentialsCode) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_identity_credentials_oidc.go b/internal/httpclient/model_identity_credentials_oidc.go
new file mode 100644
index 000000000000..ffb2dfadaa14
--- /dev/null
+++ b/internal/httpclient/model_identity_credentials_oidc.go
@@ -0,0 +1,114 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// IdentityCredentialsOidc struct for IdentityCredentialsOidc
+type IdentityCredentialsOidc struct {
+ Providers []IdentityCredentialsOidcProvider `json:"providers,omitempty"`
+}
+
+// NewIdentityCredentialsOidc instantiates a new IdentityCredentialsOidc object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewIdentityCredentialsOidc() *IdentityCredentialsOidc {
+ this := IdentityCredentialsOidc{}
+ return &this
+}
+
+// NewIdentityCredentialsOidcWithDefaults instantiates a new IdentityCredentialsOidc object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewIdentityCredentialsOidcWithDefaults() *IdentityCredentialsOidc {
+ this := IdentityCredentialsOidc{}
+ return &this
+}
+
+// GetProviders returns the Providers field value if set, zero value otherwise.
+func (o *IdentityCredentialsOidc) GetProviders() []IdentityCredentialsOidcProvider {
+ if o == nil || o.Providers == nil {
+ var ret []IdentityCredentialsOidcProvider
+ return ret
+ }
+ return o.Providers
+}
+
+// GetProvidersOk returns a tuple with the Providers field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityCredentialsOidc) GetProvidersOk() ([]IdentityCredentialsOidcProvider, bool) {
+ if o == nil || o.Providers == nil {
+ return nil, false
+ }
+ return o.Providers, true
+}
+
+// HasProviders returns a boolean if a field has been set.
+func (o *IdentityCredentialsOidc) HasProviders() bool {
+ if o != nil && o.Providers != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetProviders gets a reference to the given []IdentityCredentialsOidcProvider and assigns it to the Providers field.
+func (o *IdentityCredentialsOidc) SetProviders(v []IdentityCredentialsOidcProvider) {
+ o.Providers = v
+}
+
+func (o IdentityCredentialsOidc) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Providers != nil {
+ toSerialize["providers"] = o.Providers
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableIdentityCredentialsOidc struct {
+ value *IdentityCredentialsOidc
+ isSet bool
+}
+
+func (v NullableIdentityCredentialsOidc) Get() *IdentityCredentialsOidc {
+ return v.value
+}
+
+func (v *NullableIdentityCredentialsOidc) Set(val *IdentityCredentialsOidc) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableIdentityCredentialsOidc) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableIdentityCredentialsOidc) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableIdentityCredentialsOidc(val *IdentityCredentialsOidc) *NullableIdentityCredentialsOidc {
+ return &NullableIdentityCredentialsOidc{value: val, isSet: true}
+}
+
+func (v NullableIdentityCredentialsOidc) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableIdentityCredentialsOidc) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_identity_credentials_oidc_provider.go b/internal/httpclient/model_identity_credentials_oidc_provider.go
new file mode 100644
index 000000000000..f905f2f60413
--- /dev/null
+++ b/internal/httpclient/model_identity_credentials_oidc_provider.go
@@ -0,0 +1,294 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// IdentityCredentialsOidcProvider struct for IdentityCredentialsOidcProvider
+type IdentityCredentialsOidcProvider struct {
+ InitialAccessToken *string `json:"initial_access_token,omitempty"`
+ InitialIdToken *string `json:"initial_id_token,omitempty"`
+ InitialRefreshToken *string `json:"initial_refresh_token,omitempty"`
+ Organization *string `json:"organization,omitempty"`
+ Provider *string `json:"provider,omitempty"`
+ Subject *string `json:"subject,omitempty"`
+}
+
+// NewIdentityCredentialsOidcProvider instantiates a new IdentityCredentialsOidcProvider object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewIdentityCredentialsOidcProvider() *IdentityCredentialsOidcProvider {
+ this := IdentityCredentialsOidcProvider{}
+ return &this
+}
+
+// NewIdentityCredentialsOidcProviderWithDefaults instantiates a new IdentityCredentialsOidcProvider object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewIdentityCredentialsOidcProviderWithDefaults() *IdentityCredentialsOidcProvider {
+ this := IdentityCredentialsOidcProvider{}
+ return &this
+}
+
+// GetInitialAccessToken returns the InitialAccessToken field value if set, zero value otherwise.
+func (o *IdentityCredentialsOidcProvider) GetInitialAccessToken() string {
+ if o == nil || o.InitialAccessToken == nil {
+ var ret string
+ return ret
+ }
+ return *o.InitialAccessToken
+}
+
+// GetInitialAccessTokenOk returns a tuple with the InitialAccessToken field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityCredentialsOidcProvider) GetInitialAccessTokenOk() (*string, bool) {
+ if o == nil || o.InitialAccessToken == nil {
+ return nil, false
+ }
+ return o.InitialAccessToken, true
+}
+
+// HasInitialAccessToken returns a boolean if a field has been set.
+func (o *IdentityCredentialsOidcProvider) HasInitialAccessToken() bool {
+ if o != nil && o.InitialAccessToken != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetInitialAccessToken gets a reference to the given string and assigns it to the InitialAccessToken field.
+func (o *IdentityCredentialsOidcProvider) SetInitialAccessToken(v string) {
+ o.InitialAccessToken = &v
+}
+
+// GetInitialIdToken returns the InitialIdToken field value if set, zero value otherwise.
+func (o *IdentityCredentialsOidcProvider) GetInitialIdToken() string {
+ if o == nil || o.InitialIdToken == nil {
+ var ret string
+ return ret
+ }
+ return *o.InitialIdToken
+}
+
+// GetInitialIdTokenOk returns a tuple with the InitialIdToken field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityCredentialsOidcProvider) GetInitialIdTokenOk() (*string, bool) {
+ if o == nil || o.InitialIdToken == nil {
+ return nil, false
+ }
+ return o.InitialIdToken, true
+}
+
+// HasInitialIdToken returns a boolean if a field has been set.
+func (o *IdentityCredentialsOidcProvider) HasInitialIdToken() bool {
+ if o != nil && o.InitialIdToken != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetInitialIdToken gets a reference to the given string and assigns it to the InitialIdToken field.
+func (o *IdentityCredentialsOidcProvider) SetInitialIdToken(v string) {
+ o.InitialIdToken = &v
+}
+
+// GetInitialRefreshToken returns the InitialRefreshToken field value if set, zero value otherwise.
+func (o *IdentityCredentialsOidcProvider) GetInitialRefreshToken() string {
+ if o == nil || o.InitialRefreshToken == nil {
+ var ret string
+ return ret
+ }
+ return *o.InitialRefreshToken
+}
+
+// GetInitialRefreshTokenOk returns a tuple with the InitialRefreshToken field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityCredentialsOidcProvider) GetInitialRefreshTokenOk() (*string, bool) {
+ if o == nil || o.InitialRefreshToken == nil {
+ return nil, false
+ }
+ return o.InitialRefreshToken, true
+}
+
+// HasInitialRefreshToken returns a boolean if a field has been set.
+func (o *IdentityCredentialsOidcProvider) HasInitialRefreshToken() bool {
+ if o != nil && o.InitialRefreshToken != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetInitialRefreshToken gets a reference to the given string and assigns it to the InitialRefreshToken field.
+func (o *IdentityCredentialsOidcProvider) SetInitialRefreshToken(v string) {
+ o.InitialRefreshToken = &v
+}
+
+// GetOrganization returns the Organization field value if set, zero value otherwise.
+func (o *IdentityCredentialsOidcProvider) GetOrganization() string {
+ if o == nil || o.Organization == nil {
+ var ret string
+ return ret
+ }
+ return *o.Organization
+}
+
+// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityCredentialsOidcProvider) GetOrganizationOk() (*string, bool) {
+ if o == nil || o.Organization == nil {
+ return nil, false
+ }
+ return o.Organization, true
+}
+
+// HasOrganization returns a boolean if a field has been set.
+func (o *IdentityCredentialsOidcProvider) HasOrganization() bool {
+ if o != nil && o.Organization != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetOrganization gets a reference to the given string and assigns it to the Organization field.
+func (o *IdentityCredentialsOidcProvider) SetOrganization(v string) {
+ o.Organization = &v
+}
+
+// GetProvider returns the Provider field value if set, zero value otherwise.
+func (o *IdentityCredentialsOidcProvider) GetProvider() string {
+ if o == nil || o.Provider == nil {
+ var ret string
+ return ret
+ }
+ return *o.Provider
+}
+
+// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityCredentialsOidcProvider) GetProviderOk() (*string, bool) {
+ if o == nil || o.Provider == nil {
+ return nil, false
+ }
+ return o.Provider, true
+}
+
+// HasProvider returns a boolean if a field has been set.
+func (o *IdentityCredentialsOidcProvider) HasProvider() bool {
+ if o != nil && o.Provider != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetProvider gets a reference to the given string and assigns it to the Provider field.
+func (o *IdentityCredentialsOidcProvider) SetProvider(v string) {
+ o.Provider = &v
+}
+
+// GetSubject returns the Subject field value if set, zero value otherwise.
+func (o *IdentityCredentialsOidcProvider) GetSubject() string {
+ if o == nil || o.Subject == nil {
+ var ret string
+ return ret
+ }
+ return *o.Subject
+}
+
+// GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityCredentialsOidcProvider) GetSubjectOk() (*string, bool) {
+ if o == nil || o.Subject == nil {
+ return nil, false
+ }
+ return o.Subject, true
+}
+
+// HasSubject returns a boolean if a field has been set.
+func (o *IdentityCredentialsOidcProvider) HasSubject() bool {
+ if o != nil && o.Subject != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetSubject gets a reference to the given string and assigns it to the Subject field.
+func (o *IdentityCredentialsOidcProvider) SetSubject(v string) {
+ o.Subject = &v
+}
+
+func (o IdentityCredentialsOidcProvider) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.InitialAccessToken != nil {
+ toSerialize["initial_access_token"] = o.InitialAccessToken
+ }
+ if o.InitialIdToken != nil {
+ toSerialize["initial_id_token"] = o.InitialIdToken
+ }
+ if o.InitialRefreshToken != nil {
+ toSerialize["initial_refresh_token"] = o.InitialRefreshToken
+ }
+ if o.Organization != nil {
+ toSerialize["organization"] = o.Organization
+ }
+ if o.Provider != nil {
+ toSerialize["provider"] = o.Provider
+ }
+ if o.Subject != nil {
+ toSerialize["subject"] = o.Subject
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableIdentityCredentialsOidcProvider struct {
+ value *IdentityCredentialsOidcProvider
+ isSet bool
+}
+
+func (v NullableIdentityCredentialsOidcProvider) Get() *IdentityCredentialsOidcProvider {
+ return v.value
+}
+
+func (v *NullableIdentityCredentialsOidcProvider) Set(val *IdentityCredentialsOidcProvider) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableIdentityCredentialsOidcProvider) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableIdentityCredentialsOidcProvider) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableIdentityCredentialsOidcProvider(val *IdentityCredentialsOidcProvider) *NullableIdentityCredentialsOidcProvider {
+ return &NullableIdentityCredentialsOidcProvider{value: val, isSet: true}
+}
+
+func (v NullableIdentityCredentialsOidcProvider) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableIdentityCredentialsOidcProvider) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_identity_patch.go b/internal/httpclient/model_identity_patch.go
new file mode 100644
index 000000000000..d621e34d458f
--- /dev/null
+++ b/internal/httpclient/model_identity_patch.go
@@ -0,0 +1,151 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// IdentityPatch Payload for patching an identity
+type IdentityPatch struct {
+ Create *CreateIdentityBody `json:"create,omitempty"`
+ // The ID of this patch. The patch ID is optional. If specified, the ID will be returned in the response, so consumers of this API can correlate the response with the patch.
+ PatchId *string `json:"patch_id,omitempty"`
+}
+
+// NewIdentityPatch instantiates a new IdentityPatch object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewIdentityPatch() *IdentityPatch {
+ this := IdentityPatch{}
+ return &this
+}
+
+// NewIdentityPatchWithDefaults instantiates a new IdentityPatch object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewIdentityPatchWithDefaults() *IdentityPatch {
+ this := IdentityPatch{}
+ return &this
+}
+
+// GetCreate returns the Create field value if set, zero value otherwise.
+func (o *IdentityPatch) GetCreate() CreateIdentityBody {
+ if o == nil || o.Create == nil {
+ var ret CreateIdentityBody
+ return ret
+ }
+ return *o.Create
+}
+
+// GetCreateOk returns a tuple with the Create field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityPatch) GetCreateOk() (*CreateIdentityBody, bool) {
+ if o == nil || o.Create == nil {
+ return nil, false
+ }
+ return o.Create, true
+}
+
+// HasCreate returns a boolean if a field has been set.
+func (o *IdentityPatch) HasCreate() bool {
+ if o != nil && o.Create != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCreate gets a reference to the given CreateIdentityBody and assigns it to the Create field.
+func (o *IdentityPatch) SetCreate(v CreateIdentityBody) {
+ o.Create = &v
+}
+
+// GetPatchId returns the PatchId field value if set, zero value otherwise.
+func (o *IdentityPatch) GetPatchId() string {
+ if o == nil || o.PatchId == nil {
+ var ret string
+ return ret
+ }
+ return *o.PatchId
+}
+
+// GetPatchIdOk returns a tuple with the PatchId field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityPatch) GetPatchIdOk() (*string, bool) {
+ if o == nil || o.PatchId == nil {
+ return nil, false
+ }
+ return o.PatchId, true
+}
+
+// HasPatchId returns a boolean if a field has been set.
+func (o *IdentityPatch) HasPatchId() bool {
+ if o != nil && o.PatchId != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPatchId gets a reference to the given string and assigns it to the PatchId field.
+func (o *IdentityPatch) SetPatchId(v string) {
+ o.PatchId = &v
+}
+
+func (o IdentityPatch) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Create != nil {
+ toSerialize["create"] = o.Create
+ }
+ if o.PatchId != nil {
+ toSerialize["patch_id"] = o.PatchId
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableIdentityPatch struct {
+ value *IdentityPatch
+ isSet bool
+}
+
+func (v NullableIdentityPatch) Get() *IdentityPatch {
+ return v.value
+}
+
+func (v *NullableIdentityPatch) Set(val *IdentityPatch) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableIdentityPatch) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableIdentityPatch) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableIdentityPatch(val *IdentityPatch) *NullableIdentityPatch {
+ return &NullableIdentityPatch{value: val, isSet: true}
+}
+
+func (v NullableIdentityPatch) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableIdentityPatch) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_identity_patch_response.go b/internal/httpclient/model_identity_patch_response.go
new file mode 100644
index 000000000000..2ee305f7da81
--- /dev/null
+++ b/internal/httpclient/model_identity_patch_response.go
@@ -0,0 +1,189 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// IdentityPatchResponse Response for a single identity patch
+type IdentityPatchResponse struct {
+ // The action for this specific patch create ActionCreate Create this identity.
+ Action *string `json:"action,omitempty"`
+ // The identity ID payload of this patch
+ Identity *string `json:"identity,omitempty"`
+ // The ID of this patch response, if an ID was specified in the patch.
+ PatchId *string `json:"patch_id,omitempty"`
+}
+
+// NewIdentityPatchResponse instantiates a new IdentityPatchResponse object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewIdentityPatchResponse() *IdentityPatchResponse {
+ this := IdentityPatchResponse{}
+ return &this
+}
+
+// NewIdentityPatchResponseWithDefaults instantiates a new IdentityPatchResponse object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewIdentityPatchResponseWithDefaults() *IdentityPatchResponse {
+ this := IdentityPatchResponse{}
+ return &this
+}
+
+// GetAction returns the Action field value if set, zero value otherwise.
+func (o *IdentityPatchResponse) GetAction() string {
+ if o == nil || o.Action == nil {
+ var ret string
+ return ret
+ }
+ return *o.Action
+}
+
+// GetActionOk returns a tuple with the Action field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityPatchResponse) GetActionOk() (*string, bool) {
+ if o == nil || o.Action == nil {
+ return nil, false
+ }
+ return o.Action, true
+}
+
+// HasAction returns a boolean if a field has been set.
+func (o *IdentityPatchResponse) HasAction() bool {
+ if o != nil && o.Action != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetAction gets a reference to the given string and assigns it to the Action field.
+func (o *IdentityPatchResponse) SetAction(v string) {
+ o.Action = &v
+}
+
+// GetIdentity returns the Identity field value if set, zero value otherwise.
+func (o *IdentityPatchResponse) GetIdentity() string {
+ if o == nil || o.Identity == nil {
+ var ret string
+ return ret
+ }
+ return *o.Identity
+}
+
+// GetIdentityOk returns a tuple with the Identity field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityPatchResponse) GetIdentityOk() (*string, bool) {
+ if o == nil || o.Identity == nil {
+ return nil, false
+ }
+ return o.Identity, true
+}
+
+// HasIdentity returns a boolean if a field has been set.
+func (o *IdentityPatchResponse) HasIdentity() bool {
+ if o != nil && o.Identity != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetIdentity gets a reference to the given string and assigns it to the Identity field.
+func (o *IdentityPatchResponse) SetIdentity(v string) {
+ o.Identity = &v
+}
+
+// GetPatchId returns the PatchId field value if set, zero value otherwise.
+func (o *IdentityPatchResponse) GetPatchId() string {
+ if o == nil || o.PatchId == nil {
+ var ret string
+ return ret
+ }
+ return *o.PatchId
+}
+
+// GetPatchIdOk returns a tuple with the PatchId field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityPatchResponse) GetPatchIdOk() (*string, bool) {
+ if o == nil || o.PatchId == nil {
+ return nil, false
+ }
+ return o.PatchId, true
+}
+
+// HasPatchId returns a boolean if a field has been set.
+func (o *IdentityPatchResponse) HasPatchId() bool {
+ if o != nil && o.PatchId != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPatchId gets a reference to the given string and assigns it to the PatchId field.
+func (o *IdentityPatchResponse) SetPatchId(v string) {
+ o.PatchId = &v
+}
+
+func (o IdentityPatchResponse) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Action != nil {
+ toSerialize["action"] = o.Action
+ }
+ if o.Identity != nil {
+ toSerialize["identity"] = o.Identity
+ }
+ if o.PatchId != nil {
+ toSerialize["patch_id"] = o.PatchId
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableIdentityPatchResponse struct {
+ value *IdentityPatchResponse
+ isSet bool
+}
+
+func (v NullableIdentityPatchResponse) Get() *IdentityPatchResponse {
+ return v.value
+}
+
+func (v *NullableIdentityPatchResponse) Set(val *IdentityPatchResponse) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableIdentityPatchResponse) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableIdentityPatchResponse) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableIdentityPatchResponse(val *IdentityPatchResponse) *NullableIdentityPatchResponse {
+ return &NullableIdentityPatchResponse{value: val, isSet: true}
+}
+
+func (v NullableIdentityPatchResponse) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableIdentityPatchResponse) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_identity_schema_container.go b/internal/httpclient/model_identity_schema_container.go
new file mode 100644
index 000000000000..d25bd30ab716
--- /dev/null
+++ b/internal/httpclient/model_identity_schema_container.go
@@ -0,0 +1,152 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// IdentitySchemaContainer An Identity JSON Schema Container
+type IdentitySchemaContainer struct {
+ // The ID of the Identity JSON Schema
+ Id *string `json:"id,omitempty"`
+ // The actual Identity JSON Schema
+ Schema map[string]interface{} `json:"schema,omitempty"`
+}
+
+// NewIdentitySchemaContainer instantiates a new IdentitySchemaContainer object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewIdentitySchemaContainer() *IdentitySchemaContainer {
+ this := IdentitySchemaContainer{}
+ return &this
+}
+
+// NewIdentitySchemaContainerWithDefaults instantiates a new IdentitySchemaContainer object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewIdentitySchemaContainerWithDefaults() *IdentitySchemaContainer {
+ this := IdentitySchemaContainer{}
+ return &this
+}
+
+// GetId returns the Id field value if set, zero value otherwise.
+func (o *IdentitySchemaContainer) GetId() string {
+ if o == nil || o.Id == nil {
+ var ret string
+ return ret
+ }
+ return *o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentitySchemaContainer) GetIdOk() (*string, bool) {
+ if o == nil || o.Id == nil {
+ return nil, false
+ }
+ return o.Id, true
+}
+
+// HasId returns a boolean if a field has been set.
+func (o *IdentitySchemaContainer) HasId() bool {
+ if o != nil && o.Id != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetId gets a reference to the given string and assigns it to the Id field.
+func (o *IdentitySchemaContainer) SetId(v string) {
+ o.Id = &v
+}
+
+// GetSchema returns the Schema field value if set, zero value otherwise.
+func (o *IdentitySchemaContainer) GetSchema() map[string]interface{} {
+ if o == nil || o.Schema == nil {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.Schema
+}
+
+// GetSchemaOk returns a tuple with the Schema field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentitySchemaContainer) GetSchemaOk() (map[string]interface{}, bool) {
+ if o == nil || o.Schema == nil {
+ return nil, false
+ }
+ return o.Schema, true
+}
+
+// HasSchema returns a boolean if a field has been set.
+func (o *IdentitySchemaContainer) HasSchema() bool {
+ if o != nil && o.Schema != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetSchema gets a reference to the given map[string]interface{} and assigns it to the Schema field.
+func (o *IdentitySchemaContainer) SetSchema(v map[string]interface{}) {
+ o.Schema = v
+}
+
+func (o IdentitySchemaContainer) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Id != nil {
+ toSerialize["id"] = o.Id
+ }
+ if o.Schema != nil {
+ toSerialize["schema"] = o.Schema
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableIdentitySchemaContainer struct {
+ value *IdentitySchemaContainer
+ isSet bool
+}
+
+func (v NullableIdentitySchemaContainer) Get() *IdentitySchemaContainer {
+ return v.value
+}
+
+func (v *NullableIdentitySchemaContainer) Set(val *IdentitySchemaContainer) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableIdentitySchemaContainer) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableIdentitySchemaContainer) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableIdentitySchemaContainer(val *IdentitySchemaContainer) *NullableIdentitySchemaContainer {
+ return &NullableIdentitySchemaContainer{value: val, isSet: true}
+}
+
+func (v NullableIdentitySchemaContainer) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableIdentitySchemaContainer) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_identity_with_credentials.go b/internal/httpclient/model_identity_with_credentials.go
new file mode 100644
index 000000000000..74e0d2651633
--- /dev/null
+++ b/internal/httpclient/model_identity_with_credentials.go
@@ -0,0 +1,150 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// IdentityWithCredentials Create Identity and Import Credentials
+type IdentityWithCredentials struct {
+ Oidc *IdentityWithCredentialsOidc `json:"oidc,omitempty"`
+ Password *IdentityWithCredentialsPassword `json:"password,omitempty"`
+}
+
+// NewIdentityWithCredentials instantiates a new IdentityWithCredentials object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewIdentityWithCredentials() *IdentityWithCredentials {
+ this := IdentityWithCredentials{}
+ return &this
+}
+
+// NewIdentityWithCredentialsWithDefaults instantiates a new IdentityWithCredentials object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewIdentityWithCredentialsWithDefaults() *IdentityWithCredentials {
+ this := IdentityWithCredentials{}
+ return &this
+}
+
+// GetOidc returns the Oidc field value if set, zero value otherwise.
+func (o *IdentityWithCredentials) GetOidc() IdentityWithCredentialsOidc {
+ if o == nil || o.Oidc == nil {
+ var ret IdentityWithCredentialsOidc
+ return ret
+ }
+ return *o.Oidc
+}
+
+// GetOidcOk returns a tuple with the Oidc field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityWithCredentials) GetOidcOk() (*IdentityWithCredentialsOidc, bool) {
+ if o == nil || o.Oidc == nil {
+ return nil, false
+ }
+ return o.Oidc, true
+}
+
+// HasOidc returns a boolean if a field has been set.
+func (o *IdentityWithCredentials) HasOidc() bool {
+ if o != nil && o.Oidc != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetOidc gets a reference to the given IdentityWithCredentialsOidc and assigns it to the Oidc field.
+func (o *IdentityWithCredentials) SetOidc(v IdentityWithCredentialsOidc) {
+ o.Oidc = &v
+}
+
+// GetPassword returns the Password field value if set, zero value otherwise.
+func (o *IdentityWithCredentials) GetPassword() IdentityWithCredentialsPassword {
+ if o == nil || o.Password == nil {
+ var ret IdentityWithCredentialsPassword
+ return ret
+ }
+ return *o.Password
+}
+
+// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityWithCredentials) GetPasswordOk() (*IdentityWithCredentialsPassword, bool) {
+ if o == nil || o.Password == nil {
+ return nil, false
+ }
+ return o.Password, true
+}
+
+// HasPassword returns a boolean if a field has been set.
+func (o *IdentityWithCredentials) HasPassword() bool {
+ if o != nil && o.Password != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPassword gets a reference to the given IdentityWithCredentialsPassword and assigns it to the Password field.
+func (o *IdentityWithCredentials) SetPassword(v IdentityWithCredentialsPassword) {
+ o.Password = &v
+}
+
+func (o IdentityWithCredentials) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Oidc != nil {
+ toSerialize["oidc"] = o.Oidc
+ }
+ if o.Password != nil {
+ toSerialize["password"] = o.Password
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableIdentityWithCredentials struct {
+ value *IdentityWithCredentials
+ isSet bool
+}
+
+func (v NullableIdentityWithCredentials) Get() *IdentityWithCredentials {
+ return v.value
+}
+
+func (v *NullableIdentityWithCredentials) Set(val *IdentityWithCredentials) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableIdentityWithCredentials) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableIdentityWithCredentials) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableIdentityWithCredentials(val *IdentityWithCredentials) *NullableIdentityWithCredentials {
+ return &NullableIdentityWithCredentials{value: val, isSet: true}
+}
+
+func (v NullableIdentityWithCredentials) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableIdentityWithCredentials) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_identity_with_credentials_oidc.go b/internal/httpclient/model_identity_with_credentials_oidc.go
new file mode 100644
index 000000000000..afa70faa97e0
--- /dev/null
+++ b/internal/httpclient/model_identity_with_credentials_oidc.go
@@ -0,0 +1,114 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// IdentityWithCredentialsOidc Create Identity and Import Social Sign In Credentials
+type IdentityWithCredentialsOidc struct {
+ Config *IdentityWithCredentialsOidcConfig `json:"config,omitempty"`
+}
+
+// NewIdentityWithCredentialsOidc instantiates a new IdentityWithCredentialsOidc object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewIdentityWithCredentialsOidc() *IdentityWithCredentialsOidc {
+ this := IdentityWithCredentialsOidc{}
+ return &this
+}
+
+// NewIdentityWithCredentialsOidcWithDefaults instantiates a new IdentityWithCredentialsOidc object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewIdentityWithCredentialsOidcWithDefaults() *IdentityWithCredentialsOidc {
+ this := IdentityWithCredentialsOidc{}
+ return &this
+}
+
+// GetConfig returns the Config field value if set, zero value otherwise.
+func (o *IdentityWithCredentialsOidc) GetConfig() IdentityWithCredentialsOidcConfig {
+ if o == nil || o.Config == nil {
+ var ret IdentityWithCredentialsOidcConfig
+ return ret
+ }
+ return *o.Config
+}
+
+// GetConfigOk returns a tuple with the Config field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityWithCredentialsOidc) GetConfigOk() (*IdentityWithCredentialsOidcConfig, bool) {
+ if o == nil || o.Config == nil {
+ return nil, false
+ }
+ return o.Config, true
+}
+
+// HasConfig returns a boolean if a field has been set.
+func (o *IdentityWithCredentialsOidc) HasConfig() bool {
+ if o != nil && o.Config != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetConfig gets a reference to the given IdentityWithCredentialsOidcConfig and assigns it to the Config field.
+func (o *IdentityWithCredentialsOidc) SetConfig(v IdentityWithCredentialsOidcConfig) {
+ o.Config = &v
+}
+
+func (o IdentityWithCredentialsOidc) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Config != nil {
+ toSerialize["config"] = o.Config
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableIdentityWithCredentialsOidc struct {
+ value *IdentityWithCredentialsOidc
+ isSet bool
+}
+
+func (v NullableIdentityWithCredentialsOidc) Get() *IdentityWithCredentialsOidc {
+ return v.value
+}
+
+func (v *NullableIdentityWithCredentialsOidc) Set(val *IdentityWithCredentialsOidc) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableIdentityWithCredentialsOidc) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableIdentityWithCredentialsOidc) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableIdentityWithCredentialsOidc(val *IdentityWithCredentialsOidc) *NullableIdentityWithCredentialsOidc {
+ return &NullableIdentityWithCredentialsOidc{value: val, isSet: true}
+}
+
+func (v NullableIdentityWithCredentialsOidc) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableIdentityWithCredentialsOidc) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_identity_with_credentials_oidc_config.go b/internal/httpclient/model_identity_with_credentials_oidc_config.go
new file mode 100644
index 000000000000..51440cb44092
--- /dev/null
+++ b/internal/httpclient/model_identity_with_credentials_oidc_config.go
@@ -0,0 +1,151 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// IdentityWithCredentialsOidcConfig struct for IdentityWithCredentialsOidcConfig
+type IdentityWithCredentialsOidcConfig struct {
+ Config *IdentityWithCredentialsPasswordConfig `json:"config,omitempty"`
+ // A list of OpenID Connect Providers
+ Providers []IdentityWithCredentialsOidcConfigProvider `json:"providers,omitempty"`
+}
+
+// NewIdentityWithCredentialsOidcConfig instantiates a new IdentityWithCredentialsOidcConfig object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewIdentityWithCredentialsOidcConfig() *IdentityWithCredentialsOidcConfig {
+ this := IdentityWithCredentialsOidcConfig{}
+ return &this
+}
+
+// NewIdentityWithCredentialsOidcConfigWithDefaults instantiates a new IdentityWithCredentialsOidcConfig object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewIdentityWithCredentialsOidcConfigWithDefaults() *IdentityWithCredentialsOidcConfig {
+ this := IdentityWithCredentialsOidcConfig{}
+ return &this
+}
+
+// GetConfig returns the Config field value if set, zero value otherwise.
+func (o *IdentityWithCredentialsOidcConfig) GetConfig() IdentityWithCredentialsPasswordConfig {
+ if o == nil || o.Config == nil {
+ var ret IdentityWithCredentialsPasswordConfig
+ return ret
+ }
+ return *o.Config
+}
+
+// GetConfigOk returns a tuple with the Config field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityWithCredentialsOidcConfig) GetConfigOk() (*IdentityWithCredentialsPasswordConfig, bool) {
+ if o == nil || o.Config == nil {
+ return nil, false
+ }
+ return o.Config, true
+}
+
+// HasConfig returns a boolean if a field has been set.
+func (o *IdentityWithCredentialsOidcConfig) HasConfig() bool {
+ if o != nil && o.Config != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetConfig gets a reference to the given IdentityWithCredentialsPasswordConfig and assigns it to the Config field.
+func (o *IdentityWithCredentialsOidcConfig) SetConfig(v IdentityWithCredentialsPasswordConfig) {
+ o.Config = &v
+}
+
+// GetProviders returns the Providers field value if set, zero value otherwise.
+func (o *IdentityWithCredentialsOidcConfig) GetProviders() []IdentityWithCredentialsOidcConfigProvider {
+ if o == nil || o.Providers == nil {
+ var ret []IdentityWithCredentialsOidcConfigProvider
+ return ret
+ }
+ return o.Providers
+}
+
+// GetProvidersOk returns a tuple with the Providers field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityWithCredentialsOidcConfig) GetProvidersOk() ([]IdentityWithCredentialsOidcConfigProvider, bool) {
+ if o == nil || o.Providers == nil {
+ return nil, false
+ }
+ return o.Providers, true
+}
+
+// HasProviders returns a boolean if a field has been set.
+func (o *IdentityWithCredentialsOidcConfig) HasProviders() bool {
+ if o != nil && o.Providers != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetProviders gets a reference to the given []IdentityWithCredentialsOidcConfigProvider and assigns it to the Providers field.
+func (o *IdentityWithCredentialsOidcConfig) SetProviders(v []IdentityWithCredentialsOidcConfigProvider) {
+ o.Providers = v
+}
+
+func (o IdentityWithCredentialsOidcConfig) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Config != nil {
+ toSerialize["config"] = o.Config
+ }
+ if o.Providers != nil {
+ toSerialize["providers"] = o.Providers
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableIdentityWithCredentialsOidcConfig struct {
+ value *IdentityWithCredentialsOidcConfig
+ isSet bool
+}
+
+func (v NullableIdentityWithCredentialsOidcConfig) Get() *IdentityWithCredentialsOidcConfig {
+ return v.value
+}
+
+func (v *NullableIdentityWithCredentialsOidcConfig) Set(val *IdentityWithCredentialsOidcConfig) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableIdentityWithCredentialsOidcConfig) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableIdentityWithCredentialsOidcConfig) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableIdentityWithCredentialsOidcConfig(val *IdentityWithCredentialsOidcConfig) *NullableIdentityWithCredentialsOidcConfig {
+ return &NullableIdentityWithCredentialsOidcConfig{value: val, isSet: true}
+}
+
+func (v NullableIdentityWithCredentialsOidcConfig) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableIdentityWithCredentialsOidcConfig) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_identity_with_credentials_oidc_config_provider.go b/internal/httpclient/model_identity_with_credentials_oidc_config_provider.go
new file mode 100644
index 000000000000..a12405169aef
--- /dev/null
+++ b/internal/httpclient/model_identity_with_credentials_oidc_config_provider.go
@@ -0,0 +1,138 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// IdentityWithCredentialsOidcConfigProvider Create Identity and Import Social Sign In Credentials Configuration
+type IdentityWithCredentialsOidcConfigProvider struct {
+ // The OpenID Connect provider to link the subject to. Usually something like `google` or `github`.
+ Provider string `json:"provider"`
+ // The subject (`sub`) of the OpenID Connect connection. Usually the `sub` field of the ID Token.
+ Subject string `json:"subject"`
+}
+
+// NewIdentityWithCredentialsOidcConfigProvider instantiates a new IdentityWithCredentialsOidcConfigProvider object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewIdentityWithCredentialsOidcConfigProvider(provider string, subject string) *IdentityWithCredentialsOidcConfigProvider {
+ this := IdentityWithCredentialsOidcConfigProvider{}
+ this.Provider = provider
+ this.Subject = subject
+ return &this
+}
+
+// NewIdentityWithCredentialsOidcConfigProviderWithDefaults instantiates a new IdentityWithCredentialsOidcConfigProvider object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewIdentityWithCredentialsOidcConfigProviderWithDefaults() *IdentityWithCredentialsOidcConfigProvider {
+ this := IdentityWithCredentialsOidcConfigProvider{}
+ return &this
+}
+
+// GetProvider returns the Provider field value
+func (o *IdentityWithCredentialsOidcConfigProvider) GetProvider() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Provider
+}
+
+// GetProviderOk returns a tuple with the Provider field value
+// and a boolean to check if the value has been set.
+func (o *IdentityWithCredentialsOidcConfigProvider) GetProviderOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Provider, true
+}
+
+// SetProvider sets field value
+func (o *IdentityWithCredentialsOidcConfigProvider) SetProvider(v string) {
+ o.Provider = v
+}
+
+// GetSubject returns the Subject field value
+func (o *IdentityWithCredentialsOidcConfigProvider) GetSubject() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Subject
+}
+
+// GetSubjectOk returns a tuple with the Subject field value
+// and a boolean to check if the value has been set.
+func (o *IdentityWithCredentialsOidcConfigProvider) GetSubjectOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Subject, true
+}
+
+// SetSubject sets field value
+func (o *IdentityWithCredentialsOidcConfigProvider) SetSubject(v string) {
+ o.Subject = v
+}
+
+func (o IdentityWithCredentialsOidcConfigProvider) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if true {
+ toSerialize["provider"] = o.Provider
+ }
+ if true {
+ toSerialize["subject"] = o.Subject
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableIdentityWithCredentialsOidcConfigProvider struct {
+ value *IdentityWithCredentialsOidcConfigProvider
+ isSet bool
+}
+
+func (v NullableIdentityWithCredentialsOidcConfigProvider) Get() *IdentityWithCredentialsOidcConfigProvider {
+ return v.value
+}
+
+func (v *NullableIdentityWithCredentialsOidcConfigProvider) Set(val *IdentityWithCredentialsOidcConfigProvider) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableIdentityWithCredentialsOidcConfigProvider) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableIdentityWithCredentialsOidcConfigProvider) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableIdentityWithCredentialsOidcConfigProvider(val *IdentityWithCredentialsOidcConfigProvider) *NullableIdentityWithCredentialsOidcConfigProvider {
+ return &NullableIdentityWithCredentialsOidcConfigProvider{value: val, isSet: true}
+}
+
+func (v NullableIdentityWithCredentialsOidcConfigProvider) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableIdentityWithCredentialsOidcConfigProvider) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_identity_with_credentials_password.go b/internal/httpclient/model_identity_with_credentials_password.go
new file mode 100644
index 000000000000..ca5a7bd46195
--- /dev/null
+++ b/internal/httpclient/model_identity_with_credentials_password.go
@@ -0,0 +1,114 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// IdentityWithCredentialsPassword Create Identity and Import Password Credentials
+type IdentityWithCredentialsPassword struct {
+ Config *IdentityWithCredentialsPasswordConfig `json:"config,omitempty"`
+}
+
+// NewIdentityWithCredentialsPassword instantiates a new IdentityWithCredentialsPassword object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewIdentityWithCredentialsPassword() *IdentityWithCredentialsPassword {
+ this := IdentityWithCredentialsPassword{}
+ return &this
+}
+
+// NewIdentityWithCredentialsPasswordWithDefaults instantiates a new IdentityWithCredentialsPassword object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewIdentityWithCredentialsPasswordWithDefaults() *IdentityWithCredentialsPassword {
+ this := IdentityWithCredentialsPassword{}
+ return &this
+}
+
+// GetConfig returns the Config field value if set, zero value otherwise.
+func (o *IdentityWithCredentialsPassword) GetConfig() IdentityWithCredentialsPasswordConfig {
+ if o == nil || o.Config == nil {
+ var ret IdentityWithCredentialsPasswordConfig
+ return ret
+ }
+ return *o.Config
+}
+
+// GetConfigOk returns a tuple with the Config field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityWithCredentialsPassword) GetConfigOk() (*IdentityWithCredentialsPasswordConfig, bool) {
+ if o == nil || o.Config == nil {
+ return nil, false
+ }
+ return o.Config, true
+}
+
+// HasConfig returns a boolean if a field has been set.
+func (o *IdentityWithCredentialsPassword) HasConfig() bool {
+ if o != nil && o.Config != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetConfig gets a reference to the given IdentityWithCredentialsPasswordConfig and assigns it to the Config field.
+func (o *IdentityWithCredentialsPassword) SetConfig(v IdentityWithCredentialsPasswordConfig) {
+ o.Config = &v
+}
+
+func (o IdentityWithCredentialsPassword) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Config != nil {
+ toSerialize["config"] = o.Config
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableIdentityWithCredentialsPassword struct {
+ value *IdentityWithCredentialsPassword
+ isSet bool
+}
+
+func (v NullableIdentityWithCredentialsPassword) Get() *IdentityWithCredentialsPassword {
+ return v.value
+}
+
+func (v *NullableIdentityWithCredentialsPassword) Set(val *IdentityWithCredentialsPassword) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableIdentityWithCredentialsPassword) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableIdentityWithCredentialsPassword) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableIdentityWithCredentialsPassword(val *IdentityWithCredentialsPassword) *NullableIdentityWithCredentialsPassword {
+ return &NullableIdentityWithCredentialsPassword{value: val, isSet: true}
+}
+
+func (v NullableIdentityWithCredentialsPassword) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableIdentityWithCredentialsPassword) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_identity_with_credentials_password_config.go b/internal/httpclient/model_identity_with_credentials_password_config.go
new file mode 100644
index 000000000000..754d59460f83
--- /dev/null
+++ b/internal/httpclient/model_identity_with_credentials_password_config.go
@@ -0,0 +1,152 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// IdentityWithCredentialsPasswordConfig Create Identity and Import Password Credentials Configuration
+type IdentityWithCredentialsPasswordConfig struct {
+ // The hashed password in [PHC format](https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities#hashed-passwords)
+ HashedPassword *string `json:"hashed_password,omitempty"`
+ // The password in plain text if no hash is available.
+ Password *string `json:"password,omitempty"`
+}
+
+// NewIdentityWithCredentialsPasswordConfig instantiates a new IdentityWithCredentialsPasswordConfig object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewIdentityWithCredentialsPasswordConfig() *IdentityWithCredentialsPasswordConfig {
+ this := IdentityWithCredentialsPasswordConfig{}
+ return &this
+}
+
+// NewIdentityWithCredentialsPasswordConfigWithDefaults instantiates a new IdentityWithCredentialsPasswordConfig object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewIdentityWithCredentialsPasswordConfigWithDefaults() *IdentityWithCredentialsPasswordConfig {
+ this := IdentityWithCredentialsPasswordConfig{}
+ return &this
+}
+
+// GetHashedPassword returns the HashedPassword field value if set, zero value otherwise.
+func (o *IdentityWithCredentialsPasswordConfig) GetHashedPassword() string {
+ if o == nil || o.HashedPassword == nil {
+ var ret string
+ return ret
+ }
+ return *o.HashedPassword
+}
+
+// GetHashedPasswordOk returns a tuple with the HashedPassword field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityWithCredentialsPasswordConfig) GetHashedPasswordOk() (*string, bool) {
+ if o == nil || o.HashedPassword == nil {
+ return nil, false
+ }
+ return o.HashedPassword, true
+}
+
+// HasHashedPassword returns a boolean if a field has been set.
+func (o *IdentityWithCredentialsPasswordConfig) HasHashedPassword() bool {
+ if o != nil && o.HashedPassword != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetHashedPassword gets a reference to the given string and assigns it to the HashedPassword field.
+func (o *IdentityWithCredentialsPasswordConfig) SetHashedPassword(v string) {
+ o.HashedPassword = &v
+}
+
+// GetPassword returns the Password field value if set, zero value otherwise.
+func (o *IdentityWithCredentialsPasswordConfig) GetPassword() string {
+ if o == nil || o.Password == nil {
+ var ret string
+ return ret
+ }
+ return *o.Password
+}
+
+// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *IdentityWithCredentialsPasswordConfig) GetPasswordOk() (*string, bool) {
+ if o == nil || o.Password == nil {
+ return nil, false
+ }
+ return o.Password, true
+}
+
+// HasPassword returns a boolean if a field has been set.
+func (o *IdentityWithCredentialsPasswordConfig) HasPassword() bool {
+ if o != nil && o.Password != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPassword gets a reference to the given string and assigns it to the Password field.
+func (o *IdentityWithCredentialsPasswordConfig) SetPassword(v string) {
+ o.Password = &v
+}
+
+func (o IdentityWithCredentialsPasswordConfig) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.HashedPassword != nil {
+ toSerialize["hashed_password"] = o.HashedPassword
+ }
+ if o.Password != nil {
+ toSerialize["password"] = o.Password
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableIdentityWithCredentialsPasswordConfig struct {
+ value *IdentityWithCredentialsPasswordConfig
+ isSet bool
+}
+
+func (v NullableIdentityWithCredentialsPasswordConfig) Get() *IdentityWithCredentialsPasswordConfig {
+ return v.value
+}
+
+func (v *NullableIdentityWithCredentialsPasswordConfig) Set(val *IdentityWithCredentialsPasswordConfig) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableIdentityWithCredentialsPasswordConfig) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableIdentityWithCredentialsPasswordConfig) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableIdentityWithCredentialsPasswordConfig(val *IdentityWithCredentialsPasswordConfig) *NullableIdentityWithCredentialsPasswordConfig {
+ return &NullableIdentityWithCredentialsPasswordConfig{value: val, isSet: true}
+}
+
+func (v NullableIdentityWithCredentialsPasswordConfig) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableIdentityWithCredentialsPasswordConfig) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_is_alive_200_response.go b/internal/httpclient/model_is_alive_200_response.go
new file mode 100644
index 000000000000..cce2dfa5238f
--- /dev/null
+++ b/internal/httpclient/model_is_alive_200_response.go
@@ -0,0 +1,108 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// IsAlive200Response struct for IsAlive200Response
+type IsAlive200Response struct {
+ // Always \"ok\".
+ Status string `json:"status"`
+}
+
+// NewIsAlive200Response instantiates a new IsAlive200Response object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewIsAlive200Response(status string) *IsAlive200Response {
+ this := IsAlive200Response{}
+ this.Status = status
+ return &this
+}
+
+// NewIsAlive200ResponseWithDefaults instantiates a new IsAlive200Response object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewIsAlive200ResponseWithDefaults() *IsAlive200Response {
+ this := IsAlive200Response{}
+ return &this
+}
+
+// GetStatus returns the Status field value
+func (o *IsAlive200Response) GetStatus() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Status
+}
+
+// GetStatusOk returns a tuple with the Status field value
+// and a boolean to check if the value has been set.
+func (o *IsAlive200Response) GetStatusOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Status, true
+}
+
+// SetStatus sets field value
+func (o *IsAlive200Response) SetStatus(v string) {
+ o.Status = v
+}
+
+func (o IsAlive200Response) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if true {
+ toSerialize["status"] = o.Status
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableIsAlive200Response struct {
+ value *IsAlive200Response
+ isSet bool
+}
+
+func (v NullableIsAlive200Response) Get() *IsAlive200Response {
+ return v.value
+}
+
+func (v *NullableIsAlive200Response) Set(val *IsAlive200Response) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableIsAlive200Response) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableIsAlive200Response) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableIsAlive200Response(val *IsAlive200Response) *NullableIsAlive200Response {
+ return &NullableIsAlive200Response{value: val, isSet: true}
+}
+
+func (v NullableIsAlive200Response) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableIsAlive200Response) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_is_ready_503_response.go b/internal/httpclient/model_is_ready_503_response.go
new file mode 100644
index 000000000000..9b0b6f581a25
--- /dev/null
+++ b/internal/httpclient/model_is_ready_503_response.go
@@ -0,0 +1,108 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// IsReady503Response struct for IsReady503Response
+type IsReady503Response struct {
+ // Errors contains a list of errors that caused the not ready status.
+ Errors map[string]string `json:"errors"`
+}
+
+// NewIsReady503Response instantiates a new IsReady503Response object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewIsReady503Response(errors map[string]string) *IsReady503Response {
+ this := IsReady503Response{}
+ this.Errors = errors
+ return &this
+}
+
+// NewIsReady503ResponseWithDefaults instantiates a new IsReady503Response object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewIsReady503ResponseWithDefaults() *IsReady503Response {
+ this := IsReady503Response{}
+ return &this
+}
+
+// GetErrors returns the Errors field value
+func (o *IsReady503Response) GetErrors() map[string]string {
+ if o == nil {
+ var ret map[string]string
+ return ret
+ }
+
+ return o.Errors
+}
+
+// GetErrorsOk returns a tuple with the Errors field value
+// and a boolean to check if the value has been set.
+func (o *IsReady503Response) GetErrorsOk() (*map[string]string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Errors, true
+}
+
+// SetErrors sets field value
+func (o *IsReady503Response) SetErrors(v map[string]string) {
+ o.Errors = v
+}
+
+func (o IsReady503Response) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if true {
+ toSerialize["errors"] = o.Errors
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableIsReady503Response struct {
+ value *IsReady503Response
+ isSet bool
+}
+
+func (v NullableIsReady503Response) Get() *IsReady503Response {
+ return v.value
+}
+
+func (v *NullableIsReady503Response) Set(val *IsReady503Response) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableIsReady503Response) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableIsReady503Response) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableIsReady503Response(val *IsReady503Response) *NullableIsReady503Response {
+ return &NullableIsReady503Response{value: val, isSet: true}
+}
+
+func (v NullableIsReady503Response) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableIsReady503Response) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_json_patch.go b/internal/httpclient/model_json_patch.go
new file mode 100644
index 000000000000..b810d0ef4a74
--- /dev/null
+++ b/internal/httpclient/model_json_patch.go
@@ -0,0 +1,213 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// JsonPatch A JSONPatch document as defined by RFC 6902
+type JsonPatch struct {
+ // This field is used together with operation \"move\" and uses JSON Pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).
+ From *string `json:"from,omitempty"`
+ // The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\".
+ Op string `json:"op"`
+ // The path to the target path. Uses JSON pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).
+ Path string `json:"path"`
+ // The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).
+ Value interface{} `json:"value,omitempty"`
+}
+
+// NewJsonPatch instantiates a new JsonPatch object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewJsonPatch(op string, path string) *JsonPatch {
+ this := JsonPatch{}
+ this.Op = op
+ this.Path = path
+ return &this
+}
+
+// NewJsonPatchWithDefaults instantiates a new JsonPatch object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewJsonPatchWithDefaults() *JsonPatch {
+ this := JsonPatch{}
+ return &this
+}
+
+// GetFrom returns the From field value if set, zero value otherwise.
+func (o *JsonPatch) GetFrom() string {
+ if o == nil || o.From == nil {
+ var ret string
+ return ret
+ }
+ return *o.From
+}
+
+// GetFromOk returns a tuple with the From field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *JsonPatch) GetFromOk() (*string, bool) {
+ if o == nil || o.From == nil {
+ return nil, false
+ }
+ return o.From, true
+}
+
+// HasFrom returns a boolean if a field has been set.
+func (o *JsonPatch) HasFrom() bool {
+ if o != nil && o.From != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetFrom gets a reference to the given string and assigns it to the From field.
+func (o *JsonPatch) SetFrom(v string) {
+ o.From = &v
+}
+
+// GetOp returns the Op field value
+func (o *JsonPatch) GetOp() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Op
+}
+
+// GetOpOk returns a tuple with the Op field value
+// and a boolean to check if the value has been set.
+func (o *JsonPatch) GetOpOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Op, true
+}
+
+// SetOp sets field value
+func (o *JsonPatch) SetOp(v string) {
+ o.Op = v
+}
+
+// GetPath returns the Path field value
+func (o *JsonPatch) GetPath() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Path
+}
+
+// GetPathOk returns a tuple with the Path field value
+// and a boolean to check if the value has been set.
+func (o *JsonPatch) GetPathOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Path, true
+}
+
+// SetPath sets field value
+func (o *JsonPatch) SetPath(v string) {
+ o.Path = v
+}
+
+// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null).
+func (o *JsonPatch) GetValue() interface{} {
+ if o == nil {
+ var ret interface{}
+ return ret
+ }
+ return o.Value
+}
+
+// GetValueOk returns a tuple with the Value field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+// NOTE: If the value is an explicit nil, `nil, true` will be returned
+func (o *JsonPatch) GetValueOk() (*interface{}, bool) {
+ if o == nil || o.Value == nil {
+ return nil, false
+ }
+ return &o.Value, true
+}
+
+// HasValue returns a boolean if a field has been set.
+func (o *JsonPatch) HasValue() bool {
+ if o != nil && o.Value != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetValue gets a reference to the given interface{} and assigns it to the Value field.
+func (o *JsonPatch) SetValue(v interface{}) {
+ o.Value = v
+}
+
+func (o JsonPatch) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.From != nil {
+ toSerialize["from"] = o.From
+ }
+ if true {
+ toSerialize["op"] = o.Op
+ }
+ if true {
+ toSerialize["path"] = o.Path
+ }
+ if o.Value != nil {
+ toSerialize["value"] = o.Value
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableJsonPatch struct {
+ value *JsonPatch
+ isSet bool
+}
+
+func (v NullableJsonPatch) Get() *JsonPatch {
+ return v.value
+}
+
+func (v *NullableJsonPatch) Set(val *JsonPatch) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableJsonPatch) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableJsonPatch) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableJsonPatch(val *JsonPatch) *NullableJsonPatch {
+ return &NullableJsonPatch{value: val, isSet: true}
+}
+
+func (v NullableJsonPatch) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableJsonPatch) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_login_flow.go b/internal/httpclient/model_login_flow.go
new file mode 100644
index 000000000000..dac443b5bbe4
--- /dev/null
+++ b/internal/httpclient/model_login_flow.go
@@ -0,0 +1,705 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "time"
+)
+
+// LoginFlow This object represents a login flow. A login flow is initiated at the \"Initiate Login API / Browser Flow\" endpoint by a client. Once a login flow is completed successfully, a session cookie or session token will be issued.
+type LoginFlow struct {
+ // The active login method If set contains the login method used. If the flow is new, it is unset. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth passkey CredentialsTypePasskey profile CredentialsTypeProfile two_step TwoStep link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode
+ Active *string `json:"active,omitempty"`
+ // CreatedAt is a helper struct field for gobuffalo.pop.
+ CreatedAt *time.Time `json:"created_at,omitempty"`
+ // ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to log in, a new flow has to be initiated.
+ ExpiresAt time.Time `json:"expires_at"`
+ // ID represents the flow's unique ID. When performing the login flow, this represents the id in the login UI's query parameter: http:///?flow=
+ Id string `json:"id"`
+ // IssuedAt is the time (UTC) when the flow started.
+ IssuedAt time.Time `json:"issued_at"`
+ // Ory OAuth 2.0 Login Challenge. This value is set using the `login_challenge` query parameter of the registration and login endpoints. If set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider.
+ Oauth2LoginChallenge *string `json:"oauth2_login_challenge,omitempty"`
+ Oauth2LoginRequest *OAuth2LoginRequest `json:"oauth2_login_request,omitempty"`
+ OrganizationId NullableString `json:"organization_id,omitempty"`
+ // Refresh stores whether this login flow should enforce re-authentication.
+ Refresh *bool `json:"refresh,omitempty"`
+ // RequestURL is the initial URL that was requested from Ory Kratos. It can be used to forward information contained in the URL's path or query for example.
+ RequestUrl string `json:"request_url"`
+ RequestedAal *AuthenticatorAssuranceLevel `json:"requested_aal,omitempty"`
+ // ReturnTo contains the requested return_to URL.
+ ReturnTo *string `json:"return_to,omitempty"`
+ // SessionTokenExchangeCode holds the secret code that the client can use to retrieve a session token after the login flow has been completed. This is only set if the client has requested a session token exchange code, and if the flow is of type \"api\", and only on creating the login flow.
+ SessionTokenExchangeCode *string `json:"session_token_exchange_code,omitempty"`
+ // State represents the state of this request: choose_method: ask the user to choose a method to sign in with sent_email: the email has been sent to the user passed_challenge: the request was successful and the login challenge was passed.
+ State interface{} `json:"state"`
+ // TransientPayload is used to pass data from the login to hooks and email templates
+ TransientPayload map[string]interface{} `json:"transient_payload,omitempty"`
+ // The flow type can either be `api` or `browser`.
+ Type string `json:"type"`
+ Ui UiContainer `json:"ui"`
+ // UpdatedAt is a helper struct field for gobuffalo.pop.
+ UpdatedAt *time.Time `json:"updated_at,omitempty"`
+}
+
+// NewLoginFlow instantiates a new LoginFlow object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewLoginFlow(expiresAt time.Time, id string, issuedAt time.Time, requestUrl string, state interface{}, type_ string, ui UiContainer) *LoginFlow {
+ this := LoginFlow{}
+ this.ExpiresAt = expiresAt
+ this.Id = id
+ this.IssuedAt = issuedAt
+ this.RequestUrl = requestUrl
+ this.State = state
+ this.Type = type_
+ this.Ui = ui
+ return &this
+}
+
+// NewLoginFlowWithDefaults instantiates a new LoginFlow object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewLoginFlowWithDefaults() *LoginFlow {
+ this := LoginFlow{}
+ return &this
+}
+
+// GetActive returns the Active field value if set, zero value otherwise.
+func (o *LoginFlow) GetActive() string {
+ if o == nil || o.Active == nil {
+ var ret string
+ return ret
+ }
+ return *o.Active
+}
+
+// GetActiveOk returns a tuple with the Active field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *LoginFlow) GetActiveOk() (*string, bool) {
+ if o == nil || o.Active == nil {
+ return nil, false
+ }
+ return o.Active, true
+}
+
+// HasActive returns a boolean if a field has been set.
+func (o *LoginFlow) HasActive() bool {
+ if o != nil && o.Active != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetActive gets a reference to the given string and assigns it to the Active field.
+func (o *LoginFlow) SetActive(v string) {
+ o.Active = &v
+}
+
+// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
+func (o *LoginFlow) GetCreatedAt() time.Time {
+ if o == nil || o.CreatedAt == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.CreatedAt
+}
+
+// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *LoginFlow) GetCreatedAtOk() (*time.Time, bool) {
+ if o == nil || o.CreatedAt == nil {
+ return nil, false
+ }
+ return o.CreatedAt, true
+}
+
+// HasCreatedAt returns a boolean if a field has been set.
+func (o *LoginFlow) HasCreatedAt() bool {
+ if o != nil && o.CreatedAt != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
+func (o *LoginFlow) SetCreatedAt(v time.Time) {
+ o.CreatedAt = &v
+}
+
+// GetExpiresAt returns the ExpiresAt field value
+func (o *LoginFlow) GetExpiresAt() time.Time {
+ if o == nil {
+ var ret time.Time
+ return ret
+ }
+
+ return o.ExpiresAt
+}
+
+// GetExpiresAtOk returns a tuple with the ExpiresAt field value
+// and a boolean to check if the value has been set.
+func (o *LoginFlow) GetExpiresAtOk() (*time.Time, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.ExpiresAt, true
+}
+
+// SetExpiresAt sets field value
+func (o *LoginFlow) SetExpiresAt(v time.Time) {
+ o.ExpiresAt = v
+}
+
+// GetId returns the Id field value
+func (o *LoginFlow) GetId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value
+// and a boolean to check if the value has been set.
+func (o *LoginFlow) GetIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Id, true
+}
+
+// SetId sets field value
+func (o *LoginFlow) SetId(v string) {
+ o.Id = v
+}
+
+// GetIssuedAt returns the IssuedAt field value
+func (o *LoginFlow) GetIssuedAt() time.Time {
+ if o == nil {
+ var ret time.Time
+ return ret
+ }
+
+ return o.IssuedAt
+}
+
+// GetIssuedAtOk returns a tuple with the IssuedAt field value
+// and a boolean to check if the value has been set.
+func (o *LoginFlow) GetIssuedAtOk() (*time.Time, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.IssuedAt, true
+}
+
+// SetIssuedAt sets field value
+func (o *LoginFlow) SetIssuedAt(v time.Time) {
+ o.IssuedAt = v
+}
+
+// GetOauth2LoginChallenge returns the Oauth2LoginChallenge field value if set, zero value otherwise.
+func (o *LoginFlow) GetOauth2LoginChallenge() string {
+ if o == nil || o.Oauth2LoginChallenge == nil {
+ var ret string
+ return ret
+ }
+ return *o.Oauth2LoginChallenge
+}
+
+// GetOauth2LoginChallengeOk returns a tuple with the Oauth2LoginChallenge field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *LoginFlow) GetOauth2LoginChallengeOk() (*string, bool) {
+ if o == nil || o.Oauth2LoginChallenge == nil {
+ return nil, false
+ }
+ return o.Oauth2LoginChallenge, true
+}
+
+// HasOauth2LoginChallenge returns a boolean if a field has been set.
+func (o *LoginFlow) HasOauth2LoginChallenge() bool {
+ if o != nil && o.Oauth2LoginChallenge != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetOauth2LoginChallenge gets a reference to the given string and assigns it to the Oauth2LoginChallenge field.
+func (o *LoginFlow) SetOauth2LoginChallenge(v string) {
+ o.Oauth2LoginChallenge = &v
+}
+
+// GetOauth2LoginRequest returns the Oauth2LoginRequest field value if set, zero value otherwise.
+func (o *LoginFlow) GetOauth2LoginRequest() OAuth2LoginRequest {
+ if o == nil || o.Oauth2LoginRequest == nil {
+ var ret OAuth2LoginRequest
+ return ret
+ }
+ return *o.Oauth2LoginRequest
+}
+
+// GetOauth2LoginRequestOk returns a tuple with the Oauth2LoginRequest field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *LoginFlow) GetOauth2LoginRequestOk() (*OAuth2LoginRequest, bool) {
+ if o == nil || o.Oauth2LoginRequest == nil {
+ return nil, false
+ }
+ return o.Oauth2LoginRequest, true
+}
+
+// HasOauth2LoginRequest returns a boolean if a field has been set.
+func (o *LoginFlow) HasOauth2LoginRequest() bool {
+ if o != nil && o.Oauth2LoginRequest != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetOauth2LoginRequest gets a reference to the given OAuth2LoginRequest and assigns it to the Oauth2LoginRequest field.
+func (o *LoginFlow) SetOauth2LoginRequest(v OAuth2LoginRequest) {
+ o.Oauth2LoginRequest = &v
+}
+
+// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise (both if not set or set to explicit null).
+func (o *LoginFlow) GetOrganizationId() string {
+ if o == nil || o.OrganizationId.Get() == nil {
+ var ret string
+ return ret
+ }
+ return *o.OrganizationId.Get()
+}
+
+// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+// NOTE: If the value is an explicit nil, `nil, true` will be returned
+func (o *LoginFlow) GetOrganizationIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return o.OrganizationId.Get(), o.OrganizationId.IsSet()
+}
+
+// HasOrganizationId returns a boolean if a field has been set.
+func (o *LoginFlow) HasOrganizationId() bool {
+ if o != nil && o.OrganizationId.IsSet() {
+ return true
+ }
+
+ return false
+}
+
+// SetOrganizationId gets a reference to the given NullableString and assigns it to the OrganizationId field.
+func (o *LoginFlow) SetOrganizationId(v string) {
+ o.OrganizationId.Set(&v)
+}
+
+// SetOrganizationIdNil sets the value for OrganizationId to be an explicit nil
+func (o *LoginFlow) SetOrganizationIdNil() {
+ o.OrganizationId.Set(nil)
+}
+
+// UnsetOrganizationId ensures that no value is present for OrganizationId, not even an explicit nil
+func (o *LoginFlow) UnsetOrganizationId() {
+ o.OrganizationId.Unset()
+}
+
+// GetRefresh returns the Refresh field value if set, zero value otherwise.
+func (o *LoginFlow) GetRefresh() bool {
+ if o == nil || o.Refresh == nil {
+ var ret bool
+ return ret
+ }
+ return *o.Refresh
+}
+
+// GetRefreshOk returns a tuple with the Refresh field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *LoginFlow) GetRefreshOk() (*bool, bool) {
+ if o == nil || o.Refresh == nil {
+ return nil, false
+ }
+ return o.Refresh, true
+}
+
+// HasRefresh returns a boolean if a field has been set.
+func (o *LoginFlow) HasRefresh() bool {
+ if o != nil && o.Refresh != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetRefresh gets a reference to the given bool and assigns it to the Refresh field.
+func (o *LoginFlow) SetRefresh(v bool) {
+ o.Refresh = &v
+}
+
+// GetRequestUrl returns the RequestUrl field value
+func (o *LoginFlow) GetRequestUrl() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.RequestUrl
+}
+
+// GetRequestUrlOk returns a tuple with the RequestUrl field value
+// and a boolean to check if the value has been set.
+func (o *LoginFlow) GetRequestUrlOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.RequestUrl, true
+}
+
+// SetRequestUrl sets field value
+func (o *LoginFlow) SetRequestUrl(v string) {
+ o.RequestUrl = v
+}
+
+// GetRequestedAal returns the RequestedAal field value if set, zero value otherwise.
+func (o *LoginFlow) GetRequestedAal() AuthenticatorAssuranceLevel {
+ if o == nil || o.RequestedAal == nil {
+ var ret AuthenticatorAssuranceLevel
+ return ret
+ }
+ return *o.RequestedAal
+}
+
+// GetRequestedAalOk returns a tuple with the RequestedAal field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *LoginFlow) GetRequestedAalOk() (*AuthenticatorAssuranceLevel, bool) {
+ if o == nil || o.RequestedAal == nil {
+ return nil, false
+ }
+ return o.RequestedAal, true
+}
+
+// HasRequestedAal returns a boolean if a field has been set.
+func (o *LoginFlow) HasRequestedAal() bool {
+ if o != nil && o.RequestedAal != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetRequestedAal gets a reference to the given AuthenticatorAssuranceLevel and assigns it to the RequestedAal field.
+func (o *LoginFlow) SetRequestedAal(v AuthenticatorAssuranceLevel) {
+ o.RequestedAal = &v
+}
+
+// GetReturnTo returns the ReturnTo field value if set, zero value otherwise.
+func (o *LoginFlow) GetReturnTo() string {
+ if o == nil || o.ReturnTo == nil {
+ var ret string
+ return ret
+ }
+ return *o.ReturnTo
+}
+
+// GetReturnToOk returns a tuple with the ReturnTo field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *LoginFlow) GetReturnToOk() (*string, bool) {
+ if o == nil || o.ReturnTo == nil {
+ return nil, false
+ }
+ return o.ReturnTo, true
+}
+
+// HasReturnTo returns a boolean if a field has been set.
+func (o *LoginFlow) HasReturnTo() bool {
+ if o != nil && o.ReturnTo != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetReturnTo gets a reference to the given string and assigns it to the ReturnTo field.
+func (o *LoginFlow) SetReturnTo(v string) {
+ o.ReturnTo = &v
+}
+
+// GetSessionTokenExchangeCode returns the SessionTokenExchangeCode field value if set, zero value otherwise.
+func (o *LoginFlow) GetSessionTokenExchangeCode() string {
+ if o == nil || o.SessionTokenExchangeCode == nil {
+ var ret string
+ return ret
+ }
+ return *o.SessionTokenExchangeCode
+}
+
+// GetSessionTokenExchangeCodeOk returns a tuple with the SessionTokenExchangeCode field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *LoginFlow) GetSessionTokenExchangeCodeOk() (*string, bool) {
+ if o == nil || o.SessionTokenExchangeCode == nil {
+ return nil, false
+ }
+ return o.SessionTokenExchangeCode, true
+}
+
+// HasSessionTokenExchangeCode returns a boolean if a field has been set.
+func (o *LoginFlow) HasSessionTokenExchangeCode() bool {
+ if o != nil && o.SessionTokenExchangeCode != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetSessionTokenExchangeCode gets a reference to the given string and assigns it to the SessionTokenExchangeCode field.
+func (o *LoginFlow) SetSessionTokenExchangeCode(v string) {
+ o.SessionTokenExchangeCode = &v
+}
+
+// GetState returns the State field value
+// If the value is explicit nil, the zero value for interface{} will be returned
+func (o *LoginFlow) GetState() interface{} {
+ if o == nil {
+ var ret interface{}
+ return ret
+ }
+
+ return o.State
+}
+
+// GetStateOk returns a tuple with the State field value
+// and a boolean to check if the value has been set.
+// NOTE: If the value is an explicit nil, `nil, true` will be returned
+func (o *LoginFlow) GetStateOk() (*interface{}, bool) {
+ if o == nil || o.State == nil {
+ return nil, false
+ }
+ return &o.State, true
+}
+
+// SetState sets field value
+func (o *LoginFlow) SetState(v interface{}) {
+ o.State = v
+}
+
+// GetTransientPayload returns the TransientPayload field value if set, zero value otherwise.
+func (o *LoginFlow) GetTransientPayload() map[string]interface{} {
+ if o == nil || o.TransientPayload == nil {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.TransientPayload
+}
+
+// GetTransientPayloadOk returns a tuple with the TransientPayload field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *LoginFlow) GetTransientPayloadOk() (map[string]interface{}, bool) {
+ if o == nil || o.TransientPayload == nil {
+ return nil, false
+ }
+ return o.TransientPayload, true
+}
+
+// HasTransientPayload returns a boolean if a field has been set.
+func (o *LoginFlow) HasTransientPayload() bool {
+ if o != nil && o.TransientPayload != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetTransientPayload gets a reference to the given map[string]interface{} and assigns it to the TransientPayload field.
+func (o *LoginFlow) SetTransientPayload(v map[string]interface{}) {
+ o.TransientPayload = v
+}
+
+// GetType returns the Type field value
+func (o *LoginFlow) GetType() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Type
+}
+
+// GetTypeOk returns a tuple with the Type field value
+// and a boolean to check if the value has been set.
+func (o *LoginFlow) GetTypeOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Type, true
+}
+
+// SetType sets field value
+func (o *LoginFlow) SetType(v string) {
+ o.Type = v
+}
+
+// GetUi returns the Ui field value
+func (o *LoginFlow) GetUi() UiContainer {
+ if o == nil {
+ var ret UiContainer
+ return ret
+ }
+
+ return o.Ui
+}
+
+// GetUiOk returns a tuple with the Ui field value
+// and a boolean to check if the value has been set.
+func (o *LoginFlow) GetUiOk() (*UiContainer, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Ui, true
+}
+
+// SetUi sets field value
+func (o *LoginFlow) SetUi(v UiContainer) {
+ o.Ui = v
+}
+
+// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
+func (o *LoginFlow) GetUpdatedAt() time.Time {
+ if o == nil || o.UpdatedAt == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.UpdatedAt
+}
+
+// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *LoginFlow) GetUpdatedAtOk() (*time.Time, bool) {
+ if o == nil || o.UpdatedAt == nil {
+ return nil, false
+ }
+ return o.UpdatedAt, true
+}
+
+// HasUpdatedAt returns a boolean if a field has been set.
+func (o *LoginFlow) HasUpdatedAt() bool {
+ if o != nil && o.UpdatedAt != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
+func (o *LoginFlow) SetUpdatedAt(v time.Time) {
+ o.UpdatedAt = &v
+}
+
+func (o LoginFlow) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Active != nil {
+ toSerialize["active"] = o.Active
+ }
+ if o.CreatedAt != nil {
+ toSerialize["created_at"] = o.CreatedAt
+ }
+ if true {
+ toSerialize["expires_at"] = o.ExpiresAt
+ }
+ if true {
+ toSerialize["id"] = o.Id
+ }
+ if true {
+ toSerialize["issued_at"] = o.IssuedAt
+ }
+ if o.Oauth2LoginChallenge != nil {
+ toSerialize["oauth2_login_challenge"] = o.Oauth2LoginChallenge
+ }
+ if o.Oauth2LoginRequest != nil {
+ toSerialize["oauth2_login_request"] = o.Oauth2LoginRequest
+ }
+ if o.OrganizationId.IsSet() {
+ toSerialize["organization_id"] = o.OrganizationId.Get()
+ }
+ if o.Refresh != nil {
+ toSerialize["refresh"] = o.Refresh
+ }
+ if true {
+ toSerialize["request_url"] = o.RequestUrl
+ }
+ if o.RequestedAal != nil {
+ toSerialize["requested_aal"] = o.RequestedAal
+ }
+ if o.ReturnTo != nil {
+ toSerialize["return_to"] = o.ReturnTo
+ }
+ if o.SessionTokenExchangeCode != nil {
+ toSerialize["session_token_exchange_code"] = o.SessionTokenExchangeCode
+ }
+ if o.State != nil {
+ toSerialize["state"] = o.State
+ }
+ if o.TransientPayload != nil {
+ toSerialize["transient_payload"] = o.TransientPayload
+ }
+ if true {
+ toSerialize["type"] = o.Type
+ }
+ if true {
+ toSerialize["ui"] = o.Ui
+ }
+ if o.UpdatedAt != nil {
+ toSerialize["updated_at"] = o.UpdatedAt
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableLoginFlow struct {
+ value *LoginFlow
+ isSet bool
+}
+
+func (v NullableLoginFlow) Get() *LoginFlow {
+ return v.value
+}
+
+func (v *NullableLoginFlow) Set(val *LoginFlow) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableLoginFlow) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableLoginFlow) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableLoginFlow(val *LoginFlow) *NullableLoginFlow {
+ return &NullableLoginFlow{value: val, isSet: true}
+}
+
+func (v NullableLoginFlow) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableLoginFlow) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_login_flow_state.go b/internal/httpclient/model_login_flow_state.go
new file mode 100644
index 000000000000..ce5570b79032
--- /dev/null
+++ b/internal/httpclient/model_login_flow_state.go
@@ -0,0 +1,85 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// LoginFlowState The state represents the state of the login flow. choose_method: ask the user to choose a method (e.g. login account via email) sent_email: the email has been sent to the user passed_challenge: the request was successful and the login challenge was passed.
+type LoginFlowState string
+
+// List of loginFlowState
+const (
+ LOGINFLOWSTATE_CHOOSE_METHOD LoginFlowState = "choose_method"
+ LOGINFLOWSTATE_SENT_EMAIL LoginFlowState = "sent_email"
+ LOGINFLOWSTATE_PASSED_CHALLENGE LoginFlowState = "passed_challenge"
+)
+
+func (v *LoginFlowState) UnmarshalJSON(src []byte) error {
+ var value string
+ err := json.Unmarshal(src, &value)
+ if err != nil {
+ return err
+ }
+ enumTypeValue := LoginFlowState(value)
+ for _, existing := range []LoginFlowState{"choose_method", "sent_email", "passed_challenge"} {
+ if existing == enumTypeValue {
+ *v = enumTypeValue
+ return nil
+ }
+ }
+
+ return fmt.Errorf("%+v is not a valid LoginFlowState", value)
+}
+
+// Ptr returns reference to loginFlowState value
+func (v LoginFlowState) Ptr() *LoginFlowState {
+ return &v
+}
+
+type NullableLoginFlowState struct {
+ value *LoginFlowState
+ isSet bool
+}
+
+func (v NullableLoginFlowState) Get() *LoginFlowState {
+ return v.value
+}
+
+func (v *NullableLoginFlowState) Set(val *LoginFlowState) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableLoginFlowState) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableLoginFlowState) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableLoginFlowState(val *LoginFlowState) *NullableLoginFlowState {
+ return &NullableLoginFlowState{value: val, isSet: true}
+}
+
+func (v NullableLoginFlowState) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableLoginFlowState) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_logout_flow.go b/internal/httpclient/model_logout_flow.go
new file mode 100644
index 000000000000..63c339b4febd
--- /dev/null
+++ b/internal/httpclient/model_logout_flow.go
@@ -0,0 +1,138 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// LogoutFlow Logout Flow
+type LogoutFlow struct {
+ // LogoutToken can be used to perform logout using AJAX.
+ LogoutToken string `json:"logout_token"`
+ // LogoutURL can be opened in a browser to sign the user out. format: uri
+ LogoutUrl string `json:"logout_url"`
+}
+
+// NewLogoutFlow instantiates a new LogoutFlow object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewLogoutFlow(logoutToken string, logoutUrl string) *LogoutFlow {
+ this := LogoutFlow{}
+ this.LogoutToken = logoutToken
+ this.LogoutUrl = logoutUrl
+ return &this
+}
+
+// NewLogoutFlowWithDefaults instantiates a new LogoutFlow object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewLogoutFlowWithDefaults() *LogoutFlow {
+ this := LogoutFlow{}
+ return &this
+}
+
+// GetLogoutToken returns the LogoutToken field value
+func (o *LogoutFlow) GetLogoutToken() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.LogoutToken
+}
+
+// GetLogoutTokenOk returns a tuple with the LogoutToken field value
+// and a boolean to check if the value has been set.
+func (o *LogoutFlow) GetLogoutTokenOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.LogoutToken, true
+}
+
+// SetLogoutToken sets field value
+func (o *LogoutFlow) SetLogoutToken(v string) {
+ o.LogoutToken = v
+}
+
+// GetLogoutUrl returns the LogoutUrl field value
+func (o *LogoutFlow) GetLogoutUrl() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.LogoutUrl
+}
+
+// GetLogoutUrlOk returns a tuple with the LogoutUrl field value
+// and a boolean to check if the value has been set.
+func (o *LogoutFlow) GetLogoutUrlOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.LogoutUrl, true
+}
+
+// SetLogoutUrl sets field value
+func (o *LogoutFlow) SetLogoutUrl(v string) {
+ o.LogoutUrl = v
+}
+
+func (o LogoutFlow) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if true {
+ toSerialize["logout_token"] = o.LogoutToken
+ }
+ if true {
+ toSerialize["logout_url"] = o.LogoutUrl
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableLogoutFlow struct {
+ value *LogoutFlow
+ isSet bool
+}
+
+func (v NullableLogoutFlow) Get() *LogoutFlow {
+ return v.value
+}
+
+func (v *NullableLogoutFlow) Set(val *LogoutFlow) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableLogoutFlow) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableLogoutFlow) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableLogoutFlow(val *LogoutFlow) *NullableLogoutFlow {
+ return &NullableLogoutFlow{value: val, isSet: true}
+}
+
+func (v NullableLogoutFlow) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableLogoutFlow) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_message.go b/internal/httpclient/model_message.go
new file mode 100644
index 000000000000..405575779c78
--- /dev/null
+++ b/internal/httpclient/model_message.go
@@ -0,0 +1,445 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "time"
+)
+
+// Message struct for Message
+type Message struct {
+ Body string `json:"body"`
+ Channel *string `json:"channel,omitempty"`
+ // CreatedAt is a helper struct field for gobuffalo.pop.
+ CreatedAt time.Time `json:"created_at"`
+ // Dispatches store information about the attempts of delivering a message May contain an error if any happened, or just the `success` state.
+ Dispatches []MessageDispatch `json:"dispatches,omitempty"`
+ Id string `json:"id"`
+ Recipient string `json:"recipient"`
+ SendCount int64 `json:"send_count"`
+ Status CourierMessageStatus `json:"status"`
+ Subject string `json:"subject"`
+ // recovery_invalid TypeRecoveryInvalid recovery_valid TypeRecoveryValid recovery_code_invalid TypeRecoveryCodeInvalid recovery_code_valid TypeRecoveryCodeValid verification_invalid TypeVerificationInvalid verification_valid TypeVerificationValid verification_code_invalid TypeVerificationCodeInvalid verification_code_valid TypeVerificationCodeValid stub TypeTestStub login_code_valid TypeLoginCodeValid registration_code_valid TypeRegistrationCodeValid
+ TemplateType string `json:"template_type"`
+ Type CourierMessageType `json:"type"`
+ // UpdatedAt is a helper struct field for gobuffalo.pop.
+ UpdatedAt time.Time `json:"updated_at"`
+}
+
+// NewMessage instantiates a new Message object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewMessage(body string, createdAt time.Time, id string, recipient string, sendCount int64, status CourierMessageStatus, subject string, templateType string, type_ CourierMessageType, updatedAt time.Time) *Message {
+ this := Message{}
+ this.Body = body
+ this.CreatedAt = createdAt
+ this.Id = id
+ this.Recipient = recipient
+ this.SendCount = sendCount
+ this.Status = status
+ this.Subject = subject
+ this.TemplateType = templateType
+ this.Type = type_
+ this.UpdatedAt = updatedAt
+ return &this
+}
+
+// NewMessageWithDefaults instantiates a new Message object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewMessageWithDefaults() *Message {
+ this := Message{}
+ return &this
+}
+
+// GetBody returns the Body field value
+func (o *Message) GetBody() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Body
+}
+
+// GetBodyOk returns a tuple with the Body field value
+// and a boolean to check if the value has been set.
+func (o *Message) GetBodyOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Body, true
+}
+
+// SetBody sets field value
+func (o *Message) SetBody(v string) {
+ o.Body = v
+}
+
+// GetChannel returns the Channel field value if set, zero value otherwise.
+func (o *Message) GetChannel() string {
+ if o == nil || o.Channel == nil {
+ var ret string
+ return ret
+ }
+ return *o.Channel
+}
+
+// GetChannelOk returns a tuple with the Channel field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Message) GetChannelOk() (*string, bool) {
+ if o == nil || o.Channel == nil {
+ return nil, false
+ }
+ return o.Channel, true
+}
+
+// HasChannel returns a boolean if a field has been set.
+func (o *Message) HasChannel() bool {
+ if o != nil && o.Channel != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetChannel gets a reference to the given string and assigns it to the Channel field.
+func (o *Message) SetChannel(v string) {
+ o.Channel = &v
+}
+
+// GetCreatedAt returns the CreatedAt field value
+func (o *Message) GetCreatedAt() time.Time {
+ if o == nil {
+ var ret time.Time
+ return ret
+ }
+
+ return o.CreatedAt
+}
+
+// GetCreatedAtOk returns a tuple with the CreatedAt field value
+// and a boolean to check if the value has been set.
+func (o *Message) GetCreatedAtOk() (*time.Time, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.CreatedAt, true
+}
+
+// SetCreatedAt sets field value
+func (o *Message) SetCreatedAt(v time.Time) {
+ o.CreatedAt = v
+}
+
+// GetDispatches returns the Dispatches field value if set, zero value otherwise.
+func (o *Message) GetDispatches() []MessageDispatch {
+ if o == nil || o.Dispatches == nil {
+ var ret []MessageDispatch
+ return ret
+ }
+ return o.Dispatches
+}
+
+// GetDispatchesOk returns a tuple with the Dispatches field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Message) GetDispatchesOk() ([]MessageDispatch, bool) {
+ if o == nil || o.Dispatches == nil {
+ return nil, false
+ }
+ return o.Dispatches, true
+}
+
+// HasDispatches returns a boolean if a field has been set.
+func (o *Message) HasDispatches() bool {
+ if o != nil && o.Dispatches != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetDispatches gets a reference to the given []MessageDispatch and assigns it to the Dispatches field.
+func (o *Message) SetDispatches(v []MessageDispatch) {
+ o.Dispatches = v
+}
+
+// GetId returns the Id field value
+func (o *Message) GetId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value
+// and a boolean to check if the value has been set.
+func (o *Message) GetIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Id, true
+}
+
+// SetId sets field value
+func (o *Message) SetId(v string) {
+ o.Id = v
+}
+
+// GetRecipient returns the Recipient field value
+func (o *Message) GetRecipient() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Recipient
+}
+
+// GetRecipientOk returns a tuple with the Recipient field value
+// and a boolean to check if the value has been set.
+func (o *Message) GetRecipientOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Recipient, true
+}
+
+// SetRecipient sets field value
+func (o *Message) SetRecipient(v string) {
+ o.Recipient = v
+}
+
+// GetSendCount returns the SendCount field value
+func (o *Message) GetSendCount() int64 {
+ if o == nil {
+ var ret int64
+ return ret
+ }
+
+ return o.SendCount
+}
+
+// GetSendCountOk returns a tuple with the SendCount field value
+// and a boolean to check if the value has been set.
+func (o *Message) GetSendCountOk() (*int64, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.SendCount, true
+}
+
+// SetSendCount sets field value
+func (o *Message) SetSendCount(v int64) {
+ o.SendCount = v
+}
+
+// GetStatus returns the Status field value
+func (o *Message) GetStatus() CourierMessageStatus {
+ if o == nil {
+ var ret CourierMessageStatus
+ return ret
+ }
+
+ return o.Status
+}
+
+// GetStatusOk returns a tuple with the Status field value
+// and a boolean to check if the value has been set.
+func (o *Message) GetStatusOk() (*CourierMessageStatus, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Status, true
+}
+
+// SetStatus sets field value
+func (o *Message) SetStatus(v CourierMessageStatus) {
+ o.Status = v
+}
+
+// GetSubject returns the Subject field value
+func (o *Message) GetSubject() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Subject
+}
+
+// GetSubjectOk returns a tuple with the Subject field value
+// and a boolean to check if the value has been set.
+func (o *Message) GetSubjectOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Subject, true
+}
+
+// SetSubject sets field value
+func (o *Message) SetSubject(v string) {
+ o.Subject = v
+}
+
+// GetTemplateType returns the TemplateType field value
+func (o *Message) GetTemplateType() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.TemplateType
+}
+
+// GetTemplateTypeOk returns a tuple with the TemplateType field value
+// and a boolean to check if the value has been set.
+func (o *Message) GetTemplateTypeOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.TemplateType, true
+}
+
+// SetTemplateType sets field value
+func (o *Message) SetTemplateType(v string) {
+ o.TemplateType = v
+}
+
+// GetType returns the Type field value
+func (o *Message) GetType() CourierMessageType {
+ if o == nil {
+ var ret CourierMessageType
+ return ret
+ }
+
+ return o.Type
+}
+
+// GetTypeOk returns a tuple with the Type field value
+// and a boolean to check if the value has been set.
+func (o *Message) GetTypeOk() (*CourierMessageType, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Type, true
+}
+
+// SetType sets field value
+func (o *Message) SetType(v CourierMessageType) {
+ o.Type = v
+}
+
+// GetUpdatedAt returns the UpdatedAt field value
+func (o *Message) GetUpdatedAt() time.Time {
+ if o == nil {
+ var ret time.Time
+ return ret
+ }
+
+ return o.UpdatedAt
+}
+
+// GetUpdatedAtOk returns a tuple with the UpdatedAt field value
+// and a boolean to check if the value has been set.
+func (o *Message) GetUpdatedAtOk() (*time.Time, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.UpdatedAt, true
+}
+
+// SetUpdatedAt sets field value
+func (o *Message) SetUpdatedAt(v time.Time) {
+ o.UpdatedAt = v
+}
+
+func (o Message) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if true {
+ toSerialize["body"] = o.Body
+ }
+ if o.Channel != nil {
+ toSerialize["channel"] = o.Channel
+ }
+ if true {
+ toSerialize["created_at"] = o.CreatedAt
+ }
+ if o.Dispatches != nil {
+ toSerialize["dispatches"] = o.Dispatches
+ }
+ if true {
+ toSerialize["id"] = o.Id
+ }
+ if true {
+ toSerialize["recipient"] = o.Recipient
+ }
+ if true {
+ toSerialize["send_count"] = o.SendCount
+ }
+ if true {
+ toSerialize["status"] = o.Status
+ }
+ if true {
+ toSerialize["subject"] = o.Subject
+ }
+ if true {
+ toSerialize["template_type"] = o.TemplateType
+ }
+ if true {
+ toSerialize["type"] = o.Type
+ }
+ if true {
+ toSerialize["updated_at"] = o.UpdatedAt
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableMessage struct {
+ value *Message
+ isSet bool
+}
+
+func (v NullableMessage) Get() *Message {
+ return v.value
+}
+
+func (v *NullableMessage) Set(val *Message) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableMessage) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableMessage) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableMessage(val *Message) *NullableMessage {
+ return &NullableMessage{value: val, isSet: true}
+}
+
+func (v NullableMessage) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableMessage) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_message_dispatch.go b/internal/httpclient/model_message_dispatch.go
new file mode 100644
index 000000000000..d5ad3a2b670b
--- /dev/null
+++ b/internal/httpclient/model_message_dispatch.go
@@ -0,0 +1,265 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "time"
+)
+
+// MessageDispatch MessageDispatch represents an attempt of sending a courier message It contains the status of the attempt (failed or successful) and the error if any occured
+type MessageDispatch struct {
+ // CreatedAt is a helper struct field for gobuffalo.pop.
+ CreatedAt time.Time `json:"created_at"`
+ Error map[string]interface{} `json:"error,omitempty"`
+ // The ID of this message dispatch
+ Id string `json:"id"`
+ // The ID of the message being dispatched
+ MessageId string `json:"message_id"`
+ // The status of this dispatch Either \"failed\" or \"success\" failed CourierMessageDispatchStatusFailed success CourierMessageDispatchStatusSuccess
+ Status string `json:"status"`
+ // UpdatedAt is a helper struct field for gobuffalo.pop.
+ UpdatedAt time.Time `json:"updated_at"`
+}
+
+// NewMessageDispatch instantiates a new MessageDispatch object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewMessageDispatch(createdAt time.Time, id string, messageId string, status string, updatedAt time.Time) *MessageDispatch {
+ this := MessageDispatch{}
+ this.CreatedAt = createdAt
+ this.Id = id
+ this.MessageId = messageId
+ this.Status = status
+ this.UpdatedAt = updatedAt
+ return &this
+}
+
+// NewMessageDispatchWithDefaults instantiates a new MessageDispatch object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewMessageDispatchWithDefaults() *MessageDispatch {
+ this := MessageDispatch{}
+ return &this
+}
+
+// GetCreatedAt returns the CreatedAt field value
+func (o *MessageDispatch) GetCreatedAt() time.Time {
+ if o == nil {
+ var ret time.Time
+ return ret
+ }
+
+ return o.CreatedAt
+}
+
+// GetCreatedAtOk returns a tuple with the CreatedAt field value
+// and a boolean to check if the value has been set.
+func (o *MessageDispatch) GetCreatedAtOk() (*time.Time, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.CreatedAt, true
+}
+
+// SetCreatedAt sets field value
+func (o *MessageDispatch) SetCreatedAt(v time.Time) {
+ o.CreatedAt = v
+}
+
+// GetError returns the Error field value if set, zero value otherwise.
+func (o *MessageDispatch) GetError() map[string]interface{} {
+ if o == nil || o.Error == nil {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.Error
+}
+
+// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *MessageDispatch) GetErrorOk() (map[string]interface{}, bool) {
+ if o == nil || o.Error == nil {
+ return nil, false
+ }
+ return o.Error, true
+}
+
+// HasError returns a boolean if a field has been set.
+func (o *MessageDispatch) HasError() bool {
+ if o != nil && o.Error != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetError gets a reference to the given map[string]interface{} and assigns it to the Error field.
+func (o *MessageDispatch) SetError(v map[string]interface{}) {
+ o.Error = v
+}
+
+// GetId returns the Id field value
+func (o *MessageDispatch) GetId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value
+// and a boolean to check if the value has been set.
+func (o *MessageDispatch) GetIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Id, true
+}
+
+// SetId sets field value
+func (o *MessageDispatch) SetId(v string) {
+ o.Id = v
+}
+
+// GetMessageId returns the MessageId field value
+func (o *MessageDispatch) GetMessageId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.MessageId
+}
+
+// GetMessageIdOk returns a tuple with the MessageId field value
+// and a boolean to check if the value has been set.
+func (o *MessageDispatch) GetMessageIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.MessageId, true
+}
+
+// SetMessageId sets field value
+func (o *MessageDispatch) SetMessageId(v string) {
+ o.MessageId = v
+}
+
+// GetStatus returns the Status field value
+func (o *MessageDispatch) GetStatus() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Status
+}
+
+// GetStatusOk returns a tuple with the Status field value
+// and a boolean to check if the value has been set.
+func (o *MessageDispatch) GetStatusOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Status, true
+}
+
+// SetStatus sets field value
+func (o *MessageDispatch) SetStatus(v string) {
+ o.Status = v
+}
+
+// GetUpdatedAt returns the UpdatedAt field value
+func (o *MessageDispatch) GetUpdatedAt() time.Time {
+ if o == nil {
+ var ret time.Time
+ return ret
+ }
+
+ return o.UpdatedAt
+}
+
+// GetUpdatedAtOk returns a tuple with the UpdatedAt field value
+// and a boolean to check if the value has been set.
+func (o *MessageDispatch) GetUpdatedAtOk() (*time.Time, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.UpdatedAt, true
+}
+
+// SetUpdatedAt sets field value
+func (o *MessageDispatch) SetUpdatedAt(v time.Time) {
+ o.UpdatedAt = v
+}
+
+func (o MessageDispatch) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if true {
+ toSerialize["created_at"] = o.CreatedAt
+ }
+ if o.Error != nil {
+ toSerialize["error"] = o.Error
+ }
+ if true {
+ toSerialize["id"] = o.Id
+ }
+ if true {
+ toSerialize["message_id"] = o.MessageId
+ }
+ if true {
+ toSerialize["status"] = o.Status
+ }
+ if true {
+ toSerialize["updated_at"] = o.UpdatedAt
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableMessageDispatch struct {
+ value *MessageDispatch
+ isSet bool
+}
+
+func (v NullableMessageDispatch) Get() *MessageDispatch {
+ return v.value
+}
+
+func (v *NullableMessageDispatch) Set(val *MessageDispatch) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableMessageDispatch) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableMessageDispatch) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableMessageDispatch(val *MessageDispatch) *NullableMessageDispatch {
+ return &NullableMessageDispatch{value: val, isSet: true}
+}
+
+func (v NullableMessageDispatch) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableMessageDispatch) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_needs_privileged_session_error.go b/internal/httpclient/model_needs_privileged_session_error.go
new file mode 100644
index 000000000000..ea91c4ba2331
--- /dev/null
+++ b/internal/httpclient/model_needs_privileged_session_error.go
@@ -0,0 +1,144 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// NeedsPrivilegedSessionError struct for NeedsPrivilegedSessionError
+type NeedsPrivilegedSessionError struct {
+ Error *GenericError `json:"error,omitempty"`
+ // Points to where to redirect the user to next.
+ RedirectBrowserTo string `json:"redirect_browser_to"`
+}
+
+// NewNeedsPrivilegedSessionError instantiates a new NeedsPrivilegedSessionError object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewNeedsPrivilegedSessionError(redirectBrowserTo string) *NeedsPrivilegedSessionError {
+ this := NeedsPrivilegedSessionError{}
+ this.RedirectBrowserTo = redirectBrowserTo
+ return &this
+}
+
+// NewNeedsPrivilegedSessionErrorWithDefaults instantiates a new NeedsPrivilegedSessionError object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewNeedsPrivilegedSessionErrorWithDefaults() *NeedsPrivilegedSessionError {
+ this := NeedsPrivilegedSessionError{}
+ return &this
+}
+
+// GetError returns the Error field value if set, zero value otherwise.
+func (o *NeedsPrivilegedSessionError) GetError() GenericError {
+ if o == nil || o.Error == nil {
+ var ret GenericError
+ return ret
+ }
+ return *o.Error
+}
+
+// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *NeedsPrivilegedSessionError) GetErrorOk() (*GenericError, bool) {
+ if o == nil || o.Error == nil {
+ return nil, false
+ }
+ return o.Error, true
+}
+
+// HasError returns a boolean if a field has been set.
+func (o *NeedsPrivilegedSessionError) HasError() bool {
+ if o != nil && o.Error != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetError gets a reference to the given GenericError and assigns it to the Error field.
+func (o *NeedsPrivilegedSessionError) SetError(v GenericError) {
+ o.Error = &v
+}
+
+// GetRedirectBrowserTo returns the RedirectBrowserTo field value
+func (o *NeedsPrivilegedSessionError) GetRedirectBrowserTo() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.RedirectBrowserTo
+}
+
+// GetRedirectBrowserToOk returns a tuple with the RedirectBrowserTo field value
+// and a boolean to check if the value has been set.
+func (o *NeedsPrivilegedSessionError) GetRedirectBrowserToOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.RedirectBrowserTo, true
+}
+
+// SetRedirectBrowserTo sets field value
+func (o *NeedsPrivilegedSessionError) SetRedirectBrowserTo(v string) {
+ o.RedirectBrowserTo = v
+}
+
+func (o NeedsPrivilegedSessionError) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Error != nil {
+ toSerialize["error"] = o.Error
+ }
+ if true {
+ toSerialize["redirect_browser_to"] = o.RedirectBrowserTo
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableNeedsPrivilegedSessionError struct {
+ value *NeedsPrivilegedSessionError
+ isSet bool
+}
+
+func (v NullableNeedsPrivilegedSessionError) Get() *NeedsPrivilegedSessionError {
+ return v.value
+}
+
+func (v *NullableNeedsPrivilegedSessionError) Set(val *NeedsPrivilegedSessionError) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableNeedsPrivilegedSessionError) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableNeedsPrivilegedSessionError) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableNeedsPrivilegedSessionError(val *NeedsPrivilegedSessionError) *NullableNeedsPrivilegedSessionError {
+ return &NullableNeedsPrivilegedSessionError{value: val, isSet: true}
+}
+
+func (v NullableNeedsPrivilegedSessionError) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableNeedsPrivilegedSessionError) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_o_auth2_client.go b/internal/httpclient/model_o_auth2_client.go
new file mode 100644
index 000000000000..be48d3217ade
--- /dev/null
+++ b/internal/httpclient/model_o_auth2_client.go
@@ -0,0 +1,1848 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "time"
+)
+
+// OAuth2Client struct for OAuth2Client
+type OAuth2Client struct {
+ // OAuth 2.0 Access Token Strategy AccessTokenStrategy is the strategy used to generate access tokens. Valid options are `jwt` and `opaque`. `jwt` is a bad idea, see https://www.ory.sh/docs/hydra/advanced#json-web-tokens Setting the stragegy here overrides the global setting in `strategies.access_token`.
+ AccessTokenStrategy *string `json:"access_token_strategy,omitempty"`
+ AllowedCorsOrigins []string `json:"allowed_cors_origins,omitempty"`
+ Audience []string `json:"audience,omitempty"`
+ // Specify a time duration in milliseconds, seconds, minutes, hours.
+ AuthorizationCodeGrantAccessTokenLifespan *string `json:"authorization_code_grant_access_token_lifespan,omitempty"`
+ // Specify a time duration in milliseconds, seconds, minutes, hours.
+ AuthorizationCodeGrantIdTokenLifespan *string `json:"authorization_code_grant_id_token_lifespan,omitempty"`
+ // Specify a time duration in milliseconds, seconds, minutes, hours.
+ AuthorizationCodeGrantRefreshTokenLifespan *string `json:"authorization_code_grant_refresh_token_lifespan,omitempty"`
+ // OpenID Connect Back-Channel Logout Session Required Boolean value specifying whether the RP requires that a sid (session ID) Claim be included in the Logout Token to identify the RP session with the OP when the backchannel_logout_uri is used. If omitted, the default value is false.
+ BackchannelLogoutSessionRequired *bool `json:"backchannel_logout_session_required,omitempty"`
+ // OpenID Connect Back-Channel Logout URI RP URL that will cause the RP to log itself out when sent a Logout Token by the OP.
+ BackchannelLogoutUri *string `json:"backchannel_logout_uri,omitempty"`
+ // Specify a time duration in milliseconds, seconds, minutes, hours.
+ ClientCredentialsGrantAccessTokenLifespan *string `json:"client_credentials_grant_access_token_lifespan,omitempty"`
+ // OAuth 2.0 Client ID The ID is immutable. If no ID is provided, a UUID4 will be generated.
+ ClientId *string `json:"client_id,omitempty"`
+ // OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization.
+ ClientName *string `json:"client_name,omitempty"`
+ // OAuth 2.0 Client Secret The secret will be included in the create request as cleartext, and then never again. The secret is kept in hashed format and is not recoverable once lost.
+ ClientSecret *string `json:"client_secret,omitempty"`
+ // OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0.
+ ClientSecretExpiresAt *int64 `json:"client_secret_expires_at,omitempty"`
+ // OAuth 2.0 Client URI ClientURI is a URL string of a web page providing information about the client. If present, the server SHOULD display this URL to the end-user in a clickable fashion.
+ ClientUri *string `json:"client_uri,omitempty"`
+ Contacts []string `json:"contacts,omitempty"`
+ // OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation.
+ CreatedAt *time.Time `json:"created_at,omitempty"`
+ // OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the RP requires that iss (issuer) and sid (session ID) query parameters be included to identify the RP session with the OP when the frontchannel_logout_uri is used. If omitted, the default value is false.
+ FrontchannelLogoutSessionRequired *bool `json:"frontchannel_logout_session_required,omitempty"`
+ // OpenID Connect Front-Channel Logout URI RP URL that will cause the RP to log itself out when rendered in an iframe by the OP. An iss (issuer) query parameter and a sid (session ID) query parameter MAY be included by the OP to enable the RP to validate the request and to determine which of the potentially multiple sessions is to be logged out; if either is included, both MUST be.
+ FrontchannelLogoutUri *string `json:"frontchannel_logout_uri,omitempty"`
+ GrantTypes []string `json:"grant_types,omitempty"`
+ // Specify a time duration in milliseconds, seconds, minutes, hours.
+ ImplicitGrantAccessTokenLifespan *string `json:"implicit_grant_access_token_lifespan,omitempty"`
+ // Specify a time duration in milliseconds, seconds, minutes, hours.
+ ImplicitGrantIdTokenLifespan *string `json:"implicit_grant_id_token_lifespan,omitempty"`
+ // OAuth 2.0 Client JSON Web Key Set Client's JSON Web Key Set [JWK] document, passed by value. The semantics of the jwks parameter are the same as the jwks_uri parameter, other than that the JWK Set is passed by value, rather than by reference. This parameter is intended only to be used by Clients that, for some reason, are unable to use the jwks_uri parameter, for instance, by native applications that might not have a location to host the contents of the JWK Set. If a Client can use jwks_uri, it MUST NOT use jwks. One significant downside of jwks is that it does not enable key rotation (which jwks_uri does, as described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The jwks_uri and jwks parameters MUST NOT be used together.
+ Jwks interface{} `json:"jwks,omitempty"`
+ // OAuth 2.0 Client JSON Web Key Set URL URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate.
+ JwksUri *string `json:"jwks_uri,omitempty"`
+ // Specify a time duration in milliseconds, seconds, minutes, hours.
+ JwtBearerGrantAccessTokenLifespan *string `json:"jwt_bearer_grant_access_token_lifespan,omitempty"`
+ // OAuth 2.0 Client Logo URI A URL string referencing the client's logo.
+ LogoUri *string `json:"logo_uri,omitempty"`
+ Metadata interface{} `json:"metadata,omitempty"`
+ // OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client.
+ Owner *string `json:"owner,omitempty"`
+ // OAuth 2.0 Client Policy URI PolicyURI is a URL string that points to a human-readable privacy policy document that describes how the deployment organization collects, uses, retains, and discloses personal data.
+ PolicyUri *string `json:"policy_uri,omitempty"`
+ PostLogoutRedirectUris []string `json:"post_logout_redirect_uris,omitempty"`
+ RedirectUris []string `json:"redirect_uris,omitempty"`
+ // Specify a time duration in milliseconds, seconds, minutes, hours.
+ RefreshTokenGrantAccessTokenLifespan *string `json:"refresh_token_grant_access_token_lifespan,omitempty"`
+ // Specify a time duration in milliseconds, seconds, minutes, hours.
+ RefreshTokenGrantIdTokenLifespan *string `json:"refresh_token_grant_id_token_lifespan,omitempty"`
+ // Specify a time duration in milliseconds, seconds, minutes, hours.
+ RefreshTokenGrantRefreshTokenLifespan *string `json:"refresh_token_grant_refresh_token_lifespan,omitempty"`
+ // OpenID Connect Dynamic Client Registration Access Token RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. It is sent when creating a client using Dynamic Client Registration.
+ RegistrationAccessToken *string `json:"registration_access_token,omitempty"`
+ // OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client.
+ RegistrationClientUri *string `json:"registration_client_uri,omitempty"`
+ // OpenID Connect Request Object Signing Algorithm JWS [JWS] alg algorithm [JWA] that MUST be used for signing Request Objects sent to the OP. All Request Objects from this Client MUST be rejected, if not signed with this algorithm.
+ RequestObjectSigningAlg *string `json:"request_object_signing_alg,omitempty"`
+ RequestUris []string `json:"request_uris,omitempty"`
+ ResponseTypes []string `json:"response_types,omitempty"`
+ // OAuth 2.0 Client Scope Scope is a string containing a space-separated list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client can use when requesting access tokens.
+ Scope *string `json:"scope,omitempty"`
+ // OpenID Connect Sector Identifier URI URL using the https scheme to be used in calculating Pseudonymous Identifiers by the OP. The URL references a file with a single JSON array of redirect_uri values.
+ SectorIdentifierUri *string `json:"sector_identifier_uri,omitempty"`
+ // SkipConsent skips the consent screen for this client. This field can only be set from the admin API.
+ SkipConsent *bool `json:"skip_consent,omitempty"`
+ // SkipLogoutConsent skips the logout consent screen for this client. This field can only be set from the admin API.
+ SkipLogoutConsent *bool `json:"skip_logout_consent,omitempty"`
+ // OpenID Connect Subject Type The `subject_types_supported` Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`.
+ SubjectType *string `json:"subject_type,omitempty"`
+ // OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_basic`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `client_secret_post`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `private_key_jwt`: Use JSON Web Tokens to authenticate the client. `none`: Used for public clients (native apps, mobile apps) which can not have secrets.
+ TokenEndpointAuthMethod *string `json:"token_endpoint_auth_method,omitempty"`
+ // OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint.
+ TokenEndpointAuthSigningAlg *string `json:"token_endpoint_auth_signing_alg,omitempty"`
+ // OAuth 2.0 Client Terms of Service URI A URL string pointing to a human-readable terms of service document for the client that describes a contractual relationship between the end-user and the client that the end-user accepts when authorizing the client.
+ TosUri *string `json:"tos_uri,omitempty"`
+ // OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update.
+ UpdatedAt *time.Time `json:"updated_at,omitempty"`
+ // OpenID Connect Request Userinfo Signed Response Algorithm JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT [JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims as a UTF-8 encoded JSON object using the application/json content-type.
+ UserinfoSignedResponseAlg *string `json:"userinfo_signed_response_alg,omitempty"`
+}
+
+// NewOAuth2Client instantiates a new OAuth2Client object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewOAuth2Client() *OAuth2Client {
+ this := OAuth2Client{}
+ return &this
+}
+
+// NewOAuth2ClientWithDefaults instantiates a new OAuth2Client object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewOAuth2ClientWithDefaults() *OAuth2Client {
+ this := OAuth2Client{}
+ return &this
+}
+
+// GetAccessTokenStrategy returns the AccessTokenStrategy field value if set, zero value otherwise.
+func (o *OAuth2Client) GetAccessTokenStrategy() string {
+ if o == nil || o.AccessTokenStrategy == nil {
+ var ret string
+ return ret
+ }
+ return *o.AccessTokenStrategy
+}
+
+// GetAccessTokenStrategyOk returns a tuple with the AccessTokenStrategy field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetAccessTokenStrategyOk() (*string, bool) {
+ if o == nil || o.AccessTokenStrategy == nil {
+ return nil, false
+ }
+ return o.AccessTokenStrategy, true
+}
+
+// HasAccessTokenStrategy returns a boolean if a field has been set.
+func (o *OAuth2Client) HasAccessTokenStrategy() bool {
+ if o != nil && o.AccessTokenStrategy != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetAccessTokenStrategy gets a reference to the given string and assigns it to the AccessTokenStrategy field.
+func (o *OAuth2Client) SetAccessTokenStrategy(v string) {
+ o.AccessTokenStrategy = &v
+}
+
+// GetAllowedCorsOrigins returns the AllowedCorsOrigins field value if set, zero value otherwise.
+func (o *OAuth2Client) GetAllowedCorsOrigins() []string {
+ if o == nil || o.AllowedCorsOrigins == nil {
+ var ret []string
+ return ret
+ }
+ return o.AllowedCorsOrigins
+}
+
+// GetAllowedCorsOriginsOk returns a tuple with the AllowedCorsOrigins field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetAllowedCorsOriginsOk() ([]string, bool) {
+ if o == nil || o.AllowedCorsOrigins == nil {
+ return nil, false
+ }
+ return o.AllowedCorsOrigins, true
+}
+
+// HasAllowedCorsOrigins returns a boolean if a field has been set.
+func (o *OAuth2Client) HasAllowedCorsOrigins() bool {
+ if o != nil && o.AllowedCorsOrigins != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetAllowedCorsOrigins gets a reference to the given []string and assigns it to the AllowedCorsOrigins field.
+func (o *OAuth2Client) SetAllowedCorsOrigins(v []string) {
+ o.AllowedCorsOrigins = v
+}
+
+// GetAudience returns the Audience field value if set, zero value otherwise.
+func (o *OAuth2Client) GetAudience() []string {
+ if o == nil || o.Audience == nil {
+ var ret []string
+ return ret
+ }
+ return o.Audience
+}
+
+// GetAudienceOk returns a tuple with the Audience field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetAudienceOk() ([]string, bool) {
+ if o == nil || o.Audience == nil {
+ return nil, false
+ }
+ return o.Audience, true
+}
+
+// HasAudience returns a boolean if a field has been set.
+func (o *OAuth2Client) HasAudience() bool {
+ if o != nil && o.Audience != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetAudience gets a reference to the given []string and assigns it to the Audience field.
+func (o *OAuth2Client) SetAudience(v []string) {
+ o.Audience = v
+}
+
+// GetAuthorizationCodeGrantAccessTokenLifespan returns the AuthorizationCodeGrantAccessTokenLifespan field value if set, zero value otherwise.
+func (o *OAuth2Client) GetAuthorizationCodeGrantAccessTokenLifespan() string {
+ if o == nil || o.AuthorizationCodeGrantAccessTokenLifespan == nil {
+ var ret string
+ return ret
+ }
+ return *o.AuthorizationCodeGrantAccessTokenLifespan
+}
+
+// GetAuthorizationCodeGrantAccessTokenLifespanOk returns a tuple with the AuthorizationCodeGrantAccessTokenLifespan field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetAuthorizationCodeGrantAccessTokenLifespanOk() (*string, bool) {
+ if o == nil || o.AuthorizationCodeGrantAccessTokenLifespan == nil {
+ return nil, false
+ }
+ return o.AuthorizationCodeGrantAccessTokenLifespan, true
+}
+
+// HasAuthorizationCodeGrantAccessTokenLifespan returns a boolean if a field has been set.
+func (o *OAuth2Client) HasAuthorizationCodeGrantAccessTokenLifespan() bool {
+ if o != nil && o.AuthorizationCodeGrantAccessTokenLifespan != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetAuthorizationCodeGrantAccessTokenLifespan gets a reference to the given string and assigns it to the AuthorizationCodeGrantAccessTokenLifespan field.
+func (o *OAuth2Client) SetAuthorizationCodeGrantAccessTokenLifespan(v string) {
+ o.AuthorizationCodeGrantAccessTokenLifespan = &v
+}
+
+// GetAuthorizationCodeGrantIdTokenLifespan returns the AuthorizationCodeGrantIdTokenLifespan field value if set, zero value otherwise.
+func (o *OAuth2Client) GetAuthorizationCodeGrantIdTokenLifespan() string {
+ if o == nil || o.AuthorizationCodeGrantIdTokenLifespan == nil {
+ var ret string
+ return ret
+ }
+ return *o.AuthorizationCodeGrantIdTokenLifespan
+}
+
+// GetAuthorizationCodeGrantIdTokenLifespanOk returns a tuple with the AuthorizationCodeGrantIdTokenLifespan field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetAuthorizationCodeGrantIdTokenLifespanOk() (*string, bool) {
+ if o == nil || o.AuthorizationCodeGrantIdTokenLifespan == nil {
+ return nil, false
+ }
+ return o.AuthorizationCodeGrantIdTokenLifespan, true
+}
+
+// HasAuthorizationCodeGrantIdTokenLifespan returns a boolean if a field has been set.
+func (o *OAuth2Client) HasAuthorizationCodeGrantIdTokenLifespan() bool {
+ if o != nil && o.AuthorizationCodeGrantIdTokenLifespan != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetAuthorizationCodeGrantIdTokenLifespan gets a reference to the given string and assigns it to the AuthorizationCodeGrantIdTokenLifespan field.
+func (o *OAuth2Client) SetAuthorizationCodeGrantIdTokenLifespan(v string) {
+ o.AuthorizationCodeGrantIdTokenLifespan = &v
+}
+
+// GetAuthorizationCodeGrantRefreshTokenLifespan returns the AuthorizationCodeGrantRefreshTokenLifespan field value if set, zero value otherwise.
+func (o *OAuth2Client) GetAuthorizationCodeGrantRefreshTokenLifespan() string {
+ if o == nil || o.AuthorizationCodeGrantRefreshTokenLifespan == nil {
+ var ret string
+ return ret
+ }
+ return *o.AuthorizationCodeGrantRefreshTokenLifespan
+}
+
+// GetAuthorizationCodeGrantRefreshTokenLifespanOk returns a tuple with the AuthorizationCodeGrantRefreshTokenLifespan field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetAuthorizationCodeGrantRefreshTokenLifespanOk() (*string, bool) {
+ if o == nil || o.AuthorizationCodeGrantRefreshTokenLifespan == nil {
+ return nil, false
+ }
+ return o.AuthorizationCodeGrantRefreshTokenLifespan, true
+}
+
+// HasAuthorizationCodeGrantRefreshTokenLifespan returns a boolean if a field has been set.
+func (o *OAuth2Client) HasAuthorizationCodeGrantRefreshTokenLifespan() bool {
+ if o != nil && o.AuthorizationCodeGrantRefreshTokenLifespan != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetAuthorizationCodeGrantRefreshTokenLifespan gets a reference to the given string and assigns it to the AuthorizationCodeGrantRefreshTokenLifespan field.
+func (o *OAuth2Client) SetAuthorizationCodeGrantRefreshTokenLifespan(v string) {
+ o.AuthorizationCodeGrantRefreshTokenLifespan = &v
+}
+
+// GetBackchannelLogoutSessionRequired returns the BackchannelLogoutSessionRequired field value if set, zero value otherwise.
+func (o *OAuth2Client) GetBackchannelLogoutSessionRequired() bool {
+ if o == nil || o.BackchannelLogoutSessionRequired == nil {
+ var ret bool
+ return ret
+ }
+ return *o.BackchannelLogoutSessionRequired
+}
+
+// GetBackchannelLogoutSessionRequiredOk returns a tuple with the BackchannelLogoutSessionRequired field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetBackchannelLogoutSessionRequiredOk() (*bool, bool) {
+ if o == nil || o.BackchannelLogoutSessionRequired == nil {
+ return nil, false
+ }
+ return o.BackchannelLogoutSessionRequired, true
+}
+
+// HasBackchannelLogoutSessionRequired returns a boolean if a field has been set.
+func (o *OAuth2Client) HasBackchannelLogoutSessionRequired() bool {
+ if o != nil && o.BackchannelLogoutSessionRequired != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetBackchannelLogoutSessionRequired gets a reference to the given bool and assigns it to the BackchannelLogoutSessionRequired field.
+func (o *OAuth2Client) SetBackchannelLogoutSessionRequired(v bool) {
+ o.BackchannelLogoutSessionRequired = &v
+}
+
+// GetBackchannelLogoutUri returns the BackchannelLogoutUri field value if set, zero value otherwise.
+func (o *OAuth2Client) GetBackchannelLogoutUri() string {
+ if o == nil || o.BackchannelLogoutUri == nil {
+ var ret string
+ return ret
+ }
+ return *o.BackchannelLogoutUri
+}
+
+// GetBackchannelLogoutUriOk returns a tuple with the BackchannelLogoutUri field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetBackchannelLogoutUriOk() (*string, bool) {
+ if o == nil || o.BackchannelLogoutUri == nil {
+ return nil, false
+ }
+ return o.BackchannelLogoutUri, true
+}
+
+// HasBackchannelLogoutUri returns a boolean if a field has been set.
+func (o *OAuth2Client) HasBackchannelLogoutUri() bool {
+ if o != nil && o.BackchannelLogoutUri != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetBackchannelLogoutUri gets a reference to the given string and assigns it to the BackchannelLogoutUri field.
+func (o *OAuth2Client) SetBackchannelLogoutUri(v string) {
+ o.BackchannelLogoutUri = &v
+}
+
+// GetClientCredentialsGrantAccessTokenLifespan returns the ClientCredentialsGrantAccessTokenLifespan field value if set, zero value otherwise.
+func (o *OAuth2Client) GetClientCredentialsGrantAccessTokenLifespan() string {
+ if o == nil || o.ClientCredentialsGrantAccessTokenLifespan == nil {
+ var ret string
+ return ret
+ }
+ return *o.ClientCredentialsGrantAccessTokenLifespan
+}
+
+// GetClientCredentialsGrantAccessTokenLifespanOk returns a tuple with the ClientCredentialsGrantAccessTokenLifespan field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetClientCredentialsGrantAccessTokenLifespanOk() (*string, bool) {
+ if o == nil || o.ClientCredentialsGrantAccessTokenLifespan == nil {
+ return nil, false
+ }
+ return o.ClientCredentialsGrantAccessTokenLifespan, true
+}
+
+// HasClientCredentialsGrantAccessTokenLifespan returns a boolean if a field has been set.
+func (o *OAuth2Client) HasClientCredentialsGrantAccessTokenLifespan() bool {
+ if o != nil && o.ClientCredentialsGrantAccessTokenLifespan != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetClientCredentialsGrantAccessTokenLifespan gets a reference to the given string and assigns it to the ClientCredentialsGrantAccessTokenLifespan field.
+func (o *OAuth2Client) SetClientCredentialsGrantAccessTokenLifespan(v string) {
+ o.ClientCredentialsGrantAccessTokenLifespan = &v
+}
+
+// GetClientId returns the ClientId field value if set, zero value otherwise.
+func (o *OAuth2Client) GetClientId() string {
+ if o == nil || o.ClientId == nil {
+ var ret string
+ return ret
+ }
+ return *o.ClientId
+}
+
+// GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetClientIdOk() (*string, bool) {
+ if o == nil || o.ClientId == nil {
+ return nil, false
+ }
+ return o.ClientId, true
+}
+
+// HasClientId returns a boolean if a field has been set.
+func (o *OAuth2Client) HasClientId() bool {
+ if o != nil && o.ClientId != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetClientId gets a reference to the given string and assigns it to the ClientId field.
+func (o *OAuth2Client) SetClientId(v string) {
+ o.ClientId = &v
+}
+
+// GetClientName returns the ClientName field value if set, zero value otherwise.
+func (o *OAuth2Client) GetClientName() string {
+ if o == nil || o.ClientName == nil {
+ var ret string
+ return ret
+ }
+ return *o.ClientName
+}
+
+// GetClientNameOk returns a tuple with the ClientName field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetClientNameOk() (*string, bool) {
+ if o == nil || o.ClientName == nil {
+ return nil, false
+ }
+ return o.ClientName, true
+}
+
+// HasClientName returns a boolean if a field has been set.
+func (o *OAuth2Client) HasClientName() bool {
+ if o != nil && o.ClientName != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetClientName gets a reference to the given string and assigns it to the ClientName field.
+func (o *OAuth2Client) SetClientName(v string) {
+ o.ClientName = &v
+}
+
+// GetClientSecret returns the ClientSecret field value if set, zero value otherwise.
+func (o *OAuth2Client) GetClientSecret() string {
+ if o == nil || o.ClientSecret == nil {
+ var ret string
+ return ret
+ }
+ return *o.ClientSecret
+}
+
+// GetClientSecretOk returns a tuple with the ClientSecret field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetClientSecretOk() (*string, bool) {
+ if o == nil || o.ClientSecret == nil {
+ return nil, false
+ }
+ return o.ClientSecret, true
+}
+
+// HasClientSecret returns a boolean if a field has been set.
+func (o *OAuth2Client) HasClientSecret() bool {
+ if o != nil && o.ClientSecret != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetClientSecret gets a reference to the given string and assigns it to the ClientSecret field.
+func (o *OAuth2Client) SetClientSecret(v string) {
+ o.ClientSecret = &v
+}
+
+// GetClientSecretExpiresAt returns the ClientSecretExpiresAt field value if set, zero value otherwise.
+func (o *OAuth2Client) GetClientSecretExpiresAt() int64 {
+ if o == nil || o.ClientSecretExpiresAt == nil {
+ var ret int64
+ return ret
+ }
+ return *o.ClientSecretExpiresAt
+}
+
+// GetClientSecretExpiresAtOk returns a tuple with the ClientSecretExpiresAt field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetClientSecretExpiresAtOk() (*int64, bool) {
+ if o == nil || o.ClientSecretExpiresAt == nil {
+ return nil, false
+ }
+ return o.ClientSecretExpiresAt, true
+}
+
+// HasClientSecretExpiresAt returns a boolean if a field has been set.
+func (o *OAuth2Client) HasClientSecretExpiresAt() bool {
+ if o != nil && o.ClientSecretExpiresAt != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetClientSecretExpiresAt gets a reference to the given int64 and assigns it to the ClientSecretExpiresAt field.
+func (o *OAuth2Client) SetClientSecretExpiresAt(v int64) {
+ o.ClientSecretExpiresAt = &v
+}
+
+// GetClientUri returns the ClientUri field value if set, zero value otherwise.
+func (o *OAuth2Client) GetClientUri() string {
+ if o == nil || o.ClientUri == nil {
+ var ret string
+ return ret
+ }
+ return *o.ClientUri
+}
+
+// GetClientUriOk returns a tuple with the ClientUri field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetClientUriOk() (*string, bool) {
+ if o == nil || o.ClientUri == nil {
+ return nil, false
+ }
+ return o.ClientUri, true
+}
+
+// HasClientUri returns a boolean if a field has been set.
+func (o *OAuth2Client) HasClientUri() bool {
+ if o != nil && o.ClientUri != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetClientUri gets a reference to the given string and assigns it to the ClientUri field.
+func (o *OAuth2Client) SetClientUri(v string) {
+ o.ClientUri = &v
+}
+
+// GetContacts returns the Contacts field value if set, zero value otherwise.
+func (o *OAuth2Client) GetContacts() []string {
+ if o == nil || o.Contacts == nil {
+ var ret []string
+ return ret
+ }
+ return o.Contacts
+}
+
+// GetContactsOk returns a tuple with the Contacts field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetContactsOk() ([]string, bool) {
+ if o == nil || o.Contacts == nil {
+ return nil, false
+ }
+ return o.Contacts, true
+}
+
+// HasContacts returns a boolean if a field has been set.
+func (o *OAuth2Client) HasContacts() bool {
+ if o != nil && o.Contacts != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetContacts gets a reference to the given []string and assigns it to the Contacts field.
+func (o *OAuth2Client) SetContacts(v []string) {
+ o.Contacts = v
+}
+
+// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
+func (o *OAuth2Client) GetCreatedAt() time.Time {
+ if o == nil || o.CreatedAt == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.CreatedAt
+}
+
+// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetCreatedAtOk() (*time.Time, bool) {
+ if o == nil || o.CreatedAt == nil {
+ return nil, false
+ }
+ return o.CreatedAt, true
+}
+
+// HasCreatedAt returns a boolean if a field has been set.
+func (o *OAuth2Client) HasCreatedAt() bool {
+ if o != nil && o.CreatedAt != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
+func (o *OAuth2Client) SetCreatedAt(v time.Time) {
+ o.CreatedAt = &v
+}
+
+// GetFrontchannelLogoutSessionRequired returns the FrontchannelLogoutSessionRequired field value if set, zero value otherwise.
+func (o *OAuth2Client) GetFrontchannelLogoutSessionRequired() bool {
+ if o == nil || o.FrontchannelLogoutSessionRequired == nil {
+ var ret bool
+ return ret
+ }
+ return *o.FrontchannelLogoutSessionRequired
+}
+
+// GetFrontchannelLogoutSessionRequiredOk returns a tuple with the FrontchannelLogoutSessionRequired field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetFrontchannelLogoutSessionRequiredOk() (*bool, bool) {
+ if o == nil || o.FrontchannelLogoutSessionRequired == nil {
+ return nil, false
+ }
+ return o.FrontchannelLogoutSessionRequired, true
+}
+
+// HasFrontchannelLogoutSessionRequired returns a boolean if a field has been set.
+func (o *OAuth2Client) HasFrontchannelLogoutSessionRequired() bool {
+ if o != nil && o.FrontchannelLogoutSessionRequired != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetFrontchannelLogoutSessionRequired gets a reference to the given bool and assigns it to the FrontchannelLogoutSessionRequired field.
+func (o *OAuth2Client) SetFrontchannelLogoutSessionRequired(v bool) {
+ o.FrontchannelLogoutSessionRequired = &v
+}
+
+// GetFrontchannelLogoutUri returns the FrontchannelLogoutUri field value if set, zero value otherwise.
+func (o *OAuth2Client) GetFrontchannelLogoutUri() string {
+ if o == nil || o.FrontchannelLogoutUri == nil {
+ var ret string
+ return ret
+ }
+ return *o.FrontchannelLogoutUri
+}
+
+// GetFrontchannelLogoutUriOk returns a tuple with the FrontchannelLogoutUri field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetFrontchannelLogoutUriOk() (*string, bool) {
+ if o == nil || o.FrontchannelLogoutUri == nil {
+ return nil, false
+ }
+ return o.FrontchannelLogoutUri, true
+}
+
+// HasFrontchannelLogoutUri returns a boolean if a field has been set.
+func (o *OAuth2Client) HasFrontchannelLogoutUri() bool {
+ if o != nil && o.FrontchannelLogoutUri != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetFrontchannelLogoutUri gets a reference to the given string and assigns it to the FrontchannelLogoutUri field.
+func (o *OAuth2Client) SetFrontchannelLogoutUri(v string) {
+ o.FrontchannelLogoutUri = &v
+}
+
+// GetGrantTypes returns the GrantTypes field value if set, zero value otherwise.
+func (o *OAuth2Client) GetGrantTypes() []string {
+ if o == nil || o.GrantTypes == nil {
+ var ret []string
+ return ret
+ }
+ return o.GrantTypes
+}
+
+// GetGrantTypesOk returns a tuple with the GrantTypes field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetGrantTypesOk() ([]string, bool) {
+ if o == nil || o.GrantTypes == nil {
+ return nil, false
+ }
+ return o.GrantTypes, true
+}
+
+// HasGrantTypes returns a boolean if a field has been set.
+func (o *OAuth2Client) HasGrantTypes() bool {
+ if o != nil && o.GrantTypes != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetGrantTypes gets a reference to the given []string and assigns it to the GrantTypes field.
+func (o *OAuth2Client) SetGrantTypes(v []string) {
+ o.GrantTypes = v
+}
+
+// GetImplicitGrantAccessTokenLifespan returns the ImplicitGrantAccessTokenLifespan field value if set, zero value otherwise.
+func (o *OAuth2Client) GetImplicitGrantAccessTokenLifespan() string {
+ if o == nil || o.ImplicitGrantAccessTokenLifespan == nil {
+ var ret string
+ return ret
+ }
+ return *o.ImplicitGrantAccessTokenLifespan
+}
+
+// GetImplicitGrantAccessTokenLifespanOk returns a tuple with the ImplicitGrantAccessTokenLifespan field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetImplicitGrantAccessTokenLifespanOk() (*string, bool) {
+ if o == nil || o.ImplicitGrantAccessTokenLifespan == nil {
+ return nil, false
+ }
+ return o.ImplicitGrantAccessTokenLifespan, true
+}
+
+// HasImplicitGrantAccessTokenLifespan returns a boolean if a field has been set.
+func (o *OAuth2Client) HasImplicitGrantAccessTokenLifespan() bool {
+ if o != nil && o.ImplicitGrantAccessTokenLifespan != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetImplicitGrantAccessTokenLifespan gets a reference to the given string and assigns it to the ImplicitGrantAccessTokenLifespan field.
+func (o *OAuth2Client) SetImplicitGrantAccessTokenLifespan(v string) {
+ o.ImplicitGrantAccessTokenLifespan = &v
+}
+
+// GetImplicitGrantIdTokenLifespan returns the ImplicitGrantIdTokenLifespan field value if set, zero value otherwise.
+func (o *OAuth2Client) GetImplicitGrantIdTokenLifespan() string {
+ if o == nil || o.ImplicitGrantIdTokenLifespan == nil {
+ var ret string
+ return ret
+ }
+ return *o.ImplicitGrantIdTokenLifespan
+}
+
+// GetImplicitGrantIdTokenLifespanOk returns a tuple with the ImplicitGrantIdTokenLifespan field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetImplicitGrantIdTokenLifespanOk() (*string, bool) {
+ if o == nil || o.ImplicitGrantIdTokenLifespan == nil {
+ return nil, false
+ }
+ return o.ImplicitGrantIdTokenLifespan, true
+}
+
+// HasImplicitGrantIdTokenLifespan returns a boolean if a field has been set.
+func (o *OAuth2Client) HasImplicitGrantIdTokenLifespan() bool {
+ if o != nil && o.ImplicitGrantIdTokenLifespan != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetImplicitGrantIdTokenLifespan gets a reference to the given string and assigns it to the ImplicitGrantIdTokenLifespan field.
+func (o *OAuth2Client) SetImplicitGrantIdTokenLifespan(v string) {
+ o.ImplicitGrantIdTokenLifespan = &v
+}
+
+// GetJwks returns the Jwks field value if set, zero value otherwise (both if not set or set to explicit null).
+func (o *OAuth2Client) GetJwks() interface{} {
+ if o == nil {
+ var ret interface{}
+ return ret
+ }
+ return o.Jwks
+}
+
+// GetJwksOk returns a tuple with the Jwks field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+// NOTE: If the value is an explicit nil, `nil, true` will be returned
+func (o *OAuth2Client) GetJwksOk() (*interface{}, bool) {
+ if o == nil || o.Jwks == nil {
+ return nil, false
+ }
+ return &o.Jwks, true
+}
+
+// HasJwks returns a boolean if a field has been set.
+func (o *OAuth2Client) HasJwks() bool {
+ if o != nil && o.Jwks != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetJwks gets a reference to the given interface{} and assigns it to the Jwks field.
+func (o *OAuth2Client) SetJwks(v interface{}) {
+ o.Jwks = v
+}
+
+// GetJwksUri returns the JwksUri field value if set, zero value otherwise.
+func (o *OAuth2Client) GetJwksUri() string {
+ if o == nil || o.JwksUri == nil {
+ var ret string
+ return ret
+ }
+ return *o.JwksUri
+}
+
+// GetJwksUriOk returns a tuple with the JwksUri field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetJwksUriOk() (*string, bool) {
+ if o == nil || o.JwksUri == nil {
+ return nil, false
+ }
+ return o.JwksUri, true
+}
+
+// HasJwksUri returns a boolean if a field has been set.
+func (o *OAuth2Client) HasJwksUri() bool {
+ if o != nil && o.JwksUri != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetJwksUri gets a reference to the given string and assigns it to the JwksUri field.
+func (o *OAuth2Client) SetJwksUri(v string) {
+ o.JwksUri = &v
+}
+
+// GetJwtBearerGrantAccessTokenLifespan returns the JwtBearerGrantAccessTokenLifespan field value if set, zero value otherwise.
+func (o *OAuth2Client) GetJwtBearerGrantAccessTokenLifespan() string {
+ if o == nil || o.JwtBearerGrantAccessTokenLifespan == nil {
+ var ret string
+ return ret
+ }
+ return *o.JwtBearerGrantAccessTokenLifespan
+}
+
+// GetJwtBearerGrantAccessTokenLifespanOk returns a tuple with the JwtBearerGrantAccessTokenLifespan field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetJwtBearerGrantAccessTokenLifespanOk() (*string, bool) {
+ if o == nil || o.JwtBearerGrantAccessTokenLifespan == nil {
+ return nil, false
+ }
+ return o.JwtBearerGrantAccessTokenLifespan, true
+}
+
+// HasJwtBearerGrantAccessTokenLifespan returns a boolean if a field has been set.
+func (o *OAuth2Client) HasJwtBearerGrantAccessTokenLifespan() bool {
+ if o != nil && o.JwtBearerGrantAccessTokenLifespan != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetJwtBearerGrantAccessTokenLifespan gets a reference to the given string and assigns it to the JwtBearerGrantAccessTokenLifespan field.
+func (o *OAuth2Client) SetJwtBearerGrantAccessTokenLifespan(v string) {
+ o.JwtBearerGrantAccessTokenLifespan = &v
+}
+
+// GetLogoUri returns the LogoUri field value if set, zero value otherwise.
+func (o *OAuth2Client) GetLogoUri() string {
+ if o == nil || o.LogoUri == nil {
+ var ret string
+ return ret
+ }
+ return *o.LogoUri
+}
+
+// GetLogoUriOk returns a tuple with the LogoUri field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetLogoUriOk() (*string, bool) {
+ if o == nil || o.LogoUri == nil {
+ return nil, false
+ }
+ return o.LogoUri, true
+}
+
+// HasLogoUri returns a boolean if a field has been set.
+func (o *OAuth2Client) HasLogoUri() bool {
+ if o != nil && o.LogoUri != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetLogoUri gets a reference to the given string and assigns it to the LogoUri field.
+func (o *OAuth2Client) SetLogoUri(v string) {
+ o.LogoUri = &v
+}
+
+// GetMetadata returns the Metadata field value if set, zero value otherwise (both if not set or set to explicit null).
+func (o *OAuth2Client) GetMetadata() interface{} {
+ if o == nil {
+ var ret interface{}
+ return ret
+ }
+ return o.Metadata
+}
+
+// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+// NOTE: If the value is an explicit nil, `nil, true` will be returned
+func (o *OAuth2Client) GetMetadataOk() (*interface{}, bool) {
+ if o == nil || o.Metadata == nil {
+ return nil, false
+ }
+ return &o.Metadata, true
+}
+
+// HasMetadata returns a boolean if a field has been set.
+func (o *OAuth2Client) HasMetadata() bool {
+ if o != nil && o.Metadata != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetMetadata gets a reference to the given interface{} and assigns it to the Metadata field.
+func (o *OAuth2Client) SetMetadata(v interface{}) {
+ o.Metadata = v
+}
+
+// GetOwner returns the Owner field value if set, zero value otherwise.
+func (o *OAuth2Client) GetOwner() string {
+ if o == nil || o.Owner == nil {
+ var ret string
+ return ret
+ }
+ return *o.Owner
+}
+
+// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetOwnerOk() (*string, bool) {
+ if o == nil || o.Owner == nil {
+ return nil, false
+ }
+ return o.Owner, true
+}
+
+// HasOwner returns a boolean if a field has been set.
+func (o *OAuth2Client) HasOwner() bool {
+ if o != nil && o.Owner != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetOwner gets a reference to the given string and assigns it to the Owner field.
+func (o *OAuth2Client) SetOwner(v string) {
+ o.Owner = &v
+}
+
+// GetPolicyUri returns the PolicyUri field value if set, zero value otherwise.
+func (o *OAuth2Client) GetPolicyUri() string {
+ if o == nil || o.PolicyUri == nil {
+ var ret string
+ return ret
+ }
+ return *o.PolicyUri
+}
+
+// GetPolicyUriOk returns a tuple with the PolicyUri field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetPolicyUriOk() (*string, bool) {
+ if o == nil || o.PolicyUri == nil {
+ return nil, false
+ }
+ return o.PolicyUri, true
+}
+
+// HasPolicyUri returns a boolean if a field has been set.
+func (o *OAuth2Client) HasPolicyUri() bool {
+ if o != nil && o.PolicyUri != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPolicyUri gets a reference to the given string and assigns it to the PolicyUri field.
+func (o *OAuth2Client) SetPolicyUri(v string) {
+ o.PolicyUri = &v
+}
+
+// GetPostLogoutRedirectUris returns the PostLogoutRedirectUris field value if set, zero value otherwise.
+func (o *OAuth2Client) GetPostLogoutRedirectUris() []string {
+ if o == nil || o.PostLogoutRedirectUris == nil {
+ var ret []string
+ return ret
+ }
+ return o.PostLogoutRedirectUris
+}
+
+// GetPostLogoutRedirectUrisOk returns a tuple with the PostLogoutRedirectUris field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetPostLogoutRedirectUrisOk() ([]string, bool) {
+ if o == nil || o.PostLogoutRedirectUris == nil {
+ return nil, false
+ }
+ return o.PostLogoutRedirectUris, true
+}
+
+// HasPostLogoutRedirectUris returns a boolean if a field has been set.
+func (o *OAuth2Client) HasPostLogoutRedirectUris() bool {
+ if o != nil && o.PostLogoutRedirectUris != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPostLogoutRedirectUris gets a reference to the given []string and assigns it to the PostLogoutRedirectUris field.
+func (o *OAuth2Client) SetPostLogoutRedirectUris(v []string) {
+ o.PostLogoutRedirectUris = v
+}
+
+// GetRedirectUris returns the RedirectUris field value if set, zero value otherwise.
+func (o *OAuth2Client) GetRedirectUris() []string {
+ if o == nil || o.RedirectUris == nil {
+ var ret []string
+ return ret
+ }
+ return o.RedirectUris
+}
+
+// GetRedirectUrisOk returns a tuple with the RedirectUris field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetRedirectUrisOk() ([]string, bool) {
+ if o == nil || o.RedirectUris == nil {
+ return nil, false
+ }
+ return o.RedirectUris, true
+}
+
+// HasRedirectUris returns a boolean if a field has been set.
+func (o *OAuth2Client) HasRedirectUris() bool {
+ if o != nil && o.RedirectUris != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetRedirectUris gets a reference to the given []string and assigns it to the RedirectUris field.
+func (o *OAuth2Client) SetRedirectUris(v []string) {
+ o.RedirectUris = v
+}
+
+// GetRefreshTokenGrantAccessTokenLifespan returns the RefreshTokenGrantAccessTokenLifespan field value if set, zero value otherwise.
+func (o *OAuth2Client) GetRefreshTokenGrantAccessTokenLifespan() string {
+ if o == nil || o.RefreshTokenGrantAccessTokenLifespan == nil {
+ var ret string
+ return ret
+ }
+ return *o.RefreshTokenGrantAccessTokenLifespan
+}
+
+// GetRefreshTokenGrantAccessTokenLifespanOk returns a tuple with the RefreshTokenGrantAccessTokenLifespan field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetRefreshTokenGrantAccessTokenLifespanOk() (*string, bool) {
+ if o == nil || o.RefreshTokenGrantAccessTokenLifespan == nil {
+ return nil, false
+ }
+ return o.RefreshTokenGrantAccessTokenLifespan, true
+}
+
+// HasRefreshTokenGrantAccessTokenLifespan returns a boolean if a field has been set.
+func (o *OAuth2Client) HasRefreshTokenGrantAccessTokenLifespan() bool {
+ if o != nil && o.RefreshTokenGrantAccessTokenLifespan != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetRefreshTokenGrantAccessTokenLifespan gets a reference to the given string and assigns it to the RefreshTokenGrantAccessTokenLifespan field.
+func (o *OAuth2Client) SetRefreshTokenGrantAccessTokenLifespan(v string) {
+ o.RefreshTokenGrantAccessTokenLifespan = &v
+}
+
+// GetRefreshTokenGrantIdTokenLifespan returns the RefreshTokenGrantIdTokenLifespan field value if set, zero value otherwise.
+func (o *OAuth2Client) GetRefreshTokenGrantIdTokenLifespan() string {
+ if o == nil || o.RefreshTokenGrantIdTokenLifespan == nil {
+ var ret string
+ return ret
+ }
+ return *o.RefreshTokenGrantIdTokenLifespan
+}
+
+// GetRefreshTokenGrantIdTokenLifespanOk returns a tuple with the RefreshTokenGrantIdTokenLifespan field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetRefreshTokenGrantIdTokenLifespanOk() (*string, bool) {
+ if o == nil || o.RefreshTokenGrantIdTokenLifespan == nil {
+ return nil, false
+ }
+ return o.RefreshTokenGrantIdTokenLifespan, true
+}
+
+// HasRefreshTokenGrantIdTokenLifespan returns a boolean if a field has been set.
+func (o *OAuth2Client) HasRefreshTokenGrantIdTokenLifespan() bool {
+ if o != nil && o.RefreshTokenGrantIdTokenLifespan != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetRefreshTokenGrantIdTokenLifespan gets a reference to the given string and assigns it to the RefreshTokenGrantIdTokenLifespan field.
+func (o *OAuth2Client) SetRefreshTokenGrantIdTokenLifespan(v string) {
+ o.RefreshTokenGrantIdTokenLifespan = &v
+}
+
+// GetRefreshTokenGrantRefreshTokenLifespan returns the RefreshTokenGrantRefreshTokenLifespan field value if set, zero value otherwise.
+func (o *OAuth2Client) GetRefreshTokenGrantRefreshTokenLifespan() string {
+ if o == nil || o.RefreshTokenGrantRefreshTokenLifespan == nil {
+ var ret string
+ return ret
+ }
+ return *o.RefreshTokenGrantRefreshTokenLifespan
+}
+
+// GetRefreshTokenGrantRefreshTokenLifespanOk returns a tuple with the RefreshTokenGrantRefreshTokenLifespan field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetRefreshTokenGrantRefreshTokenLifespanOk() (*string, bool) {
+ if o == nil || o.RefreshTokenGrantRefreshTokenLifespan == nil {
+ return nil, false
+ }
+ return o.RefreshTokenGrantRefreshTokenLifespan, true
+}
+
+// HasRefreshTokenGrantRefreshTokenLifespan returns a boolean if a field has been set.
+func (o *OAuth2Client) HasRefreshTokenGrantRefreshTokenLifespan() bool {
+ if o != nil && o.RefreshTokenGrantRefreshTokenLifespan != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetRefreshTokenGrantRefreshTokenLifespan gets a reference to the given string and assigns it to the RefreshTokenGrantRefreshTokenLifespan field.
+func (o *OAuth2Client) SetRefreshTokenGrantRefreshTokenLifespan(v string) {
+ o.RefreshTokenGrantRefreshTokenLifespan = &v
+}
+
+// GetRegistrationAccessToken returns the RegistrationAccessToken field value if set, zero value otherwise.
+func (o *OAuth2Client) GetRegistrationAccessToken() string {
+ if o == nil || o.RegistrationAccessToken == nil {
+ var ret string
+ return ret
+ }
+ return *o.RegistrationAccessToken
+}
+
+// GetRegistrationAccessTokenOk returns a tuple with the RegistrationAccessToken field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetRegistrationAccessTokenOk() (*string, bool) {
+ if o == nil || o.RegistrationAccessToken == nil {
+ return nil, false
+ }
+ return o.RegistrationAccessToken, true
+}
+
+// HasRegistrationAccessToken returns a boolean if a field has been set.
+func (o *OAuth2Client) HasRegistrationAccessToken() bool {
+ if o != nil && o.RegistrationAccessToken != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetRegistrationAccessToken gets a reference to the given string and assigns it to the RegistrationAccessToken field.
+func (o *OAuth2Client) SetRegistrationAccessToken(v string) {
+ o.RegistrationAccessToken = &v
+}
+
+// GetRegistrationClientUri returns the RegistrationClientUri field value if set, zero value otherwise.
+func (o *OAuth2Client) GetRegistrationClientUri() string {
+ if o == nil || o.RegistrationClientUri == nil {
+ var ret string
+ return ret
+ }
+ return *o.RegistrationClientUri
+}
+
+// GetRegistrationClientUriOk returns a tuple with the RegistrationClientUri field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetRegistrationClientUriOk() (*string, bool) {
+ if o == nil || o.RegistrationClientUri == nil {
+ return nil, false
+ }
+ return o.RegistrationClientUri, true
+}
+
+// HasRegistrationClientUri returns a boolean if a field has been set.
+func (o *OAuth2Client) HasRegistrationClientUri() bool {
+ if o != nil && o.RegistrationClientUri != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetRegistrationClientUri gets a reference to the given string and assigns it to the RegistrationClientUri field.
+func (o *OAuth2Client) SetRegistrationClientUri(v string) {
+ o.RegistrationClientUri = &v
+}
+
+// GetRequestObjectSigningAlg returns the RequestObjectSigningAlg field value if set, zero value otherwise.
+func (o *OAuth2Client) GetRequestObjectSigningAlg() string {
+ if o == nil || o.RequestObjectSigningAlg == nil {
+ var ret string
+ return ret
+ }
+ return *o.RequestObjectSigningAlg
+}
+
+// GetRequestObjectSigningAlgOk returns a tuple with the RequestObjectSigningAlg field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetRequestObjectSigningAlgOk() (*string, bool) {
+ if o == nil || o.RequestObjectSigningAlg == nil {
+ return nil, false
+ }
+ return o.RequestObjectSigningAlg, true
+}
+
+// HasRequestObjectSigningAlg returns a boolean if a field has been set.
+func (o *OAuth2Client) HasRequestObjectSigningAlg() bool {
+ if o != nil && o.RequestObjectSigningAlg != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetRequestObjectSigningAlg gets a reference to the given string and assigns it to the RequestObjectSigningAlg field.
+func (o *OAuth2Client) SetRequestObjectSigningAlg(v string) {
+ o.RequestObjectSigningAlg = &v
+}
+
+// GetRequestUris returns the RequestUris field value if set, zero value otherwise.
+func (o *OAuth2Client) GetRequestUris() []string {
+ if o == nil || o.RequestUris == nil {
+ var ret []string
+ return ret
+ }
+ return o.RequestUris
+}
+
+// GetRequestUrisOk returns a tuple with the RequestUris field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetRequestUrisOk() ([]string, bool) {
+ if o == nil || o.RequestUris == nil {
+ return nil, false
+ }
+ return o.RequestUris, true
+}
+
+// HasRequestUris returns a boolean if a field has been set.
+func (o *OAuth2Client) HasRequestUris() bool {
+ if o != nil && o.RequestUris != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetRequestUris gets a reference to the given []string and assigns it to the RequestUris field.
+func (o *OAuth2Client) SetRequestUris(v []string) {
+ o.RequestUris = v
+}
+
+// GetResponseTypes returns the ResponseTypes field value if set, zero value otherwise.
+func (o *OAuth2Client) GetResponseTypes() []string {
+ if o == nil || o.ResponseTypes == nil {
+ var ret []string
+ return ret
+ }
+ return o.ResponseTypes
+}
+
+// GetResponseTypesOk returns a tuple with the ResponseTypes field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetResponseTypesOk() ([]string, bool) {
+ if o == nil || o.ResponseTypes == nil {
+ return nil, false
+ }
+ return o.ResponseTypes, true
+}
+
+// HasResponseTypes returns a boolean if a field has been set.
+func (o *OAuth2Client) HasResponseTypes() bool {
+ if o != nil && o.ResponseTypes != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetResponseTypes gets a reference to the given []string and assigns it to the ResponseTypes field.
+func (o *OAuth2Client) SetResponseTypes(v []string) {
+ o.ResponseTypes = v
+}
+
+// GetScope returns the Scope field value if set, zero value otherwise.
+func (o *OAuth2Client) GetScope() string {
+ if o == nil || o.Scope == nil {
+ var ret string
+ return ret
+ }
+ return *o.Scope
+}
+
+// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetScopeOk() (*string, bool) {
+ if o == nil || o.Scope == nil {
+ return nil, false
+ }
+ return o.Scope, true
+}
+
+// HasScope returns a boolean if a field has been set.
+func (o *OAuth2Client) HasScope() bool {
+ if o != nil && o.Scope != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetScope gets a reference to the given string and assigns it to the Scope field.
+func (o *OAuth2Client) SetScope(v string) {
+ o.Scope = &v
+}
+
+// GetSectorIdentifierUri returns the SectorIdentifierUri field value if set, zero value otherwise.
+func (o *OAuth2Client) GetSectorIdentifierUri() string {
+ if o == nil || o.SectorIdentifierUri == nil {
+ var ret string
+ return ret
+ }
+ return *o.SectorIdentifierUri
+}
+
+// GetSectorIdentifierUriOk returns a tuple with the SectorIdentifierUri field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetSectorIdentifierUriOk() (*string, bool) {
+ if o == nil || o.SectorIdentifierUri == nil {
+ return nil, false
+ }
+ return o.SectorIdentifierUri, true
+}
+
+// HasSectorIdentifierUri returns a boolean if a field has been set.
+func (o *OAuth2Client) HasSectorIdentifierUri() bool {
+ if o != nil && o.SectorIdentifierUri != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetSectorIdentifierUri gets a reference to the given string and assigns it to the SectorIdentifierUri field.
+func (o *OAuth2Client) SetSectorIdentifierUri(v string) {
+ o.SectorIdentifierUri = &v
+}
+
+// GetSkipConsent returns the SkipConsent field value if set, zero value otherwise.
+func (o *OAuth2Client) GetSkipConsent() bool {
+ if o == nil || o.SkipConsent == nil {
+ var ret bool
+ return ret
+ }
+ return *o.SkipConsent
+}
+
+// GetSkipConsentOk returns a tuple with the SkipConsent field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetSkipConsentOk() (*bool, bool) {
+ if o == nil || o.SkipConsent == nil {
+ return nil, false
+ }
+ return o.SkipConsent, true
+}
+
+// HasSkipConsent returns a boolean if a field has been set.
+func (o *OAuth2Client) HasSkipConsent() bool {
+ if o != nil && o.SkipConsent != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetSkipConsent gets a reference to the given bool and assigns it to the SkipConsent field.
+func (o *OAuth2Client) SetSkipConsent(v bool) {
+ o.SkipConsent = &v
+}
+
+// GetSkipLogoutConsent returns the SkipLogoutConsent field value if set, zero value otherwise.
+func (o *OAuth2Client) GetSkipLogoutConsent() bool {
+ if o == nil || o.SkipLogoutConsent == nil {
+ var ret bool
+ return ret
+ }
+ return *o.SkipLogoutConsent
+}
+
+// GetSkipLogoutConsentOk returns a tuple with the SkipLogoutConsent field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetSkipLogoutConsentOk() (*bool, bool) {
+ if o == nil || o.SkipLogoutConsent == nil {
+ return nil, false
+ }
+ return o.SkipLogoutConsent, true
+}
+
+// HasSkipLogoutConsent returns a boolean if a field has been set.
+func (o *OAuth2Client) HasSkipLogoutConsent() bool {
+ if o != nil && o.SkipLogoutConsent != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetSkipLogoutConsent gets a reference to the given bool and assigns it to the SkipLogoutConsent field.
+func (o *OAuth2Client) SetSkipLogoutConsent(v bool) {
+ o.SkipLogoutConsent = &v
+}
+
+// GetSubjectType returns the SubjectType field value if set, zero value otherwise.
+func (o *OAuth2Client) GetSubjectType() string {
+ if o == nil || o.SubjectType == nil {
+ var ret string
+ return ret
+ }
+ return *o.SubjectType
+}
+
+// GetSubjectTypeOk returns a tuple with the SubjectType field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetSubjectTypeOk() (*string, bool) {
+ if o == nil || o.SubjectType == nil {
+ return nil, false
+ }
+ return o.SubjectType, true
+}
+
+// HasSubjectType returns a boolean if a field has been set.
+func (o *OAuth2Client) HasSubjectType() bool {
+ if o != nil && o.SubjectType != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetSubjectType gets a reference to the given string and assigns it to the SubjectType field.
+func (o *OAuth2Client) SetSubjectType(v string) {
+ o.SubjectType = &v
+}
+
+// GetTokenEndpointAuthMethod returns the TokenEndpointAuthMethod field value if set, zero value otherwise.
+func (o *OAuth2Client) GetTokenEndpointAuthMethod() string {
+ if o == nil || o.TokenEndpointAuthMethod == nil {
+ var ret string
+ return ret
+ }
+ return *o.TokenEndpointAuthMethod
+}
+
+// GetTokenEndpointAuthMethodOk returns a tuple with the TokenEndpointAuthMethod field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetTokenEndpointAuthMethodOk() (*string, bool) {
+ if o == nil || o.TokenEndpointAuthMethod == nil {
+ return nil, false
+ }
+ return o.TokenEndpointAuthMethod, true
+}
+
+// HasTokenEndpointAuthMethod returns a boolean if a field has been set.
+func (o *OAuth2Client) HasTokenEndpointAuthMethod() bool {
+ if o != nil && o.TokenEndpointAuthMethod != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetTokenEndpointAuthMethod gets a reference to the given string and assigns it to the TokenEndpointAuthMethod field.
+func (o *OAuth2Client) SetTokenEndpointAuthMethod(v string) {
+ o.TokenEndpointAuthMethod = &v
+}
+
+// GetTokenEndpointAuthSigningAlg returns the TokenEndpointAuthSigningAlg field value if set, zero value otherwise.
+func (o *OAuth2Client) GetTokenEndpointAuthSigningAlg() string {
+ if o == nil || o.TokenEndpointAuthSigningAlg == nil {
+ var ret string
+ return ret
+ }
+ return *o.TokenEndpointAuthSigningAlg
+}
+
+// GetTokenEndpointAuthSigningAlgOk returns a tuple with the TokenEndpointAuthSigningAlg field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetTokenEndpointAuthSigningAlgOk() (*string, bool) {
+ if o == nil || o.TokenEndpointAuthSigningAlg == nil {
+ return nil, false
+ }
+ return o.TokenEndpointAuthSigningAlg, true
+}
+
+// HasTokenEndpointAuthSigningAlg returns a boolean if a field has been set.
+func (o *OAuth2Client) HasTokenEndpointAuthSigningAlg() bool {
+ if o != nil && o.TokenEndpointAuthSigningAlg != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetTokenEndpointAuthSigningAlg gets a reference to the given string and assigns it to the TokenEndpointAuthSigningAlg field.
+func (o *OAuth2Client) SetTokenEndpointAuthSigningAlg(v string) {
+ o.TokenEndpointAuthSigningAlg = &v
+}
+
+// GetTosUri returns the TosUri field value if set, zero value otherwise.
+func (o *OAuth2Client) GetTosUri() string {
+ if o == nil || o.TosUri == nil {
+ var ret string
+ return ret
+ }
+ return *o.TosUri
+}
+
+// GetTosUriOk returns a tuple with the TosUri field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetTosUriOk() (*string, bool) {
+ if o == nil || o.TosUri == nil {
+ return nil, false
+ }
+ return o.TosUri, true
+}
+
+// HasTosUri returns a boolean if a field has been set.
+func (o *OAuth2Client) HasTosUri() bool {
+ if o != nil && o.TosUri != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetTosUri gets a reference to the given string and assigns it to the TosUri field.
+func (o *OAuth2Client) SetTosUri(v string) {
+ o.TosUri = &v
+}
+
+// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
+func (o *OAuth2Client) GetUpdatedAt() time.Time {
+ if o == nil || o.UpdatedAt == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.UpdatedAt
+}
+
+// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetUpdatedAtOk() (*time.Time, bool) {
+ if o == nil || o.UpdatedAt == nil {
+ return nil, false
+ }
+ return o.UpdatedAt, true
+}
+
+// HasUpdatedAt returns a boolean if a field has been set.
+func (o *OAuth2Client) HasUpdatedAt() bool {
+ if o != nil && o.UpdatedAt != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
+func (o *OAuth2Client) SetUpdatedAt(v time.Time) {
+ o.UpdatedAt = &v
+}
+
+// GetUserinfoSignedResponseAlg returns the UserinfoSignedResponseAlg field value if set, zero value otherwise.
+func (o *OAuth2Client) GetUserinfoSignedResponseAlg() string {
+ if o == nil || o.UserinfoSignedResponseAlg == nil {
+ var ret string
+ return ret
+ }
+ return *o.UserinfoSignedResponseAlg
+}
+
+// GetUserinfoSignedResponseAlgOk returns a tuple with the UserinfoSignedResponseAlg field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2Client) GetUserinfoSignedResponseAlgOk() (*string, bool) {
+ if o == nil || o.UserinfoSignedResponseAlg == nil {
+ return nil, false
+ }
+ return o.UserinfoSignedResponseAlg, true
+}
+
+// HasUserinfoSignedResponseAlg returns a boolean if a field has been set.
+func (o *OAuth2Client) HasUserinfoSignedResponseAlg() bool {
+ if o != nil && o.UserinfoSignedResponseAlg != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetUserinfoSignedResponseAlg gets a reference to the given string and assigns it to the UserinfoSignedResponseAlg field.
+func (o *OAuth2Client) SetUserinfoSignedResponseAlg(v string) {
+ o.UserinfoSignedResponseAlg = &v
+}
+
+func (o OAuth2Client) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.AccessTokenStrategy != nil {
+ toSerialize["access_token_strategy"] = o.AccessTokenStrategy
+ }
+ if o.AllowedCorsOrigins != nil {
+ toSerialize["allowed_cors_origins"] = o.AllowedCorsOrigins
+ }
+ if o.Audience != nil {
+ toSerialize["audience"] = o.Audience
+ }
+ if o.AuthorizationCodeGrantAccessTokenLifespan != nil {
+ toSerialize["authorization_code_grant_access_token_lifespan"] = o.AuthorizationCodeGrantAccessTokenLifespan
+ }
+ if o.AuthorizationCodeGrantIdTokenLifespan != nil {
+ toSerialize["authorization_code_grant_id_token_lifespan"] = o.AuthorizationCodeGrantIdTokenLifespan
+ }
+ if o.AuthorizationCodeGrantRefreshTokenLifespan != nil {
+ toSerialize["authorization_code_grant_refresh_token_lifespan"] = o.AuthorizationCodeGrantRefreshTokenLifespan
+ }
+ if o.BackchannelLogoutSessionRequired != nil {
+ toSerialize["backchannel_logout_session_required"] = o.BackchannelLogoutSessionRequired
+ }
+ if o.BackchannelLogoutUri != nil {
+ toSerialize["backchannel_logout_uri"] = o.BackchannelLogoutUri
+ }
+ if o.ClientCredentialsGrantAccessTokenLifespan != nil {
+ toSerialize["client_credentials_grant_access_token_lifespan"] = o.ClientCredentialsGrantAccessTokenLifespan
+ }
+ if o.ClientId != nil {
+ toSerialize["client_id"] = o.ClientId
+ }
+ if o.ClientName != nil {
+ toSerialize["client_name"] = o.ClientName
+ }
+ if o.ClientSecret != nil {
+ toSerialize["client_secret"] = o.ClientSecret
+ }
+ if o.ClientSecretExpiresAt != nil {
+ toSerialize["client_secret_expires_at"] = o.ClientSecretExpiresAt
+ }
+ if o.ClientUri != nil {
+ toSerialize["client_uri"] = o.ClientUri
+ }
+ if o.Contacts != nil {
+ toSerialize["contacts"] = o.Contacts
+ }
+ if o.CreatedAt != nil {
+ toSerialize["created_at"] = o.CreatedAt
+ }
+ if o.FrontchannelLogoutSessionRequired != nil {
+ toSerialize["frontchannel_logout_session_required"] = o.FrontchannelLogoutSessionRequired
+ }
+ if o.FrontchannelLogoutUri != nil {
+ toSerialize["frontchannel_logout_uri"] = o.FrontchannelLogoutUri
+ }
+ if o.GrantTypes != nil {
+ toSerialize["grant_types"] = o.GrantTypes
+ }
+ if o.ImplicitGrantAccessTokenLifespan != nil {
+ toSerialize["implicit_grant_access_token_lifespan"] = o.ImplicitGrantAccessTokenLifespan
+ }
+ if o.ImplicitGrantIdTokenLifespan != nil {
+ toSerialize["implicit_grant_id_token_lifespan"] = o.ImplicitGrantIdTokenLifespan
+ }
+ if o.Jwks != nil {
+ toSerialize["jwks"] = o.Jwks
+ }
+ if o.JwksUri != nil {
+ toSerialize["jwks_uri"] = o.JwksUri
+ }
+ if o.JwtBearerGrantAccessTokenLifespan != nil {
+ toSerialize["jwt_bearer_grant_access_token_lifespan"] = o.JwtBearerGrantAccessTokenLifespan
+ }
+ if o.LogoUri != nil {
+ toSerialize["logo_uri"] = o.LogoUri
+ }
+ if o.Metadata != nil {
+ toSerialize["metadata"] = o.Metadata
+ }
+ if o.Owner != nil {
+ toSerialize["owner"] = o.Owner
+ }
+ if o.PolicyUri != nil {
+ toSerialize["policy_uri"] = o.PolicyUri
+ }
+ if o.PostLogoutRedirectUris != nil {
+ toSerialize["post_logout_redirect_uris"] = o.PostLogoutRedirectUris
+ }
+ if o.RedirectUris != nil {
+ toSerialize["redirect_uris"] = o.RedirectUris
+ }
+ if o.RefreshTokenGrantAccessTokenLifespan != nil {
+ toSerialize["refresh_token_grant_access_token_lifespan"] = o.RefreshTokenGrantAccessTokenLifespan
+ }
+ if o.RefreshTokenGrantIdTokenLifespan != nil {
+ toSerialize["refresh_token_grant_id_token_lifespan"] = o.RefreshTokenGrantIdTokenLifespan
+ }
+ if o.RefreshTokenGrantRefreshTokenLifespan != nil {
+ toSerialize["refresh_token_grant_refresh_token_lifespan"] = o.RefreshTokenGrantRefreshTokenLifespan
+ }
+ if o.RegistrationAccessToken != nil {
+ toSerialize["registration_access_token"] = o.RegistrationAccessToken
+ }
+ if o.RegistrationClientUri != nil {
+ toSerialize["registration_client_uri"] = o.RegistrationClientUri
+ }
+ if o.RequestObjectSigningAlg != nil {
+ toSerialize["request_object_signing_alg"] = o.RequestObjectSigningAlg
+ }
+ if o.RequestUris != nil {
+ toSerialize["request_uris"] = o.RequestUris
+ }
+ if o.ResponseTypes != nil {
+ toSerialize["response_types"] = o.ResponseTypes
+ }
+ if o.Scope != nil {
+ toSerialize["scope"] = o.Scope
+ }
+ if o.SectorIdentifierUri != nil {
+ toSerialize["sector_identifier_uri"] = o.SectorIdentifierUri
+ }
+ if o.SkipConsent != nil {
+ toSerialize["skip_consent"] = o.SkipConsent
+ }
+ if o.SkipLogoutConsent != nil {
+ toSerialize["skip_logout_consent"] = o.SkipLogoutConsent
+ }
+ if o.SubjectType != nil {
+ toSerialize["subject_type"] = o.SubjectType
+ }
+ if o.TokenEndpointAuthMethod != nil {
+ toSerialize["token_endpoint_auth_method"] = o.TokenEndpointAuthMethod
+ }
+ if o.TokenEndpointAuthSigningAlg != nil {
+ toSerialize["token_endpoint_auth_signing_alg"] = o.TokenEndpointAuthSigningAlg
+ }
+ if o.TosUri != nil {
+ toSerialize["tos_uri"] = o.TosUri
+ }
+ if o.UpdatedAt != nil {
+ toSerialize["updated_at"] = o.UpdatedAt
+ }
+ if o.UserinfoSignedResponseAlg != nil {
+ toSerialize["userinfo_signed_response_alg"] = o.UserinfoSignedResponseAlg
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableOAuth2Client struct {
+ value *OAuth2Client
+ isSet bool
+}
+
+func (v NullableOAuth2Client) Get() *OAuth2Client {
+ return v.value
+}
+
+func (v *NullableOAuth2Client) Set(val *OAuth2Client) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableOAuth2Client) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableOAuth2Client) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableOAuth2Client(val *OAuth2Client) *NullableOAuth2Client {
+ return &NullableOAuth2Client{value: val, isSet: true}
+}
+
+func (v NullableOAuth2Client) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableOAuth2Client) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_o_auth2_consent_request_open_id_connect_context.go b/internal/httpclient/model_o_auth2_consent_request_open_id_connect_context.go
new file mode 100644
index 000000000000..c0cbf7f3129e
--- /dev/null
+++ b/internal/httpclient/model_o_auth2_consent_request_open_id_connect_context.go
@@ -0,0 +1,263 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// OAuth2ConsentRequestOpenIDConnectContext OAuth2ConsentRequestOpenIDConnectContext struct for OAuth2ConsentRequestOpenIDConnectContext
+type OAuth2ConsentRequestOpenIDConnectContext struct {
+ // ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request. It is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required. OpenID Connect defines it as follows: > Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values that the Authorization Server is being requested to use for processing this Authentication Request, with the values appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a Voluntary Claim by this parameter.
+ AcrValues []string `json:"acr_values,omitempty"`
+ // Display is a string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User. The defined values are: page: The Authorization Server SHOULD display the authentication and consent UI consistent with a full User Agent page view. If the display parameter is not specified, this is the default display mode. popup: The Authorization Server SHOULD display the authentication and consent UI consistent with a popup User Agent window. The popup User Agent window should be of an appropriate size for a login-focused dialog and should not obscure the entire window that it is popping up over. touch: The Authorization Server SHOULD display the authentication and consent UI consistent with a device that leverages a touch interface. wap: The Authorization Server SHOULD display the authentication and consent UI consistent with a \\\"feature phone\\\" type display. The Authorization Server MAY also attempt to detect the capabilities of the User Agent and present an appropriate display.
+ Display *string `json:"display,omitempty"`
+ // IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the End-User's current or past authenticated session with the Client.
+ IdTokenHintClaims map[string]interface{} `json:"id_token_hint_claims,omitempty"`
+ // LoginHint hints about the login identifier the End-User might use to log in (if necessary). This hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier) and then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a phone number in the format specified for the phone_number Claim. The use of this parameter is optional.
+ LoginHint *string `json:"login_hint,omitempty"`
+ // UILocales is the End-User'id preferred languages and scripts for the user interface, represented as a space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value \\\"fr-CA fr en\\\" represents a preference for French as spoken in Canada, then French (without a region designation), followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested locales are not supported by the OpenID Provider.
+ UiLocales []string `json:"ui_locales,omitempty"`
+}
+
+// NewOAuth2ConsentRequestOpenIDConnectContext instantiates a new OAuth2ConsentRequestOpenIDConnectContext object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewOAuth2ConsentRequestOpenIDConnectContext() *OAuth2ConsentRequestOpenIDConnectContext {
+ this := OAuth2ConsentRequestOpenIDConnectContext{}
+ return &this
+}
+
+// NewOAuth2ConsentRequestOpenIDConnectContextWithDefaults instantiates a new OAuth2ConsentRequestOpenIDConnectContext object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewOAuth2ConsentRequestOpenIDConnectContextWithDefaults() *OAuth2ConsentRequestOpenIDConnectContext {
+ this := OAuth2ConsentRequestOpenIDConnectContext{}
+ return &this
+}
+
+// GetAcrValues returns the AcrValues field value if set, zero value otherwise.
+func (o *OAuth2ConsentRequestOpenIDConnectContext) GetAcrValues() []string {
+ if o == nil || o.AcrValues == nil {
+ var ret []string
+ return ret
+ }
+ return o.AcrValues
+}
+
+// GetAcrValuesOk returns a tuple with the AcrValues field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2ConsentRequestOpenIDConnectContext) GetAcrValuesOk() ([]string, bool) {
+ if o == nil || o.AcrValues == nil {
+ return nil, false
+ }
+ return o.AcrValues, true
+}
+
+// HasAcrValues returns a boolean if a field has been set.
+func (o *OAuth2ConsentRequestOpenIDConnectContext) HasAcrValues() bool {
+ if o != nil && o.AcrValues != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetAcrValues gets a reference to the given []string and assigns it to the AcrValues field.
+func (o *OAuth2ConsentRequestOpenIDConnectContext) SetAcrValues(v []string) {
+ o.AcrValues = v
+}
+
+// GetDisplay returns the Display field value if set, zero value otherwise.
+func (o *OAuth2ConsentRequestOpenIDConnectContext) GetDisplay() string {
+ if o == nil || o.Display == nil {
+ var ret string
+ return ret
+ }
+ return *o.Display
+}
+
+// GetDisplayOk returns a tuple with the Display field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2ConsentRequestOpenIDConnectContext) GetDisplayOk() (*string, bool) {
+ if o == nil || o.Display == nil {
+ return nil, false
+ }
+ return o.Display, true
+}
+
+// HasDisplay returns a boolean if a field has been set.
+func (o *OAuth2ConsentRequestOpenIDConnectContext) HasDisplay() bool {
+ if o != nil && o.Display != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetDisplay gets a reference to the given string and assigns it to the Display field.
+func (o *OAuth2ConsentRequestOpenIDConnectContext) SetDisplay(v string) {
+ o.Display = &v
+}
+
+// GetIdTokenHintClaims returns the IdTokenHintClaims field value if set, zero value otherwise.
+func (o *OAuth2ConsentRequestOpenIDConnectContext) GetIdTokenHintClaims() map[string]interface{} {
+ if o == nil || o.IdTokenHintClaims == nil {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.IdTokenHintClaims
+}
+
+// GetIdTokenHintClaimsOk returns a tuple with the IdTokenHintClaims field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2ConsentRequestOpenIDConnectContext) GetIdTokenHintClaimsOk() (map[string]interface{}, bool) {
+ if o == nil || o.IdTokenHintClaims == nil {
+ return nil, false
+ }
+ return o.IdTokenHintClaims, true
+}
+
+// HasIdTokenHintClaims returns a boolean if a field has been set.
+func (o *OAuth2ConsentRequestOpenIDConnectContext) HasIdTokenHintClaims() bool {
+ if o != nil && o.IdTokenHintClaims != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetIdTokenHintClaims gets a reference to the given map[string]interface{} and assigns it to the IdTokenHintClaims field.
+func (o *OAuth2ConsentRequestOpenIDConnectContext) SetIdTokenHintClaims(v map[string]interface{}) {
+ o.IdTokenHintClaims = v
+}
+
+// GetLoginHint returns the LoginHint field value if set, zero value otherwise.
+func (o *OAuth2ConsentRequestOpenIDConnectContext) GetLoginHint() string {
+ if o == nil || o.LoginHint == nil {
+ var ret string
+ return ret
+ }
+ return *o.LoginHint
+}
+
+// GetLoginHintOk returns a tuple with the LoginHint field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2ConsentRequestOpenIDConnectContext) GetLoginHintOk() (*string, bool) {
+ if o == nil || o.LoginHint == nil {
+ return nil, false
+ }
+ return o.LoginHint, true
+}
+
+// HasLoginHint returns a boolean if a field has been set.
+func (o *OAuth2ConsentRequestOpenIDConnectContext) HasLoginHint() bool {
+ if o != nil && o.LoginHint != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetLoginHint gets a reference to the given string and assigns it to the LoginHint field.
+func (o *OAuth2ConsentRequestOpenIDConnectContext) SetLoginHint(v string) {
+ o.LoginHint = &v
+}
+
+// GetUiLocales returns the UiLocales field value if set, zero value otherwise.
+func (o *OAuth2ConsentRequestOpenIDConnectContext) GetUiLocales() []string {
+ if o == nil || o.UiLocales == nil {
+ var ret []string
+ return ret
+ }
+ return o.UiLocales
+}
+
+// GetUiLocalesOk returns a tuple with the UiLocales field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2ConsentRequestOpenIDConnectContext) GetUiLocalesOk() ([]string, bool) {
+ if o == nil || o.UiLocales == nil {
+ return nil, false
+ }
+ return o.UiLocales, true
+}
+
+// HasUiLocales returns a boolean if a field has been set.
+func (o *OAuth2ConsentRequestOpenIDConnectContext) HasUiLocales() bool {
+ if o != nil && o.UiLocales != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetUiLocales gets a reference to the given []string and assigns it to the UiLocales field.
+func (o *OAuth2ConsentRequestOpenIDConnectContext) SetUiLocales(v []string) {
+ o.UiLocales = v
+}
+
+func (o OAuth2ConsentRequestOpenIDConnectContext) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.AcrValues != nil {
+ toSerialize["acr_values"] = o.AcrValues
+ }
+ if o.Display != nil {
+ toSerialize["display"] = o.Display
+ }
+ if o.IdTokenHintClaims != nil {
+ toSerialize["id_token_hint_claims"] = o.IdTokenHintClaims
+ }
+ if o.LoginHint != nil {
+ toSerialize["login_hint"] = o.LoginHint
+ }
+ if o.UiLocales != nil {
+ toSerialize["ui_locales"] = o.UiLocales
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableOAuth2ConsentRequestOpenIDConnectContext struct {
+ value *OAuth2ConsentRequestOpenIDConnectContext
+ isSet bool
+}
+
+func (v NullableOAuth2ConsentRequestOpenIDConnectContext) Get() *OAuth2ConsentRequestOpenIDConnectContext {
+ return v.value
+}
+
+func (v *NullableOAuth2ConsentRequestOpenIDConnectContext) Set(val *OAuth2ConsentRequestOpenIDConnectContext) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableOAuth2ConsentRequestOpenIDConnectContext) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableOAuth2ConsentRequestOpenIDConnectContext) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableOAuth2ConsentRequestOpenIDConnectContext(val *OAuth2ConsentRequestOpenIDConnectContext) *NullableOAuth2ConsentRequestOpenIDConnectContext {
+ return &NullableOAuth2ConsentRequestOpenIDConnectContext{value: val, isSet: true}
+}
+
+func (v NullableOAuth2ConsentRequestOpenIDConnectContext) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableOAuth2ConsentRequestOpenIDConnectContext) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_o_auth2_login_request.go b/internal/httpclient/model_o_auth2_login_request.go
new file mode 100644
index 000000000000..9fcd87be72fa
--- /dev/null
+++ b/internal/httpclient/model_o_auth2_login_request.go
@@ -0,0 +1,407 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// OAuth2LoginRequest OAuth2LoginRequest struct for OAuth2LoginRequest
+type OAuth2LoginRequest struct {
+ // ID is the identifier (\\\"login challenge\\\") of the login request. It is used to identify the session.
+ Challenge *string `json:"challenge,omitempty"`
+ Client *OAuth2Client `json:"client,omitempty"`
+ OidcContext *OAuth2ConsentRequestOpenIDConnectContext `json:"oidc_context,omitempty"`
+ // RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters.
+ RequestUrl *string `json:"request_url,omitempty"`
+ RequestedAccessTokenAudience []string `json:"requested_access_token_audience,omitempty"`
+ RequestedScope []string `json:"requested_scope,omitempty"`
+ // SessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \\\"sid\\\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user.
+ SessionId *string `json:"session_id,omitempty"`
+ // Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect URL. This feature allows you to update / set session information.
+ Skip *bool `json:"skip,omitempty"`
+ // Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client. If this value is set and `skip` is true, you MUST include this subject type when accepting the login request, or the request will fail.
+ Subject *string `json:"subject,omitempty"`
+}
+
+// NewOAuth2LoginRequest instantiates a new OAuth2LoginRequest object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewOAuth2LoginRequest() *OAuth2LoginRequest {
+ this := OAuth2LoginRequest{}
+ return &this
+}
+
+// NewOAuth2LoginRequestWithDefaults instantiates a new OAuth2LoginRequest object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewOAuth2LoginRequestWithDefaults() *OAuth2LoginRequest {
+ this := OAuth2LoginRequest{}
+ return &this
+}
+
+// GetChallenge returns the Challenge field value if set, zero value otherwise.
+func (o *OAuth2LoginRequest) GetChallenge() string {
+ if o == nil || o.Challenge == nil {
+ var ret string
+ return ret
+ }
+ return *o.Challenge
+}
+
+// GetChallengeOk returns a tuple with the Challenge field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2LoginRequest) GetChallengeOk() (*string, bool) {
+ if o == nil || o.Challenge == nil {
+ return nil, false
+ }
+ return o.Challenge, true
+}
+
+// HasChallenge returns a boolean if a field has been set.
+func (o *OAuth2LoginRequest) HasChallenge() bool {
+ if o != nil && o.Challenge != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetChallenge gets a reference to the given string and assigns it to the Challenge field.
+func (o *OAuth2LoginRequest) SetChallenge(v string) {
+ o.Challenge = &v
+}
+
+// GetClient returns the Client field value if set, zero value otherwise.
+func (o *OAuth2LoginRequest) GetClient() OAuth2Client {
+ if o == nil || o.Client == nil {
+ var ret OAuth2Client
+ return ret
+ }
+ return *o.Client
+}
+
+// GetClientOk returns a tuple with the Client field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2LoginRequest) GetClientOk() (*OAuth2Client, bool) {
+ if o == nil || o.Client == nil {
+ return nil, false
+ }
+ return o.Client, true
+}
+
+// HasClient returns a boolean if a field has been set.
+func (o *OAuth2LoginRequest) HasClient() bool {
+ if o != nil && o.Client != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetClient gets a reference to the given OAuth2Client and assigns it to the Client field.
+func (o *OAuth2LoginRequest) SetClient(v OAuth2Client) {
+ o.Client = &v
+}
+
+// GetOidcContext returns the OidcContext field value if set, zero value otherwise.
+func (o *OAuth2LoginRequest) GetOidcContext() OAuth2ConsentRequestOpenIDConnectContext {
+ if o == nil || o.OidcContext == nil {
+ var ret OAuth2ConsentRequestOpenIDConnectContext
+ return ret
+ }
+ return *o.OidcContext
+}
+
+// GetOidcContextOk returns a tuple with the OidcContext field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2LoginRequest) GetOidcContextOk() (*OAuth2ConsentRequestOpenIDConnectContext, bool) {
+ if o == nil || o.OidcContext == nil {
+ return nil, false
+ }
+ return o.OidcContext, true
+}
+
+// HasOidcContext returns a boolean if a field has been set.
+func (o *OAuth2LoginRequest) HasOidcContext() bool {
+ if o != nil && o.OidcContext != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetOidcContext gets a reference to the given OAuth2ConsentRequestOpenIDConnectContext and assigns it to the OidcContext field.
+func (o *OAuth2LoginRequest) SetOidcContext(v OAuth2ConsentRequestOpenIDConnectContext) {
+ o.OidcContext = &v
+}
+
+// GetRequestUrl returns the RequestUrl field value if set, zero value otherwise.
+func (o *OAuth2LoginRequest) GetRequestUrl() string {
+ if o == nil || o.RequestUrl == nil {
+ var ret string
+ return ret
+ }
+ return *o.RequestUrl
+}
+
+// GetRequestUrlOk returns a tuple with the RequestUrl field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2LoginRequest) GetRequestUrlOk() (*string, bool) {
+ if o == nil || o.RequestUrl == nil {
+ return nil, false
+ }
+ return o.RequestUrl, true
+}
+
+// HasRequestUrl returns a boolean if a field has been set.
+func (o *OAuth2LoginRequest) HasRequestUrl() bool {
+ if o != nil && o.RequestUrl != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetRequestUrl gets a reference to the given string and assigns it to the RequestUrl field.
+func (o *OAuth2LoginRequest) SetRequestUrl(v string) {
+ o.RequestUrl = &v
+}
+
+// GetRequestedAccessTokenAudience returns the RequestedAccessTokenAudience field value if set, zero value otherwise.
+func (o *OAuth2LoginRequest) GetRequestedAccessTokenAudience() []string {
+ if o == nil || o.RequestedAccessTokenAudience == nil {
+ var ret []string
+ return ret
+ }
+ return o.RequestedAccessTokenAudience
+}
+
+// GetRequestedAccessTokenAudienceOk returns a tuple with the RequestedAccessTokenAudience field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2LoginRequest) GetRequestedAccessTokenAudienceOk() ([]string, bool) {
+ if o == nil || o.RequestedAccessTokenAudience == nil {
+ return nil, false
+ }
+ return o.RequestedAccessTokenAudience, true
+}
+
+// HasRequestedAccessTokenAudience returns a boolean if a field has been set.
+func (o *OAuth2LoginRequest) HasRequestedAccessTokenAudience() bool {
+ if o != nil && o.RequestedAccessTokenAudience != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetRequestedAccessTokenAudience gets a reference to the given []string and assigns it to the RequestedAccessTokenAudience field.
+func (o *OAuth2LoginRequest) SetRequestedAccessTokenAudience(v []string) {
+ o.RequestedAccessTokenAudience = v
+}
+
+// GetRequestedScope returns the RequestedScope field value if set, zero value otherwise.
+func (o *OAuth2LoginRequest) GetRequestedScope() []string {
+ if o == nil || o.RequestedScope == nil {
+ var ret []string
+ return ret
+ }
+ return o.RequestedScope
+}
+
+// GetRequestedScopeOk returns a tuple with the RequestedScope field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2LoginRequest) GetRequestedScopeOk() ([]string, bool) {
+ if o == nil || o.RequestedScope == nil {
+ return nil, false
+ }
+ return o.RequestedScope, true
+}
+
+// HasRequestedScope returns a boolean if a field has been set.
+func (o *OAuth2LoginRequest) HasRequestedScope() bool {
+ if o != nil && o.RequestedScope != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetRequestedScope gets a reference to the given []string and assigns it to the RequestedScope field.
+func (o *OAuth2LoginRequest) SetRequestedScope(v []string) {
+ o.RequestedScope = v
+}
+
+// GetSessionId returns the SessionId field value if set, zero value otherwise.
+func (o *OAuth2LoginRequest) GetSessionId() string {
+ if o == nil || o.SessionId == nil {
+ var ret string
+ return ret
+ }
+ return *o.SessionId
+}
+
+// GetSessionIdOk returns a tuple with the SessionId field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2LoginRequest) GetSessionIdOk() (*string, bool) {
+ if o == nil || o.SessionId == nil {
+ return nil, false
+ }
+ return o.SessionId, true
+}
+
+// HasSessionId returns a boolean if a field has been set.
+func (o *OAuth2LoginRequest) HasSessionId() bool {
+ if o != nil && o.SessionId != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetSessionId gets a reference to the given string and assigns it to the SessionId field.
+func (o *OAuth2LoginRequest) SetSessionId(v string) {
+ o.SessionId = &v
+}
+
+// GetSkip returns the Skip field value if set, zero value otherwise.
+func (o *OAuth2LoginRequest) GetSkip() bool {
+ if o == nil || o.Skip == nil {
+ var ret bool
+ return ret
+ }
+ return *o.Skip
+}
+
+// GetSkipOk returns a tuple with the Skip field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2LoginRequest) GetSkipOk() (*bool, bool) {
+ if o == nil || o.Skip == nil {
+ return nil, false
+ }
+ return o.Skip, true
+}
+
+// HasSkip returns a boolean if a field has been set.
+func (o *OAuth2LoginRequest) HasSkip() bool {
+ if o != nil && o.Skip != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetSkip gets a reference to the given bool and assigns it to the Skip field.
+func (o *OAuth2LoginRequest) SetSkip(v bool) {
+ o.Skip = &v
+}
+
+// GetSubject returns the Subject field value if set, zero value otherwise.
+func (o *OAuth2LoginRequest) GetSubject() string {
+ if o == nil || o.Subject == nil {
+ var ret string
+ return ret
+ }
+ return *o.Subject
+}
+
+// GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OAuth2LoginRequest) GetSubjectOk() (*string, bool) {
+ if o == nil || o.Subject == nil {
+ return nil, false
+ }
+ return o.Subject, true
+}
+
+// HasSubject returns a boolean if a field has been set.
+func (o *OAuth2LoginRequest) HasSubject() bool {
+ if o != nil && o.Subject != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetSubject gets a reference to the given string and assigns it to the Subject field.
+func (o *OAuth2LoginRequest) SetSubject(v string) {
+ o.Subject = &v
+}
+
+func (o OAuth2LoginRequest) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Challenge != nil {
+ toSerialize["challenge"] = o.Challenge
+ }
+ if o.Client != nil {
+ toSerialize["client"] = o.Client
+ }
+ if o.OidcContext != nil {
+ toSerialize["oidc_context"] = o.OidcContext
+ }
+ if o.RequestUrl != nil {
+ toSerialize["request_url"] = o.RequestUrl
+ }
+ if o.RequestedAccessTokenAudience != nil {
+ toSerialize["requested_access_token_audience"] = o.RequestedAccessTokenAudience
+ }
+ if o.RequestedScope != nil {
+ toSerialize["requested_scope"] = o.RequestedScope
+ }
+ if o.SessionId != nil {
+ toSerialize["session_id"] = o.SessionId
+ }
+ if o.Skip != nil {
+ toSerialize["skip"] = o.Skip
+ }
+ if o.Subject != nil {
+ toSerialize["subject"] = o.Subject
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableOAuth2LoginRequest struct {
+ value *OAuth2LoginRequest
+ isSet bool
+}
+
+func (v NullableOAuth2LoginRequest) Get() *OAuth2LoginRequest {
+ return v.value
+}
+
+func (v *NullableOAuth2LoginRequest) Set(val *OAuth2LoginRequest) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableOAuth2LoginRequest) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableOAuth2LoginRequest) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableOAuth2LoginRequest(val *OAuth2LoginRequest) *NullableOAuth2LoginRequest {
+ return &NullableOAuth2LoginRequest{value: val, isSet: true}
+}
+
+func (v NullableOAuth2LoginRequest) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableOAuth2LoginRequest) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_patch_identities_body.go b/internal/httpclient/model_patch_identities_body.go
new file mode 100644
index 000000000000..01ea4833c924
--- /dev/null
+++ b/internal/httpclient/model_patch_identities_body.go
@@ -0,0 +1,115 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// PatchIdentitiesBody Patch Identities Body
+type PatchIdentitiesBody struct {
+ // Identities holds the list of patches to apply required
+ Identities []IdentityPatch `json:"identities,omitempty"`
+}
+
+// NewPatchIdentitiesBody instantiates a new PatchIdentitiesBody object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewPatchIdentitiesBody() *PatchIdentitiesBody {
+ this := PatchIdentitiesBody{}
+ return &this
+}
+
+// NewPatchIdentitiesBodyWithDefaults instantiates a new PatchIdentitiesBody object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewPatchIdentitiesBodyWithDefaults() *PatchIdentitiesBody {
+ this := PatchIdentitiesBody{}
+ return &this
+}
+
+// GetIdentities returns the Identities field value if set, zero value otherwise.
+func (o *PatchIdentitiesBody) GetIdentities() []IdentityPatch {
+ if o == nil || o.Identities == nil {
+ var ret []IdentityPatch
+ return ret
+ }
+ return o.Identities
+}
+
+// GetIdentitiesOk returns a tuple with the Identities field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *PatchIdentitiesBody) GetIdentitiesOk() ([]IdentityPatch, bool) {
+ if o == nil || o.Identities == nil {
+ return nil, false
+ }
+ return o.Identities, true
+}
+
+// HasIdentities returns a boolean if a field has been set.
+func (o *PatchIdentitiesBody) HasIdentities() bool {
+ if o != nil && o.Identities != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetIdentities gets a reference to the given []IdentityPatch and assigns it to the Identities field.
+func (o *PatchIdentitiesBody) SetIdentities(v []IdentityPatch) {
+ o.Identities = v
+}
+
+func (o PatchIdentitiesBody) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Identities != nil {
+ toSerialize["identities"] = o.Identities
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullablePatchIdentitiesBody struct {
+ value *PatchIdentitiesBody
+ isSet bool
+}
+
+func (v NullablePatchIdentitiesBody) Get() *PatchIdentitiesBody {
+ return v.value
+}
+
+func (v *NullablePatchIdentitiesBody) Set(val *PatchIdentitiesBody) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullablePatchIdentitiesBody) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullablePatchIdentitiesBody) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullablePatchIdentitiesBody(val *PatchIdentitiesBody) *NullablePatchIdentitiesBody {
+ return &NullablePatchIdentitiesBody{value: val, isSet: true}
+}
+
+func (v NullablePatchIdentitiesBody) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullablePatchIdentitiesBody) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_perform_native_logout_body.go b/internal/httpclient/model_perform_native_logout_body.go
new file mode 100644
index 000000000000..81d65f11a7c1
--- /dev/null
+++ b/internal/httpclient/model_perform_native_logout_body.go
@@ -0,0 +1,108 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// PerformNativeLogoutBody Perform Native Logout Request Body
+type PerformNativeLogoutBody struct {
+ // The Session Token Invalidate this session token.
+ SessionToken string `json:"session_token"`
+}
+
+// NewPerformNativeLogoutBody instantiates a new PerformNativeLogoutBody object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewPerformNativeLogoutBody(sessionToken string) *PerformNativeLogoutBody {
+ this := PerformNativeLogoutBody{}
+ this.SessionToken = sessionToken
+ return &this
+}
+
+// NewPerformNativeLogoutBodyWithDefaults instantiates a new PerformNativeLogoutBody object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewPerformNativeLogoutBodyWithDefaults() *PerformNativeLogoutBody {
+ this := PerformNativeLogoutBody{}
+ return &this
+}
+
+// GetSessionToken returns the SessionToken field value
+func (o *PerformNativeLogoutBody) GetSessionToken() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.SessionToken
+}
+
+// GetSessionTokenOk returns a tuple with the SessionToken field value
+// and a boolean to check if the value has been set.
+func (o *PerformNativeLogoutBody) GetSessionTokenOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.SessionToken, true
+}
+
+// SetSessionToken sets field value
+func (o *PerformNativeLogoutBody) SetSessionToken(v string) {
+ o.SessionToken = v
+}
+
+func (o PerformNativeLogoutBody) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if true {
+ toSerialize["session_token"] = o.SessionToken
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullablePerformNativeLogoutBody struct {
+ value *PerformNativeLogoutBody
+ isSet bool
+}
+
+func (v NullablePerformNativeLogoutBody) Get() *PerformNativeLogoutBody {
+ return v.value
+}
+
+func (v *NullablePerformNativeLogoutBody) Set(val *PerformNativeLogoutBody) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullablePerformNativeLogoutBody) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullablePerformNativeLogoutBody) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullablePerformNativeLogoutBody(val *PerformNativeLogoutBody) *NullablePerformNativeLogoutBody {
+ return &NullablePerformNativeLogoutBody{value: val, isSet: true}
+}
+
+func (v NullablePerformNativeLogoutBody) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullablePerformNativeLogoutBody) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_recovery_code_for_identity.go b/internal/httpclient/model_recovery_code_for_identity.go
new file mode 100644
index 000000000000..a5027e7c882e
--- /dev/null
+++ b/internal/httpclient/model_recovery_code_for_identity.go
@@ -0,0 +1,176 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "time"
+)
+
+// RecoveryCodeForIdentity Used when an administrator creates a recovery code for an identity.
+type RecoveryCodeForIdentity struct {
+ // Expires At is the timestamp of when the recovery flow expires The timestamp when the recovery code expires.
+ ExpiresAt *time.Time `json:"expires_at,omitempty"`
+ // RecoveryCode is the code that can be used to recover the account
+ RecoveryCode string `json:"recovery_code"`
+ // RecoveryLink with flow This link opens the recovery UI with an empty `code` field.
+ RecoveryLink string `json:"recovery_link"`
+}
+
+// NewRecoveryCodeForIdentity instantiates a new RecoveryCodeForIdentity object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewRecoveryCodeForIdentity(recoveryCode string, recoveryLink string) *RecoveryCodeForIdentity {
+ this := RecoveryCodeForIdentity{}
+ this.RecoveryCode = recoveryCode
+ this.RecoveryLink = recoveryLink
+ return &this
+}
+
+// NewRecoveryCodeForIdentityWithDefaults instantiates a new RecoveryCodeForIdentity object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewRecoveryCodeForIdentityWithDefaults() *RecoveryCodeForIdentity {
+ this := RecoveryCodeForIdentity{}
+ return &this
+}
+
+// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise.
+func (o *RecoveryCodeForIdentity) GetExpiresAt() time.Time {
+ if o == nil || o.ExpiresAt == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.ExpiresAt
+}
+
+// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RecoveryCodeForIdentity) GetExpiresAtOk() (*time.Time, bool) {
+ if o == nil || o.ExpiresAt == nil {
+ return nil, false
+ }
+ return o.ExpiresAt, true
+}
+
+// HasExpiresAt returns a boolean if a field has been set.
+func (o *RecoveryCodeForIdentity) HasExpiresAt() bool {
+ if o != nil && o.ExpiresAt != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetExpiresAt gets a reference to the given time.Time and assigns it to the ExpiresAt field.
+func (o *RecoveryCodeForIdentity) SetExpiresAt(v time.Time) {
+ o.ExpiresAt = &v
+}
+
+// GetRecoveryCode returns the RecoveryCode field value
+func (o *RecoveryCodeForIdentity) GetRecoveryCode() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.RecoveryCode
+}
+
+// GetRecoveryCodeOk returns a tuple with the RecoveryCode field value
+// and a boolean to check if the value has been set.
+func (o *RecoveryCodeForIdentity) GetRecoveryCodeOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.RecoveryCode, true
+}
+
+// SetRecoveryCode sets field value
+func (o *RecoveryCodeForIdentity) SetRecoveryCode(v string) {
+ o.RecoveryCode = v
+}
+
+// GetRecoveryLink returns the RecoveryLink field value
+func (o *RecoveryCodeForIdentity) GetRecoveryLink() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.RecoveryLink
+}
+
+// GetRecoveryLinkOk returns a tuple with the RecoveryLink field value
+// and a boolean to check if the value has been set.
+func (o *RecoveryCodeForIdentity) GetRecoveryLinkOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.RecoveryLink, true
+}
+
+// SetRecoveryLink sets field value
+func (o *RecoveryCodeForIdentity) SetRecoveryLink(v string) {
+ o.RecoveryLink = v
+}
+
+func (o RecoveryCodeForIdentity) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.ExpiresAt != nil {
+ toSerialize["expires_at"] = o.ExpiresAt
+ }
+ if true {
+ toSerialize["recovery_code"] = o.RecoveryCode
+ }
+ if true {
+ toSerialize["recovery_link"] = o.RecoveryLink
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableRecoveryCodeForIdentity struct {
+ value *RecoveryCodeForIdentity
+ isSet bool
+}
+
+func (v NullableRecoveryCodeForIdentity) Get() *RecoveryCodeForIdentity {
+ return v.value
+}
+
+func (v *NullableRecoveryCodeForIdentity) Set(val *RecoveryCodeForIdentity) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableRecoveryCodeForIdentity) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableRecoveryCodeForIdentity) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableRecoveryCodeForIdentity(val *RecoveryCodeForIdentity) *NullableRecoveryCodeForIdentity {
+ return &NullableRecoveryCodeForIdentity{value: val, isSet: true}
+}
+
+func (v NullableRecoveryCodeForIdentity) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableRecoveryCodeForIdentity) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_recovery_flow.go b/internal/httpclient/model_recovery_flow.go
new file mode 100644
index 000000000000..56f27a904be1
--- /dev/null
+++ b/internal/httpclient/model_recovery_flow.go
@@ -0,0 +1,438 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "time"
+)
+
+// RecoveryFlow This request is used when an identity wants to recover their account. We recommend reading the [Account Recovery Documentation](../self-service/flows/password-reset-account-recovery)
+type RecoveryFlow struct {
+ // Active, if set, contains the recovery method that is being used. It is initially not set.
+ Active *string `json:"active,omitempty"`
+ // Contains possible actions that could follow this flow
+ ContinueWith []ContinueWith `json:"continue_with,omitempty"`
+ // ExpiresAt is the time (UTC) when the request expires. If the user still wishes to update the setting, a new request has to be initiated.
+ ExpiresAt time.Time `json:"expires_at"`
+ // ID represents the request's unique ID. When performing the recovery flow, this represents the id in the recovery ui's query parameter: http://?request=
+ Id string `json:"id"`
+ // IssuedAt is the time (UTC) when the request occurred.
+ IssuedAt time.Time `json:"issued_at"`
+ // RequestURL is the initial URL that was requested from Ory Kratos. It can be used to forward information contained in the URL's path or query for example.
+ RequestUrl string `json:"request_url"`
+ // ReturnTo contains the requested return_to URL.
+ ReturnTo *string `json:"return_to,omitempty"`
+ // State represents the state of this request: choose_method: ask the user to choose a method (e.g. recover account via email) sent_email: the email has been sent to the user passed_challenge: the request was successful and the recovery challenge was passed.
+ State interface{} `json:"state"`
+ // TransientPayload is used to pass data from the recovery flow to hooks and email templates
+ TransientPayload map[string]interface{} `json:"transient_payload,omitempty"`
+ // The flow type can either be `api` or `browser`.
+ Type string `json:"type"`
+ Ui UiContainer `json:"ui"`
+}
+
+// NewRecoveryFlow instantiates a new RecoveryFlow object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewRecoveryFlow(expiresAt time.Time, id string, issuedAt time.Time, requestUrl string, state interface{}, type_ string, ui UiContainer) *RecoveryFlow {
+ this := RecoveryFlow{}
+ this.ExpiresAt = expiresAt
+ this.Id = id
+ this.IssuedAt = issuedAt
+ this.RequestUrl = requestUrl
+ this.State = state
+ this.Type = type_
+ this.Ui = ui
+ return &this
+}
+
+// NewRecoveryFlowWithDefaults instantiates a new RecoveryFlow object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewRecoveryFlowWithDefaults() *RecoveryFlow {
+ this := RecoveryFlow{}
+ return &this
+}
+
+// GetActive returns the Active field value if set, zero value otherwise.
+func (o *RecoveryFlow) GetActive() string {
+ if o == nil || o.Active == nil {
+ var ret string
+ return ret
+ }
+ return *o.Active
+}
+
+// GetActiveOk returns a tuple with the Active field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RecoveryFlow) GetActiveOk() (*string, bool) {
+ if o == nil || o.Active == nil {
+ return nil, false
+ }
+ return o.Active, true
+}
+
+// HasActive returns a boolean if a field has been set.
+func (o *RecoveryFlow) HasActive() bool {
+ if o != nil && o.Active != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetActive gets a reference to the given string and assigns it to the Active field.
+func (o *RecoveryFlow) SetActive(v string) {
+ o.Active = &v
+}
+
+// GetContinueWith returns the ContinueWith field value if set, zero value otherwise.
+func (o *RecoveryFlow) GetContinueWith() []ContinueWith {
+ if o == nil || o.ContinueWith == nil {
+ var ret []ContinueWith
+ return ret
+ }
+ return o.ContinueWith
+}
+
+// GetContinueWithOk returns a tuple with the ContinueWith field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RecoveryFlow) GetContinueWithOk() ([]ContinueWith, bool) {
+ if o == nil || o.ContinueWith == nil {
+ return nil, false
+ }
+ return o.ContinueWith, true
+}
+
+// HasContinueWith returns a boolean if a field has been set.
+func (o *RecoveryFlow) HasContinueWith() bool {
+ if o != nil && o.ContinueWith != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetContinueWith gets a reference to the given []ContinueWith and assigns it to the ContinueWith field.
+func (o *RecoveryFlow) SetContinueWith(v []ContinueWith) {
+ o.ContinueWith = v
+}
+
+// GetExpiresAt returns the ExpiresAt field value
+func (o *RecoveryFlow) GetExpiresAt() time.Time {
+ if o == nil {
+ var ret time.Time
+ return ret
+ }
+
+ return o.ExpiresAt
+}
+
+// GetExpiresAtOk returns a tuple with the ExpiresAt field value
+// and a boolean to check if the value has been set.
+func (o *RecoveryFlow) GetExpiresAtOk() (*time.Time, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.ExpiresAt, true
+}
+
+// SetExpiresAt sets field value
+func (o *RecoveryFlow) SetExpiresAt(v time.Time) {
+ o.ExpiresAt = v
+}
+
+// GetId returns the Id field value
+func (o *RecoveryFlow) GetId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value
+// and a boolean to check if the value has been set.
+func (o *RecoveryFlow) GetIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Id, true
+}
+
+// SetId sets field value
+func (o *RecoveryFlow) SetId(v string) {
+ o.Id = v
+}
+
+// GetIssuedAt returns the IssuedAt field value
+func (o *RecoveryFlow) GetIssuedAt() time.Time {
+ if o == nil {
+ var ret time.Time
+ return ret
+ }
+
+ return o.IssuedAt
+}
+
+// GetIssuedAtOk returns a tuple with the IssuedAt field value
+// and a boolean to check if the value has been set.
+func (o *RecoveryFlow) GetIssuedAtOk() (*time.Time, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.IssuedAt, true
+}
+
+// SetIssuedAt sets field value
+func (o *RecoveryFlow) SetIssuedAt(v time.Time) {
+ o.IssuedAt = v
+}
+
+// GetRequestUrl returns the RequestUrl field value
+func (o *RecoveryFlow) GetRequestUrl() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.RequestUrl
+}
+
+// GetRequestUrlOk returns a tuple with the RequestUrl field value
+// and a boolean to check if the value has been set.
+func (o *RecoveryFlow) GetRequestUrlOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.RequestUrl, true
+}
+
+// SetRequestUrl sets field value
+func (o *RecoveryFlow) SetRequestUrl(v string) {
+ o.RequestUrl = v
+}
+
+// GetReturnTo returns the ReturnTo field value if set, zero value otherwise.
+func (o *RecoveryFlow) GetReturnTo() string {
+ if o == nil || o.ReturnTo == nil {
+ var ret string
+ return ret
+ }
+ return *o.ReturnTo
+}
+
+// GetReturnToOk returns a tuple with the ReturnTo field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RecoveryFlow) GetReturnToOk() (*string, bool) {
+ if o == nil || o.ReturnTo == nil {
+ return nil, false
+ }
+ return o.ReturnTo, true
+}
+
+// HasReturnTo returns a boolean if a field has been set.
+func (o *RecoveryFlow) HasReturnTo() bool {
+ if o != nil && o.ReturnTo != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetReturnTo gets a reference to the given string and assigns it to the ReturnTo field.
+func (o *RecoveryFlow) SetReturnTo(v string) {
+ o.ReturnTo = &v
+}
+
+// GetState returns the State field value
+// If the value is explicit nil, the zero value for interface{} will be returned
+func (o *RecoveryFlow) GetState() interface{} {
+ if o == nil {
+ var ret interface{}
+ return ret
+ }
+
+ return o.State
+}
+
+// GetStateOk returns a tuple with the State field value
+// and a boolean to check if the value has been set.
+// NOTE: If the value is an explicit nil, `nil, true` will be returned
+func (o *RecoveryFlow) GetStateOk() (*interface{}, bool) {
+ if o == nil || o.State == nil {
+ return nil, false
+ }
+ return &o.State, true
+}
+
+// SetState sets field value
+func (o *RecoveryFlow) SetState(v interface{}) {
+ o.State = v
+}
+
+// GetTransientPayload returns the TransientPayload field value if set, zero value otherwise.
+func (o *RecoveryFlow) GetTransientPayload() map[string]interface{} {
+ if o == nil || o.TransientPayload == nil {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.TransientPayload
+}
+
+// GetTransientPayloadOk returns a tuple with the TransientPayload field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RecoveryFlow) GetTransientPayloadOk() (map[string]interface{}, bool) {
+ if o == nil || o.TransientPayload == nil {
+ return nil, false
+ }
+ return o.TransientPayload, true
+}
+
+// HasTransientPayload returns a boolean if a field has been set.
+func (o *RecoveryFlow) HasTransientPayload() bool {
+ if o != nil && o.TransientPayload != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetTransientPayload gets a reference to the given map[string]interface{} and assigns it to the TransientPayload field.
+func (o *RecoveryFlow) SetTransientPayload(v map[string]interface{}) {
+ o.TransientPayload = v
+}
+
+// GetType returns the Type field value
+func (o *RecoveryFlow) GetType() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Type
+}
+
+// GetTypeOk returns a tuple with the Type field value
+// and a boolean to check if the value has been set.
+func (o *RecoveryFlow) GetTypeOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Type, true
+}
+
+// SetType sets field value
+func (o *RecoveryFlow) SetType(v string) {
+ o.Type = v
+}
+
+// GetUi returns the Ui field value
+func (o *RecoveryFlow) GetUi() UiContainer {
+ if o == nil {
+ var ret UiContainer
+ return ret
+ }
+
+ return o.Ui
+}
+
+// GetUiOk returns a tuple with the Ui field value
+// and a boolean to check if the value has been set.
+func (o *RecoveryFlow) GetUiOk() (*UiContainer, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Ui, true
+}
+
+// SetUi sets field value
+func (o *RecoveryFlow) SetUi(v UiContainer) {
+ o.Ui = v
+}
+
+func (o RecoveryFlow) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Active != nil {
+ toSerialize["active"] = o.Active
+ }
+ if o.ContinueWith != nil {
+ toSerialize["continue_with"] = o.ContinueWith
+ }
+ if true {
+ toSerialize["expires_at"] = o.ExpiresAt
+ }
+ if true {
+ toSerialize["id"] = o.Id
+ }
+ if true {
+ toSerialize["issued_at"] = o.IssuedAt
+ }
+ if true {
+ toSerialize["request_url"] = o.RequestUrl
+ }
+ if o.ReturnTo != nil {
+ toSerialize["return_to"] = o.ReturnTo
+ }
+ if o.State != nil {
+ toSerialize["state"] = o.State
+ }
+ if o.TransientPayload != nil {
+ toSerialize["transient_payload"] = o.TransientPayload
+ }
+ if true {
+ toSerialize["type"] = o.Type
+ }
+ if true {
+ toSerialize["ui"] = o.Ui
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableRecoveryFlow struct {
+ value *RecoveryFlow
+ isSet bool
+}
+
+func (v NullableRecoveryFlow) Get() *RecoveryFlow {
+ return v.value
+}
+
+func (v *NullableRecoveryFlow) Set(val *RecoveryFlow) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableRecoveryFlow) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableRecoveryFlow) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableRecoveryFlow(val *RecoveryFlow) *NullableRecoveryFlow {
+ return &NullableRecoveryFlow{value: val, isSet: true}
+}
+
+func (v NullableRecoveryFlow) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableRecoveryFlow) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_recovery_flow_state.go b/internal/httpclient/model_recovery_flow_state.go
new file mode 100644
index 000000000000..1c660ba043b9
--- /dev/null
+++ b/internal/httpclient/model_recovery_flow_state.go
@@ -0,0 +1,85 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// RecoveryFlowState The state represents the state of the recovery flow. choose_method: ask the user to choose a method (e.g. recover account via email) sent_email: the email has been sent to the user passed_challenge: the request was successful and the recovery challenge was passed.
+type RecoveryFlowState string
+
+// List of recoveryFlowState
+const (
+ RECOVERYFLOWSTATE_CHOOSE_METHOD RecoveryFlowState = "choose_method"
+ RECOVERYFLOWSTATE_SENT_EMAIL RecoveryFlowState = "sent_email"
+ RECOVERYFLOWSTATE_PASSED_CHALLENGE RecoveryFlowState = "passed_challenge"
+)
+
+func (v *RecoveryFlowState) UnmarshalJSON(src []byte) error {
+ var value string
+ err := json.Unmarshal(src, &value)
+ if err != nil {
+ return err
+ }
+ enumTypeValue := RecoveryFlowState(value)
+ for _, existing := range []RecoveryFlowState{"choose_method", "sent_email", "passed_challenge"} {
+ if existing == enumTypeValue {
+ *v = enumTypeValue
+ return nil
+ }
+ }
+
+ return fmt.Errorf("%+v is not a valid RecoveryFlowState", value)
+}
+
+// Ptr returns reference to recoveryFlowState value
+func (v RecoveryFlowState) Ptr() *RecoveryFlowState {
+ return &v
+}
+
+type NullableRecoveryFlowState struct {
+ value *RecoveryFlowState
+ isSet bool
+}
+
+func (v NullableRecoveryFlowState) Get() *RecoveryFlowState {
+ return v.value
+}
+
+func (v *NullableRecoveryFlowState) Set(val *RecoveryFlowState) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableRecoveryFlowState) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableRecoveryFlowState) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableRecoveryFlowState(val *RecoveryFlowState) *NullableRecoveryFlowState {
+ return &NullableRecoveryFlowState{value: val, isSet: true}
+}
+
+func (v NullableRecoveryFlowState) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableRecoveryFlowState) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_recovery_identity_address.go b/internal/httpclient/model_recovery_identity_address.go
new file mode 100644
index 000000000000..8247f3533794
--- /dev/null
+++ b/internal/httpclient/model_recovery_identity_address.go
@@ -0,0 +1,240 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "time"
+)
+
+// RecoveryIdentityAddress struct for RecoveryIdentityAddress
+type RecoveryIdentityAddress struct {
+ // CreatedAt is a helper struct field for gobuffalo.pop.
+ CreatedAt *time.Time `json:"created_at,omitempty"`
+ Id string `json:"id"`
+ // UpdatedAt is a helper struct field for gobuffalo.pop.
+ UpdatedAt *time.Time `json:"updated_at,omitempty"`
+ Value string `json:"value"`
+ Via string `json:"via"`
+}
+
+// NewRecoveryIdentityAddress instantiates a new RecoveryIdentityAddress object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewRecoveryIdentityAddress(id string, value string, via string) *RecoveryIdentityAddress {
+ this := RecoveryIdentityAddress{}
+ this.Id = id
+ this.Value = value
+ this.Via = via
+ return &this
+}
+
+// NewRecoveryIdentityAddressWithDefaults instantiates a new RecoveryIdentityAddress object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewRecoveryIdentityAddressWithDefaults() *RecoveryIdentityAddress {
+ this := RecoveryIdentityAddress{}
+ return &this
+}
+
+// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
+func (o *RecoveryIdentityAddress) GetCreatedAt() time.Time {
+ if o == nil || o.CreatedAt == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.CreatedAt
+}
+
+// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RecoveryIdentityAddress) GetCreatedAtOk() (*time.Time, bool) {
+ if o == nil || o.CreatedAt == nil {
+ return nil, false
+ }
+ return o.CreatedAt, true
+}
+
+// HasCreatedAt returns a boolean if a field has been set.
+func (o *RecoveryIdentityAddress) HasCreatedAt() bool {
+ if o != nil && o.CreatedAt != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
+func (o *RecoveryIdentityAddress) SetCreatedAt(v time.Time) {
+ o.CreatedAt = &v
+}
+
+// GetId returns the Id field value
+func (o *RecoveryIdentityAddress) GetId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value
+// and a boolean to check if the value has been set.
+func (o *RecoveryIdentityAddress) GetIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Id, true
+}
+
+// SetId sets field value
+func (o *RecoveryIdentityAddress) SetId(v string) {
+ o.Id = v
+}
+
+// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
+func (o *RecoveryIdentityAddress) GetUpdatedAt() time.Time {
+ if o == nil || o.UpdatedAt == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.UpdatedAt
+}
+
+// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RecoveryIdentityAddress) GetUpdatedAtOk() (*time.Time, bool) {
+ if o == nil || o.UpdatedAt == nil {
+ return nil, false
+ }
+ return o.UpdatedAt, true
+}
+
+// HasUpdatedAt returns a boolean if a field has been set.
+func (o *RecoveryIdentityAddress) HasUpdatedAt() bool {
+ if o != nil && o.UpdatedAt != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
+func (o *RecoveryIdentityAddress) SetUpdatedAt(v time.Time) {
+ o.UpdatedAt = &v
+}
+
+// GetValue returns the Value field value
+func (o *RecoveryIdentityAddress) GetValue() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Value
+}
+
+// GetValueOk returns a tuple with the Value field value
+// and a boolean to check if the value has been set.
+func (o *RecoveryIdentityAddress) GetValueOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Value, true
+}
+
+// SetValue sets field value
+func (o *RecoveryIdentityAddress) SetValue(v string) {
+ o.Value = v
+}
+
+// GetVia returns the Via field value
+func (o *RecoveryIdentityAddress) GetVia() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Via
+}
+
+// GetViaOk returns a tuple with the Via field value
+// and a boolean to check if the value has been set.
+func (o *RecoveryIdentityAddress) GetViaOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Via, true
+}
+
+// SetVia sets field value
+func (o *RecoveryIdentityAddress) SetVia(v string) {
+ o.Via = v
+}
+
+func (o RecoveryIdentityAddress) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.CreatedAt != nil {
+ toSerialize["created_at"] = o.CreatedAt
+ }
+ if true {
+ toSerialize["id"] = o.Id
+ }
+ if o.UpdatedAt != nil {
+ toSerialize["updated_at"] = o.UpdatedAt
+ }
+ if true {
+ toSerialize["value"] = o.Value
+ }
+ if true {
+ toSerialize["via"] = o.Via
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableRecoveryIdentityAddress struct {
+ value *RecoveryIdentityAddress
+ isSet bool
+}
+
+func (v NullableRecoveryIdentityAddress) Get() *RecoveryIdentityAddress {
+ return v.value
+}
+
+func (v *NullableRecoveryIdentityAddress) Set(val *RecoveryIdentityAddress) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableRecoveryIdentityAddress) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableRecoveryIdentityAddress) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableRecoveryIdentityAddress(val *RecoveryIdentityAddress) *NullableRecoveryIdentityAddress {
+ return &NullableRecoveryIdentityAddress{value: val, isSet: true}
+}
+
+func (v NullableRecoveryIdentityAddress) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableRecoveryIdentityAddress) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_recovery_link_for_identity.go b/internal/httpclient/model_recovery_link_for_identity.go
new file mode 100644
index 000000000000..2694706eabae
--- /dev/null
+++ b/internal/httpclient/model_recovery_link_for_identity.go
@@ -0,0 +1,146 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "time"
+)
+
+// RecoveryLinkForIdentity Used when an administrator creates a recovery link for an identity.
+type RecoveryLinkForIdentity struct {
+ // Recovery Link Expires At The timestamp when the recovery link expires.
+ ExpiresAt *time.Time `json:"expires_at,omitempty"`
+ // Recovery Link This link can be used to recover the account.
+ RecoveryLink string `json:"recovery_link"`
+}
+
+// NewRecoveryLinkForIdentity instantiates a new RecoveryLinkForIdentity object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewRecoveryLinkForIdentity(recoveryLink string) *RecoveryLinkForIdentity {
+ this := RecoveryLinkForIdentity{}
+ this.RecoveryLink = recoveryLink
+ return &this
+}
+
+// NewRecoveryLinkForIdentityWithDefaults instantiates a new RecoveryLinkForIdentity object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewRecoveryLinkForIdentityWithDefaults() *RecoveryLinkForIdentity {
+ this := RecoveryLinkForIdentity{}
+ return &this
+}
+
+// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise.
+func (o *RecoveryLinkForIdentity) GetExpiresAt() time.Time {
+ if o == nil || o.ExpiresAt == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.ExpiresAt
+}
+
+// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RecoveryLinkForIdentity) GetExpiresAtOk() (*time.Time, bool) {
+ if o == nil || o.ExpiresAt == nil {
+ return nil, false
+ }
+ return o.ExpiresAt, true
+}
+
+// HasExpiresAt returns a boolean if a field has been set.
+func (o *RecoveryLinkForIdentity) HasExpiresAt() bool {
+ if o != nil && o.ExpiresAt != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetExpiresAt gets a reference to the given time.Time and assigns it to the ExpiresAt field.
+func (o *RecoveryLinkForIdentity) SetExpiresAt(v time.Time) {
+ o.ExpiresAt = &v
+}
+
+// GetRecoveryLink returns the RecoveryLink field value
+func (o *RecoveryLinkForIdentity) GetRecoveryLink() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.RecoveryLink
+}
+
+// GetRecoveryLinkOk returns a tuple with the RecoveryLink field value
+// and a boolean to check if the value has been set.
+func (o *RecoveryLinkForIdentity) GetRecoveryLinkOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.RecoveryLink, true
+}
+
+// SetRecoveryLink sets field value
+func (o *RecoveryLinkForIdentity) SetRecoveryLink(v string) {
+ o.RecoveryLink = v
+}
+
+func (o RecoveryLinkForIdentity) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.ExpiresAt != nil {
+ toSerialize["expires_at"] = o.ExpiresAt
+ }
+ if true {
+ toSerialize["recovery_link"] = o.RecoveryLink
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableRecoveryLinkForIdentity struct {
+ value *RecoveryLinkForIdentity
+ isSet bool
+}
+
+func (v NullableRecoveryLinkForIdentity) Get() *RecoveryLinkForIdentity {
+ return v.value
+}
+
+func (v *NullableRecoveryLinkForIdentity) Set(val *RecoveryLinkForIdentity) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableRecoveryLinkForIdentity) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableRecoveryLinkForIdentity) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableRecoveryLinkForIdentity(val *RecoveryLinkForIdentity) *NullableRecoveryLinkForIdentity {
+ return &NullableRecoveryLinkForIdentity{value: val, isSet: true}
+}
+
+func (v NullableRecoveryLinkForIdentity) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableRecoveryLinkForIdentity) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_registration_flow.go b/internal/httpclient/model_registration_flow.go
new file mode 100644
index 000000000000..c5fe02951e21
--- /dev/null
+++ b/internal/httpclient/model_registration_flow.go
@@ -0,0 +1,558 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "time"
+)
+
+// RegistrationFlow struct for RegistrationFlow
+type RegistrationFlow struct {
+ // Active, if set, contains the registration method that is being used. It is initially not set. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth passkey CredentialsTypePasskey profile CredentialsTypeProfile two_step TwoStep link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode
+ Active *string `json:"active,omitempty"`
+ // ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to log in, a new flow has to be initiated.
+ ExpiresAt time.Time `json:"expires_at"`
+ // ID represents the flow's unique ID. When performing the registration flow, this represents the id in the registration ui's query parameter: http:///?flow=
+ Id string `json:"id"`
+ // IssuedAt is the time (UTC) when the flow occurred.
+ IssuedAt time.Time `json:"issued_at"`
+ // Ory OAuth 2.0 Login Challenge. This value is set using the `login_challenge` query parameter of the registration and login endpoints. If set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider.
+ Oauth2LoginChallenge *string `json:"oauth2_login_challenge,omitempty"`
+ Oauth2LoginRequest *OAuth2LoginRequest `json:"oauth2_login_request,omitempty"`
+ OrganizationId NullableString `json:"organization_id,omitempty"`
+ // RequestURL is the initial URL that was requested from Ory Kratos. It can be used to forward information contained in the URL's path or query for example.
+ RequestUrl string `json:"request_url"`
+ // ReturnTo contains the requested return_to URL.
+ ReturnTo *string `json:"return_to,omitempty"`
+ // SessionTokenExchangeCode holds the secret code that the client can use to retrieve a session token after the flow has been completed. This is only set if the client has requested a session token exchange code, and if the flow is of type \"api\", and only on creating the flow.
+ SessionTokenExchangeCode *string `json:"session_token_exchange_code,omitempty"`
+ // State represents the state of this request: choose_method: ask the user to choose a method (e.g. registration with email) sent_email: the email has been sent to the user passed_challenge: the request was successful and the registration challenge was passed.
+ State interface{} `json:"state"`
+ // TransientPayload is used to pass data from the registration to a webhook
+ TransientPayload map[string]interface{} `json:"transient_payload,omitempty"`
+ // The flow type can either be `api` or `browser`.
+ Type string `json:"type"`
+ Ui UiContainer `json:"ui"`
+}
+
+// NewRegistrationFlow instantiates a new RegistrationFlow object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewRegistrationFlow(expiresAt time.Time, id string, issuedAt time.Time, requestUrl string, state interface{}, type_ string, ui UiContainer) *RegistrationFlow {
+ this := RegistrationFlow{}
+ this.ExpiresAt = expiresAt
+ this.Id = id
+ this.IssuedAt = issuedAt
+ this.RequestUrl = requestUrl
+ this.State = state
+ this.Type = type_
+ this.Ui = ui
+ return &this
+}
+
+// NewRegistrationFlowWithDefaults instantiates a new RegistrationFlow object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewRegistrationFlowWithDefaults() *RegistrationFlow {
+ this := RegistrationFlow{}
+ return &this
+}
+
+// GetActive returns the Active field value if set, zero value otherwise.
+func (o *RegistrationFlow) GetActive() string {
+ if o == nil || o.Active == nil {
+ var ret string
+ return ret
+ }
+ return *o.Active
+}
+
+// GetActiveOk returns a tuple with the Active field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RegistrationFlow) GetActiveOk() (*string, bool) {
+ if o == nil || o.Active == nil {
+ return nil, false
+ }
+ return o.Active, true
+}
+
+// HasActive returns a boolean if a field has been set.
+func (o *RegistrationFlow) HasActive() bool {
+ if o != nil && o.Active != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetActive gets a reference to the given string and assigns it to the Active field.
+func (o *RegistrationFlow) SetActive(v string) {
+ o.Active = &v
+}
+
+// GetExpiresAt returns the ExpiresAt field value
+func (o *RegistrationFlow) GetExpiresAt() time.Time {
+ if o == nil {
+ var ret time.Time
+ return ret
+ }
+
+ return o.ExpiresAt
+}
+
+// GetExpiresAtOk returns a tuple with the ExpiresAt field value
+// and a boolean to check if the value has been set.
+func (o *RegistrationFlow) GetExpiresAtOk() (*time.Time, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.ExpiresAt, true
+}
+
+// SetExpiresAt sets field value
+func (o *RegistrationFlow) SetExpiresAt(v time.Time) {
+ o.ExpiresAt = v
+}
+
+// GetId returns the Id field value
+func (o *RegistrationFlow) GetId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value
+// and a boolean to check if the value has been set.
+func (o *RegistrationFlow) GetIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Id, true
+}
+
+// SetId sets field value
+func (o *RegistrationFlow) SetId(v string) {
+ o.Id = v
+}
+
+// GetIssuedAt returns the IssuedAt field value
+func (o *RegistrationFlow) GetIssuedAt() time.Time {
+ if o == nil {
+ var ret time.Time
+ return ret
+ }
+
+ return o.IssuedAt
+}
+
+// GetIssuedAtOk returns a tuple with the IssuedAt field value
+// and a boolean to check if the value has been set.
+func (o *RegistrationFlow) GetIssuedAtOk() (*time.Time, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.IssuedAt, true
+}
+
+// SetIssuedAt sets field value
+func (o *RegistrationFlow) SetIssuedAt(v time.Time) {
+ o.IssuedAt = v
+}
+
+// GetOauth2LoginChallenge returns the Oauth2LoginChallenge field value if set, zero value otherwise.
+func (o *RegistrationFlow) GetOauth2LoginChallenge() string {
+ if o == nil || o.Oauth2LoginChallenge == nil {
+ var ret string
+ return ret
+ }
+ return *o.Oauth2LoginChallenge
+}
+
+// GetOauth2LoginChallengeOk returns a tuple with the Oauth2LoginChallenge field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RegistrationFlow) GetOauth2LoginChallengeOk() (*string, bool) {
+ if o == nil || o.Oauth2LoginChallenge == nil {
+ return nil, false
+ }
+ return o.Oauth2LoginChallenge, true
+}
+
+// HasOauth2LoginChallenge returns a boolean if a field has been set.
+func (o *RegistrationFlow) HasOauth2LoginChallenge() bool {
+ if o != nil && o.Oauth2LoginChallenge != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetOauth2LoginChallenge gets a reference to the given string and assigns it to the Oauth2LoginChallenge field.
+func (o *RegistrationFlow) SetOauth2LoginChallenge(v string) {
+ o.Oauth2LoginChallenge = &v
+}
+
+// GetOauth2LoginRequest returns the Oauth2LoginRequest field value if set, zero value otherwise.
+func (o *RegistrationFlow) GetOauth2LoginRequest() OAuth2LoginRequest {
+ if o == nil || o.Oauth2LoginRequest == nil {
+ var ret OAuth2LoginRequest
+ return ret
+ }
+ return *o.Oauth2LoginRequest
+}
+
+// GetOauth2LoginRequestOk returns a tuple with the Oauth2LoginRequest field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RegistrationFlow) GetOauth2LoginRequestOk() (*OAuth2LoginRequest, bool) {
+ if o == nil || o.Oauth2LoginRequest == nil {
+ return nil, false
+ }
+ return o.Oauth2LoginRequest, true
+}
+
+// HasOauth2LoginRequest returns a boolean if a field has been set.
+func (o *RegistrationFlow) HasOauth2LoginRequest() bool {
+ if o != nil && o.Oauth2LoginRequest != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetOauth2LoginRequest gets a reference to the given OAuth2LoginRequest and assigns it to the Oauth2LoginRequest field.
+func (o *RegistrationFlow) SetOauth2LoginRequest(v OAuth2LoginRequest) {
+ o.Oauth2LoginRequest = &v
+}
+
+// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise (both if not set or set to explicit null).
+func (o *RegistrationFlow) GetOrganizationId() string {
+ if o == nil || o.OrganizationId.Get() == nil {
+ var ret string
+ return ret
+ }
+ return *o.OrganizationId.Get()
+}
+
+// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+// NOTE: If the value is an explicit nil, `nil, true` will be returned
+func (o *RegistrationFlow) GetOrganizationIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return o.OrganizationId.Get(), o.OrganizationId.IsSet()
+}
+
+// HasOrganizationId returns a boolean if a field has been set.
+func (o *RegistrationFlow) HasOrganizationId() bool {
+ if o != nil && o.OrganizationId.IsSet() {
+ return true
+ }
+
+ return false
+}
+
+// SetOrganizationId gets a reference to the given NullableString and assigns it to the OrganizationId field.
+func (o *RegistrationFlow) SetOrganizationId(v string) {
+ o.OrganizationId.Set(&v)
+}
+
+// SetOrganizationIdNil sets the value for OrganizationId to be an explicit nil
+func (o *RegistrationFlow) SetOrganizationIdNil() {
+ o.OrganizationId.Set(nil)
+}
+
+// UnsetOrganizationId ensures that no value is present for OrganizationId, not even an explicit nil
+func (o *RegistrationFlow) UnsetOrganizationId() {
+ o.OrganizationId.Unset()
+}
+
+// GetRequestUrl returns the RequestUrl field value
+func (o *RegistrationFlow) GetRequestUrl() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.RequestUrl
+}
+
+// GetRequestUrlOk returns a tuple with the RequestUrl field value
+// and a boolean to check if the value has been set.
+func (o *RegistrationFlow) GetRequestUrlOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.RequestUrl, true
+}
+
+// SetRequestUrl sets field value
+func (o *RegistrationFlow) SetRequestUrl(v string) {
+ o.RequestUrl = v
+}
+
+// GetReturnTo returns the ReturnTo field value if set, zero value otherwise.
+func (o *RegistrationFlow) GetReturnTo() string {
+ if o == nil || o.ReturnTo == nil {
+ var ret string
+ return ret
+ }
+ return *o.ReturnTo
+}
+
+// GetReturnToOk returns a tuple with the ReturnTo field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RegistrationFlow) GetReturnToOk() (*string, bool) {
+ if o == nil || o.ReturnTo == nil {
+ return nil, false
+ }
+ return o.ReturnTo, true
+}
+
+// HasReturnTo returns a boolean if a field has been set.
+func (o *RegistrationFlow) HasReturnTo() bool {
+ if o != nil && o.ReturnTo != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetReturnTo gets a reference to the given string and assigns it to the ReturnTo field.
+func (o *RegistrationFlow) SetReturnTo(v string) {
+ o.ReturnTo = &v
+}
+
+// GetSessionTokenExchangeCode returns the SessionTokenExchangeCode field value if set, zero value otherwise.
+func (o *RegistrationFlow) GetSessionTokenExchangeCode() string {
+ if o == nil || o.SessionTokenExchangeCode == nil {
+ var ret string
+ return ret
+ }
+ return *o.SessionTokenExchangeCode
+}
+
+// GetSessionTokenExchangeCodeOk returns a tuple with the SessionTokenExchangeCode field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RegistrationFlow) GetSessionTokenExchangeCodeOk() (*string, bool) {
+ if o == nil || o.SessionTokenExchangeCode == nil {
+ return nil, false
+ }
+ return o.SessionTokenExchangeCode, true
+}
+
+// HasSessionTokenExchangeCode returns a boolean if a field has been set.
+func (o *RegistrationFlow) HasSessionTokenExchangeCode() bool {
+ if o != nil && o.SessionTokenExchangeCode != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetSessionTokenExchangeCode gets a reference to the given string and assigns it to the SessionTokenExchangeCode field.
+func (o *RegistrationFlow) SetSessionTokenExchangeCode(v string) {
+ o.SessionTokenExchangeCode = &v
+}
+
+// GetState returns the State field value
+// If the value is explicit nil, the zero value for interface{} will be returned
+func (o *RegistrationFlow) GetState() interface{} {
+ if o == nil {
+ var ret interface{}
+ return ret
+ }
+
+ return o.State
+}
+
+// GetStateOk returns a tuple with the State field value
+// and a boolean to check if the value has been set.
+// NOTE: If the value is an explicit nil, `nil, true` will be returned
+func (o *RegistrationFlow) GetStateOk() (*interface{}, bool) {
+ if o == nil || o.State == nil {
+ return nil, false
+ }
+ return &o.State, true
+}
+
+// SetState sets field value
+func (o *RegistrationFlow) SetState(v interface{}) {
+ o.State = v
+}
+
+// GetTransientPayload returns the TransientPayload field value if set, zero value otherwise.
+func (o *RegistrationFlow) GetTransientPayload() map[string]interface{} {
+ if o == nil || o.TransientPayload == nil {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.TransientPayload
+}
+
+// GetTransientPayloadOk returns a tuple with the TransientPayload field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RegistrationFlow) GetTransientPayloadOk() (map[string]interface{}, bool) {
+ if o == nil || o.TransientPayload == nil {
+ return nil, false
+ }
+ return o.TransientPayload, true
+}
+
+// HasTransientPayload returns a boolean if a field has been set.
+func (o *RegistrationFlow) HasTransientPayload() bool {
+ if o != nil && o.TransientPayload != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetTransientPayload gets a reference to the given map[string]interface{} and assigns it to the TransientPayload field.
+func (o *RegistrationFlow) SetTransientPayload(v map[string]interface{}) {
+ o.TransientPayload = v
+}
+
+// GetType returns the Type field value
+func (o *RegistrationFlow) GetType() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Type
+}
+
+// GetTypeOk returns a tuple with the Type field value
+// and a boolean to check if the value has been set.
+func (o *RegistrationFlow) GetTypeOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Type, true
+}
+
+// SetType sets field value
+func (o *RegistrationFlow) SetType(v string) {
+ o.Type = v
+}
+
+// GetUi returns the Ui field value
+func (o *RegistrationFlow) GetUi() UiContainer {
+ if o == nil {
+ var ret UiContainer
+ return ret
+ }
+
+ return o.Ui
+}
+
+// GetUiOk returns a tuple with the Ui field value
+// and a boolean to check if the value has been set.
+func (o *RegistrationFlow) GetUiOk() (*UiContainer, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Ui, true
+}
+
+// SetUi sets field value
+func (o *RegistrationFlow) SetUi(v UiContainer) {
+ o.Ui = v
+}
+
+func (o RegistrationFlow) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Active != nil {
+ toSerialize["active"] = o.Active
+ }
+ if true {
+ toSerialize["expires_at"] = o.ExpiresAt
+ }
+ if true {
+ toSerialize["id"] = o.Id
+ }
+ if true {
+ toSerialize["issued_at"] = o.IssuedAt
+ }
+ if o.Oauth2LoginChallenge != nil {
+ toSerialize["oauth2_login_challenge"] = o.Oauth2LoginChallenge
+ }
+ if o.Oauth2LoginRequest != nil {
+ toSerialize["oauth2_login_request"] = o.Oauth2LoginRequest
+ }
+ if o.OrganizationId.IsSet() {
+ toSerialize["organization_id"] = o.OrganizationId.Get()
+ }
+ if true {
+ toSerialize["request_url"] = o.RequestUrl
+ }
+ if o.ReturnTo != nil {
+ toSerialize["return_to"] = o.ReturnTo
+ }
+ if o.SessionTokenExchangeCode != nil {
+ toSerialize["session_token_exchange_code"] = o.SessionTokenExchangeCode
+ }
+ if o.State != nil {
+ toSerialize["state"] = o.State
+ }
+ if o.TransientPayload != nil {
+ toSerialize["transient_payload"] = o.TransientPayload
+ }
+ if true {
+ toSerialize["type"] = o.Type
+ }
+ if true {
+ toSerialize["ui"] = o.Ui
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableRegistrationFlow struct {
+ value *RegistrationFlow
+ isSet bool
+}
+
+func (v NullableRegistrationFlow) Get() *RegistrationFlow {
+ return v.value
+}
+
+func (v *NullableRegistrationFlow) Set(val *RegistrationFlow) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableRegistrationFlow) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableRegistrationFlow) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableRegistrationFlow(val *RegistrationFlow) *NullableRegistrationFlow {
+ return &NullableRegistrationFlow{value: val, isSet: true}
+}
+
+func (v NullableRegistrationFlow) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableRegistrationFlow) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_registration_flow_state.go b/internal/httpclient/model_registration_flow_state.go
new file mode 100644
index 000000000000..86f3fd38cff0
--- /dev/null
+++ b/internal/httpclient/model_registration_flow_state.go
@@ -0,0 +1,85 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// RegistrationFlowState choose_method: ask the user to choose a method (e.g. registration with email) sent_email: the email has been sent to the user passed_challenge: the request was successful and the registration challenge was passed.
+type RegistrationFlowState string
+
+// List of registrationFlowState
+const (
+ REGISTRATIONFLOWSTATE_CHOOSE_METHOD RegistrationFlowState = "choose_method"
+ REGISTRATIONFLOWSTATE_SENT_EMAIL RegistrationFlowState = "sent_email"
+ REGISTRATIONFLOWSTATE_PASSED_CHALLENGE RegistrationFlowState = "passed_challenge"
+)
+
+func (v *RegistrationFlowState) UnmarshalJSON(src []byte) error {
+ var value string
+ err := json.Unmarshal(src, &value)
+ if err != nil {
+ return err
+ }
+ enumTypeValue := RegistrationFlowState(value)
+ for _, existing := range []RegistrationFlowState{"choose_method", "sent_email", "passed_challenge"} {
+ if existing == enumTypeValue {
+ *v = enumTypeValue
+ return nil
+ }
+ }
+
+ return fmt.Errorf("%+v is not a valid RegistrationFlowState", value)
+}
+
+// Ptr returns reference to registrationFlowState value
+func (v RegistrationFlowState) Ptr() *RegistrationFlowState {
+ return &v
+}
+
+type NullableRegistrationFlowState struct {
+ value *RegistrationFlowState
+ isSet bool
+}
+
+func (v NullableRegistrationFlowState) Get() *RegistrationFlowState {
+ return v.value
+}
+
+func (v *NullableRegistrationFlowState) Set(val *RegistrationFlowState) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableRegistrationFlowState) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableRegistrationFlowState) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableRegistrationFlowState(val *RegistrationFlowState) *NullableRegistrationFlowState {
+ return &NullableRegistrationFlowState{value: val, isSet: true}
+}
+
+func (v NullableRegistrationFlowState) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableRegistrationFlowState) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_self_service_flow_expired_error.go b/internal/httpclient/model_self_service_flow_expired_error.go
new file mode 100644
index 000000000000..a84737381a2d
--- /dev/null
+++ b/internal/httpclient/model_self_service_flow_expired_error.go
@@ -0,0 +1,226 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "time"
+)
+
+// SelfServiceFlowExpiredError Is sent when a flow is expired
+type SelfServiceFlowExpiredError struct {
+ Error *GenericError `json:"error,omitempty"`
+ // When the flow has expired
+ ExpiredAt *time.Time `json:"expired_at,omitempty"`
+ // A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years.
+ Since *int64 `json:"since,omitempty"`
+ // The flow ID that should be used for the new flow as it contains the correct messages.
+ UseFlowId *string `json:"use_flow_id,omitempty"`
+}
+
+// NewSelfServiceFlowExpiredError instantiates a new SelfServiceFlowExpiredError object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewSelfServiceFlowExpiredError() *SelfServiceFlowExpiredError {
+ this := SelfServiceFlowExpiredError{}
+ return &this
+}
+
+// NewSelfServiceFlowExpiredErrorWithDefaults instantiates a new SelfServiceFlowExpiredError object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewSelfServiceFlowExpiredErrorWithDefaults() *SelfServiceFlowExpiredError {
+ this := SelfServiceFlowExpiredError{}
+ return &this
+}
+
+// GetError returns the Error field value if set, zero value otherwise.
+func (o *SelfServiceFlowExpiredError) GetError() GenericError {
+ if o == nil || o.Error == nil {
+ var ret GenericError
+ return ret
+ }
+ return *o.Error
+}
+
+// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *SelfServiceFlowExpiredError) GetErrorOk() (*GenericError, bool) {
+ if o == nil || o.Error == nil {
+ return nil, false
+ }
+ return o.Error, true
+}
+
+// HasError returns a boolean if a field has been set.
+func (o *SelfServiceFlowExpiredError) HasError() bool {
+ if o != nil && o.Error != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetError gets a reference to the given GenericError and assigns it to the Error field.
+func (o *SelfServiceFlowExpiredError) SetError(v GenericError) {
+ o.Error = &v
+}
+
+// GetExpiredAt returns the ExpiredAt field value if set, zero value otherwise.
+func (o *SelfServiceFlowExpiredError) GetExpiredAt() time.Time {
+ if o == nil || o.ExpiredAt == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.ExpiredAt
+}
+
+// GetExpiredAtOk returns a tuple with the ExpiredAt field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *SelfServiceFlowExpiredError) GetExpiredAtOk() (*time.Time, bool) {
+ if o == nil || o.ExpiredAt == nil {
+ return nil, false
+ }
+ return o.ExpiredAt, true
+}
+
+// HasExpiredAt returns a boolean if a field has been set.
+func (o *SelfServiceFlowExpiredError) HasExpiredAt() bool {
+ if o != nil && o.ExpiredAt != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetExpiredAt gets a reference to the given time.Time and assigns it to the ExpiredAt field.
+func (o *SelfServiceFlowExpiredError) SetExpiredAt(v time.Time) {
+ o.ExpiredAt = &v
+}
+
+// GetSince returns the Since field value if set, zero value otherwise.
+func (o *SelfServiceFlowExpiredError) GetSince() int64 {
+ if o == nil || o.Since == nil {
+ var ret int64
+ return ret
+ }
+ return *o.Since
+}
+
+// GetSinceOk returns a tuple with the Since field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *SelfServiceFlowExpiredError) GetSinceOk() (*int64, bool) {
+ if o == nil || o.Since == nil {
+ return nil, false
+ }
+ return o.Since, true
+}
+
+// HasSince returns a boolean if a field has been set.
+func (o *SelfServiceFlowExpiredError) HasSince() bool {
+ if o != nil && o.Since != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetSince gets a reference to the given int64 and assigns it to the Since field.
+func (o *SelfServiceFlowExpiredError) SetSince(v int64) {
+ o.Since = &v
+}
+
+// GetUseFlowId returns the UseFlowId field value if set, zero value otherwise.
+func (o *SelfServiceFlowExpiredError) GetUseFlowId() string {
+ if o == nil || o.UseFlowId == nil {
+ var ret string
+ return ret
+ }
+ return *o.UseFlowId
+}
+
+// GetUseFlowIdOk returns a tuple with the UseFlowId field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *SelfServiceFlowExpiredError) GetUseFlowIdOk() (*string, bool) {
+ if o == nil || o.UseFlowId == nil {
+ return nil, false
+ }
+ return o.UseFlowId, true
+}
+
+// HasUseFlowId returns a boolean if a field has been set.
+func (o *SelfServiceFlowExpiredError) HasUseFlowId() bool {
+ if o != nil && o.UseFlowId != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetUseFlowId gets a reference to the given string and assigns it to the UseFlowId field.
+func (o *SelfServiceFlowExpiredError) SetUseFlowId(v string) {
+ o.UseFlowId = &v
+}
+
+func (o SelfServiceFlowExpiredError) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Error != nil {
+ toSerialize["error"] = o.Error
+ }
+ if o.ExpiredAt != nil {
+ toSerialize["expired_at"] = o.ExpiredAt
+ }
+ if o.Since != nil {
+ toSerialize["since"] = o.Since
+ }
+ if o.UseFlowId != nil {
+ toSerialize["use_flow_id"] = o.UseFlowId
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableSelfServiceFlowExpiredError struct {
+ value *SelfServiceFlowExpiredError
+ isSet bool
+}
+
+func (v NullableSelfServiceFlowExpiredError) Get() *SelfServiceFlowExpiredError {
+ return v.value
+}
+
+func (v *NullableSelfServiceFlowExpiredError) Set(val *SelfServiceFlowExpiredError) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableSelfServiceFlowExpiredError) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableSelfServiceFlowExpiredError) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableSelfServiceFlowExpiredError(val *SelfServiceFlowExpiredError) *NullableSelfServiceFlowExpiredError {
+ return &NullableSelfServiceFlowExpiredError{value: val, isSet: true}
+}
+
+func (v NullableSelfServiceFlowExpiredError) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableSelfServiceFlowExpiredError) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_session.go b/internal/httpclient/model_session.go
new file mode 100644
index 000000000000..aa10a1dac55c
--- /dev/null
+++ b/internal/httpclient/model_session.go
@@ -0,0 +1,440 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "time"
+)
+
+// Session A Session
+type Session struct {
+ // Active state. If false the session is no longer active.
+ Active *bool `json:"active,omitempty"`
+ // The Session Authentication Timestamp When this session was authenticated at. If multi-factor authentication was used this is the time when the last factor was authenticated (e.g. the TOTP code challenge was completed).
+ AuthenticatedAt *time.Time `json:"authenticated_at,omitempty"`
+ // A list of authenticators which were used to authenticate the session.
+ AuthenticationMethods []SessionAuthenticationMethod `json:"authentication_methods,omitempty"`
+ AuthenticatorAssuranceLevel *AuthenticatorAssuranceLevel `json:"authenticator_assurance_level,omitempty"`
+ // Devices has history of all endpoints where the session was used
+ Devices []SessionDevice `json:"devices,omitempty"`
+ // The Session Expiry When this session expires at.
+ ExpiresAt *time.Time `json:"expires_at,omitempty"`
+ // Session ID
+ Id string `json:"id"`
+ Identity *Identity `json:"identity,omitempty"`
+ // The Session Issuance Timestamp When this session was issued at. Usually equal or close to `authenticated_at`.
+ IssuedAt *time.Time `json:"issued_at,omitempty"`
+ // Tokenized is the tokenized (e.g. JWT) version of the session. It is only set when the `tokenize` query parameter was set to a valid tokenize template during calls to `/session/whoami`.
+ Tokenized *string `json:"tokenized,omitempty"`
+}
+
+// NewSession instantiates a new Session object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewSession(id string) *Session {
+ this := Session{}
+ this.Id = id
+ return &this
+}
+
+// NewSessionWithDefaults instantiates a new Session object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewSessionWithDefaults() *Session {
+ this := Session{}
+ return &this
+}
+
+// GetActive returns the Active field value if set, zero value otherwise.
+func (o *Session) GetActive() bool {
+ if o == nil || o.Active == nil {
+ var ret bool
+ return ret
+ }
+ return *o.Active
+}
+
+// GetActiveOk returns a tuple with the Active field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Session) GetActiveOk() (*bool, bool) {
+ if o == nil || o.Active == nil {
+ return nil, false
+ }
+ return o.Active, true
+}
+
+// HasActive returns a boolean if a field has been set.
+func (o *Session) HasActive() bool {
+ if o != nil && o.Active != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetActive gets a reference to the given bool and assigns it to the Active field.
+func (o *Session) SetActive(v bool) {
+ o.Active = &v
+}
+
+// GetAuthenticatedAt returns the AuthenticatedAt field value if set, zero value otherwise.
+func (o *Session) GetAuthenticatedAt() time.Time {
+ if o == nil || o.AuthenticatedAt == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.AuthenticatedAt
+}
+
+// GetAuthenticatedAtOk returns a tuple with the AuthenticatedAt field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Session) GetAuthenticatedAtOk() (*time.Time, bool) {
+ if o == nil || o.AuthenticatedAt == nil {
+ return nil, false
+ }
+ return o.AuthenticatedAt, true
+}
+
+// HasAuthenticatedAt returns a boolean if a field has been set.
+func (o *Session) HasAuthenticatedAt() bool {
+ if o != nil && o.AuthenticatedAt != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetAuthenticatedAt gets a reference to the given time.Time and assigns it to the AuthenticatedAt field.
+func (o *Session) SetAuthenticatedAt(v time.Time) {
+ o.AuthenticatedAt = &v
+}
+
+// GetAuthenticationMethods returns the AuthenticationMethods field value if set, zero value otherwise.
+func (o *Session) GetAuthenticationMethods() []SessionAuthenticationMethod {
+ if o == nil || o.AuthenticationMethods == nil {
+ var ret []SessionAuthenticationMethod
+ return ret
+ }
+ return o.AuthenticationMethods
+}
+
+// GetAuthenticationMethodsOk returns a tuple with the AuthenticationMethods field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Session) GetAuthenticationMethodsOk() ([]SessionAuthenticationMethod, bool) {
+ if o == nil || o.AuthenticationMethods == nil {
+ return nil, false
+ }
+ return o.AuthenticationMethods, true
+}
+
+// HasAuthenticationMethods returns a boolean if a field has been set.
+func (o *Session) HasAuthenticationMethods() bool {
+ if o != nil && o.AuthenticationMethods != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetAuthenticationMethods gets a reference to the given []SessionAuthenticationMethod and assigns it to the AuthenticationMethods field.
+func (o *Session) SetAuthenticationMethods(v []SessionAuthenticationMethod) {
+ o.AuthenticationMethods = v
+}
+
+// GetAuthenticatorAssuranceLevel returns the AuthenticatorAssuranceLevel field value if set, zero value otherwise.
+func (o *Session) GetAuthenticatorAssuranceLevel() AuthenticatorAssuranceLevel {
+ if o == nil || o.AuthenticatorAssuranceLevel == nil {
+ var ret AuthenticatorAssuranceLevel
+ return ret
+ }
+ return *o.AuthenticatorAssuranceLevel
+}
+
+// GetAuthenticatorAssuranceLevelOk returns a tuple with the AuthenticatorAssuranceLevel field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Session) GetAuthenticatorAssuranceLevelOk() (*AuthenticatorAssuranceLevel, bool) {
+ if o == nil || o.AuthenticatorAssuranceLevel == nil {
+ return nil, false
+ }
+ return o.AuthenticatorAssuranceLevel, true
+}
+
+// HasAuthenticatorAssuranceLevel returns a boolean if a field has been set.
+func (o *Session) HasAuthenticatorAssuranceLevel() bool {
+ if o != nil && o.AuthenticatorAssuranceLevel != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetAuthenticatorAssuranceLevel gets a reference to the given AuthenticatorAssuranceLevel and assigns it to the AuthenticatorAssuranceLevel field.
+func (o *Session) SetAuthenticatorAssuranceLevel(v AuthenticatorAssuranceLevel) {
+ o.AuthenticatorAssuranceLevel = &v
+}
+
+// GetDevices returns the Devices field value if set, zero value otherwise.
+func (o *Session) GetDevices() []SessionDevice {
+ if o == nil || o.Devices == nil {
+ var ret []SessionDevice
+ return ret
+ }
+ return o.Devices
+}
+
+// GetDevicesOk returns a tuple with the Devices field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Session) GetDevicesOk() ([]SessionDevice, bool) {
+ if o == nil || o.Devices == nil {
+ return nil, false
+ }
+ return o.Devices, true
+}
+
+// HasDevices returns a boolean if a field has been set.
+func (o *Session) HasDevices() bool {
+ if o != nil && o.Devices != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetDevices gets a reference to the given []SessionDevice and assigns it to the Devices field.
+func (o *Session) SetDevices(v []SessionDevice) {
+ o.Devices = v
+}
+
+// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise.
+func (o *Session) GetExpiresAt() time.Time {
+ if o == nil || o.ExpiresAt == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.ExpiresAt
+}
+
+// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Session) GetExpiresAtOk() (*time.Time, bool) {
+ if o == nil || o.ExpiresAt == nil {
+ return nil, false
+ }
+ return o.ExpiresAt, true
+}
+
+// HasExpiresAt returns a boolean if a field has been set.
+func (o *Session) HasExpiresAt() bool {
+ if o != nil && o.ExpiresAt != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetExpiresAt gets a reference to the given time.Time and assigns it to the ExpiresAt field.
+func (o *Session) SetExpiresAt(v time.Time) {
+ o.ExpiresAt = &v
+}
+
+// GetId returns the Id field value
+func (o *Session) GetId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value
+// and a boolean to check if the value has been set.
+func (o *Session) GetIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Id, true
+}
+
+// SetId sets field value
+func (o *Session) SetId(v string) {
+ o.Id = v
+}
+
+// GetIdentity returns the Identity field value if set, zero value otherwise.
+func (o *Session) GetIdentity() Identity {
+ if o == nil || o.Identity == nil {
+ var ret Identity
+ return ret
+ }
+ return *o.Identity
+}
+
+// GetIdentityOk returns a tuple with the Identity field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Session) GetIdentityOk() (*Identity, bool) {
+ if o == nil || o.Identity == nil {
+ return nil, false
+ }
+ return o.Identity, true
+}
+
+// HasIdentity returns a boolean if a field has been set.
+func (o *Session) HasIdentity() bool {
+ if o != nil && o.Identity != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetIdentity gets a reference to the given Identity and assigns it to the Identity field.
+func (o *Session) SetIdentity(v Identity) {
+ o.Identity = &v
+}
+
+// GetIssuedAt returns the IssuedAt field value if set, zero value otherwise.
+func (o *Session) GetIssuedAt() time.Time {
+ if o == nil || o.IssuedAt == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.IssuedAt
+}
+
+// GetIssuedAtOk returns a tuple with the IssuedAt field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Session) GetIssuedAtOk() (*time.Time, bool) {
+ if o == nil || o.IssuedAt == nil {
+ return nil, false
+ }
+ return o.IssuedAt, true
+}
+
+// HasIssuedAt returns a boolean if a field has been set.
+func (o *Session) HasIssuedAt() bool {
+ if o != nil && o.IssuedAt != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetIssuedAt gets a reference to the given time.Time and assigns it to the IssuedAt field.
+func (o *Session) SetIssuedAt(v time.Time) {
+ o.IssuedAt = &v
+}
+
+// GetTokenized returns the Tokenized field value if set, zero value otherwise.
+func (o *Session) GetTokenized() string {
+ if o == nil || o.Tokenized == nil {
+ var ret string
+ return ret
+ }
+ return *o.Tokenized
+}
+
+// GetTokenizedOk returns a tuple with the Tokenized field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Session) GetTokenizedOk() (*string, bool) {
+ if o == nil || o.Tokenized == nil {
+ return nil, false
+ }
+ return o.Tokenized, true
+}
+
+// HasTokenized returns a boolean if a field has been set.
+func (o *Session) HasTokenized() bool {
+ if o != nil && o.Tokenized != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetTokenized gets a reference to the given string and assigns it to the Tokenized field.
+func (o *Session) SetTokenized(v string) {
+ o.Tokenized = &v
+}
+
+func (o Session) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Active != nil {
+ toSerialize["active"] = o.Active
+ }
+ if o.AuthenticatedAt != nil {
+ toSerialize["authenticated_at"] = o.AuthenticatedAt
+ }
+ if o.AuthenticationMethods != nil {
+ toSerialize["authentication_methods"] = o.AuthenticationMethods
+ }
+ if o.AuthenticatorAssuranceLevel != nil {
+ toSerialize["authenticator_assurance_level"] = o.AuthenticatorAssuranceLevel
+ }
+ if o.Devices != nil {
+ toSerialize["devices"] = o.Devices
+ }
+ if o.ExpiresAt != nil {
+ toSerialize["expires_at"] = o.ExpiresAt
+ }
+ if true {
+ toSerialize["id"] = o.Id
+ }
+ if o.Identity != nil {
+ toSerialize["identity"] = o.Identity
+ }
+ if o.IssuedAt != nil {
+ toSerialize["issued_at"] = o.IssuedAt
+ }
+ if o.Tokenized != nil {
+ toSerialize["tokenized"] = o.Tokenized
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableSession struct {
+ value *Session
+ isSet bool
+}
+
+func (v NullableSession) Get() *Session {
+ return v.value
+}
+
+func (v *NullableSession) Set(val *Session) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableSession) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableSession) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableSession(val *Session) *NullableSession {
+ return &NullableSession{value: val, isSet: true}
+}
+
+func (v NullableSession) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableSession) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_session_authentication_method.go b/internal/httpclient/model_session_authentication_method.go
new file mode 100644
index 000000000000..17228de93141
--- /dev/null
+++ b/internal/httpclient/model_session_authentication_method.go
@@ -0,0 +1,262 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "time"
+)
+
+// SessionAuthenticationMethod A singular authenticator used during authentication / login.
+type SessionAuthenticationMethod struct {
+ Aal *AuthenticatorAssuranceLevel `json:"aal,omitempty"`
+ // When the authentication challenge was completed.
+ CompletedAt *time.Time `json:"completed_at,omitempty"`
+ Method *string `json:"method,omitempty"`
+ // The Organization id used for authentication
+ Organization *string `json:"organization,omitempty"`
+ // OIDC or SAML provider id used for authentication
+ Provider *string `json:"provider,omitempty"`
+}
+
+// NewSessionAuthenticationMethod instantiates a new SessionAuthenticationMethod object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewSessionAuthenticationMethod() *SessionAuthenticationMethod {
+ this := SessionAuthenticationMethod{}
+ return &this
+}
+
+// NewSessionAuthenticationMethodWithDefaults instantiates a new SessionAuthenticationMethod object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewSessionAuthenticationMethodWithDefaults() *SessionAuthenticationMethod {
+ this := SessionAuthenticationMethod{}
+ return &this
+}
+
+// GetAal returns the Aal field value if set, zero value otherwise.
+func (o *SessionAuthenticationMethod) GetAal() AuthenticatorAssuranceLevel {
+ if o == nil || o.Aal == nil {
+ var ret AuthenticatorAssuranceLevel
+ return ret
+ }
+ return *o.Aal
+}
+
+// GetAalOk returns a tuple with the Aal field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *SessionAuthenticationMethod) GetAalOk() (*AuthenticatorAssuranceLevel, bool) {
+ if o == nil || o.Aal == nil {
+ return nil, false
+ }
+ return o.Aal, true
+}
+
+// HasAal returns a boolean if a field has been set.
+func (o *SessionAuthenticationMethod) HasAal() bool {
+ if o != nil && o.Aal != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetAal gets a reference to the given AuthenticatorAssuranceLevel and assigns it to the Aal field.
+func (o *SessionAuthenticationMethod) SetAal(v AuthenticatorAssuranceLevel) {
+ o.Aal = &v
+}
+
+// GetCompletedAt returns the CompletedAt field value if set, zero value otherwise.
+func (o *SessionAuthenticationMethod) GetCompletedAt() time.Time {
+ if o == nil || o.CompletedAt == nil {
+ var ret time.Time
+ return ret
+ }
+ return *o.CompletedAt
+}
+
+// GetCompletedAtOk returns a tuple with the CompletedAt field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *SessionAuthenticationMethod) GetCompletedAtOk() (*time.Time, bool) {
+ if o == nil || o.CompletedAt == nil {
+ return nil, false
+ }
+ return o.CompletedAt, true
+}
+
+// HasCompletedAt returns a boolean if a field has been set.
+func (o *SessionAuthenticationMethod) HasCompletedAt() bool {
+ if o != nil && o.CompletedAt != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetCompletedAt gets a reference to the given time.Time and assigns it to the CompletedAt field.
+func (o *SessionAuthenticationMethod) SetCompletedAt(v time.Time) {
+ o.CompletedAt = &v
+}
+
+// GetMethod returns the Method field value if set, zero value otherwise.
+func (o *SessionAuthenticationMethod) GetMethod() string {
+ if o == nil || o.Method == nil {
+ var ret string
+ return ret
+ }
+ return *o.Method
+}
+
+// GetMethodOk returns a tuple with the Method field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *SessionAuthenticationMethod) GetMethodOk() (*string, bool) {
+ if o == nil || o.Method == nil {
+ return nil, false
+ }
+ return o.Method, true
+}
+
+// HasMethod returns a boolean if a field has been set.
+func (o *SessionAuthenticationMethod) HasMethod() bool {
+ if o != nil && o.Method != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetMethod gets a reference to the given string and assigns it to the Method field.
+func (o *SessionAuthenticationMethod) SetMethod(v string) {
+ o.Method = &v
+}
+
+// GetOrganization returns the Organization field value if set, zero value otherwise.
+func (o *SessionAuthenticationMethod) GetOrganization() string {
+ if o == nil || o.Organization == nil {
+ var ret string
+ return ret
+ }
+ return *o.Organization
+}
+
+// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *SessionAuthenticationMethod) GetOrganizationOk() (*string, bool) {
+ if o == nil || o.Organization == nil {
+ return nil, false
+ }
+ return o.Organization, true
+}
+
+// HasOrganization returns a boolean if a field has been set.
+func (o *SessionAuthenticationMethod) HasOrganization() bool {
+ if o != nil && o.Organization != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetOrganization gets a reference to the given string and assigns it to the Organization field.
+func (o *SessionAuthenticationMethod) SetOrganization(v string) {
+ o.Organization = &v
+}
+
+// GetProvider returns the Provider field value if set, zero value otherwise.
+func (o *SessionAuthenticationMethod) GetProvider() string {
+ if o == nil || o.Provider == nil {
+ var ret string
+ return ret
+ }
+ return *o.Provider
+}
+
+// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *SessionAuthenticationMethod) GetProviderOk() (*string, bool) {
+ if o == nil || o.Provider == nil {
+ return nil, false
+ }
+ return o.Provider, true
+}
+
+// HasProvider returns a boolean if a field has been set.
+func (o *SessionAuthenticationMethod) HasProvider() bool {
+ if o != nil && o.Provider != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetProvider gets a reference to the given string and assigns it to the Provider field.
+func (o *SessionAuthenticationMethod) SetProvider(v string) {
+ o.Provider = &v
+}
+
+func (o SessionAuthenticationMethod) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Aal != nil {
+ toSerialize["aal"] = o.Aal
+ }
+ if o.CompletedAt != nil {
+ toSerialize["completed_at"] = o.CompletedAt
+ }
+ if o.Method != nil {
+ toSerialize["method"] = o.Method
+ }
+ if o.Organization != nil {
+ toSerialize["organization"] = o.Organization
+ }
+ if o.Provider != nil {
+ toSerialize["provider"] = o.Provider
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableSessionAuthenticationMethod struct {
+ value *SessionAuthenticationMethod
+ isSet bool
+}
+
+func (v NullableSessionAuthenticationMethod) Get() *SessionAuthenticationMethod {
+ return v.value
+}
+
+func (v *NullableSessionAuthenticationMethod) Set(val *SessionAuthenticationMethod) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableSessionAuthenticationMethod) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableSessionAuthenticationMethod) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableSessionAuthenticationMethod(val *SessionAuthenticationMethod) *NullableSessionAuthenticationMethod {
+ return &NullableSessionAuthenticationMethod{value: val, isSet: true}
+}
+
+func (v NullableSessionAuthenticationMethod) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableSessionAuthenticationMethod) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_session_device.go b/internal/httpclient/model_session_device.go
new file mode 100644
index 000000000000..44e79c507dc1
--- /dev/null
+++ b/internal/httpclient/model_session_device.go
@@ -0,0 +1,219 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// SessionDevice Device corresponding to a Session
+type SessionDevice struct {
+ // Device record ID
+ Id string `json:"id"`
+ // IPAddress of the client
+ IpAddress *string `json:"ip_address,omitempty"`
+ // Geo Location corresponding to the IP Address
+ Location *string `json:"location,omitempty"`
+ // UserAgent of the client
+ UserAgent *string `json:"user_agent,omitempty"`
+}
+
+// NewSessionDevice instantiates a new SessionDevice object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewSessionDevice(id string) *SessionDevice {
+ this := SessionDevice{}
+ this.Id = id
+ return &this
+}
+
+// NewSessionDeviceWithDefaults instantiates a new SessionDevice object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewSessionDeviceWithDefaults() *SessionDevice {
+ this := SessionDevice{}
+ return &this
+}
+
+// GetId returns the Id field value
+func (o *SessionDevice) GetId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value
+// and a boolean to check if the value has been set.
+func (o *SessionDevice) GetIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Id, true
+}
+
+// SetId sets field value
+func (o *SessionDevice) SetId(v string) {
+ o.Id = v
+}
+
+// GetIpAddress returns the IpAddress field value if set, zero value otherwise.
+func (o *SessionDevice) GetIpAddress() string {
+ if o == nil || o.IpAddress == nil {
+ var ret string
+ return ret
+ }
+ return *o.IpAddress
+}
+
+// GetIpAddressOk returns a tuple with the IpAddress field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *SessionDevice) GetIpAddressOk() (*string, bool) {
+ if o == nil || o.IpAddress == nil {
+ return nil, false
+ }
+ return o.IpAddress, true
+}
+
+// HasIpAddress returns a boolean if a field has been set.
+func (o *SessionDevice) HasIpAddress() bool {
+ if o != nil && o.IpAddress != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetIpAddress gets a reference to the given string and assigns it to the IpAddress field.
+func (o *SessionDevice) SetIpAddress(v string) {
+ o.IpAddress = &v
+}
+
+// GetLocation returns the Location field value if set, zero value otherwise.
+func (o *SessionDevice) GetLocation() string {
+ if o == nil || o.Location == nil {
+ var ret string
+ return ret
+ }
+ return *o.Location
+}
+
+// GetLocationOk returns a tuple with the Location field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *SessionDevice) GetLocationOk() (*string, bool) {
+ if o == nil || o.Location == nil {
+ return nil, false
+ }
+ return o.Location, true
+}
+
+// HasLocation returns a boolean if a field has been set.
+func (o *SessionDevice) HasLocation() bool {
+ if o != nil && o.Location != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetLocation gets a reference to the given string and assigns it to the Location field.
+func (o *SessionDevice) SetLocation(v string) {
+ o.Location = &v
+}
+
+// GetUserAgent returns the UserAgent field value if set, zero value otherwise.
+func (o *SessionDevice) GetUserAgent() string {
+ if o == nil || o.UserAgent == nil {
+ var ret string
+ return ret
+ }
+ return *o.UserAgent
+}
+
+// GetUserAgentOk returns a tuple with the UserAgent field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *SessionDevice) GetUserAgentOk() (*string, bool) {
+ if o == nil || o.UserAgent == nil {
+ return nil, false
+ }
+ return o.UserAgent, true
+}
+
+// HasUserAgent returns a boolean if a field has been set.
+func (o *SessionDevice) HasUserAgent() bool {
+ if o != nil && o.UserAgent != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetUserAgent gets a reference to the given string and assigns it to the UserAgent field.
+func (o *SessionDevice) SetUserAgent(v string) {
+ o.UserAgent = &v
+}
+
+func (o SessionDevice) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if true {
+ toSerialize["id"] = o.Id
+ }
+ if o.IpAddress != nil {
+ toSerialize["ip_address"] = o.IpAddress
+ }
+ if o.Location != nil {
+ toSerialize["location"] = o.Location
+ }
+ if o.UserAgent != nil {
+ toSerialize["user_agent"] = o.UserAgent
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableSessionDevice struct {
+ value *SessionDevice
+ isSet bool
+}
+
+func (v NullableSessionDevice) Get() *SessionDevice {
+ return v.value
+}
+
+func (v *NullableSessionDevice) Set(val *SessionDevice) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableSessionDevice) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableSessionDevice) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableSessionDevice(val *SessionDevice) *NullableSessionDevice {
+ return &NullableSessionDevice{value: val, isSet: true}
+}
+
+func (v NullableSessionDevice) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableSessionDevice) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_settings_flow.go b/internal/httpclient/model_settings_flow.go
new file mode 100644
index 000000000000..f45c1599e8dd
--- /dev/null
+++ b/internal/httpclient/model_settings_flow.go
@@ -0,0 +1,467 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "time"
+)
+
+// SettingsFlow This flow is used when an identity wants to update settings (e.g. profile data, passwords, ...) in a selfservice manner. We recommend reading the [User Settings Documentation](../self-service/flows/user-settings)
+type SettingsFlow struct {
+ // Active, if set, contains the registration method that is being used. It is initially not set.
+ Active *string `json:"active,omitempty"`
+ // Contains a list of actions, that could follow this flow It can, for example, contain a reference to the verification flow, created as part of the user's registration.
+ ContinueWith []ContinueWith `json:"continue_with,omitempty"`
+ // ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to update the setting, a new flow has to be initiated.
+ ExpiresAt time.Time `json:"expires_at"`
+ // ID represents the flow's unique ID. When performing the settings flow, this represents the id in the settings ui's query parameter: http://?flow=
+ Id string `json:"id"`
+ Identity Identity `json:"identity"`
+ // IssuedAt is the time (UTC) when the flow occurred.
+ IssuedAt time.Time `json:"issued_at"`
+ // RequestURL is the initial URL that was requested from Ory Kratos. It can be used to forward information contained in the URL's path or query for example.
+ RequestUrl string `json:"request_url"`
+ // ReturnTo contains the requested return_to URL.
+ ReturnTo *string `json:"return_to,omitempty"`
+ // State represents the state of this flow. It knows two states: show_form: No user data has been collected, or it is invalid, and thus the form should be shown. success: Indicates that the settings flow has been updated successfully with the provided data. Done will stay true when repeatedly checking. If set to true, done will revert back to false only when a flow with invalid (e.g. \"please use a valid phone number\") data was sent.
+ State interface{} `json:"state"`
+ // TransientPayload is used to pass data from the settings flow to hooks and email templates
+ TransientPayload map[string]interface{} `json:"transient_payload,omitempty"`
+ // The flow type can either be `api` or `browser`.
+ Type string `json:"type"`
+ Ui UiContainer `json:"ui"`
+}
+
+// NewSettingsFlow instantiates a new SettingsFlow object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewSettingsFlow(expiresAt time.Time, id string, identity Identity, issuedAt time.Time, requestUrl string, state interface{}, type_ string, ui UiContainer) *SettingsFlow {
+ this := SettingsFlow{}
+ this.ExpiresAt = expiresAt
+ this.Id = id
+ this.Identity = identity
+ this.IssuedAt = issuedAt
+ this.RequestUrl = requestUrl
+ this.State = state
+ this.Type = type_
+ this.Ui = ui
+ return &this
+}
+
+// NewSettingsFlowWithDefaults instantiates a new SettingsFlow object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewSettingsFlowWithDefaults() *SettingsFlow {
+ this := SettingsFlow{}
+ return &this
+}
+
+// GetActive returns the Active field value if set, zero value otherwise.
+func (o *SettingsFlow) GetActive() string {
+ if o == nil || o.Active == nil {
+ var ret string
+ return ret
+ }
+ return *o.Active
+}
+
+// GetActiveOk returns a tuple with the Active field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *SettingsFlow) GetActiveOk() (*string, bool) {
+ if o == nil || o.Active == nil {
+ return nil, false
+ }
+ return o.Active, true
+}
+
+// HasActive returns a boolean if a field has been set.
+func (o *SettingsFlow) HasActive() bool {
+ if o != nil && o.Active != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetActive gets a reference to the given string and assigns it to the Active field.
+func (o *SettingsFlow) SetActive(v string) {
+ o.Active = &v
+}
+
+// GetContinueWith returns the ContinueWith field value if set, zero value otherwise.
+func (o *SettingsFlow) GetContinueWith() []ContinueWith {
+ if o == nil || o.ContinueWith == nil {
+ var ret []ContinueWith
+ return ret
+ }
+ return o.ContinueWith
+}
+
+// GetContinueWithOk returns a tuple with the ContinueWith field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *SettingsFlow) GetContinueWithOk() ([]ContinueWith, bool) {
+ if o == nil || o.ContinueWith == nil {
+ return nil, false
+ }
+ return o.ContinueWith, true
+}
+
+// HasContinueWith returns a boolean if a field has been set.
+func (o *SettingsFlow) HasContinueWith() bool {
+ if o != nil && o.ContinueWith != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetContinueWith gets a reference to the given []ContinueWith and assigns it to the ContinueWith field.
+func (o *SettingsFlow) SetContinueWith(v []ContinueWith) {
+ o.ContinueWith = v
+}
+
+// GetExpiresAt returns the ExpiresAt field value
+func (o *SettingsFlow) GetExpiresAt() time.Time {
+ if o == nil {
+ var ret time.Time
+ return ret
+ }
+
+ return o.ExpiresAt
+}
+
+// GetExpiresAtOk returns a tuple with the ExpiresAt field value
+// and a boolean to check if the value has been set.
+func (o *SettingsFlow) GetExpiresAtOk() (*time.Time, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.ExpiresAt, true
+}
+
+// SetExpiresAt sets field value
+func (o *SettingsFlow) SetExpiresAt(v time.Time) {
+ o.ExpiresAt = v
+}
+
+// GetId returns the Id field value
+func (o *SettingsFlow) GetId() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value
+// and a boolean to check if the value has been set.
+func (o *SettingsFlow) GetIdOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Id, true
+}
+
+// SetId sets field value
+func (o *SettingsFlow) SetId(v string) {
+ o.Id = v
+}
+
+// GetIdentity returns the Identity field value
+func (o *SettingsFlow) GetIdentity() Identity {
+ if o == nil {
+ var ret Identity
+ return ret
+ }
+
+ return o.Identity
+}
+
+// GetIdentityOk returns a tuple with the Identity field value
+// and a boolean to check if the value has been set.
+func (o *SettingsFlow) GetIdentityOk() (*Identity, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Identity, true
+}
+
+// SetIdentity sets field value
+func (o *SettingsFlow) SetIdentity(v Identity) {
+ o.Identity = v
+}
+
+// GetIssuedAt returns the IssuedAt field value
+func (o *SettingsFlow) GetIssuedAt() time.Time {
+ if o == nil {
+ var ret time.Time
+ return ret
+ }
+
+ return o.IssuedAt
+}
+
+// GetIssuedAtOk returns a tuple with the IssuedAt field value
+// and a boolean to check if the value has been set.
+func (o *SettingsFlow) GetIssuedAtOk() (*time.Time, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.IssuedAt, true
+}
+
+// SetIssuedAt sets field value
+func (o *SettingsFlow) SetIssuedAt(v time.Time) {
+ o.IssuedAt = v
+}
+
+// GetRequestUrl returns the RequestUrl field value
+func (o *SettingsFlow) GetRequestUrl() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.RequestUrl
+}
+
+// GetRequestUrlOk returns a tuple with the RequestUrl field value
+// and a boolean to check if the value has been set.
+func (o *SettingsFlow) GetRequestUrlOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.RequestUrl, true
+}
+
+// SetRequestUrl sets field value
+func (o *SettingsFlow) SetRequestUrl(v string) {
+ o.RequestUrl = v
+}
+
+// GetReturnTo returns the ReturnTo field value if set, zero value otherwise.
+func (o *SettingsFlow) GetReturnTo() string {
+ if o == nil || o.ReturnTo == nil {
+ var ret string
+ return ret
+ }
+ return *o.ReturnTo
+}
+
+// GetReturnToOk returns a tuple with the ReturnTo field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *SettingsFlow) GetReturnToOk() (*string, bool) {
+ if o == nil || o.ReturnTo == nil {
+ return nil, false
+ }
+ return o.ReturnTo, true
+}
+
+// HasReturnTo returns a boolean if a field has been set.
+func (o *SettingsFlow) HasReturnTo() bool {
+ if o != nil && o.ReturnTo != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetReturnTo gets a reference to the given string and assigns it to the ReturnTo field.
+func (o *SettingsFlow) SetReturnTo(v string) {
+ o.ReturnTo = &v
+}
+
+// GetState returns the State field value
+// If the value is explicit nil, the zero value for interface{} will be returned
+func (o *SettingsFlow) GetState() interface{} {
+ if o == nil {
+ var ret interface{}
+ return ret
+ }
+
+ return o.State
+}
+
+// GetStateOk returns a tuple with the State field value
+// and a boolean to check if the value has been set.
+// NOTE: If the value is an explicit nil, `nil, true` will be returned
+func (o *SettingsFlow) GetStateOk() (*interface{}, bool) {
+ if o == nil || o.State == nil {
+ return nil, false
+ }
+ return &o.State, true
+}
+
+// SetState sets field value
+func (o *SettingsFlow) SetState(v interface{}) {
+ o.State = v
+}
+
+// GetTransientPayload returns the TransientPayload field value if set, zero value otherwise.
+func (o *SettingsFlow) GetTransientPayload() map[string]interface{} {
+ if o == nil || o.TransientPayload == nil {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.TransientPayload
+}
+
+// GetTransientPayloadOk returns a tuple with the TransientPayload field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *SettingsFlow) GetTransientPayloadOk() (map[string]interface{}, bool) {
+ if o == nil || o.TransientPayload == nil {
+ return nil, false
+ }
+ return o.TransientPayload, true
+}
+
+// HasTransientPayload returns a boolean if a field has been set.
+func (o *SettingsFlow) HasTransientPayload() bool {
+ if o != nil && o.TransientPayload != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetTransientPayload gets a reference to the given map[string]interface{} and assigns it to the TransientPayload field.
+func (o *SettingsFlow) SetTransientPayload(v map[string]interface{}) {
+ o.TransientPayload = v
+}
+
+// GetType returns the Type field value
+func (o *SettingsFlow) GetType() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Type
+}
+
+// GetTypeOk returns a tuple with the Type field value
+// and a boolean to check if the value has been set.
+func (o *SettingsFlow) GetTypeOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Type, true
+}
+
+// SetType sets field value
+func (o *SettingsFlow) SetType(v string) {
+ o.Type = v
+}
+
+// GetUi returns the Ui field value
+func (o *SettingsFlow) GetUi() UiContainer {
+ if o == nil {
+ var ret UiContainer
+ return ret
+ }
+
+ return o.Ui
+}
+
+// GetUiOk returns a tuple with the Ui field value
+// and a boolean to check if the value has been set.
+func (o *SettingsFlow) GetUiOk() (*UiContainer, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Ui, true
+}
+
+// SetUi sets field value
+func (o *SettingsFlow) SetUi(v UiContainer) {
+ o.Ui = v
+}
+
+func (o SettingsFlow) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Active != nil {
+ toSerialize["active"] = o.Active
+ }
+ if o.ContinueWith != nil {
+ toSerialize["continue_with"] = o.ContinueWith
+ }
+ if true {
+ toSerialize["expires_at"] = o.ExpiresAt
+ }
+ if true {
+ toSerialize["id"] = o.Id
+ }
+ if true {
+ toSerialize["identity"] = o.Identity
+ }
+ if true {
+ toSerialize["issued_at"] = o.IssuedAt
+ }
+ if true {
+ toSerialize["request_url"] = o.RequestUrl
+ }
+ if o.ReturnTo != nil {
+ toSerialize["return_to"] = o.ReturnTo
+ }
+ if o.State != nil {
+ toSerialize["state"] = o.State
+ }
+ if o.TransientPayload != nil {
+ toSerialize["transient_payload"] = o.TransientPayload
+ }
+ if true {
+ toSerialize["type"] = o.Type
+ }
+ if true {
+ toSerialize["ui"] = o.Ui
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableSettingsFlow struct {
+ value *SettingsFlow
+ isSet bool
+}
+
+func (v NullableSettingsFlow) Get() *SettingsFlow {
+ return v.value
+}
+
+func (v *NullableSettingsFlow) Set(val *SettingsFlow) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableSettingsFlow) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableSettingsFlow) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableSettingsFlow(val *SettingsFlow) *NullableSettingsFlow {
+ return &NullableSettingsFlow{value: val, isSet: true}
+}
+
+func (v NullableSettingsFlow) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableSettingsFlow) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_settings_flow_state.go b/internal/httpclient/model_settings_flow_state.go
new file mode 100644
index 000000000000..f994c786a2d8
--- /dev/null
+++ b/internal/httpclient/model_settings_flow_state.go
@@ -0,0 +1,84 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// SettingsFlowState show_form: No user data has been collected, or it is invalid, and thus the form should be shown. success: Indicates that the settings flow has been updated successfully with the provided data. Done will stay true when repeatedly checking. If set to true, done will revert back to false only when a flow with invalid (e.g. \"please use a valid phone number\") data was sent.
+type SettingsFlowState string
+
+// List of settingsFlowState
+const (
+ SETTINGSFLOWSTATE_SHOW_FORM SettingsFlowState = "show_form"
+ SETTINGSFLOWSTATE_SUCCESS SettingsFlowState = "success"
+)
+
+func (v *SettingsFlowState) UnmarshalJSON(src []byte) error {
+ var value string
+ err := json.Unmarshal(src, &value)
+ if err != nil {
+ return err
+ }
+ enumTypeValue := SettingsFlowState(value)
+ for _, existing := range []SettingsFlowState{"show_form", "success"} {
+ if existing == enumTypeValue {
+ *v = enumTypeValue
+ return nil
+ }
+ }
+
+ return fmt.Errorf("%+v is not a valid SettingsFlowState", value)
+}
+
+// Ptr returns reference to settingsFlowState value
+func (v SettingsFlowState) Ptr() *SettingsFlowState {
+ return &v
+}
+
+type NullableSettingsFlowState struct {
+ value *SettingsFlowState
+ isSet bool
+}
+
+func (v NullableSettingsFlowState) Get() *SettingsFlowState {
+ return v.value
+}
+
+func (v *NullableSettingsFlowState) Set(val *SettingsFlowState) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableSettingsFlowState) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableSettingsFlowState) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableSettingsFlowState(val *SettingsFlowState) *NullableSettingsFlowState {
+ return &NullableSettingsFlowState{value: val, isSet: true}
+}
+
+func (v NullableSettingsFlowState) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableSettingsFlowState) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_successful_code_exchange_response.go b/internal/httpclient/model_successful_code_exchange_response.go
new file mode 100644
index 000000000000..9defabefefe5
--- /dev/null
+++ b/internal/httpclient/model_successful_code_exchange_response.go
@@ -0,0 +1,144 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// SuccessfulCodeExchangeResponse The Response for Registration Flows via API
+type SuccessfulCodeExchangeResponse struct {
+ Session Session `json:"session"`
+ // The Session Token A session token is equivalent to a session cookie, but it can be sent in the HTTP Authorization Header: Authorization: bearer ${session-token} The session token is only issued for API flows, not for Browser flows!
+ SessionToken *string `json:"session_token,omitempty"`
+}
+
+// NewSuccessfulCodeExchangeResponse instantiates a new SuccessfulCodeExchangeResponse object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewSuccessfulCodeExchangeResponse(session Session) *SuccessfulCodeExchangeResponse {
+ this := SuccessfulCodeExchangeResponse{}
+ this.Session = session
+ return &this
+}
+
+// NewSuccessfulCodeExchangeResponseWithDefaults instantiates a new SuccessfulCodeExchangeResponse object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewSuccessfulCodeExchangeResponseWithDefaults() *SuccessfulCodeExchangeResponse {
+ this := SuccessfulCodeExchangeResponse{}
+ return &this
+}
+
+// GetSession returns the Session field value
+func (o *SuccessfulCodeExchangeResponse) GetSession() Session {
+ if o == nil {
+ var ret Session
+ return ret
+ }
+
+ return o.Session
+}
+
+// GetSessionOk returns a tuple with the Session field value
+// and a boolean to check if the value has been set.
+func (o *SuccessfulCodeExchangeResponse) GetSessionOk() (*Session, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Session, true
+}
+
+// SetSession sets field value
+func (o *SuccessfulCodeExchangeResponse) SetSession(v Session) {
+ o.Session = v
+}
+
+// GetSessionToken returns the SessionToken field value if set, zero value otherwise.
+func (o *SuccessfulCodeExchangeResponse) GetSessionToken() string {
+ if o == nil || o.SessionToken == nil {
+ var ret string
+ return ret
+ }
+ return *o.SessionToken
+}
+
+// GetSessionTokenOk returns a tuple with the SessionToken field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *SuccessfulCodeExchangeResponse) GetSessionTokenOk() (*string, bool) {
+ if o == nil || o.SessionToken == nil {
+ return nil, false
+ }
+ return o.SessionToken, true
+}
+
+// HasSessionToken returns a boolean if a field has been set.
+func (o *SuccessfulCodeExchangeResponse) HasSessionToken() bool {
+ if o != nil && o.SessionToken != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetSessionToken gets a reference to the given string and assigns it to the SessionToken field.
+func (o *SuccessfulCodeExchangeResponse) SetSessionToken(v string) {
+ o.SessionToken = &v
+}
+
+func (o SuccessfulCodeExchangeResponse) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if true {
+ toSerialize["session"] = o.Session
+ }
+ if o.SessionToken != nil {
+ toSerialize["session_token"] = o.SessionToken
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableSuccessfulCodeExchangeResponse struct {
+ value *SuccessfulCodeExchangeResponse
+ isSet bool
+}
+
+func (v NullableSuccessfulCodeExchangeResponse) Get() *SuccessfulCodeExchangeResponse {
+ return v.value
+}
+
+func (v *NullableSuccessfulCodeExchangeResponse) Set(val *SuccessfulCodeExchangeResponse) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableSuccessfulCodeExchangeResponse) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableSuccessfulCodeExchangeResponse) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableSuccessfulCodeExchangeResponse(val *SuccessfulCodeExchangeResponse) *NullableSuccessfulCodeExchangeResponse {
+ return &NullableSuccessfulCodeExchangeResponse{value: val, isSet: true}
+}
+
+func (v NullableSuccessfulCodeExchangeResponse) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableSuccessfulCodeExchangeResponse) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_successful_native_login.go b/internal/httpclient/model_successful_native_login.go
new file mode 100644
index 000000000000..faf59ae906e7
--- /dev/null
+++ b/internal/httpclient/model_successful_native_login.go
@@ -0,0 +1,181 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// SuccessfulNativeLogin The Response for Login Flows via API
+type SuccessfulNativeLogin struct {
+ // Contains a list of actions, that could follow this flow It can, for example, this will contain a reference to the verification flow, created as part of the user's registration or the token of the session.
+ ContinueWith []ContinueWith `json:"continue_with,omitempty"`
+ Session Session `json:"session"`
+ // The Session Token A session token is equivalent to a session cookie, but it can be sent in the HTTP Authorization Header: Authorization: bearer ${session-token} The session token is only issued for API flows, not for Browser flows!
+ SessionToken *string `json:"session_token,omitempty"`
+}
+
+// NewSuccessfulNativeLogin instantiates a new SuccessfulNativeLogin object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewSuccessfulNativeLogin(session Session) *SuccessfulNativeLogin {
+ this := SuccessfulNativeLogin{}
+ this.Session = session
+ return &this
+}
+
+// NewSuccessfulNativeLoginWithDefaults instantiates a new SuccessfulNativeLogin object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewSuccessfulNativeLoginWithDefaults() *SuccessfulNativeLogin {
+ this := SuccessfulNativeLogin{}
+ return &this
+}
+
+// GetContinueWith returns the ContinueWith field value if set, zero value otherwise.
+func (o *SuccessfulNativeLogin) GetContinueWith() []ContinueWith {
+ if o == nil || o.ContinueWith == nil {
+ var ret []ContinueWith
+ return ret
+ }
+ return o.ContinueWith
+}
+
+// GetContinueWithOk returns a tuple with the ContinueWith field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *SuccessfulNativeLogin) GetContinueWithOk() ([]ContinueWith, bool) {
+ if o == nil || o.ContinueWith == nil {
+ return nil, false
+ }
+ return o.ContinueWith, true
+}
+
+// HasContinueWith returns a boolean if a field has been set.
+func (o *SuccessfulNativeLogin) HasContinueWith() bool {
+ if o != nil && o.ContinueWith != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetContinueWith gets a reference to the given []ContinueWith and assigns it to the ContinueWith field.
+func (o *SuccessfulNativeLogin) SetContinueWith(v []ContinueWith) {
+ o.ContinueWith = v
+}
+
+// GetSession returns the Session field value
+func (o *SuccessfulNativeLogin) GetSession() Session {
+ if o == nil {
+ var ret Session
+ return ret
+ }
+
+ return o.Session
+}
+
+// GetSessionOk returns a tuple with the Session field value
+// and a boolean to check if the value has been set.
+func (o *SuccessfulNativeLogin) GetSessionOk() (*Session, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Session, true
+}
+
+// SetSession sets field value
+func (o *SuccessfulNativeLogin) SetSession(v Session) {
+ o.Session = v
+}
+
+// GetSessionToken returns the SessionToken field value if set, zero value otherwise.
+func (o *SuccessfulNativeLogin) GetSessionToken() string {
+ if o == nil || o.SessionToken == nil {
+ var ret string
+ return ret
+ }
+ return *o.SessionToken
+}
+
+// GetSessionTokenOk returns a tuple with the SessionToken field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *SuccessfulNativeLogin) GetSessionTokenOk() (*string, bool) {
+ if o == nil || o.SessionToken == nil {
+ return nil, false
+ }
+ return o.SessionToken, true
+}
+
+// HasSessionToken returns a boolean if a field has been set.
+func (o *SuccessfulNativeLogin) HasSessionToken() bool {
+ if o != nil && o.SessionToken != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetSessionToken gets a reference to the given string and assigns it to the SessionToken field.
+func (o *SuccessfulNativeLogin) SetSessionToken(v string) {
+ o.SessionToken = &v
+}
+
+func (o SuccessfulNativeLogin) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.ContinueWith != nil {
+ toSerialize["continue_with"] = o.ContinueWith
+ }
+ if true {
+ toSerialize["session"] = o.Session
+ }
+ if o.SessionToken != nil {
+ toSerialize["session_token"] = o.SessionToken
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableSuccessfulNativeLogin struct {
+ value *SuccessfulNativeLogin
+ isSet bool
+}
+
+func (v NullableSuccessfulNativeLogin) Get() *SuccessfulNativeLogin {
+ return v.value
+}
+
+func (v *NullableSuccessfulNativeLogin) Set(val *SuccessfulNativeLogin) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableSuccessfulNativeLogin) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableSuccessfulNativeLogin) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableSuccessfulNativeLogin(val *SuccessfulNativeLogin) *NullableSuccessfulNativeLogin {
+ return &NullableSuccessfulNativeLogin{value: val, isSet: true}
+}
+
+func (v NullableSuccessfulNativeLogin) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableSuccessfulNativeLogin) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_successful_native_registration.go b/internal/httpclient/model_successful_native_registration.go
new file mode 100644
index 000000000000..b56cc42bc6e5
--- /dev/null
+++ b/internal/httpclient/model_successful_native_registration.go
@@ -0,0 +1,217 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// SuccessfulNativeRegistration The Response for Registration Flows via API
+type SuccessfulNativeRegistration struct {
+ // Contains a list of actions, that could follow this flow It can, for example, this will contain a reference to the verification flow, created as part of the user's registration or the token of the session.
+ ContinueWith []ContinueWith `json:"continue_with,omitempty"`
+ Identity Identity `json:"identity"`
+ Session *Session `json:"session,omitempty"`
+ // The Session Token This field is only set when the session hook is configured as a post-registration hook. A session token is equivalent to a session cookie, but it can be sent in the HTTP Authorization Header: Authorization: bearer ${session-token} The session token is only issued for API flows, not for Browser flows!
+ SessionToken *string `json:"session_token,omitempty"`
+}
+
+// NewSuccessfulNativeRegistration instantiates a new SuccessfulNativeRegistration object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewSuccessfulNativeRegistration(identity Identity) *SuccessfulNativeRegistration {
+ this := SuccessfulNativeRegistration{}
+ this.Identity = identity
+ return &this
+}
+
+// NewSuccessfulNativeRegistrationWithDefaults instantiates a new SuccessfulNativeRegistration object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewSuccessfulNativeRegistrationWithDefaults() *SuccessfulNativeRegistration {
+ this := SuccessfulNativeRegistration{}
+ return &this
+}
+
+// GetContinueWith returns the ContinueWith field value if set, zero value otherwise.
+func (o *SuccessfulNativeRegistration) GetContinueWith() []ContinueWith {
+ if o == nil || o.ContinueWith == nil {
+ var ret []ContinueWith
+ return ret
+ }
+ return o.ContinueWith
+}
+
+// GetContinueWithOk returns a tuple with the ContinueWith field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *SuccessfulNativeRegistration) GetContinueWithOk() ([]ContinueWith, bool) {
+ if o == nil || o.ContinueWith == nil {
+ return nil, false
+ }
+ return o.ContinueWith, true
+}
+
+// HasContinueWith returns a boolean if a field has been set.
+func (o *SuccessfulNativeRegistration) HasContinueWith() bool {
+ if o != nil && o.ContinueWith != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetContinueWith gets a reference to the given []ContinueWith and assigns it to the ContinueWith field.
+func (o *SuccessfulNativeRegistration) SetContinueWith(v []ContinueWith) {
+ o.ContinueWith = v
+}
+
+// GetIdentity returns the Identity field value
+func (o *SuccessfulNativeRegistration) GetIdentity() Identity {
+ if o == nil {
+ var ret Identity
+ return ret
+ }
+
+ return o.Identity
+}
+
+// GetIdentityOk returns a tuple with the Identity field value
+// and a boolean to check if the value has been set.
+func (o *SuccessfulNativeRegistration) GetIdentityOk() (*Identity, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Identity, true
+}
+
+// SetIdentity sets field value
+func (o *SuccessfulNativeRegistration) SetIdentity(v Identity) {
+ o.Identity = v
+}
+
+// GetSession returns the Session field value if set, zero value otherwise.
+func (o *SuccessfulNativeRegistration) GetSession() Session {
+ if o == nil || o.Session == nil {
+ var ret Session
+ return ret
+ }
+ return *o.Session
+}
+
+// GetSessionOk returns a tuple with the Session field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *SuccessfulNativeRegistration) GetSessionOk() (*Session, bool) {
+ if o == nil || o.Session == nil {
+ return nil, false
+ }
+ return o.Session, true
+}
+
+// HasSession returns a boolean if a field has been set.
+func (o *SuccessfulNativeRegistration) HasSession() bool {
+ if o != nil && o.Session != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetSession gets a reference to the given Session and assigns it to the Session field.
+func (o *SuccessfulNativeRegistration) SetSession(v Session) {
+ o.Session = &v
+}
+
+// GetSessionToken returns the SessionToken field value if set, zero value otherwise.
+func (o *SuccessfulNativeRegistration) GetSessionToken() string {
+ if o == nil || o.SessionToken == nil {
+ var ret string
+ return ret
+ }
+ return *o.SessionToken
+}
+
+// GetSessionTokenOk returns a tuple with the SessionToken field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *SuccessfulNativeRegistration) GetSessionTokenOk() (*string, bool) {
+ if o == nil || o.SessionToken == nil {
+ return nil, false
+ }
+ return o.SessionToken, true
+}
+
+// HasSessionToken returns a boolean if a field has been set.
+func (o *SuccessfulNativeRegistration) HasSessionToken() bool {
+ if o != nil && o.SessionToken != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetSessionToken gets a reference to the given string and assigns it to the SessionToken field.
+func (o *SuccessfulNativeRegistration) SetSessionToken(v string) {
+ o.SessionToken = &v
+}
+
+func (o SuccessfulNativeRegistration) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.ContinueWith != nil {
+ toSerialize["continue_with"] = o.ContinueWith
+ }
+ if true {
+ toSerialize["identity"] = o.Identity
+ }
+ if o.Session != nil {
+ toSerialize["session"] = o.Session
+ }
+ if o.SessionToken != nil {
+ toSerialize["session_token"] = o.SessionToken
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableSuccessfulNativeRegistration struct {
+ value *SuccessfulNativeRegistration
+ isSet bool
+}
+
+func (v NullableSuccessfulNativeRegistration) Get() *SuccessfulNativeRegistration {
+ return v.value
+}
+
+func (v *NullableSuccessfulNativeRegistration) Set(val *SuccessfulNativeRegistration) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableSuccessfulNativeRegistration) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableSuccessfulNativeRegistration) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableSuccessfulNativeRegistration(val *SuccessfulNativeRegistration) *NullableSuccessfulNativeRegistration {
+ return &NullableSuccessfulNativeRegistration{value: val, isSet: true}
+}
+
+func (v NullableSuccessfulNativeRegistration) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableSuccessfulNativeRegistration) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_token_pagination.go b/internal/httpclient/model_token_pagination.go
new file mode 100644
index 000000000000..b8422dd14242
--- /dev/null
+++ b/internal/httpclient/model_token_pagination.go
@@ -0,0 +1,160 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// TokenPagination struct for TokenPagination
+type TokenPagination struct {
+ // Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).
+ PageSize *int64 `json:"page_size,omitempty"`
+ // Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).
+ PageToken *string `json:"page_token,omitempty"`
+}
+
+// NewTokenPagination instantiates a new TokenPagination object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewTokenPagination() *TokenPagination {
+ this := TokenPagination{}
+ var pageSize int64 = 250
+ this.PageSize = &pageSize
+ var pageToken string = "1"
+ this.PageToken = &pageToken
+ return &this
+}
+
+// NewTokenPaginationWithDefaults instantiates a new TokenPagination object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewTokenPaginationWithDefaults() *TokenPagination {
+ this := TokenPagination{}
+ var pageSize int64 = 250
+ this.PageSize = &pageSize
+ var pageToken string = "1"
+ this.PageToken = &pageToken
+ return &this
+}
+
+// GetPageSize returns the PageSize field value if set, zero value otherwise.
+func (o *TokenPagination) GetPageSize() int64 {
+ if o == nil || o.PageSize == nil {
+ var ret int64
+ return ret
+ }
+ return *o.PageSize
+}
+
+// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *TokenPagination) GetPageSizeOk() (*int64, bool) {
+ if o == nil || o.PageSize == nil {
+ return nil, false
+ }
+ return o.PageSize, true
+}
+
+// HasPageSize returns a boolean if a field has been set.
+func (o *TokenPagination) HasPageSize() bool {
+ if o != nil && o.PageSize != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field.
+func (o *TokenPagination) SetPageSize(v int64) {
+ o.PageSize = &v
+}
+
+// GetPageToken returns the PageToken field value if set, zero value otherwise.
+func (o *TokenPagination) GetPageToken() string {
+ if o == nil || o.PageToken == nil {
+ var ret string
+ return ret
+ }
+ return *o.PageToken
+}
+
+// GetPageTokenOk returns a tuple with the PageToken field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *TokenPagination) GetPageTokenOk() (*string, bool) {
+ if o == nil || o.PageToken == nil {
+ return nil, false
+ }
+ return o.PageToken, true
+}
+
+// HasPageToken returns a boolean if a field has been set.
+func (o *TokenPagination) HasPageToken() bool {
+ if o != nil && o.PageToken != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetPageToken gets a reference to the given string and assigns it to the PageToken field.
+func (o *TokenPagination) SetPageToken(v string) {
+ o.PageToken = &v
+}
+
+func (o TokenPagination) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.PageSize != nil {
+ toSerialize["page_size"] = o.PageSize
+ }
+ if o.PageToken != nil {
+ toSerialize["page_token"] = o.PageToken
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableTokenPagination struct {
+ value *TokenPagination
+ isSet bool
+}
+
+func (v NullableTokenPagination) Get() *TokenPagination {
+ return v.value
+}
+
+func (v *NullableTokenPagination) Set(val *TokenPagination) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableTokenPagination) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableTokenPagination) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableTokenPagination(val *TokenPagination) *NullableTokenPagination {
+ return &NullableTokenPagination{value: val, isSet: true}
+}
+
+func (v NullableTokenPagination) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableTokenPagination) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_token_pagination_headers.go b/internal/httpclient/model_token_pagination_headers.go
new file mode 100644
index 000000000000..00e0b840f124
--- /dev/null
+++ b/internal/httpclient/model_token_pagination_headers.go
@@ -0,0 +1,152 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// TokenPaginationHeaders struct for TokenPaginationHeaders
+type TokenPaginationHeaders struct {
+ // The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). in: header
+ Link *string `json:"link,omitempty"`
+ // The total number of clients. in: header
+ XTotalCount *string `json:"x-total-count,omitempty"`
+}
+
+// NewTokenPaginationHeaders instantiates a new TokenPaginationHeaders object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewTokenPaginationHeaders() *TokenPaginationHeaders {
+ this := TokenPaginationHeaders{}
+ return &this
+}
+
+// NewTokenPaginationHeadersWithDefaults instantiates a new TokenPaginationHeaders object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewTokenPaginationHeadersWithDefaults() *TokenPaginationHeaders {
+ this := TokenPaginationHeaders{}
+ return &this
+}
+
+// GetLink returns the Link field value if set, zero value otherwise.
+func (o *TokenPaginationHeaders) GetLink() string {
+ if o == nil || o.Link == nil {
+ var ret string
+ return ret
+ }
+ return *o.Link
+}
+
+// GetLinkOk returns a tuple with the Link field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *TokenPaginationHeaders) GetLinkOk() (*string, bool) {
+ if o == nil || o.Link == nil {
+ return nil, false
+ }
+ return o.Link, true
+}
+
+// HasLink returns a boolean if a field has been set.
+func (o *TokenPaginationHeaders) HasLink() bool {
+ if o != nil && o.Link != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetLink gets a reference to the given string and assigns it to the Link field.
+func (o *TokenPaginationHeaders) SetLink(v string) {
+ o.Link = &v
+}
+
+// GetXTotalCount returns the XTotalCount field value if set, zero value otherwise.
+func (o *TokenPaginationHeaders) GetXTotalCount() string {
+ if o == nil || o.XTotalCount == nil {
+ var ret string
+ return ret
+ }
+ return *o.XTotalCount
+}
+
+// GetXTotalCountOk returns a tuple with the XTotalCount field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *TokenPaginationHeaders) GetXTotalCountOk() (*string, bool) {
+ if o == nil || o.XTotalCount == nil {
+ return nil, false
+ }
+ return o.XTotalCount, true
+}
+
+// HasXTotalCount returns a boolean if a field has been set.
+func (o *TokenPaginationHeaders) HasXTotalCount() bool {
+ if o != nil && o.XTotalCount != nil {
+ return true
+ }
+
+ return false
+}
+
+// SetXTotalCount gets a reference to the given string and assigns it to the XTotalCount field.
+func (o *TokenPaginationHeaders) SetXTotalCount(v string) {
+ o.XTotalCount = &v
+}
+
+func (o TokenPaginationHeaders) MarshalJSON() ([]byte, error) {
+ toSerialize := map[string]interface{}{}
+ if o.Link != nil {
+ toSerialize["link"] = o.Link
+ }
+ if o.XTotalCount != nil {
+ toSerialize["x-total-count"] = o.XTotalCount
+ }
+ return json.Marshal(toSerialize)
+}
+
+type NullableTokenPaginationHeaders struct {
+ value *TokenPaginationHeaders
+ isSet bool
+}
+
+func (v NullableTokenPaginationHeaders) Get() *TokenPaginationHeaders {
+ return v.value
+}
+
+func (v *NullableTokenPaginationHeaders) Set(val *TokenPaginationHeaders) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableTokenPaginationHeaders) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableTokenPaginationHeaders) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableTokenPaginationHeaders(val *TokenPaginationHeaders) *NullableTokenPaginationHeaders {
+ return &NullableTokenPaginationHeaders{value: val, isSet: true}
+}
+
+func (v NullableTokenPaginationHeaders) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableTokenPaginationHeaders) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/internal/httpclient/model_ui_container.go b/internal/httpclient/model_ui_container.go
new file mode 100644
index 000000000000..10ffd75ea4a2
--- /dev/null
+++ b/internal/httpclient/model_ui_container.go
@@ -0,0 +1,203 @@
+/*
+ * Ory Identities API
+ *
+ * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.
+ *
+ * API version:
+ * Contact: office@ory.sh
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package client
+
+import (
+ "encoding/json"
+)
+
+// UiContainer Container represents a HTML Form. The container can work with both HTTP Form and JSON requests
+type UiContainer struct {
+ // Action should be used as the form action URL `