diff --git a/.schema/openapi/patches/selfservice.yaml b/.schema/openapi/patches/selfservice.yaml index a966cf27401e..81d82247586b 100644 --- a/.schema/openapi/patches/selfservice.yaml +++ b/.schema/openapi/patches/selfservice.yaml @@ -18,6 +18,7 @@ - "$ref": "#/components/schemas/updateRegistrationFlowWithOidcMethod" - "$ref": "#/components/schemas/updateRegistrationFlowWithWebAuthnMethod" - "$ref": "#/components/schemas/updateRegistrationFlowWithCodeMethod" + - "$ref": "#/components/schemas/updateRegistrationFlowWithPasskeyMethod" - op: add path: /components/schemas/updateRegistrationFlowBody/discriminator value: @@ -27,6 +28,7 @@ oidc: "#/components/schemas/updateRegistrationFlowWithOidcMethod" webauthn: "#/components/schemas/updateRegistrationFlowWithWebAuthnMethod" code: "#/components/schemas/updateRegistrationFlowWithCodeMethod" + passKey: "#/components/schemas/updateRegistrationFlowWithPasskeyMethod" - op: add path: /components/schemas/registrationFlowState/enum value: @@ -47,6 +49,7 @@ - "$ref": "#/components/schemas/updateLoginFlowWithWebAuthnMethod" - "$ref": "#/components/schemas/updateLoginFlowWithLookupSecretMethod" - "$ref": "#/components/schemas/updateLoginFlowWithCodeMethod" + - "$ref": "#/components/schemas/updateLoginFlowWithPasskeyMethod" - op: add path: /components/schemas/updateLoginFlowBody/discriminator value: @@ -58,6 +61,7 @@ webauthn: "#/components/schemas/updateLoginFlowWithWebAuthnMethod" lookup_secret: "#/components/schemas/updateLoginFlowWithLookupSecretMethod" code: "#/components/schemas/updateLoginFlowWithCodeMethod" + passkey: "#/components/schemas/updateLoginFlowWithPasskeyMethod" - op: add path: /components/schemas/loginFlowState/enum value: @@ -121,10 +125,10 @@ - "$ref": "#/components/schemas/updateSettingsFlowWithPasswordMethod" - "$ref": "#/components/schemas/updateSettingsFlowWithProfileMethod" - "$ref": "#/components/schemas/updateSettingsFlowWithOidcMethod" - - "$ref": "#/components/schemas/updateSettingsFlowWithOidcMethod" - "$ref": "#/components/schemas/updateSettingsFlowWithTotpMethod" - "$ref": "#/components/schemas/updateSettingsFlowWithWebAuthnMethod" - "$ref": "#/components/schemas/updateSettingsFlowWithLookupMethod" + - "$ref": "#/components/schemas/updateSettingsFlowWithPasskeyMethod" - op: add path: /components/schemas/updateSettingsFlowBody/discriminator value: @@ -135,6 +139,7 @@ oidc: "#/components/schemas/updateSettingsFlowWithOidcMethod" totp: "#/components/schemas/updateSettingsFlowWithTotpMethod" webauthn: "#/components/schemas/updateSettingsFlowWithWebAuthnMethod" + passkey: "#/components/schemas/updateSettingsFlowWithPasskeyMethod" lookup_secret: "#/components/schemas/updateSettingsFlowWithLookupMethod" - op: add path: /components/schemas/settingsFlowState/enum diff --git a/internal/client-go/model_update_login_flow_body.go b/internal/client-go/model_update_login_flow_body.go index ac3e4f503292..b8bb05734e3c 100644 --- a/internal/client-go/model_update_login_flow_body.go +++ b/internal/client-go/model_update_login_flow_body.go @@ -21,6 +21,7 @@ type UpdateLoginFlowBody struct { UpdateLoginFlowWithCodeMethod *UpdateLoginFlowWithCodeMethod UpdateLoginFlowWithLookupSecretMethod *UpdateLoginFlowWithLookupSecretMethod UpdateLoginFlowWithOidcMethod *UpdateLoginFlowWithOidcMethod + UpdateLoginFlowWithPasskeyMethod *UpdateLoginFlowWithPasskeyMethod UpdateLoginFlowWithPasswordMethod *UpdateLoginFlowWithPasswordMethod UpdateLoginFlowWithTotpMethod *UpdateLoginFlowWithTotpMethod UpdateLoginFlowWithWebAuthnMethod *UpdateLoginFlowWithWebAuthnMethod @@ -47,6 +48,13 @@ func UpdateLoginFlowWithOidcMethodAsUpdateLoginFlowBody(v *UpdateLoginFlowWithOi } } +// UpdateLoginFlowWithPasskeyMethodAsUpdateLoginFlowBody is a convenience function that returns UpdateLoginFlowWithPasskeyMethod wrapped in UpdateLoginFlowBody +func UpdateLoginFlowWithPasskeyMethodAsUpdateLoginFlowBody(v *UpdateLoginFlowWithPasskeyMethod) UpdateLoginFlowBody { + return UpdateLoginFlowBody{ + UpdateLoginFlowWithPasskeyMethod: v, + } +} + // UpdateLoginFlowWithPasswordMethodAsUpdateLoginFlowBody is a convenience function that returns UpdateLoginFlowWithPasswordMethod wrapped in UpdateLoginFlowBody func UpdateLoginFlowWithPasswordMethodAsUpdateLoginFlowBody(v *UpdateLoginFlowWithPasswordMethod) UpdateLoginFlowBody { return UpdateLoginFlowBody{ @@ -114,6 +122,18 @@ func (dst *UpdateLoginFlowBody) UnmarshalJSON(data []byte) error { } } + // check if the discriminator value is 'passkey' + if jsonDict["method"] == "passkey" { + // try to unmarshal JSON data into UpdateLoginFlowWithPasskeyMethod + err = json.Unmarshal(data, &dst.UpdateLoginFlowWithPasskeyMethod) + if err == nil { + return nil // data stored in dst.UpdateLoginFlowWithPasskeyMethod, return on the first match + } else { + dst.UpdateLoginFlowWithPasskeyMethod = nil + return fmt.Errorf("Failed to unmarshal UpdateLoginFlowBody as UpdateLoginFlowWithPasskeyMethod: %s", err.Error()) + } + } + // check if the discriminator value is 'password' if jsonDict["method"] == "password" { // try to unmarshal JSON data into UpdateLoginFlowWithPasswordMethod @@ -186,6 +206,18 @@ func (dst *UpdateLoginFlowBody) UnmarshalJSON(data []byte) error { } } + // check if the discriminator value is 'updateLoginFlowWithPasskeyMethod' + if jsonDict["method"] == "updateLoginFlowWithPasskeyMethod" { + // try to unmarshal JSON data into UpdateLoginFlowWithPasskeyMethod + err = json.Unmarshal(data, &dst.UpdateLoginFlowWithPasskeyMethod) + if err == nil { + return nil // data stored in dst.UpdateLoginFlowWithPasskeyMethod, return on the first match + } else { + dst.UpdateLoginFlowWithPasskeyMethod = nil + return fmt.Errorf("Failed to unmarshal UpdateLoginFlowBody as UpdateLoginFlowWithPasskeyMethod: %s", err.Error()) + } + } + // check if the discriminator value is 'updateLoginFlowWithPasswordMethod' if jsonDict["method"] == "updateLoginFlowWithPasswordMethod" { // try to unmarshal JSON data into UpdateLoginFlowWithPasswordMethod @@ -239,6 +271,10 @@ func (src UpdateLoginFlowBody) MarshalJSON() ([]byte, error) { return json.Marshal(&src.UpdateLoginFlowWithOidcMethod) } + if src.UpdateLoginFlowWithPasskeyMethod != nil { + return json.Marshal(&src.UpdateLoginFlowWithPasskeyMethod) + } + if src.UpdateLoginFlowWithPasswordMethod != nil { return json.Marshal(&src.UpdateLoginFlowWithPasswordMethod) } @@ -271,6 +307,10 @@ func (obj *UpdateLoginFlowBody) GetActualInstance() interface{} { return obj.UpdateLoginFlowWithOidcMethod } + if obj.UpdateLoginFlowWithPasskeyMethod != nil { + return obj.UpdateLoginFlowWithPasskeyMethod + } + if obj.UpdateLoginFlowWithPasswordMethod != nil { return obj.UpdateLoginFlowWithPasswordMethod } diff --git a/internal/client-go/model_update_registration_flow_body.go b/internal/client-go/model_update_registration_flow_body.go index 7272ea1ace1a..64374c620f8f 100644 --- a/internal/client-go/model_update_registration_flow_body.go +++ b/internal/client-go/model_update_registration_flow_body.go @@ -20,6 +20,7 @@ import ( type UpdateRegistrationFlowBody struct { UpdateRegistrationFlowWithCodeMethod *UpdateRegistrationFlowWithCodeMethod UpdateRegistrationFlowWithOidcMethod *UpdateRegistrationFlowWithOidcMethod + UpdateRegistrationFlowWithPasskeyMethod *UpdateRegistrationFlowWithPasskeyMethod UpdateRegistrationFlowWithPasswordMethod *UpdateRegistrationFlowWithPasswordMethod UpdateRegistrationFlowWithWebAuthnMethod *UpdateRegistrationFlowWithWebAuthnMethod } @@ -38,6 +39,13 @@ func UpdateRegistrationFlowWithOidcMethodAsUpdateRegistrationFlowBody(v *UpdateR } } +// UpdateRegistrationFlowWithPasskeyMethodAsUpdateRegistrationFlowBody is a convenience function that returns UpdateRegistrationFlowWithPasskeyMethod wrapped in UpdateRegistrationFlowBody +func UpdateRegistrationFlowWithPasskeyMethodAsUpdateRegistrationFlowBody(v *UpdateRegistrationFlowWithPasskeyMethod) UpdateRegistrationFlowBody { + return UpdateRegistrationFlowBody{ + UpdateRegistrationFlowWithPasskeyMethod: v, + } +} + // UpdateRegistrationFlowWithPasswordMethodAsUpdateRegistrationFlowBody is a convenience function that returns UpdateRegistrationFlowWithPasswordMethod wrapped in UpdateRegistrationFlowBody func UpdateRegistrationFlowWithPasswordMethodAsUpdateRegistrationFlowBody(v *UpdateRegistrationFlowWithPasswordMethod) UpdateRegistrationFlowBody { return UpdateRegistrationFlowBody{ @@ -86,6 +94,18 @@ func (dst *UpdateRegistrationFlowBody) UnmarshalJSON(data []byte) error { } } + // check if the discriminator value is 'passKey' + if jsonDict["method"] == "passKey" { + // try to unmarshal JSON data into UpdateRegistrationFlowWithPasskeyMethod + err = json.Unmarshal(data, &dst.UpdateRegistrationFlowWithPasskeyMethod) + if err == nil { + return nil // data stored in dst.UpdateRegistrationFlowWithPasskeyMethod, return on the first match + } else { + dst.UpdateRegistrationFlowWithPasskeyMethod = nil + return fmt.Errorf("Failed to unmarshal UpdateRegistrationFlowBody as UpdateRegistrationFlowWithPasskeyMethod: %s", err.Error()) + } + } + // check if the discriminator value is 'password' if jsonDict["method"] == "password" { // try to unmarshal JSON data into UpdateRegistrationFlowWithPasswordMethod @@ -134,6 +154,18 @@ func (dst *UpdateRegistrationFlowBody) UnmarshalJSON(data []byte) error { } } + // check if the discriminator value is 'updateRegistrationFlowWithPasskeyMethod' + if jsonDict["method"] == "updateRegistrationFlowWithPasskeyMethod" { + // try to unmarshal JSON data into UpdateRegistrationFlowWithPasskeyMethod + err = json.Unmarshal(data, &dst.UpdateRegistrationFlowWithPasskeyMethod) + if err == nil { + return nil // data stored in dst.UpdateRegistrationFlowWithPasskeyMethod, return on the first match + } else { + dst.UpdateRegistrationFlowWithPasskeyMethod = nil + return fmt.Errorf("Failed to unmarshal UpdateRegistrationFlowBody as UpdateRegistrationFlowWithPasskeyMethod: %s", err.Error()) + } + } + // check if the discriminator value is 'updateRegistrationFlowWithPasswordMethod' if jsonDict["method"] == "updateRegistrationFlowWithPasswordMethod" { // try to unmarshal JSON data into UpdateRegistrationFlowWithPasswordMethod @@ -171,6 +203,10 @@ func (src UpdateRegistrationFlowBody) MarshalJSON() ([]byte, error) { return json.Marshal(&src.UpdateRegistrationFlowWithOidcMethod) } + if src.UpdateRegistrationFlowWithPasskeyMethod != nil { + return json.Marshal(&src.UpdateRegistrationFlowWithPasskeyMethod) + } + if src.UpdateRegistrationFlowWithPasswordMethod != nil { return json.Marshal(&src.UpdateRegistrationFlowWithPasswordMethod) } @@ -195,6 +231,10 @@ func (obj *UpdateRegistrationFlowBody) GetActualInstance() interface{} { return obj.UpdateRegistrationFlowWithOidcMethod } + if obj.UpdateRegistrationFlowWithPasskeyMethod != nil { + return obj.UpdateRegistrationFlowWithPasskeyMethod + } + if obj.UpdateRegistrationFlowWithPasswordMethod != nil { return obj.UpdateRegistrationFlowWithPasswordMethod } diff --git a/internal/client-go/model_update_settings_flow_body.go b/internal/client-go/model_update_settings_flow_body.go index e2aec380a586..cb1edae41d31 100644 --- a/internal/client-go/model_update_settings_flow_body.go +++ b/internal/client-go/model_update_settings_flow_body.go @@ -20,6 +20,7 @@ import ( type UpdateSettingsFlowBody struct { UpdateSettingsFlowWithLookupMethod *UpdateSettingsFlowWithLookupMethod UpdateSettingsFlowWithOidcMethod *UpdateSettingsFlowWithOidcMethod + UpdateSettingsFlowWithPasskeyMethod *UpdateSettingsFlowWithPasskeyMethod UpdateSettingsFlowWithPasswordMethod *UpdateSettingsFlowWithPasswordMethod UpdateSettingsFlowWithProfileMethod *UpdateSettingsFlowWithProfileMethod UpdateSettingsFlowWithTotpMethod *UpdateSettingsFlowWithTotpMethod @@ -40,6 +41,13 @@ func UpdateSettingsFlowWithOidcMethodAsUpdateSettingsFlowBody(v *UpdateSettingsF } } +// UpdateSettingsFlowWithPasskeyMethodAsUpdateSettingsFlowBody is a convenience function that returns UpdateSettingsFlowWithPasskeyMethod wrapped in UpdateSettingsFlowBody +func UpdateSettingsFlowWithPasskeyMethodAsUpdateSettingsFlowBody(v *UpdateSettingsFlowWithPasskeyMethod) UpdateSettingsFlowBody { + return UpdateSettingsFlowBody{ + UpdateSettingsFlowWithPasskeyMethod: v, + } +} + // UpdateSettingsFlowWithPasswordMethodAsUpdateSettingsFlowBody is a convenience function that returns UpdateSettingsFlowWithPasswordMethod wrapped in UpdateSettingsFlowBody func UpdateSettingsFlowWithPasswordMethodAsUpdateSettingsFlowBody(v *UpdateSettingsFlowWithPasswordMethod) UpdateSettingsFlowBody { return UpdateSettingsFlowBody{ @@ -102,6 +110,18 @@ func (dst *UpdateSettingsFlowBody) UnmarshalJSON(data []byte) error { } } + // check if the discriminator value is 'passkey' + if jsonDict["method"] == "passkey" { + // try to unmarshal JSON data into UpdateSettingsFlowWithPasskeyMethod + err = json.Unmarshal(data, &dst.UpdateSettingsFlowWithPasskeyMethod) + if err == nil { + return nil // data stored in dst.UpdateSettingsFlowWithPasskeyMethod, return on the first match + } else { + dst.UpdateSettingsFlowWithPasskeyMethod = nil + return fmt.Errorf("Failed to unmarshal UpdateSettingsFlowBody as UpdateSettingsFlowWithPasskeyMethod: %s", err.Error()) + } + } + // check if the discriminator value is 'password' if jsonDict["method"] == "password" { // try to unmarshal JSON data into UpdateSettingsFlowWithPasswordMethod @@ -174,6 +194,18 @@ func (dst *UpdateSettingsFlowBody) UnmarshalJSON(data []byte) error { } } + // check if the discriminator value is 'updateSettingsFlowWithPasskeyMethod' + if jsonDict["method"] == "updateSettingsFlowWithPasskeyMethod" { + // try to unmarshal JSON data into UpdateSettingsFlowWithPasskeyMethod + err = json.Unmarshal(data, &dst.UpdateSettingsFlowWithPasskeyMethod) + if err == nil { + return nil // data stored in dst.UpdateSettingsFlowWithPasskeyMethod, return on the first match + } else { + dst.UpdateSettingsFlowWithPasskeyMethod = nil + return fmt.Errorf("Failed to unmarshal UpdateSettingsFlowBody as UpdateSettingsFlowWithPasskeyMethod: %s", err.Error()) + } + } + // check if the discriminator value is 'updateSettingsFlowWithPasswordMethod' if jsonDict["method"] == "updateSettingsFlowWithPasswordMethod" { // try to unmarshal JSON data into UpdateSettingsFlowWithPasswordMethod @@ -235,6 +267,10 @@ func (src UpdateSettingsFlowBody) MarshalJSON() ([]byte, error) { return json.Marshal(&src.UpdateSettingsFlowWithOidcMethod) } + if src.UpdateSettingsFlowWithPasskeyMethod != nil { + return json.Marshal(&src.UpdateSettingsFlowWithPasskeyMethod) + } + if src.UpdateSettingsFlowWithPasswordMethod != nil { return json.Marshal(&src.UpdateSettingsFlowWithPasswordMethod) } @@ -267,6 +303,10 @@ func (obj *UpdateSettingsFlowBody) GetActualInstance() interface{} { return obj.UpdateSettingsFlowWithOidcMethod } + if obj.UpdateSettingsFlowWithPasskeyMethod != nil { + return obj.UpdateSettingsFlowWithPasskeyMethod + } + if obj.UpdateSettingsFlowWithPasswordMethod != nil { return obj.UpdateSettingsFlowWithPasswordMethod } diff --git a/internal/httpclient/model_update_login_flow_body.go b/internal/httpclient/model_update_login_flow_body.go index ac3e4f503292..b8bb05734e3c 100644 --- a/internal/httpclient/model_update_login_flow_body.go +++ b/internal/httpclient/model_update_login_flow_body.go @@ -21,6 +21,7 @@ type UpdateLoginFlowBody struct { UpdateLoginFlowWithCodeMethod *UpdateLoginFlowWithCodeMethod UpdateLoginFlowWithLookupSecretMethod *UpdateLoginFlowWithLookupSecretMethod UpdateLoginFlowWithOidcMethod *UpdateLoginFlowWithOidcMethod + UpdateLoginFlowWithPasskeyMethod *UpdateLoginFlowWithPasskeyMethod UpdateLoginFlowWithPasswordMethod *UpdateLoginFlowWithPasswordMethod UpdateLoginFlowWithTotpMethod *UpdateLoginFlowWithTotpMethod UpdateLoginFlowWithWebAuthnMethod *UpdateLoginFlowWithWebAuthnMethod @@ -47,6 +48,13 @@ func UpdateLoginFlowWithOidcMethodAsUpdateLoginFlowBody(v *UpdateLoginFlowWithOi } } +// UpdateLoginFlowWithPasskeyMethodAsUpdateLoginFlowBody is a convenience function that returns UpdateLoginFlowWithPasskeyMethod wrapped in UpdateLoginFlowBody +func UpdateLoginFlowWithPasskeyMethodAsUpdateLoginFlowBody(v *UpdateLoginFlowWithPasskeyMethod) UpdateLoginFlowBody { + return UpdateLoginFlowBody{ + UpdateLoginFlowWithPasskeyMethod: v, + } +} + // UpdateLoginFlowWithPasswordMethodAsUpdateLoginFlowBody is a convenience function that returns UpdateLoginFlowWithPasswordMethod wrapped in UpdateLoginFlowBody func UpdateLoginFlowWithPasswordMethodAsUpdateLoginFlowBody(v *UpdateLoginFlowWithPasswordMethod) UpdateLoginFlowBody { return UpdateLoginFlowBody{ @@ -114,6 +122,18 @@ func (dst *UpdateLoginFlowBody) UnmarshalJSON(data []byte) error { } } + // check if the discriminator value is 'passkey' + if jsonDict["method"] == "passkey" { + // try to unmarshal JSON data into UpdateLoginFlowWithPasskeyMethod + err = json.Unmarshal(data, &dst.UpdateLoginFlowWithPasskeyMethod) + if err == nil { + return nil // data stored in dst.UpdateLoginFlowWithPasskeyMethod, return on the first match + } else { + dst.UpdateLoginFlowWithPasskeyMethod = nil + return fmt.Errorf("Failed to unmarshal UpdateLoginFlowBody as UpdateLoginFlowWithPasskeyMethod: %s", err.Error()) + } + } + // check if the discriminator value is 'password' if jsonDict["method"] == "password" { // try to unmarshal JSON data into UpdateLoginFlowWithPasswordMethod @@ -186,6 +206,18 @@ func (dst *UpdateLoginFlowBody) UnmarshalJSON(data []byte) error { } } + // check if the discriminator value is 'updateLoginFlowWithPasskeyMethod' + if jsonDict["method"] == "updateLoginFlowWithPasskeyMethod" { + // try to unmarshal JSON data into UpdateLoginFlowWithPasskeyMethod + err = json.Unmarshal(data, &dst.UpdateLoginFlowWithPasskeyMethod) + if err == nil { + return nil // data stored in dst.UpdateLoginFlowWithPasskeyMethod, return on the first match + } else { + dst.UpdateLoginFlowWithPasskeyMethod = nil + return fmt.Errorf("Failed to unmarshal UpdateLoginFlowBody as UpdateLoginFlowWithPasskeyMethod: %s", err.Error()) + } + } + // check if the discriminator value is 'updateLoginFlowWithPasswordMethod' if jsonDict["method"] == "updateLoginFlowWithPasswordMethod" { // try to unmarshal JSON data into UpdateLoginFlowWithPasswordMethod @@ -239,6 +271,10 @@ func (src UpdateLoginFlowBody) MarshalJSON() ([]byte, error) { return json.Marshal(&src.UpdateLoginFlowWithOidcMethod) } + if src.UpdateLoginFlowWithPasskeyMethod != nil { + return json.Marshal(&src.UpdateLoginFlowWithPasskeyMethod) + } + if src.UpdateLoginFlowWithPasswordMethod != nil { return json.Marshal(&src.UpdateLoginFlowWithPasswordMethod) } @@ -271,6 +307,10 @@ func (obj *UpdateLoginFlowBody) GetActualInstance() interface{} { return obj.UpdateLoginFlowWithOidcMethod } + if obj.UpdateLoginFlowWithPasskeyMethod != nil { + return obj.UpdateLoginFlowWithPasskeyMethod + } + if obj.UpdateLoginFlowWithPasswordMethod != nil { return obj.UpdateLoginFlowWithPasswordMethod } diff --git a/internal/httpclient/model_update_registration_flow_body.go b/internal/httpclient/model_update_registration_flow_body.go index 7272ea1ace1a..64374c620f8f 100644 --- a/internal/httpclient/model_update_registration_flow_body.go +++ b/internal/httpclient/model_update_registration_flow_body.go @@ -20,6 +20,7 @@ import ( type UpdateRegistrationFlowBody struct { UpdateRegistrationFlowWithCodeMethod *UpdateRegistrationFlowWithCodeMethod UpdateRegistrationFlowWithOidcMethod *UpdateRegistrationFlowWithOidcMethod + UpdateRegistrationFlowWithPasskeyMethod *UpdateRegistrationFlowWithPasskeyMethod UpdateRegistrationFlowWithPasswordMethod *UpdateRegistrationFlowWithPasswordMethod UpdateRegistrationFlowWithWebAuthnMethod *UpdateRegistrationFlowWithWebAuthnMethod } @@ -38,6 +39,13 @@ func UpdateRegistrationFlowWithOidcMethodAsUpdateRegistrationFlowBody(v *UpdateR } } +// UpdateRegistrationFlowWithPasskeyMethodAsUpdateRegistrationFlowBody is a convenience function that returns UpdateRegistrationFlowWithPasskeyMethod wrapped in UpdateRegistrationFlowBody +func UpdateRegistrationFlowWithPasskeyMethodAsUpdateRegistrationFlowBody(v *UpdateRegistrationFlowWithPasskeyMethod) UpdateRegistrationFlowBody { + return UpdateRegistrationFlowBody{ + UpdateRegistrationFlowWithPasskeyMethod: v, + } +} + // UpdateRegistrationFlowWithPasswordMethodAsUpdateRegistrationFlowBody is a convenience function that returns UpdateRegistrationFlowWithPasswordMethod wrapped in UpdateRegistrationFlowBody func UpdateRegistrationFlowWithPasswordMethodAsUpdateRegistrationFlowBody(v *UpdateRegistrationFlowWithPasswordMethod) UpdateRegistrationFlowBody { return UpdateRegistrationFlowBody{ @@ -86,6 +94,18 @@ func (dst *UpdateRegistrationFlowBody) UnmarshalJSON(data []byte) error { } } + // check if the discriminator value is 'passKey' + if jsonDict["method"] == "passKey" { + // try to unmarshal JSON data into UpdateRegistrationFlowWithPasskeyMethod + err = json.Unmarshal(data, &dst.UpdateRegistrationFlowWithPasskeyMethod) + if err == nil { + return nil // data stored in dst.UpdateRegistrationFlowWithPasskeyMethod, return on the first match + } else { + dst.UpdateRegistrationFlowWithPasskeyMethod = nil + return fmt.Errorf("Failed to unmarshal UpdateRegistrationFlowBody as UpdateRegistrationFlowWithPasskeyMethod: %s", err.Error()) + } + } + // check if the discriminator value is 'password' if jsonDict["method"] == "password" { // try to unmarshal JSON data into UpdateRegistrationFlowWithPasswordMethod @@ -134,6 +154,18 @@ func (dst *UpdateRegistrationFlowBody) UnmarshalJSON(data []byte) error { } } + // check if the discriminator value is 'updateRegistrationFlowWithPasskeyMethod' + if jsonDict["method"] == "updateRegistrationFlowWithPasskeyMethod" { + // try to unmarshal JSON data into UpdateRegistrationFlowWithPasskeyMethod + err = json.Unmarshal(data, &dst.UpdateRegistrationFlowWithPasskeyMethod) + if err == nil { + return nil // data stored in dst.UpdateRegistrationFlowWithPasskeyMethod, return on the first match + } else { + dst.UpdateRegistrationFlowWithPasskeyMethod = nil + return fmt.Errorf("Failed to unmarshal UpdateRegistrationFlowBody as UpdateRegistrationFlowWithPasskeyMethod: %s", err.Error()) + } + } + // check if the discriminator value is 'updateRegistrationFlowWithPasswordMethod' if jsonDict["method"] == "updateRegistrationFlowWithPasswordMethod" { // try to unmarshal JSON data into UpdateRegistrationFlowWithPasswordMethod @@ -171,6 +203,10 @@ func (src UpdateRegistrationFlowBody) MarshalJSON() ([]byte, error) { return json.Marshal(&src.UpdateRegistrationFlowWithOidcMethod) } + if src.UpdateRegistrationFlowWithPasskeyMethod != nil { + return json.Marshal(&src.UpdateRegistrationFlowWithPasskeyMethod) + } + if src.UpdateRegistrationFlowWithPasswordMethod != nil { return json.Marshal(&src.UpdateRegistrationFlowWithPasswordMethod) } @@ -195,6 +231,10 @@ func (obj *UpdateRegistrationFlowBody) GetActualInstance() interface{} { return obj.UpdateRegistrationFlowWithOidcMethod } + if obj.UpdateRegistrationFlowWithPasskeyMethod != nil { + return obj.UpdateRegistrationFlowWithPasskeyMethod + } + if obj.UpdateRegistrationFlowWithPasswordMethod != nil { return obj.UpdateRegistrationFlowWithPasswordMethod } diff --git a/internal/httpclient/model_update_settings_flow_body.go b/internal/httpclient/model_update_settings_flow_body.go index e2aec380a586..cb1edae41d31 100644 --- a/internal/httpclient/model_update_settings_flow_body.go +++ b/internal/httpclient/model_update_settings_flow_body.go @@ -20,6 +20,7 @@ import ( type UpdateSettingsFlowBody struct { UpdateSettingsFlowWithLookupMethod *UpdateSettingsFlowWithLookupMethod UpdateSettingsFlowWithOidcMethod *UpdateSettingsFlowWithOidcMethod + UpdateSettingsFlowWithPasskeyMethod *UpdateSettingsFlowWithPasskeyMethod UpdateSettingsFlowWithPasswordMethod *UpdateSettingsFlowWithPasswordMethod UpdateSettingsFlowWithProfileMethod *UpdateSettingsFlowWithProfileMethod UpdateSettingsFlowWithTotpMethod *UpdateSettingsFlowWithTotpMethod @@ -40,6 +41,13 @@ func UpdateSettingsFlowWithOidcMethodAsUpdateSettingsFlowBody(v *UpdateSettingsF } } +// UpdateSettingsFlowWithPasskeyMethodAsUpdateSettingsFlowBody is a convenience function that returns UpdateSettingsFlowWithPasskeyMethod wrapped in UpdateSettingsFlowBody +func UpdateSettingsFlowWithPasskeyMethodAsUpdateSettingsFlowBody(v *UpdateSettingsFlowWithPasskeyMethod) UpdateSettingsFlowBody { + return UpdateSettingsFlowBody{ + UpdateSettingsFlowWithPasskeyMethod: v, + } +} + // UpdateSettingsFlowWithPasswordMethodAsUpdateSettingsFlowBody is a convenience function that returns UpdateSettingsFlowWithPasswordMethod wrapped in UpdateSettingsFlowBody func UpdateSettingsFlowWithPasswordMethodAsUpdateSettingsFlowBody(v *UpdateSettingsFlowWithPasswordMethod) UpdateSettingsFlowBody { return UpdateSettingsFlowBody{ @@ -102,6 +110,18 @@ func (dst *UpdateSettingsFlowBody) UnmarshalJSON(data []byte) error { } } + // check if the discriminator value is 'passkey' + if jsonDict["method"] == "passkey" { + // try to unmarshal JSON data into UpdateSettingsFlowWithPasskeyMethod + err = json.Unmarshal(data, &dst.UpdateSettingsFlowWithPasskeyMethod) + if err == nil { + return nil // data stored in dst.UpdateSettingsFlowWithPasskeyMethod, return on the first match + } else { + dst.UpdateSettingsFlowWithPasskeyMethod = nil + return fmt.Errorf("Failed to unmarshal UpdateSettingsFlowBody as UpdateSettingsFlowWithPasskeyMethod: %s", err.Error()) + } + } + // check if the discriminator value is 'password' if jsonDict["method"] == "password" { // try to unmarshal JSON data into UpdateSettingsFlowWithPasswordMethod @@ -174,6 +194,18 @@ func (dst *UpdateSettingsFlowBody) UnmarshalJSON(data []byte) error { } } + // check if the discriminator value is 'updateSettingsFlowWithPasskeyMethod' + if jsonDict["method"] == "updateSettingsFlowWithPasskeyMethod" { + // try to unmarshal JSON data into UpdateSettingsFlowWithPasskeyMethod + err = json.Unmarshal(data, &dst.UpdateSettingsFlowWithPasskeyMethod) + if err == nil { + return nil // data stored in dst.UpdateSettingsFlowWithPasskeyMethod, return on the first match + } else { + dst.UpdateSettingsFlowWithPasskeyMethod = nil + return fmt.Errorf("Failed to unmarshal UpdateSettingsFlowBody as UpdateSettingsFlowWithPasskeyMethod: %s", err.Error()) + } + } + // check if the discriminator value is 'updateSettingsFlowWithPasswordMethod' if jsonDict["method"] == "updateSettingsFlowWithPasswordMethod" { // try to unmarshal JSON data into UpdateSettingsFlowWithPasswordMethod @@ -235,6 +267,10 @@ func (src UpdateSettingsFlowBody) MarshalJSON() ([]byte, error) { return json.Marshal(&src.UpdateSettingsFlowWithOidcMethod) } + if src.UpdateSettingsFlowWithPasskeyMethod != nil { + return json.Marshal(&src.UpdateSettingsFlowWithPasskeyMethod) + } + if src.UpdateSettingsFlowWithPasswordMethod != nil { return json.Marshal(&src.UpdateSettingsFlowWithPasswordMethod) } @@ -267,6 +303,10 @@ func (obj *UpdateSettingsFlowBody) GetActualInstance() interface{} { return obj.UpdateSettingsFlowWithOidcMethod } + if obj.UpdateSettingsFlowWithPasskeyMethod != nil { + return obj.UpdateSettingsFlowWithPasskeyMethod + } + if obj.UpdateSettingsFlowWithPasswordMethod != nil { return obj.UpdateSettingsFlowWithPasswordMethod } diff --git a/spec/api.json b/spec/api.json index 0f46469df162..84202310f0a4 100644 --- a/spec/api.json +++ b/spec/api.json @@ -2594,6 +2594,7 @@ "code": "#/components/schemas/updateLoginFlowWithCodeMethod", "lookup_secret": "#/components/schemas/updateLoginFlowWithLookupSecretMethod", "oidc": "#/components/schemas/updateLoginFlowWithOidcMethod", + "passkey": "#/components/schemas/updateLoginFlowWithPasskeyMethod", "password": "#/components/schemas/updateLoginFlowWithPasswordMethod", "totp": "#/components/schemas/updateLoginFlowWithTotpMethod", "webauthn": "#/components/schemas/updateLoginFlowWithWebAuthnMethod" @@ -2618,6 +2619,9 @@ }, { "$ref": "#/components/schemas/updateLoginFlowWithCodeMethod" + }, + { + "$ref": "#/components/schemas/updateLoginFlowWithPasskeyMethod" } ] }, @@ -2920,6 +2924,7 @@ "mapping": { "code": "#/components/schemas/updateRegistrationFlowWithCodeMethod", "oidc": "#/components/schemas/updateRegistrationFlowWithOidcMethod", + "passKey": "#/components/schemas/updateRegistrationFlowWithPasskeyMethod", "password": "#/components/schemas/updateRegistrationFlowWithPasswordMethod", "webauthn": "#/components/schemas/updateRegistrationFlowWithWebAuthnMethod" }, @@ -2937,6 +2942,9 @@ }, { "$ref": "#/components/schemas/updateRegistrationFlowWithCodeMethod" + }, + { + "$ref": "#/components/schemas/updateRegistrationFlowWithPasskeyMethod" } ] }, @@ -3147,6 +3155,7 @@ "mapping": { "lookup_secret": "#/components/schemas/updateSettingsFlowWithLookupMethod", "oidc": "#/components/schemas/updateSettingsFlowWithOidcMethod", + "passkey": "#/components/schemas/updateSettingsFlowWithPasskeyMethod", "password": "#/components/schemas/updateSettingsFlowWithPasswordMethod", "profile": "#/components/schemas/updateSettingsFlowWithProfileMethod", "totp": "#/components/schemas/updateSettingsFlowWithTotpMethod", @@ -3164,9 +3173,6 @@ { "$ref": "#/components/schemas/updateSettingsFlowWithOidcMethod" }, - { - "$ref": "#/components/schemas/updateSettingsFlowWithOidcMethod" - }, { "$ref": "#/components/schemas/updateSettingsFlowWithTotpMethod" }, @@ -3175,6 +3181,9 @@ }, { "$ref": "#/components/schemas/updateSettingsFlowWithLookupMethod" + }, + { + "$ref": "#/components/schemas/updateSettingsFlowWithPasskeyMethod" } ] },