diff --git a/.schema/openapi/patches/selfservice.yaml b/.schema/openapi/patches/selfservice.yaml index 05f1e5e5e406..42bf8c4874dd 100644 --- a/.schema/openapi/patches/selfservice.yaml +++ b/.schema/openapi/patches/selfservice.yaml @@ -16,6 +16,7 @@ value: - "$ref": "#/components/schemas/submitSelfServiceRegistrationFlowWithPasswordMethodBody" - "$ref": "#/components/schemas/submitSelfServiceRegistrationFlowWithOidcMethodBody" + - "$ref": "#/components/schemas/submitSelfServiceRegistrationFlowWithWebAuthnMethodBody" - op: add path: /components/schemas/submitSelfServiceRegistrationFlowBody/discriminator value: @@ -23,6 +24,7 @@ mapping: password: "#/components/schemas/submitSelfServiceRegistrationFlowWithPasswordMethodBody" oidc: "#/components/schemas/submitSelfServiceRegistrationFlowWithOidcMethodBody" + webauthn: "#/components/schemas/submitSelfServiceRegistrationFlowWithWebAuthnMethodBody" # end # All modifications for the login flow @@ -34,6 +36,8 @@ - "$ref": "#/components/schemas/submitSelfServiceLoginFlowWithPasswordMethodBody" - "$ref": "#/components/schemas/submitSelfServiceLoginFlowWithOidcMethodBody" - "$ref": "#/components/schemas/submitSelfServiceLoginFlowWithTotpMethodBody" + - "$ref": "#/components/schemas/submitSelfServiceLoginFlowWithWebAuthnMethodBody" + - "$ref": "#/components/schemas/submitSelfServiceLoginFlowWithLookupSecretMethodBody" - op: add path: /components/schemas/submitSelfServiceLoginFlowBody/discriminator value: @@ -42,6 +46,8 @@ password: "#/components/schemas/submitSelfServiceLoginFlowWithPasswordMethodBody" oidc: "#/components/schemas/submitSelfServiceLoginFlowWithOidcMethodBody" totp: "#/components/schemas/submitSelfServiceLoginFlowWithTotpMethodBody" + webauthn: "#/components/schemas/submitSelfServiceLoginFlowWithWebAuthnMethodBody" + lookup_secret: "#/components/schemas/submitSelfServiceLoginFlowWithLookupSecretMethodBody" # end # All modifications for the recovery flow @@ -97,6 +103,8 @@ - "$ref": "#/components/schemas/submitSelfServiceSettingsFlowWithOidcMethodBody" - "$ref": "#/components/schemas/submitSelfServiceSettingsFlowWithOidcMethodBody" - "$ref": "#/components/schemas/submitSelfServiceSettingsFlowWithTotpMethodBody" + - "$ref": "#/components/schemas/submitSelfServiceSettingsFlowWithWebAuthnMethodBody" + - "$ref": "#/components/schemas/submitSelfServiceSettingsFlowWithLookupMethodBody" - op: add path: /components/schemas/submitSelfServiceSettingsFlowBody/discriminator value: @@ -106,6 +114,8 @@ profile: "#/components/schemas/submitSelfServiceSettingsFlowWithProfileMethodBody" oidc: "#/components/schemas/submitSelfServiceSettingsFlowWithOidcMethodBody" totp: "#/components/schemas/submitSelfServiceSettingsFlowWithTotpMethodBody" + webauthn: "#/components/schemas/submitSelfServiceSettingsFlowWithWebAuthnMethodBody" + lookup_secret: "#/components/schemas/submitSelfServiceSettingsFlowWithLookupMethodBody" - op: add path: /components/schemas/selfServiceSettingsFlowState/enum value: diff --git a/internal/httpclient/.openapi-generator/FILES b/internal/httpclient/.openapi-generator/FILES index da1e30ed3d83..24b1600e0f74 100644 --- a/internal/httpclient/.openapi-generator/FILES +++ b/internal/httpclient/.openapi-generator/FILES @@ -55,6 +55,7 @@ docs/Session.md docs/SessionAuthenticationMethod.md docs/SessionDevice.md docs/SettingsProfileFormConfig.md +docs/SubmitSelfServiceFlowWithWebAuthnRegistrationMethod.md docs/SubmitSelfServiceLoginFlowBody.md docs/SubmitSelfServiceLoginFlowWithLookupSecretMethodBody.md docs/SubmitSelfServiceLoginFlowWithOidcMethodBody.md @@ -67,6 +68,7 @@ docs/SubmitSelfServiceRecoveryFlowWithLinkMethodBody.md docs/SubmitSelfServiceRegistrationFlowBody.md docs/SubmitSelfServiceRegistrationFlowWithOidcMethodBody.md docs/SubmitSelfServiceRegistrationFlowWithPasswordMethodBody.md +docs/SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody.md docs/SubmitSelfServiceSettingsFlowBody.md docs/SubmitSelfServiceSettingsFlowWithLookupMethodBody.md docs/SubmitSelfServiceSettingsFlowWithOidcMethodBody.md @@ -141,6 +143,7 @@ model_session.go model_session_authentication_method.go model_session_device.go model_settings_profile_form_config.go +model_submit_self_service_flow_with_web_authn_registration_method.go model_submit_self_service_login_flow_body.go model_submit_self_service_login_flow_with_lookup_secret_method_body.go model_submit_self_service_login_flow_with_oidc_method_body.go @@ -153,6 +156,7 @@ model_submit_self_service_recovery_flow_with_link_method_body.go model_submit_self_service_registration_flow_body.go model_submit_self_service_registration_flow_with_oidc_method_body.go model_submit_self_service_registration_flow_with_password_method_body.go +model_submit_self_service_registration_flow_with_web_authn_method_body.go model_submit_self_service_settings_flow_body.go model_submit_self_service_settings_flow_with_lookup_method_body.go model_submit_self_service_settings_flow_with_oidc_method_body.go diff --git a/internal/httpclient/README.md b/internal/httpclient/README.md index 6e6a547954e4..099e428670c6 100644 --- a/internal/httpclient/README.md +++ b/internal/httpclient/README.md @@ -176,6 +176,7 @@ Class | Method | HTTP request | Description - [SessionAuthenticationMethod](docs/SessionAuthenticationMethod.md) - [SessionDevice](docs/SessionDevice.md) - [SettingsProfileFormConfig](docs/SettingsProfileFormConfig.md) + - [SubmitSelfServiceFlowWithWebAuthnRegistrationMethod](docs/SubmitSelfServiceFlowWithWebAuthnRegistrationMethod.md) - [SubmitSelfServiceLoginFlowBody](docs/SubmitSelfServiceLoginFlowBody.md) - [SubmitSelfServiceLoginFlowWithLookupSecretMethodBody](docs/SubmitSelfServiceLoginFlowWithLookupSecretMethodBody.md) - [SubmitSelfServiceLoginFlowWithOidcMethodBody](docs/SubmitSelfServiceLoginFlowWithOidcMethodBody.md) @@ -188,6 +189,7 @@ Class | Method | HTTP request | Description - [SubmitSelfServiceRegistrationFlowBody](docs/SubmitSelfServiceRegistrationFlowBody.md) - [SubmitSelfServiceRegistrationFlowWithOidcMethodBody](docs/SubmitSelfServiceRegistrationFlowWithOidcMethodBody.md) - [SubmitSelfServiceRegistrationFlowWithPasswordMethodBody](docs/SubmitSelfServiceRegistrationFlowWithPasswordMethodBody.md) + - [SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody](docs/SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody.md) - [SubmitSelfServiceSettingsFlowBody](docs/SubmitSelfServiceSettingsFlowBody.md) - [SubmitSelfServiceSettingsFlowWithLookupMethodBody](docs/SubmitSelfServiceSettingsFlowWithLookupMethodBody.md) - [SubmitSelfServiceSettingsFlowWithOidcMethodBody](docs/SubmitSelfServiceSettingsFlowWithOidcMethodBody.md) diff --git a/internal/httpclient/api/openapi.yaml b/internal/httpclient/api/openapi.yaml index bc512b6ae0b2..320f88c84ee8 100644 --- a/internal/httpclient/api/openapi.yaml +++ b/internal/httpclient/api/openapi.yaml @@ -122,9 +122,9 @@ paths: name: page required: false schema: - default: 0 + default: 1 format: int64 - minimum: 0 + minimum: 1 type: integer style: form responses: @@ -424,9 +424,9 @@ paths: name: page required: false schema: - default: 0 + default: 1 format: int64 - minimum: 0 + minimum: 1 type: integer style: form - description: Active is a boolean flag that filters out sessions based on the @@ -540,9 +540,9 @@ paths: name: page required: false schema: - default: 0 + default: 1 format: int64 - minimum: 0 + minimum: 1 type: integer style: form responses: @@ -2354,9 +2354,9 @@ paths: name: page required: false schema: - default: 0 + default: 1 format: int64 - minimum: 0 + minimum: 1 type: integer style: form responses: @@ -2909,6 +2909,7 @@ components: - identifiers created_at: 2000-01-23T04:56:07.000+00:00 config: '{}' + version: 0 verifiable_addresses: - updated_at: 2014-01-01T23:28:56.782Z verified_at: 2000-01-23T04:56:07.000+00:00 @@ -3000,6 +3001,7 @@ components: - identifiers created_at: 2000-01-23T04:56:07.000+00:00 config: '{}' + version: 0 properties: config: title: JSONRawMessage represents a json.RawMessage that works well with @@ -3021,6 +3023,11 @@ components: description: UpdatedAt is a helper struct field for gobuffalo.pop. format: date-time type: string + version: + description: Version refers to the version of the credential. Useful when + changing the config schema. + format: int64 + type: integer type: object identityCredentialsOidc: properties: @@ -3183,10 +3190,10 @@ components: pagination: properties: page: - default: 0 + default: 1 description: Pagination Page format: int64 - minimum: 0 + minimum: 1 type: integer per_page: default: 250 @@ -3792,6 +3799,7 @@ components: - identifiers created_at: 2000-01-23T04:56:07.000+00:00 config: '{}' + version: 0 verifiable_addresses: - updated_at: 2014-01-01T23:28:56.782Z verified_at: 2000-01-23T04:56:07.000+00:00 @@ -4025,6 +4033,7 @@ components: - identifiers created_at: 2000-01-23T04:56:07.000+00:00 config: '{}' + version: 0 verifiable_addresses: - updated_at: 2014-01-01T23:28:56.782Z verified_at: 2000-01-23T04:56:07.000+00:00 @@ -4101,6 +4110,8 @@ components: completed_at: 2000-01-23T04:56:07.000+00:00 method: link_recovery properties: + aal: + $ref: '#/components/schemas/authenticatorAssuranceLevel' completed_at: description: When the authentication challenge was completed. format: date-time @@ -4155,17 +4166,37 @@ components: - method - nodes type: object + submitSelfServiceFlowWithWebAuthnRegistrationMethod: + properties: + webauthn_register: + description: |- + Register a WebAuthn Security Key + + It is expected that the JSON returned by the WebAuthn registration process + is included here. + type: string + webauthn_register_displayname: + description: |- + Name of the WebAuthn Security Key to be Added + + A human-readable name for the security key which will be added. + type: string + type: object submitSelfServiceLoginFlowBody: discriminator: mapping: + lookup_secret: '#/components/schemas/submitSelfServiceLoginFlowWithLookupSecretMethodBody' oidc: '#/components/schemas/submitSelfServiceLoginFlowWithOidcMethodBody' password: '#/components/schemas/submitSelfServiceLoginFlowWithPasswordMethodBody' totp: '#/components/schemas/submitSelfServiceLoginFlowWithTotpMethodBody' + webauthn: '#/components/schemas/submitSelfServiceLoginFlowWithWebAuthnMethodBody' propertyName: method oneOf: - $ref: '#/components/schemas/submitSelfServiceLoginFlowWithPasswordMethodBody' - $ref: '#/components/schemas/submitSelfServiceLoginFlowWithOidcMethodBody' - $ref: '#/components/schemas/submitSelfServiceLoginFlowWithTotpMethodBody' + - $ref: '#/components/schemas/submitSelfServiceLoginFlowWithWebAuthnMethodBody' + - $ref: '#/components/schemas/submitSelfServiceLoginFlowWithLookupSecretMethodBody' submitSelfServiceLoginFlowWithLookupSecretMethodBody: properties: csrf_token: @@ -4216,6 +4247,10 @@ components: description: Sending the anti-csrf token is only required for browser login flows. type: string + identifier: + description: Identifier is the email or username of the user trying to log + in. + type: string method: description: Method should be set to "password" when logging in using the identifier and password strategy. @@ -4224,10 +4259,12 @@ components: description: The user's password. type: string password_identifier: - description: Identifier is the email or username of the user trying to log - in. + description: |- + Identifier is the email or username of the user trying to log in. + This field is deprecated! type: string required: + - identifier - method - password - password_identifier @@ -4259,6 +4296,12 @@ components: description: Sending the anti-csrf token is only required for browser login flows. type: string + identifier: + description: |- + Identifier is the email or username of the user trying to log in. This field is + only required when using WebAuthn for passwordless login. When using WebAuthn + for multi-factor authentication, it is not needed. + type: string method: description: Method should be set to "webAuthn" when logging in using the WebAuthn strategy. @@ -4321,10 +4364,12 @@ components: mapping: oidc: '#/components/schemas/submitSelfServiceRegistrationFlowWithOidcMethodBody' password: '#/components/schemas/submitSelfServiceRegistrationFlowWithPasswordMethodBody' + webauthn: '#/components/schemas/submitSelfServiceRegistrationFlowWithWebAuthnMethodBody' propertyName: method oneOf: - $ref: '#/components/schemas/submitSelfServiceRegistrationFlowWithPasswordMethodBody' - $ref: '#/components/schemas/submitSelfServiceRegistrationFlowWithOidcMethodBody' + - $ref: '#/components/schemas/submitSelfServiceRegistrationFlowWithWebAuthnMethodBody' submitSelfServiceRegistrationFlowWithOidcMethodBody: description: |- SubmitSelfServiceRegistrationFlowWithOidcMethodBody is used to decode the registration form payload @@ -4374,13 +4419,46 @@ components: - password - traits type: object + submitSelfServiceRegistrationFlowWithWebAuthnMethodBody: + properties: + csrf_token: + description: CSRFToken is the anti-CSRF token + type: string + method: + description: |- + Method + + Should be set to "webauthn" when trying to add, update, or remove a webAuthn pairing. + type: string + traits: + description: The identity's traits + type: object + webauthn_register: + description: |- + Register a WebAuthn Security Key + + It is expected that the JSON returned by the WebAuthn registration process + is included here. + type: string + webauthn_register_displayname: + description: |- + Name of the WebAuthn Security Key to be Added + + A human-readable name for the security key which will be added. + type: string + required: + - method + - traits + type: object submitSelfServiceSettingsFlowBody: discriminator: mapping: + lookup_secret: '#/components/schemas/submitSelfServiceSettingsFlowWithLookupMethodBody' oidc: '#/components/schemas/submitSelfServiceSettingsFlowWithOidcMethodBody' password: '#/components/schemas/submitSelfServiceSettingsFlowWithPasswordMethodBody' profile: '#/components/schemas/submitSelfServiceSettingsFlowWithProfileMethodBody' totp: '#/components/schemas/submitSelfServiceSettingsFlowWithTotpMethodBody' + webauthn: '#/components/schemas/submitSelfServiceSettingsFlowWithWebAuthnMethodBody' propertyName: method oneOf: - $ref: '#/components/schemas/submitSelfServiceSettingsFlowWithPasswordMethodBody' @@ -4388,6 +4466,8 @@ components: - $ref: '#/components/schemas/submitSelfServiceSettingsFlowWithOidcMethodBody' - $ref: '#/components/schemas/submitSelfServiceSettingsFlowWithOidcMethodBody' - $ref: '#/components/schemas/submitSelfServiceSettingsFlowWithTotpMethodBody' + - $ref: '#/components/schemas/submitSelfServiceSettingsFlowWithWebAuthnMethodBody' + - $ref: '#/components/schemas/submitSelfServiceSettingsFlowWithLookupMethodBody' submitSelfServiceSettingsFlowWithLookupMethodBody: properties: csrf_token: @@ -4616,6 +4696,7 @@ components: - identifiers created_at: 2000-01-23T04:56:07.000+00:00 config: '{}' + version: 0 verifiable_addresses: - updated_at: 2014-01-01T23:28:56.782Z verified_at: 2000-01-23T04:56:07.000+00:00 @@ -4685,6 +4766,7 @@ components: - identifiers created_at: 2000-01-23T04:56:07.000+00:00 config: '{}' + version: 0 verifiable_addresses: - updated_at: 2014-01-01T23:28:56.782Z verified_at: 2000-01-23T04:56:07.000+00:00 @@ -4736,6 +4818,7 @@ components: - identifiers created_at: 2000-01-23T04:56:07.000+00:00 config: '{}' + version: 0 verifiable_addresses: - updated_at: 2014-01-01T23:28:56.782Z verified_at: 2000-01-23T04:56:07.000+00:00 diff --git a/internal/httpclient/docs/IdentityCredentials.md b/internal/httpclient/docs/IdentityCredentials.md index f47bc0777d46..19b869b000b7 100644 --- a/internal/httpclient/docs/IdentityCredentials.md +++ b/internal/httpclient/docs/IdentityCredentials.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **Identifiers** | Pointer to **[]string** | Identifiers represents a list of unique identifiers this credential type matches. | [optional] **Type** | Pointer to [**IdentityCredentialsType**](IdentityCredentialsType.md) | | [optional] **UpdatedAt** | Pointer to **time.Time** | UpdatedAt is a helper struct field for gobuffalo.pop. | [optional] +**Version** | Pointer to **int64** | Version refers to the version of the credential. Useful when changing the config schema. | [optional] ## Methods @@ -154,6 +155,31 @@ SetUpdatedAt sets UpdatedAt field to given value. HasUpdatedAt returns a boolean if a field has been set. +### GetVersion + +`func (o *IdentityCredentials) GetVersion() int64` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *IdentityCredentials) GetVersionOk() (*int64, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *IdentityCredentials) SetVersion(v int64)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *IdentityCredentials) HasVersion() bool` + +HasVersion returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/internal/httpclient/docs/Pagination.md b/internal/httpclient/docs/Pagination.md index 79e11a031312..55f471f672ab 100644 --- a/internal/httpclient/docs/Pagination.md +++ b/internal/httpclient/docs/Pagination.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Page** | Pointer to **int64** | Pagination Page | [optional] [default to 0] +**Page** | Pointer to **int64** | Pagination Page | [optional] [default to 1] **PerPage** | Pointer to **int64** | Items per Page This is the number of items per page. | [optional] [default to 250] ## Methods diff --git a/internal/httpclient/docs/SessionAuthenticationMethod.md b/internal/httpclient/docs/SessionAuthenticationMethod.md index 369c35de6b80..cf6124da24f8 100644 --- a/internal/httpclient/docs/SessionAuthenticationMethod.md +++ b/internal/httpclient/docs/SessionAuthenticationMethod.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**Aal** | Pointer to [**AuthenticatorAssuranceLevel**](AuthenticatorAssuranceLevel.md) | | [optional] **CompletedAt** | Pointer to **time.Time** | When the authentication challenge was completed. | [optional] **Method** | Pointer to **string** | | [optional] @@ -26,6 +27,31 @@ NewSessionAuthenticationMethodWithDefaults instantiates a new SessionAuthenticat 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 +### GetAal + +`func (o *SessionAuthenticationMethod) GetAal() AuthenticatorAssuranceLevel` + +GetAal returns the Aal field if non-nil, zero value otherwise. + +### GetAalOk + +`func (o *SessionAuthenticationMethod) GetAalOk() (*AuthenticatorAssuranceLevel, bool)` + +GetAalOk returns a tuple with the Aal field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAal + +`func (o *SessionAuthenticationMethod) SetAal(v AuthenticatorAssuranceLevel)` + +SetAal sets Aal field to given value. + +### HasAal + +`func (o *SessionAuthenticationMethod) HasAal() bool` + +HasAal returns a boolean if a field has been set. + ### GetCompletedAt `func (o *SessionAuthenticationMethod) GetCompletedAt() time.Time` diff --git a/internal/httpclient/docs/SubmitSelfServiceFlowWithWebAuthnRegistrationMethod.md b/internal/httpclient/docs/SubmitSelfServiceFlowWithWebAuthnRegistrationMethod.md new file mode 100644 index 000000000000..3979cf82b64d --- /dev/null +++ b/internal/httpclient/docs/SubmitSelfServiceFlowWithWebAuthnRegistrationMethod.md @@ -0,0 +1,82 @@ +# SubmitSelfServiceFlowWithWebAuthnRegistrationMethod + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**WebauthnRegister** | Pointer to **string** | Register a WebAuthn Security Key It is expected that the JSON returned by the WebAuthn registration process is included here. | [optional] +**WebauthnRegisterDisplayname** | Pointer to **string** | Name of the WebAuthn Security Key to be Added A human-readable name for the security key which will be added. | [optional] + +## Methods + +### NewSubmitSelfServiceFlowWithWebAuthnRegistrationMethod + +`func NewSubmitSelfServiceFlowWithWebAuthnRegistrationMethod() *SubmitSelfServiceFlowWithWebAuthnRegistrationMethod` + +NewSubmitSelfServiceFlowWithWebAuthnRegistrationMethod instantiates a new SubmitSelfServiceFlowWithWebAuthnRegistrationMethod 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 + +### NewSubmitSelfServiceFlowWithWebAuthnRegistrationMethodWithDefaults + +`func NewSubmitSelfServiceFlowWithWebAuthnRegistrationMethodWithDefaults() *SubmitSelfServiceFlowWithWebAuthnRegistrationMethod` + +NewSubmitSelfServiceFlowWithWebAuthnRegistrationMethodWithDefaults instantiates a new SubmitSelfServiceFlowWithWebAuthnRegistrationMethod 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 + +### GetWebauthnRegister + +`func (o *SubmitSelfServiceFlowWithWebAuthnRegistrationMethod) GetWebauthnRegister() string` + +GetWebauthnRegister returns the WebauthnRegister field if non-nil, zero value otherwise. + +### GetWebauthnRegisterOk + +`func (o *SubmitSelfServiceFlowWithWebAuthnRegistrationMethod) GetWebauthnRegisterOk() (*string, bool)` + +GetWebauthnRegisterOk returns a tuple with the WebauthnRegister field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWebauthnRegister + +`func (o *SubmitSelfServiceFlowWithWebAuthnRegistrationMethod) SetWebauthnRegister(v string)` + +SetWebauthnRegister sets WebauthnRegister field to given value. + +### HasWebauthnRegister + +`func (o *SubmitSelfServiceFlowWithWebAuthnRegistrationMethod) HasWebauthnRegister() bool` + +HasWebauthnRegister returns a boolean if a field has been set. + +### GetWebauthnRegisterDisplayname + +`func (o *SubmitSelfServiceFlowWithWebAuthnRegistrationMethod) GetWebauthnRegisterDisplayname() string` + +GetWebauthnRegisterDisplayname returns the WebauthnRegisterDisplayname field if non-nil, zero value otherwise. + +### GetWebauthnRegisterDisplaynameOk + +`func (o *SubmitSelfServiceFlowWithWebAuthnRegistrationMethod) GetWebauthnRegisterDisplaynameOk() (*string, bool)` + +GetWebauthnRegisterDisplaynameOk returns a tuple with the WebauthnRegisterDisplayname field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWebauthnRegisterDisplayname + +`func (o *SubmitSelfServiceFlowWithWebAuthnRegistrationMethod) SetWebauthnRegisterDisplayname(v string)` + +SetWebauthnRegisterDisplayname sets WebauthnRegisterDisplayname field to given value. + +### HasWebauthnRegisterDisplayname + +`func (o *SubmitSelfServiceFlowWithWebAuthnRegistrationMethod) HasWebauthnRegisterDisplayname() bool` + +HasWebauthnRegisterDisplayname returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/internal/httpclient/docs/SubmitSelfServiceLoginFlowBody.md b/internal/httpclient/docs/SubmitSelfServiceLoginFlowBody.md index e1b18332b588..a47b6ae06629 100644 --- a/internal/httpclient/docs/SubmitSelfServiceLoginFlowBody.md +++ b/internal/httpclient/docs/SubmitSelfServiceLoginFlowBody.md @@ -5,18 +5,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **CsrfToken** | Pointer to **string** | Sending the anti-csrf token is only required for browser login flows. | [optional] -**Method** | **string** | Method should be set to \"totp\" when logging in using the TOTP strategy. | +**Identifier** | **string** | Identifier is the email or username of the user trying to log in. This field is only required when using WebAuthn for passwordless login. When using WebAuthn for multi-factor authentication, it is not needed. | +**Method** | **string** | Method should be set to \"lookup_secret\" when logging in using the lookup_secret strategy. | **Password** | **string** | The user's password. | -**PasswordIdentifier** | **string** | Identifier is the email or username of the user trying to log in. | +**PasswordIdentifier** | **string** | Identifier is the email or username of the user trying to log in. This field is deprecated! | **Provider** | **string** | The provider to register with | **Traits** | Pointer to **map[string]interface{}** | The identity traits. This is a placeholder for the registration flow. | [optional] **TotpCode** | **string** | The TOTP code. | +**WebauthnLogin** | Pointer to **string** | Login a WebAuthn Security Key This must contain the ID of the WebAuthN connection. | [optional] +**LookupSecret** | **string** | The lookup secret. | ## Methods ### NewSubmitSelfServiceLoginFlowBody -`func NewSubmitSelfServiceLoginFlowBody(method string, password string, passwordIdentifier string, provider string, totpCode string, ) *SubmitSelfServiceLoginFlowBody` +`func NewSubmitSelfServiceLoginFlowBody(identifier string, method string, password string, passwordIdentifier string, provider string, totpCode string, lookupSecret string, ) *SubmitSelfServiceLoginFlowBody` NewSubmitSelfServiceLoginFlowBody instantiates a new SubmitSelfServiceLoginFlowBody object This constructor will assign default values to properties that have it defined, @@ -56,6 +59,26 @@ SetCsrfToken sets CsrfToken field to given value. HasCsrfToken returns a boolean if a field has been set. +### GetIdentifier + +`func (o *SubmitSelfServiceLoginFlowBody) GetIdentifier() string` + +GetIdentifier returns the Identifier field if non-nil, zero value otherwise. + +### GetIdentifierOk + +`func (o *SubmitSelfServiceLoginFlowBody) GetIdentifierOk() (*string, bool)` + +GetIdentifierOk returns a tuple with the Identifier field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdentifier + +`func (o *SubmitSelfServiceLoginFlowBody) SetIdentifier(v string)` + +SetIdentifier sets Identifier field to given value. + + ### GetMethod `func (o *SubmitSelfServiceLoginFlowBody) GetMethod() string` @@ -181,6 +204,51 @@ and a boolean to check if the value has been set. SetTotpCode sets TotpCode field to given value. +### GetWebauthnLogin + +`func (o *SubmitSelfServiceLoginFlowBody) GetWebauthnLogin() string` + +GetWebauthnLogin returns the WebauthnLogin field if non-nil, zero value otherwise. + +### GetWebauthnLoginOk + +`func (o *SubmitSelfServiceLoginFlowBody) GetWebauthnLoginOk() (*string, bool)` + +GetWebauthnLoginOk returns a tuple with the WebauthnLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWebauthnLogin + +`func (o *SubmitSelfServiceLoginFlowBody) SetWebauthnLogin(v string)` + +SetWebauthnLogin sets WebauthnLogin field to given value. + +### HasWebauthnLogin + +`func (o *SubmitSelfServiceLoginFlowBody) HasWebauthnLogin() bool` + +HasWebauthnLogin returns a boolean if a field has been set. + +### GetLookupSecret + +`func (o *SubmitSelfServiceLoginFlowBody) GetLookupSecret() string` + +GetLookupSecret returns the LookupSecret field if non-nil, zero value otherwise. + +### GetLookupSecretOk + +`func (o *SubmitSelfServiceLoginFlowBody) GetLookupSecretOk() (*string, bool)` + +GetLookupSecretOk returns a tuple with the LookupSecret field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLookupSecret + +`func (o *SubmitSelfServiceLoginFlowBody) SetLookupSecret(v string)` + +SetLookupSecret sets LookupSecret field to given value. + + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/internal/httpclient/docs/SubmitSelfServiceLoginFlowWithPasswordMethodBody.md b/internal/httpclient/docs/SubmitSelfServiceLoginFlowWithPasswordMethodBody.md index 3550d2977eee..8a5d910e2abb 100644 --- a/internal/httpclient/docs/SubmitSelfServiceLoginFlowWithPasswordMethodBody.md +++ b/internal/httpclient/docs/SubmitSelfServiceLoginFlowWithPasswordMethodBody.md @@ -5,15 +5,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **CsrfToken** | Pointer to **string** | Sending the anti-csrf token is only required for browser login flows. | [optional] +**Identifier** | **string** | Identifier is the email or username of the user trying to log in. | **Method** | **string** | Method should be set to \"password\" when logging in using the identifier and password strategy. | **Password** | **string** | The user's password. | -**PasswordIdentifier** | **string** | Identifier is the email or username of the user trying to log in. | +**PasswordIdentifier** | **string** | Identifier is the email or username of the user trying to log in. This field is deprecated! | ## Methods ### NewSubmitSelfServiceLoginFlowWithPasswordMethodBody -`func NewSubmitSelfServiceLoginFlowWithPasswordMethodBody(method string, password string, passwordIdentifier string, ) *SubmitSelfServiceLoginFlowWithPasswordMethodBody` +`func NewSubmitSelfServiceLoginFlowWithPasswordMethodBody(identifier string, method string, password string, passwordIdentifier string, ) *SubmitSelfServiceLoginFlowWithPasswordMethodBody` NewSubmitSelfServiceLoginFlowWithPasswordMethodBody instantiates a new SubmitSelfServiceLoginFlowWithPasswordMethodBody object This constructor will assign default values to properties that have it defined, @@ -53,6 +54,26 @@ SetCsrfToken sets CsrfToken field to given value. HasCsrfToken returns a boolean if a field has been set. +### GetIdentifier + +`func (o *SubmitSelfServiceLoginFlowWithPasswordMethodBody) GetIdentifier() string` + +GetIdentifier returns the Identifier field if non-nil, zero value otherwise. + +### GetIdentifierOk + +`func (o *SubmitSelfServiceLoginFlowWithPasswordMethodBody) GetIdentifierOk() (*string, bool)` + +GetIdentifierOk returns a tuple with the Identifier field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdentifier + +`func (o *SubmitSelfServiceLoginFlowWithPasswordMethodBody) SetIdentifier(v string)` + +SetIdentifier sets Identifier field to given value. + + ### GetMethod `func (o *SubmitSelfServiceLoginFlowWithPasswordMethodBody) GetMethod() string` diff --git a/internal/httpclient/docs/SubmitSelfServiceLoginFlowWithWebAuthnMethodBody.md b/internal/httpclient/docs/SubmitSelfServiceLoginFlowWithWebAuthnMethodBody.md index 568bde2737ed..9eabeb917ff5 100644 --- a/internal/httpclient/docs/SubmitSelfServiceLoginFlowWithWebAuthnMethodBody.md +++ b/internal/httpclient/docs/SubmitSelfServiceLoginFlowWithWebAuthnMethodBody.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **CsrfToken** | Pointer to **string** | Sending the anti-csrf token is only required for browser login flows. | [optional] +**Identifier** | Pointer to **string** | Identifier is the email or username of the user trying to log in. This field is only required when using WebAuthn for passwordless login. When using WebAuthn for multi-factor authentication, it is not needed. | [optional] **Method** | **string** | Method should be set to \"webAuthn\" when logging in using the WebAuthn strategy. | **WebauthnLogin** | Pointer to **string** | Login a WebAuthn Security Key This must contain the ID of the WebAuthN connection. | [optional] @@ -52,6 +53,31 @@ SetCsrfToken sets CsrfToken field to given value. HasCsrfToken returns a boolean if a field has been set. +### GetIdentifier + +`func (o *SubmitSelfServiceLoginFlowWithWebAuthnMethodBody) GetIdentifier() string` + +GetIdentifier returns the Identifier field if non-nil, zero value otherwise. + +### GetIdentifierOk + +`func (o *SubmitSelfServiceLoginFlowWithWebAuthnMethodBody) GetIdentifierOk() (*string, bool)` + +GetIdentifierOk returns a tuple with the Identifier field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdentifier + +`func (o *SubmitSelfServiceLoginFlowWithWebAuthnMethodBody) SetIdentifier(v string)` + +SetIdentifier sets Identifier field to given value. + +### HasIdentifier + +`func (o *SubmitSelfServiceLoginFlowWithWebAuthnMethodBody) HasIdentifier() bool` + +HasIdentifier returns a boolean if a field has been set. + ### GetMethod `func (o *SubmitSelfServiceLoginFlowWithWebAuthnMethodBody) GetMethod() string` diff --git a/internal/httpclient/docs/SubmitSelfServiceRegistrationFlowBody.md b/internal/httpclient/docs/SubmitSelfServiceRegistrationFlowBody.md index f367b562260c..83244bfe7630 100644 --- a/internal/httpclient/docs/SubmitSelfServiceRegistrationFlowBody.md +++ b/internal/httpclient/docs/SubmitSelfServiceRegistrationFlowBody.md @@ -4,11 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**CsrfToken** | Pointer to **string** | The CSRF Token | [optional] -**Method** | **string** | Method to use This field must be set to `oidc` when using the oidc method. | +**CsrfToken** | Pointer to **string** | CSRFToken is the anti-CSRF token | [optional] +**Method** | **string** | Method Should be set to \"webauthn\" when trying to add, update, or remove a webAuthn pairing. | **Password** | **string** | Password to sign the user up with | -**Traits** | **map[string]interface{}** | The identity traits | +**Traits** | **map[string]interface{}** | The identity's traits | **Provider** | **string** | The provider to register with | +**WebauthnRegister** | Pointer to **string** | Register a WebAuthn Security Key It is expected that the JSON returned by the WebAuthn registration process is included here. | [optional] +**WebauthnRegisterDisplayname** | Pointer to **string** | Name of the WebAuthn Security Key to be Added A human-readable name for the security key which will be added. | [optional] ## Methods @@ -134,6 +136,56 @@ and a boolean to check if the value has been set. SetProvider sets Provider field to given value. +### GetWebauthnRegister + +`func (o *SubmitSelfServiceRegistrationFlowBody) GetWebauthnRegister() string` + +GetWebauthnRegister returns the WebauthnRegister field if non-nil, zero value otherwise. + +### GetWebauthnRegisterOk + +`func (o *SubmitSelfServiceRegistrationFlowBody) GetWebauthnRegisterOk() (*string, bool)` + +GetWebauthnRegisterOk returns a tuple with the WebauthnRegister field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWebauthnRegister + +`func (o *SubmitSelfServiceRegistrationFlowBody) SetWebauthnRegister(v string)` + +SetWebauthnRegister sets WebauthnRegister field to given value. + +### HasWebauthnRegister + +`func (o *SubmitSelfServiceRegistrationFlowBody) HasWebauthnRegister() bool` + +HasWebauthnRegister returns a boolean if a field has been set. + +### GetWebauthnRegisterDisplayname + +`func (o *SubmitSelfServiceRegistrationFlowBody) GetWebauthnRegisterDisplayname() string` + +GetWebauthnRegisterDisplayname returns the WebauthnRegisterDisplayname field if non-nil, zero value otherwise. + +### GetWebauthnRegisterDisplaynameOk + +`func (o *SubmitSelfServiceRegistrationFlowBody) GetWebauthnRegisterDisplaynameOk() (*string, bool)` + +GetWebauthnRegisterDisplaynameOk returns a tuple with the WebauthnRegisterDisplayname field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWebauthnRegisterDisplayname + +`func (o *SubmitSelfServiceRegistrationFlowBody) SetWebauthnRegisterDisplayname(v string)` + +SetWebauthnRegisterDisplayname sets WebauthnRegisterDisplayname field to given value. + +### HasWebauthnRegisterDisplayname + +`func (o *SubmitSelfServiceRegistrationFlowBody) HasWebauthnRegisterDisplayname() bool` + +HasWebauthnRegisterDisplayname returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/internal/httpclient/docs/SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody.md b/internal/httpclient/docs/SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody.md new file mode 100644 index 000000000000..e23d5ce026ae --- /dev/null +++ b/internal/httpclient/docs/SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody.md @@ -0,0 +1,150 @@ +# SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CsrfToken** | Pointer to **string** | CSRFToken is the anti-CSRF token | [optional] +**Method** | **string** | Method Should be set to \"webauthn\" when trying to add, update, or remove a webAuthn pairing. | +**Traits** | **map[string]interface{}** | The identity's traits | +**WebauthnRegister** | Pointer to **string** | Register a WebAuthn Security Key It is expected that the JSON returned by the WebAuthn registration process is included here. | [optional] +**WebauthnRegisterDisplayname** | Pointer to **string** | Name of the WebAuthn Security Key to be Added A human-readable name for the security key which will be added. | [optional] + +## Methods + +### NewSubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody + +`func NewSubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody(method string, traits map[string]interface{}, ) *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody` + +NewSubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody instantiates a new SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody 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 + +### NewSubmitSelfServiceRegistrationFlowWithWebAuthnMethodBodyWithDefaults + +`func NewSubmitSelfServiceRegistrationFlowWithWebAuthnMethodBodyWithDefaults() *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody` + +NewSubmitSelfServiceRegistrationFlowWithWebAuthnMethodBodyWithDefaults instantiates a new SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody 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 + +### GetCsrfToken + +`func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) GetCsrfToken() string` + +GetCsrfToken returns the CsrfToken field if non-nil, zero value otherwise. + +### GetCsrfTokenOk + +`func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) GetCsrfTokenOk() (*string, bool)` + +GetCsrfTokenOk returns a tuple with the CsrfToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCsrfToken + +`func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) SetCsrfToken(v string)` + +SetCsrfToken sets CsrfToken field to given value. + +### HasCsrfToken + +`func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) HasCsrfToken() bool` + +HasCsrfToken returns a boolean if a field has been set. + +### GetMethod + +`func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) GetMethod() string` + +GetMethod returns the Method field if non-nil, zero value otherwise. + +### GetMethodOk + +`func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) GetMethodOk() (*string, bool)` + +GetMethodOk returns a tuple with the Method field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMethod + +`func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) SetMethod(v string)` + +SetMethod sets Method field to given value. + + +### GetTraits + +`func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) GetTraits() map[string]interface{}` + +GetTraits returns the Traits field if non-nil, zero value otherwise. + +### GetTraitsOk + +`func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) GetTraitsOk() (*map[string]interface{}, bool)` + +GetTraitsOk returns a tuple with the Traits field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTraits + +`func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) SetTraits(v map[string]interface{})` + +SetTraits sets Traits field to given value. + + +### GetWebauthnRegister + +`func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) GetWebauthnRegister() string` + +GetWebauthnRegister returns the WebauthnRegister field if non-nil, zero value otherwise. + +### GetWebauthnRegisterOk + +`func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) GetWebauthnRegisterOk() (*string, bool)` + +GetWebauthnRegisterOk returns a tuple with the WebauthnRegister field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWebauthnRegister + +`func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) SetWebauthnRegister(v string)` + +SetWebauthnRegister sets WebauthnRegister field to given value. + +### HasWebauthnRegister + +`func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) HasWebauthnRegister() bool` + +HasWebauthnRegister returns a boolean if a field has been set. + +### GetWebauthnRegisterDisplayname + +`func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) GetWebauthnRegisterDisplayname() string` + +GetWebauthnRegisterDisplayname returns the WebauthnRegisterDisplayname field if non-nil, zero value otherwise. + +### GetWebauthnRegisterDisplaynameOk + +`func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) GetWebauthnRegisterDisplaynameOk() (*string, bool)` + +GetWebauthnRegisterDisplaynameOk returns a tuple with the WebauthnRegisterDisplayname field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWebauthnRegisterDisplayname + +`func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) SetWebauthnRegisterDisplayname(v string)` + +SetWebauthnRegisterDisplayname sets WebauthnRegisterDisplayname field to given value. + +### HasWebauthnRegisterDisplayname + +`func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) HasWebauthnRegisterDisplayname() bool` + +HasWebauthnRegisterDisplayname returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/internal/httpclient/docs/SubmitSelfServiceSettingsFlowBody.md b/internal/httpclient/docs/SubmitSelfServiceSettingsFlowBody.md index d369139c60f9..53240b3f6adc 100644 --- a/internal/httpclient/docs/SubmitSelfServiceSettingsFlowBody.md +++ b/internal/httpclient/docs/SubmitSelfServiceSettingsFlowBody.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **CsrfToken** | Pointer to **string** | CSRFToken is the anti-CSRF token | [optional] -**Method** | **string** | Method Should be set to \"totp\" when trying to add, update, or remove a totp pairing. | +**Method** | **string** | Method Should be set to \"lookup\" when trying to add, update, or remove a lookup pairing. | **Password** | **string** | Password is the updated password | **Traits** | **map[string]interface{}** | The identity's traits in: body | **Flow** | Pointer to **string** | Flow ID is the flow's ID. in: query | [optional] @@ -13,6 +13,13 @@ Name | Type | Description | Notes **Unlink** | Pointer to **string** | Unlink this provider Either this or `link` must be set. type: string in: body | [optional] **TotpCode** | Pointer to **string** | ValidationTOTP must contain a valid TOTP based on the | [optional] **TotpUnlink** | Pointer to **bool** | UnlinkTOTP if true will remove the TOTP pairing, effectively removing the credential. This can be used to set up a new TOTP device. | [optional] +**WebauthnRegister** | Pointer to **string** | Register a WebAuthn Security Key It is expected that the JSON returned by the WebAuthn registration process is included here. | [optional] +**WebauthnRegisterDisplayname** | Pointer to **string** | Name of the WebAuthn Security Key to be Added A human-readable name for the security key which will be added. | [optional] +**WebauthnRemove** | Pointer to **string** | Remove a WebAuthn Security Key This must contain the ID of the WebAuthN connection. | [optional] +**LookupSecretConfirm** | Pointer to **bool** | If set to true will save the regenerated lookup secrets | [optional] +**LookupSecretDisable** | Pointer to **bool** | Disables this method if true. | [optional] +**LookupSecretRegenerate** | Pointer to **bool** | If set to true will regenerate the lookup secrets | [optional] +**LookupSecretReveal** | Pointer to **bool** | If set to true will reveal the lookup secrets | [optional] ## Methods @@ -243,6 +250,181 @@ SetTotpUnlink sets TotpUnlink field to given value. HasTotpUnlink returns a boolean if a field has been set. +### GetWebauthnRegister + +`func (o *SubmitSelfServiceSettingsFlowBody) GetWebauthnRegister() string` + +GetWebauthnRegister returns the WebauthnRegister field if non-nil, zero value otherwise. + +### GetWebauthnRegisterOk + +`func (o *SubmitSelfServiceSettingsFlowBody) GetWebauthnRegisterOk() (*string, bool)` + +GetWebauthnRegisterOk returns a tuple with the WebauthnRegister field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWebauthnRegister + +`func (o *SubmitSelfServiceSettingsFlowBody) SetWebauthnRegister(v string)` + +SetWebauthnRegister sets WebauthnRegister field to given value. + +### HasWebauthnRegister + +`func (o *SubmitSelfServiceSettingsFlowBody) HasWebauthnRegister() bool` + +HasWebauthnRegister returns a boolean if a field has been set. + +### GetWebauthnRegisterDisplayname + +`func (o *SubmitSelfServiceSettingsFlowBody) GetWebauthnRegisterDisplayname() string` + +GetWebauthnRegisterDisplayname returns the WebauthnRegisterDisplayname field if non-nil, zero value otherwise. + +### GetWebauthnRegisterDisplaynameOk + +`func (o *SubmitSelfServiceSettingsFlowBody) GetWebauthnRegisterDisplaynameOk() (*string, bool)` + +GetWebauthnRegisterDisplaynameOk returns a tuple with the WebauthnRegisterDisplayname field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWebauthnRegisterDisplayname + +`func (o *SubmitSelfServiceSettingsFlowBody) SetWebauthnRegisterDisplayname(v string)` + +SetWebauthnRegisterDisplayname sets WebauthnRegisterDisplayname field to given value. + +### HasWebauthnRegisterDisplayname + +`func (o *SubmitSelfServiceSettingsFlowBody) HasWebauthnRegisterDisplayname() bool` + +HasWebauthnRegisterDisplayname returns a boolean if a field has been set. + +### GetWebauthnRemove + +`func (o *SubmitSelfServiceSettingsFlowBody) GetWebauthnRemove() string` + +GetWebauthnRemove returns the WebauthnRemove field if non-nil, zero value otherwise. + +### GetWebauthnRemoveOk + +`func (o *SubmitSelfServiceSettingsFlowBody) GetWebauthnRemoveOk() (*string, bool)` + +GetWebauthnRemoveOk returns a tuple with the WebauthnRemove field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWebauthnRemove + +`func (o *SubmitSelfServiceSettingsFlowBody) SetWebauthnRemove(v string)` + +SetWebauthnRemove sets WebauthnRemove field to given value. + +### HasWebauthnRemove + +`func (o *SubmitSelfServiceSettingsFlowBody) HasWebauthnRemove() bool` + +HasWebauthnRemove returns a boolean if a field has been set. + +### GetLookupSecretConfirm + +`func (o *SubmitSelfServiceSettingsFlowBody) GetLookupSecretConfirm() bool` + +GetLookupSecretConfirm returns the LookupSecretConfirm field if non-nil, zero value otherwise. + +### GetLookupSecretConfirmOk + +`func (o *SubmitSelfServiceSettingsFlowBody) GetLookupSecretConfirmOk() (*bool, bool)` + +GetLookupSecretConfirmOk returns a tuple with the LookupSecretConfirm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLookupSecretConfirm + +`func (o *SubmitSelfServiceSettingsFlowBody) SetLookupSecretConfirm(v bool)` + +SetLookupSecretConfirm sets LookupSecretConfirm field to given value. + +### HasLookupSecretConfirm + +`func (o *SubmitSelfServiceSettingsFlowBody) HasLookupSecretConfirm() bool` + +HasLookupSecretConfirm returns a boolean if a field has been set. + +### GetLookupSecretDisable + +`func (o *SubmitSelfServiceSettingsFlowBody) GetLookupSecretDisable() bool` + +GetLookupSecretDisable returns the LookupSecretDisable field if non-nil, zero value otherwise. + +### GetLookupSecretDisableOk + +`func (o *SubmitSelfServiceSettingsFlowBody) GetLookupSecretDisableOk() (*bool, bool)` + +GetLookupSecretDisableOk returns a tuple with the LookupSecretDisable field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLookupSecretDisable + +`func (o *SubmitSelfServiceSettingsFlowBody) SetLookupSecretDisable(v bool)` + +SetLookupSecretDisable sets LookupSecretDisable field to given value. + +### HasLookupSecretDisable + +`func (o *SubmitSelfServiceSettingsFlowBody) HasLookupSecretDisable() bool` + +HasLookupSecretDisable returns a boolean if a field has been set. + +### GetLookupSecretRegenerate + +`func (o *SubmitSelfServiceSettingsFlowBody) GetLookupSecretRegenerate() bool` + +GetLookupSecretRegenerate returns the LookupSecretRegenerate field if non-nil, zero value otherwise. + +### GetLookupSecretRegenerateOk + +`func (o *SubmitSelfServiceSettingsFlowBody) GetLookupSecretRegenerateOk() (*bool, bool)` + +GetLookupSecretRegenerateOk returns a tuple with the LookupSecretRegenerate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLookupSecretRegenerate + +`func (o *SubmitSelfServiceSettingsFlowBody) SetLookupSecretRegenerate(v bool)` + +SetLookupSecretRegenerate sets LookupSecretRegenerate field to given value. + +### HasLookupSecretRegenerate + +`func (o *SubmitSelfServiceSettingsFlowBody) HasLookupSecretRegenerate() bool` + +HasLookupSecretRegenerate returns a boolean if a field has been set. + +### GetLookupSecretReveal + +`func (o *SubmitSelfServiceSettingsFlowBody) GetLookupSecretReveal() bool` + +GetLookupSecretReveal returns the LookupSecretReveal field if non-nil, zero value otherwise. + +### GetLookupSecretRevealOk + +`func (o *SubmitSelfServiceSettingsFlowBody) GetLookupSecretRevealOk() (*bool, bool)` + +GetLookupSecretRevealOk returns a tuple with the LookupSecretReveal field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLookupSecretReveal + +`func (o *SubmitSelfServiceSettingsFlowBody) SetLookupSecretReveal(v bool)` + +SetLookupSecretReveal sets LookupSecretReveal field to given value. + +### HasLookupSecretReveal + +`func (o *SubmitSelfServiceSettingsFlowBody) HasLookupSecretReveal() bool` + +HasLookupSecretReveal returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/internal/httpclient/docs/V0alpha2Api.md b/internal/httpclient/docs/V0alpha2Api.md index 473ca99b86bf..57f71d1b0283 100644 --- a/internal/httpclient/docs/V0alpha2Api.md +++ b/internal/httpclient/docs/V0alpha2Api.md @@ -408,7 +408,7 @@ import ( func main() { perPage := int64(789) // int64 | Items per Page This is the number of items per page. (optional) (default to 250) - page := int64(789) // int64 | Pagination Page (optional) (default to 0) + page := int64(789) // int64 | Pagination Page (optional) (default to 1) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -434,7 +434,7 @@ Other parameters are passed through a pointer to a apiAdminListIdentitiesRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **perPage** | **int64** | Items per Page This is the number of items per page. | [default to 250] - **page** | **int64** | Pagination Page | [default to 0] + **page** | **int64** | Pagination Page | [default to 1] ### Return type @@ -477,7 +477,7 @@ import ( func main() { id := "id_example" // string | ID is the identity's ID. perPage := int64(789) // int64 | Items per Page This is the number of items per page. (optional) (default to 250) - page := int64(789) // int64 | Pagination Page (optional) (default to 0) + page := int64(789) // int64 | Pagination Page (optional) (default to 1) active := true // bool | Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned. (optional) configuration := openapiclient.NewConfiguration() @@ -509,7 +509,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **perPage** | **int64** | Items per Page This is the number of items per page. | [default to 250] - **page** | **int64** | Pagination Page | [default to 0] + **page** | **int64** | Pagination Page | [default to 1] **active** | **bool** | Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned. | ### Return type @@ -1882,7 +1882,7 @@ import ( func main() { perPage := int64(789) // int64 | Items per Page This is the number of items per page. (optional) (default to 250) - page := int64(789) // int64 | Pagination Page (optional) (default to 0) + page := int64(789) // int64 | Pagination Page (optional) (default to 1) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -1908,7 +1908,7 @@ Other parameters are passed through a pointer to a apiListIdentitySchemasRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **perPage** | **int64** | Items per Page This is the number of items per page. | [default to 250] - **page** | **int64** | Pagination Page | [default to 0] + **page** | **int64** | Pagination Page | [default to 1] ### Return type @@ -1952,7 +1952,7 @@ func main() { xSessionToken := "xSessionToken_example" // string | Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) cookie := "cookie_example" // string | Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`. It is ok if more than one cookie are included here as all other cookies will be ignored. (optional) perPage := int64(789) // int64 | Items per Page This is the number of items per page. (optional) (default to 250) - page := int64(789) // int64 | Pagination Page (optional) (default to 0) + page := int64(789) // int64 | Pagination Page (optional) (default to 1) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -1980,7 +1980,7 @@ Name | Type | Description | Notes **xSessionToken** | **string** | Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. | **cookie** | **string** | Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`. It is ok if more than one cookie are included here as all other cookies will be ignored. | **perPage** | **int64** | Items per Page This is the number of items per page. | [default to 250] - **page** | **int64** | Pagination Page | [default to 0] + **page** | **int64** | Pagination Page | [default to 1] ### Return type @@ -2159,7 +2159,7 @@ import ( func main() { flow := "flow_example" // string | The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). xSessionToken := "xSessionToken_example" // string | The Session Token of the Identity performing the settings flow. (optional) - submitSelfServiceLoginFlowBody := openapiclient.submitSelfServiceLoginFlowBody{SubmitSelfServiceLoginFlowWithOidcMethodBody: openapiclient.NewSubmitSelfServiceLoginFlowWithOidcMethodBody("Method_example", "Provider_example")} // SubmitSelfServiceLoginFlowBody | (optional) + submitSelfServiceLoginFlowBody := openapiclient.submitSelfServiceLoginFlowBody{SubmitSelfServiceLoginFlowWithLookupSecretMethodBody: openapiclient.NewSubmitSelfServiceLoginFlowWithLookupSecretMethodBody("LookupSecret_example", "Method_example")} // SubmitSelfServiceLoginFlowBody | (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -2497,7 +2497,7 @@ import ( func main() { flow := "flow_example" // string | The Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). xSessionToken := "xSessionToken_example" // string | The Session Token of the Identity performing the settings flow. (optional) - submitSelfServiceSettingsFlowBody := openapiclient.submitSelfServiceSettingsFlowBody{SubmitSelfServiceSettingsFlowWithOidcMethodBody: openapiclient.NewSubmitSelfServiceSettingsFlowWithOidcMethodBody("Method_example")} // SubmitSelfServiceSettingsFlowBody | (optional) + submitSelfServiceSettingsFlowBody := openapiclient.submitSelfServiceSettingsFlowBody{SubmitSelfServiceSettingsFlowWithLookupMethodBody: openapiclient.NewSubmitSelfServiceSettingsFlowWithLookupMethodBody("Method_example")} // SubmitSelfServiceSettingsFlowBody | (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) diff --git a/internal/httpclient/model_identity_credentials.go b/internal/httpclient/model_identity_credentials.go index d10d862ea87a..78bfad71710a 100644 --- a/internal/httpclient/model_identity_credentials.go +++ b/internal/httpclient/model_identity_credentials.go @@ -26,6 +26,8 @@ type IdentityCredentials struct { Type *IdentityCredentialsType `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 @@ -205,6 +207,38 @@ 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 { @@ -222,6 +256,9 @@ func (o IdentityCredentials) MarshalJSON() ([]byte, error) { if o.UpdatedAt != nil { toSerialize["updated_at"] = o.UpdatedAt } + if o.Version != nil { + toSerialize["version"] = o.Version + } return json.Marshal(toSerialize) } diff --git a/internal/httpclient/model_pagination.go b/internal/httpclient/model_pagination.go index cba8c9778e8d..d880e74dd284 100644 --- a/internal/httpclient/model_pagination.go +++ b/internal/httpclient/model_pagination.go @@ -29,7 +29,7 @@ type Pagination struct { // will change when the set of required properties is changed func NewPagination() *Pagination { this := Pagination{} - var page int64 = 0 + var page int64 = 1 this.Page = &page var perPage int64 = 250 this.PerPage = &perPage @@ -41,7 +41,7 @@ func NewPagination() *Pagination { // but it doesn't guarantee that properties required by API are set func NewPaginationWithDefaults() *Pagination { this := Pagination{} - var page int64 = 0 + var page int64 = 1 this.Page = &page var perPage int64 = 250 this.PerPage = &perPage diff --git a/internal/httpclient/model_session_authentication_method.go b/internal/httpclient/model_session_authentication_method.go index 170b40d294e5..64c52da69a69 100644 --- a/internal/httpclient/model_session_authentication_method.go +++ b/internal/httpclient/model_session_authentication_method.go @@ -18,6 +18,7 @@ import ( // 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"` @@ -40,6 +41,38 @@ func NewSessionAuthenticationMethodWithDefaults() *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 { @@ -106,6 +139,9 @@ func (o *SessionAuthenticationMethod) SetMethod(v string) { 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 } diff --git a/internal/httpclient/model_submit_self_service_flow_with_web_authn_registration_method.go b/internal/httpclient/model_submit_self_service_flow_with_web_authn_registration_method.go new file mode 100644 index 000000000000..60795e23d5ee --- /dev/null +++ b/internal/httpclient/model_submit_self_service_flow_with_web_authn_registration_method.go @@ -0,0 +1,152 @@ +/* + * Ory Kratos API + * + * Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the administative API port you should use something like Nginx, Ory Oathkeeper, or any other technology capable of authorizing incoming requests. + * + * API version: 1.0.0 + * Contact: hi@ory.sh + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// SubmitSelfServiceFlowWithWebAuthnRegistrationMethod struct for SubmitSelfServiceFlowWithWebAuthnRegistrationMethod +type SubmitSelfServiceFlowWithWebAuthnRegistrationMethod struct { + // Register a WebAuthn Security Key It is expected that the JSON returned by the WebAuthn registration process is included here. + WebauthnRegister *string `json:"webauthn_register,omitempty"` + // Name of the WebAuthn Security Key to be Added A human-readable name for the security key which will be added. + WebauthnRegisterDisplayname *string `json:"webauthn_register_displayname,omitempty"` +} + +// NewSubmitSelfServiceFlowWithWebAuthnRegistrationMethod instantiates a new SubmitSelfServiceFlowWithWebAuthnRegistrationMethod 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 NewSubmitSelfServiceFlowWithWebAuthnRegistrationMethod() *SubmitSelfServiceFlowWithWebAuthnRegistrationMethod { + this := SubmitSelfServiceFlowWithWebAuthnRegistrationMethod{} + return &this +} + +// NewSubmitSelfServiceFlowWithWebAuthnRegistrationMethodWithDefaults instantiates a new SubmitSelfServiceFlowWithWebAuthnRegistrationMethod 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 NewSubmitSelfServiceFlowWithWebAuthnRegistrationMethodWithDefaults() *SubmitSelfServiceFlowWithWebAuthnRegistrationMethod { + this := SubmitSelfServiceFlowWithWebAuthnRegistrationMethod{} + return &this +} + +// GetWebauthnRegister returns the WebauthnRegister field value if set, zero value otherwise. +func (o *SubmitSelfServiceFlowWithWebAuthnRegistrationMethod) GetWebauthnRegister() string { + if o == nil || o.WebauthnRegister == nil { + var ret string + return ret + } + return *o.WebauthnRegister +} + +// GetWebauthnRegisterOk returns a tuple with the WebauthnRegister field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SubmitSelfServiceFlowWithWebAuthnRegistrationMethod) GetWebauthnRegisterOk() (*string, bool) { + if o == nil || o.WebauthnRegister == nil { + return nil, false + } + return o.WebauthnRegister, true +} + +// HasWebauthnRegister returns a boolean if a field has been set. +func (o *SubmitSelfServiceFlowWithWebAuthnRegistrationMethod) HasWebauthnRegister() bool { + if o != nil && o.WebauthnRegister != nil { + return true + } + + return false +} + +// SetWebauthnRegister gets a reference to the given string and assigns it to the WebauthnRegister field. +func (o *SubmitSelfServiceFlowWithWebAuthnRegistrationMethod) SetWebauthnRegister(v string) { + o.WebauthnRegister = &v +} + +// GetWebauthnRegisterDisplayname returns the WebauthnRegisterDisplayname field value if set, zero value otherwise. +func (o *SubmitSelfServiceFlowWithWebAuthnRegistrationMethod) GetWebauthnRegisterDisplayname() string { + if o == nil || o.WebauthnRegisterDisplayname == nil { + var ret string + return ret + } + return *o.WebauthnRegisterDisplayname +} + +// GetWebauthnRegisterDisplaynameOk returns a tuple with the WebauthnRegisterDisplayname field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SubmitSelfServiceFlowWithWebAuthnRegistrationMethod) GetWebauthnRegisterDisplaynameOk() (*string, bool) { + if o == nil || o.WebauthnRegisterDisplayname == nil { + return nil, false + } + return o.WebauthnRegisterDisplayname, true +} + +// HasWebauthnRegisterDisplayname returns a boolean if a field has been set. +func (o *SubmitSelfServiceFlowWithWebAuthnRegistrationMethod) HasWebauthnRegisterDisplayname() bool { + if o != nil && o.WebauthnRegisterDisplayname != nil { + return true + } + + return false +} + +// SetWebauthnRegisterDisplayname gets a reference to the given string and assigns it to the WebauthnRegisterDisplayname field. +func (o *SubmitSelfServiceFlowWithWebAuthnRegistrationMethod) SetWebauthnRegisterDisplayname(v string) { + o.WebauthnRegisterDisplayname = &v +} + +func (o SubmitSelfServiceFlowWithWebAuthnRegistrationMethod) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.WebauthnRegister != nil { + toSerialize["webauthn_register"] = o.WebauthnRegister + } + if o.WebauthnRegisterDisplayname != nil { + toSerialize["webauthn_register_displayname"] = o.WebauthnRegisterDisplayname + } + return json.Marshal(toSerialize) +} + +type NullableSubmitSelfServiceFlowWithWebAuthnRegistrationMethod struct { + value *SubmitSelfServiceFlowWithWebAuthnRegistrationMethod + isSet bool +} + +func (v NullableSubmitSelfServiceFlowWithWebAuthnRegistrationMethod) Get() *SubmitSelfServiceFlowWithWebAuthnRegistrationMethod { + return v.value +} + +func (v *NullableSubmitSelfServiceFlowWithWebAuthnRegistrationMethod) Set(val *SubmitSelfServiceFlowWithWebAuthnRegistrationMethod) { + v.value = val + v.isSet = true +} + +func (v NullableSubmitSelfServiceFlowWithWebAuthnRegistrationMethod) IsSet() bool { + return v.isSet +} + +func (v *NullableSubmitSelfServiceFlowWithWebAuthnRegistrationMethod) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSubmitSelfServiceFlowWithWebAuthnRegistrationMethod(val *SubmitSelfServiceFlowWithWebAuthnRegistrationMethod) *NullableSubmitSelfServiceFlowWithWebAuthnRegistrationMethod { + return &NullableSubmitSelfServiceFlowWithWebAuthnRegistrationMethod{value: val, isSet: true} +} + +func (v NullableSubmitSelfServiceFlowWithWebAuthnRegistrationMethod) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSubmitSelfServiceFlowWithWebAuthnRegistrationMethod) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/httpclient/model_submit_self_service_login_flow_body.go b/internal/httpclient/model_submit_self_service_login_flow_body.go index 0c2529e15e80..a196e222b00b 100644 --- a/internal/httpclient/model_submit_self_service_login_flow_body.go +++ b/internal/httpclient/model_submit_self_service_login_flow_body.go @@ -18,9 +18,18 @@ import ( // SubmitSelfServiceLoginFlowBody - struct for SubmitSelfServiceLoginFlowBody type SubmitSelfServiceLoginFlowBody struct { - SubmitSelfServiceLoginFlowWithOidcMethodBody *SubmitSelfServiceLoginFlowWithOidcMethodBody - SubmitSelfServiceLoginFlowWithPasswordMethodBody *SubmitSelfServiceLoginFlowWithPasswordMethodBody - SubmitSelfServiceLoginFlowWithTotpMethodBody *SubmitSelfServiceLoginFlowWithTotpMethodBody + SubmitSelfServiceLoginFlowWithLookupSecretMethodBody *SubmitSelfServiceLoginFlowWithLookupSecretMethodBody + SubmitSelfServiceLoginFlowWithOidcMethodBody *SubmitSelfServiceLoginFlowWithOidcMethodBody + SubmitSelfServiceLoginFlowWithPasswordMethodBody *SubmitSelfServiceLoginFlowWithPasswordMethodBody + SubmitSelfServiceLoginFlowWithTotpMethodBody *SubmitSelfServiceLoginFlowWithTotpMethodBody + SubmitSelfServiceLoginFlowWithWebAuthnMethodBody *SubmitSelfServiceLoginFlowWithWebAuthnMethodBody +} + +// SubmitSelfServiceLoginFlowWithLookupSecretMethodBodyAsSubmitSelfServiceLoginFlowBody is a convenience function that returns SubmitSelfServiceLoginFlowWithLookupSecretMethodBody wrapped in SubmitSelfServiceLoginFlowBody +func SubmitSelfServiceLoginFlowWithLookupSecretMethodBodyAsSubmitSelfServiceLoginFlowBody(v *SubmitSelfServiceLoginFlowWithLookupSecretMethodBody) SubmitSelfServiceLoginFlowBody { + return SubmitSelfServiceLoginFlowBody{ + SubmitSelfServiceLoginFlowWithLookupSecretMethodBody: v, + } } // SubmitSelfServiceLoginFlowWithOidcMethodBodyAsSubmitSelfServiceLoginFlowBody is a convenience function that returns SubmitSelfServiceLoginFlowWithOidcMethodBody wrapped in SubmitSelfServiceLoginFlowBody @@ -44,10 +53,30 @@ func SubmitSelfServiceLoginFlowWithTotpMethodBodyAsSubmitSelfServiceLoginFlowBod } } +// SubmitSelfServiceLoginFlowWithWebAuthnMethodBodyAsSubmitSelfServiceLoginFlowBody is a convenience function that returns SubmitSelfServiceLoginFlowWithWebAuthnMethodBody wrapped in SubmitSelfServiceLoginFlowBody +func SubmitSelfServiceLoginFlowWithWebAuthnMethodBodyAsSubmitSelfServiceLoginFlowBody(v *SubmitSelfServiceLoginFlowWithWebAuthnMethodBody) SubmitSelfServiceLoginFlowBody { + return SubmitSelfServiceLoginFlowBody{ + SubmitSelfServiceLoginFlowWithWebAuthnMethodBody: v, + } +} + // Unmarshal JSON data into one of the pointers in the struct func (dst *SubmitSelfServiceLoginFlowBody) UnmarshalJSON(data []byte) error { var err error match := 0 + // try to unmarshal data into SubmitSelfServiceLoginFlowWithLookupSecretMethodBody + err = newStrictDecoder(data).Decode(&dst.SubmitSelfServiceLoginFlowWithLookupSecretMethodBody) + if err == nil { + jsonSubmitSelfServiceLoginFlowWithLookupSecretMethodBody, _ := json.Marshal(dst.SubmitSelfServiceLoginFlowWithLookupSecretMethodBody) + if string(jsonSubmitSelfServiceLoginFlowWithLookupSecretMethodBody) == "{}" { // empty struct + dst.SubmitSelfServiceLoginFlowWithLookupSecretMethodBody = nil + } else { + match++ + } + } else { + dst.SubmitSelfServiceLoginFlowWithLookupSecretMethodBody = nil + } + // try to unmarshal data into SubmitSelfServiceLoginFlowWithOidcMethodBody err = newStrictDecoder(data).Decode(&dst.SubmitSelfServiceLoginFlowWithOidcMethodBody) if err == nil { @@ -87,11 +116,26 @@ func (dst *SubmitSelfServiceLoginFlowBody) UnmarshalJSON(data []byte) error { dst.SubmitSelfServiceLoginFlowWithTotpMethodBody = nil } + // try to unmarshal data into SubmitSelfServiceLoginFlowWithWebAuthnMethodBody + err = newStrictDecoder(data).Decode(&dst.SubmitSelfServiceLoginFlowWithWebAuthnMethodBody) + if err == nil { + jsonSubmitSelfServiceLoginFlowWithWebAuthnMethodBody, _ := json.Marshal(dst.SubmitSelfServiceLoginFlowWithWebAuthnMethodBody) + if string(jsonSubmitSelfServiceLoginFlowWithWebAuthnMethodBody) == "{}" { // empty struct + dst.SubmitSelfServiceLoginFlowWithWebAuthnMethodBody = nil + } else { + match++ + } + } else { + dst.SubmitSelfServiceLoginFlowWithWebAuthnMethodBody = nil + } + if match > 1 { // more than 1 match // reset to nil + dst.SubmitSelfServiceLoginFlowWithLookupSecretMethodBody = nil dst.SubmitSelfServiceLoginFlowWithOidcMethodBody = nil dst.SubmitSelfServiceLoginFlowWithPasswordMethodBody = nil dst.SubmitSelfServiceLoginFlowWithTotpMethodBody = nil + dst.SubmitSelfServiceLoginFlowWithWebAuthnMethodBody = nil return fmt.Errorf("Data matches more than one schema in oneOf(SubmitSelfServiceLoginFlowBody)") } else if match == 1 { @@ -103,6 +147,10 @@ func (dst *SubmitSelfServiceLoginFlowBody) UnmarshalJSON(data []byte) error { // Marshal data from the first non-nil pointers in the struct to JSON func (src SubmitSelfServiceLoginFlowBody) MarshalJSON() ([]byte, error) { + if src.SubmitSelfServiceLoginFlowWithLookupSecretMethodBody != nil { + return json.Marshal(&src.SubmitSelfServiceLoginFlowWithLookupSecretMethodBody) + } + if src.SubmitSelfServiceLoginFlowWithOidcMethodBody != nil { return json.Marshal(&src.SubmitSelfServiceLoginFlowWithOidcMethodBody) } @@ -115,6 +163,10 @@ func (src SubmitSelfServiceLoginFlowBody) MarshalJSON() ([]byte, error) { return json.Marshal(&src.SubmitSelfServiceLoginFlowWithTotpMethodBody) } + if src.SubmitSelfServiceLoginFlowWithWebAuthnMethodBody != nil { + return json.Marshal(&src.SubmitSelfServiceLoginFlowWithWebAuthnMethodBody) + } + return nil, nil // no data in oneOf schemas } @@ -123,6 +175,10 @@ func (obj *SubmitSelfServiceLoginFlowBody) GetActualInstance() interface{} { if obj == nil { return nil } + if obj.SubmitSelfServiceLoginFlowWithLookupSecretMethodBody != nil { + return obj.SubmitSelfServiceLoginFlowWithLookupSecretMethodBody + } + if obj.SubmitSelfServiceLoginFlowWithOidcMethodBody != nil { return obj.SubmitSelfServiceLoginFlowWithOidcMethodBody } @@ -135,6 +191,10 @@ func (obj *SubmitSelfServiceLoginFlowBody) GetActualInstance() interface{} { return obj.SubmitSelfServiceLoginFlowWithTotpMethodBody } + if obj.SubmitSelfServiceLoginFlowWithWebAuthnMethodBody != nil { + return obj.SubmitSelfServiceLoginFlowWithWebAuthnMethodBody + } + // all schemas are nil return nil } diff --git a/internal/httpclient/model_submit_self_service_login_flow_with_password_method_body.go b/internal/httpclient/model_submit_self_service_login_flow_with_password_method_body.go index e5e82eec243c..1a96f996a022 100644 --- a/internal/httpclient/model_submit_self_service_login_flow_with_password_method_body.go +++ b/internal/httpclient/model_submit_self_service_login_flow_with_password_method_body.go @@ -19,11 +19,13 @@ import ( type SubmitSelfServiceLoginFlowWithPasswordMethodBody 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"` // The user's password. Password string `json:"password"` - // Identifier is the email or username of the user trying to log in. + // Identifier is the email or username of the user trying to log in. This field is deprecated! PasswordIdentifier string `json:"password_identifier"` } @@ -31,8 +33,9 @@ type SubmitSelfServiceLoginFlowWithPasswordMethodBody struct { // 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 NewSubmitSelfServiceLoginFlowWithPasswordMethodBody(method string, password string, passwordIdentifier string) *SubmitSelfServiceLoginFlowWithPasswordMethodBody { +func NewSubmitSelfServiceLoginFlowWithPasswordMethodBody(identifier string, method string, password string, passwordIdentifier string) *SubmitSelfServiceLoginFlowWithPasswordMethodBody { this := SubmitSelfServiceLoginFlowWithPasswordMethodBody{} + this.Identifier = identifier this.Method = method this.Password = password this.PasswordIdentifier = passwordIdentifier @@ -79,6 +82,30 @@ func (o *SubmitSelfServiceLoginFlowWithPasswordMethodBody) SetCsrfToken(v string o.CsrfToken = &v } +// GetIdentifier returns the Identifier field value +func (o *SubmitSelfServiceLoginFlowWithPasswordMethodBody) 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 *SubmitSelfServiceLoginFlowWithPasswordMethodBody) GetIdentifierOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Identifier, true +} + +// SetIdentifier sets field value +func (o *SubmitSelfServiceLoginFlowWithPasswordMethodBody) SetIdentifier(v string) { + o.Identifier = v +} + // GetMethod returns the Method field value func (o *SubmitSelfServiceLoginFlowWithPasswordMethodBody) GetMethod() string { if o == nil { @@ -156,6 +183,9 @@ func (o SubmitSelfServiceLoginFlowWithPasswordMethodBody) MarshalJSON() ([]byte, if o.CsrfToken != nil { toSerialize["csrf_token"] = o.CsrfToken } + if true { + toSerialize["identifier"] = o.Identifier + } if true { toSerialize["method"] = o.Method } diff --git a/internal/httpclient/model_submit_self_service_login_flow_with_web_authn_method_body.go b/internal/httpclient/model_submit_self_service_login_flow_with_web_authn_method_body.go index 9fc220e10b9b..2975a60a4e39 100644 --- a/internal/httpclient/model_submit_self_service_login_flow_with_web_authn_method_body.go +++ b/internal/httpclient/model_submit_self_service_login_flow_with_web_authn_method_body.go @@ -19,6 +19,8 @@ import ( type SubmitSelfServiceLoginFlowWithWebAuthnMethodBody 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. This field is only required when using WebAuthn for passwordless login. When using WebAuthn for multi-factor authentication, it is not needed. + Identifier *string `json:"identifier,omitempty"` // Method should be set to \"webAuthn\" when logging in using the WebAuthn strategy. Method string `json:"method"` // Login a WebAuthn Security Key This must contain the ID of the WebAuthN connection. @@ -75,6 +77,38 @@ func (o *SubmitSelfServiceLoginFlowWithWebAuthnMethodBody) SetCsrfToken(v string o.CsrfToken = &v } +// GetIdentifier returns the Identifier field value if set, zero value otherwise. +func (o *SubmitSelfServiceLoginFlowWithWebAuthnMethodBody) GetIdentifier() string { + if o == nil || o.Identifier == nil { + var ret string + return ret + } + return *o.Identifier +} + +// GetIdentifierOk returns a tuple with the Identifier field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SubmitSelfServiceLoginFlowWithWebAuthnMethodBody) GetIdentifierOk() (*string, bool) { + if o == nil || o.Identifier == nil { + return nil, false + } + return o.Identifier, true +} + +// HasIdentifier returns a boolean if a field has been set. +func (o *SubmitSelfServiceLoginFlowWithWebAuthnMethodBody) HasIdentifier() bool { + if o != nil && o.Identifier != nil { + return true + } + + return false +} + +// SetIdentifier gets a reference to the given string and assigns it to the Identifier field. +func (o *SubmitSelfServiceLoginFlowWithWebAuthnMethodBody) SetIdentifier(v string) { + o.Identifier = &v +} + // GetMethod returns the Method field value func (o *SubmitSelfServiceLoginFlowWithWebAuthnMethodBody) GetMethod() string { if o == nil { @@ -136,6 +170,9 @@ func (o SubmitSelfServiceLoginFlowWithWebAuthnMethodBody) MarshalJSON() ([]byte, if o.CsrfToken != nil { toSerialize["csrf_token"] = o.CsrfToken } + if o.Identifier != nil { + toSerialize["identifier"] = o.Identifier + } if true { toSerialize["method"] = o.Method } diff --git a/internal/httpclient/model_submit_self_service_registration_flow_body.go b/internal/httpclient/model_submit_self_service_registration_flow_body.go index 9ea302edea2b..c7b4a78b37c7 100644 --- a/internal/httpclient/model_submit_self_service_registration_flow_body.go +++ b/internal/httpclient/model_submit_self_service_registration_flow_body.go @@ -20,6 +20,7 @@ import ( type SubmitSelfServiceRegistrationFlowBody struct { SubmitSelfServiceRegistrationFlowWithOidcMethodBody *SubmitSelfServiceRegistrationFlowWithOidcMethodBody SubmitSelfServiceRegistrationFlowWithPasswordMethodBody *SubmitSelfServiceRegistrationFlowWithPasswordMethodBody + SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody } // SubmitSelfServiceRegistrationFlowWithOidcMethodBodyAsSubmitSelfServiceRegistrationFlowBody is a convenience function that returns SubmitSelfServiceRegistrationFlowWithOidcMethodBody wrapped in SubmitSelfServiceRegistrationFlowBody @@ -36,6 +37,13 @@ func SubmitSelfServiceRegistrationFlowWithPasswordMethodBodyAsSubmitSelfServiceR } } +// SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBodyAsSubmitSelfServiceRegistrationFlowBody is a convenience function that returns SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody wrapped in SubmitSelfServiceRegistrationFlowBody +func SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBodyAsSubmitSelfServiceRegistrationFlowBody(v *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) SubmitSelfServiceRegistrationFlowBody { + return SubmitSelfServiceRegistrationFlowBody{ + SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody: v, + } +} + // Unmarshal JSON data into one of the pointers in the struct func (dst *SubmitSelfServiceRegistrationFlowBody) UnmarshalJSON(data []byte) error { var err error @@ -66,10 +74,24 @@ func (dst *SubmitSelfServiceRegistrationFlowBody) UnmarshalJSON(data []byte) err dst.SubmitSelfServiceRegistrationFlowWithPasswordMethodBody = nil } + // try to unmarshal data into SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody + err = newStrictDecoder(data).Decode(&dst.SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) + if err == nil { + jsonSubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody, _ := json.Marshal(dst.SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) + if string(jsonSubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) == "{}" { // empty struct + dst.SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody = nil + } else { + match++ + } + } else { + dst.SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody = nil + } + if match > 1 { // more than 1 match // reset to nil dst.SubmitSelfServiceRegistrationFlowWithOidcMethodBody = nil dst.SubmitSelfServiceRegistrationFlowWithPasswordMethodBody = nil + dst.SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody = nil return fmt.Errorf("Data matches more than one schema in oneOf(SubmitSelfServiceRegistrationFlowBody)") } else if match == 1 { @@ -89,6 +111,10 @@ func (src SubmitSelfServiceRegistrationFlowBody) MarshalJSON() ([]byte, error) { return json.Marshal(&src.SubmitSelfServiceRegistrationFlowWithPasswordMethodBody) } + if src.SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody != nil { + return json.Marshal(&src.SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) + } + return nil, nil // no data in oneOf schemas } @@ -105,6 +131,10 @@ func (obj *SubmitSelfServiceRegistrationFlowBody) GetActualInstance() interface{ return obj.SubmitSelfServiceRegistrationFlowWithPasswordMethodBody } + if obj.SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody != nil { + return obj.SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody + } + // all schemas are nil return nil } diff --git a/internal/httpclient/model_submit_self_service_registration_flow_with_web_authn_method_body.go b/internal/httpclient/model_submit_self_service_registration_flow_with_web_authn_method_body.go new file mode 100644 index 000000000000..5ba6f0cf6ac2 --- /dev/null +++ b/internal/httpclient/model_submit_self_service_registration_flow_with_web_authn_method_body.go @@ -0,0 +1,249 @@ +/* + * Ory Kratos API + * + * Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the administative API port you should use something like Nginx, Ory Oathkeeper, or any other technology capable of authorizing incoming requests. + * + * API version: 1.0.0 + * Contact: hi@ory.sh + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody struct for SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody +type SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody struct { + // CSRFToken is the anti-CSRF token + CsrfToken *string `json:"csrf_token,omitempty"` + // Method Should be set to \"webauthn\" when trying to add, update, or remove a webAuthn pairing. + Method string `json:"method"` + // The identity's traits + Traits map[string]interface{} `json:"traits"` + // Register a WebAuthn Security Key It is expected that the JSON returned by the WebAuthn registration process is included here. + WebauthnRegister *string `json:"webauthn_register,omitempty"` + // Name of the WebAuthn Security Key to be Added A human-readable name for the security key which will be added. + WebauthnRegisterDisplayname *string `json:"webauthn_register_displayname,omitempty"` +} + +// NewSubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody instantiates a new SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody 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 NewSubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody(method string, traits map[string]interface{}) *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody { + this := SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody{} + this.Method = method + this.Traits = traits + return &this +} + +// NewSubmitSelfServiceRegistrationFlowWithWebAuthnMethodBodyWithDefaults instantiates a new SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody 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 NewSubmitSelfServiceRegistrationFlowWithWebAuthnMethodBodyWithDefaults() *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody { + this := SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody{} + return &this +} + +// GetCsrfToken returns the CsrfToken field value if set, zero value otherwise. +func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) 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 *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) 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 *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) 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 *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) SetCsrfToken(v string) { + o.CsrfToken = &v +} + +// GetMethod returns the Method field value +func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) 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 *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) GetMethodOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Method, true +} + +// SetMethod sets field value +func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) SetMethod(v string) { + o.Method = v +} + +// GetTraits returns the Traits field value +func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) 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 *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) GetTraitsOk() (map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Traits, true +} + +// SetTraits sets field value +func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) SetTraits(v map[string]interface{}) { + o.Traits = v +} + +// GetWebauthnRegister returns the WebauthnRegister field value if set, zero value otherwise. +func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) GetWebauthnRegister() string { + if o == nil || o.WebauthnRegister == nil { + var ret string + return ret + } + return *o.WebauthnRegister +} + +// GetWebauthnRegisterOk returns a tuple with the WebauthnRegister field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) GetWebauthnRegisterOk() (*string, bool) { + if o == nil || o.WebauthnRegister == nil { + return nil, false + } + return o.WebauthnRegister, true +} + +// HasWebauthnRegister returns a boolean if a field has been set. +func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) HasWebauthnRegister() bool { + if o != nil && o.WebauthnRegister != nil { + return true + } + + return false +} + +// SetWebauthnRegister gets a reference to the given string and assigns it to the WebauthnRegister field. +func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) SetWebauthnRegister(v string) { + o.WebauthnRegister = &v +} + +// GetWebauthnRegisterDisplayname returns the WebauthnRegisterDisplayname field value if set, zero value otherwise. +func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) GetWebauthnRegisterDisplayname() string { + if o == nil || o.WebauthnRegisterDisplayname == nil { + var ret string + return ret + } + return *o.WebauthnRegisterDisplayname +} + +// GetWebauthnRegisterDisplaynameOk returns a tuple with the WebauthnRegisterDisplayname field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) GetWebauthnRegisterDisplaynameOk() (*string, bool) { + if o == nil || o.WebauthnRegisterDisplayname == nil { + return nil, false + } + return o.WebauthnRegisterDisplayname, true +} + +// HasWebauthnRegisterDisplayname returns a boolean if a field has been set. +func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) HasWebauthnRegisterDisplayname() bool { + if o != nil && o.WebauthnRegisterDisplayname != nil { + return true + } + + return false +} + +// SetWebauthnRegisterDisplayname gets a reference to the given string and assigns it to the WebauthnRegisterDisplayname field. +func (o *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) SetWebauthnRegisterDisplayname(v string) { + o.WebauthnRegisterDisplayname = &v +} + +func (o SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.CsrfToken != nil { + toSerialize["csrf_token"] = o.CsrfToken + } + if true { + toSerialize["method"] = o.Method + } + if true { + toSerialize["traits"] = o.Traits + } + if o.WebauthnRegister != nil { + toSerialize["webauthn_register"] = o.WebauthnRegister + } + if o.WebauthnRegisterDisplayname != nil { + toSerialize["webauthn_register_displayname"] = o.WebauthnRegisterDisplayname + } + return json.Marshal(toSerialize) +} + +type NullableSubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody struct { + value *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody + isSet bool +} + +func (v NullableSubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) Get() *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody { + return v.value +} + +func (v *NullableSubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) Set(val *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) { + v.value = val + v.isSet = true +} + +func (v NullableSubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) IsSet() bool { + return v.isSet +} + +func (v *NullableSubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody(val *SubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) *NullableSubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody { + return &NullableSubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody{value: val, isSet: true} +} + +func (v NullableSubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSubmitSelfServiceRegistrationFlowWithWebAuthnMethodBody) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/httpclient/model_submit_self_service_settings_flow_body.go b/internal/httpclient/model_submit_self_service_settings_flow_body.go index 6d4bd90b0f99..84e5839a415c 100644 --- a/internal/httpclient/model_submit_self_service_settings_flow_body.go +++ b/internal/httpclient/model_submit_self_service_settings_flow_body.go @@ -18,10 +18,19 @@ import ( // SubmitSelfServiceSettingsFlowBody - struct for SubmitSelfServiceSettingsFlowBody type SubmitSelfServiceSettingsFlowBody struct { + SubmitSelfServiceSettingsFlowWithLookupMethodBody *SubmitSelfServiceSettingsFlowWithLookupMethodBody SubmitSelfServiceSettingsFlowWithOidcMethodBody *SubmitSelfServiceSettingsFlowWithOidcMethodBody SubmitSelfServiceSettingsFlowWithPasswordMethodBody *SubmitSelfServiceSettingsFlowWithPasswordMethodBody SubmitSelfServiceSettingsFlowWithProfileMethodBody *SubmitSelfServiceSettingsFlowWithProfileMethodBody SubmitSelfServiceSettingsFlowWithTotpMethodBody *SubmitSelfServiceSettingsFlowWithTotpMethodBody + SubmitSelfServiceSettingsFlowWithWebAuthnMethodBody *SubmitSelfServiceSettingsFlowWithWebAuthnMethodBody +} + +// SubmitSelfServiceSettingsFlowWithLookupMethodBodyAsSubmitSelfServiceSettingsFlowBody is a convenience function that returns SubmitSelfServiceSettingsFlowWithLookupMethodBody wrapped in SubmitSelfServiceSettingsFlowBody +func SubmitSelfServiceSettingsFlowWithLookupMethodBodyAsSubmitSelfServiceSettingsFlowBody(v *SubmitSelfServiceSettingsFlowWithLookupMethodBody) SubmitSelfServiceSettingsFlowBody { + return SubmitSelfServiceSettingsFlowBody{ + SubmitSelfServiceSettingsFlowWithLookupMethodBody: v, + } } // SubmitSelfServiceSettingsFlowWithOidcMethodBodyAsSubmitSelfServiceSettingsFlowBody is a convenience function that returns SubmitSelfServiceSettingsFlowWithOidcMethodBody wrapped in SubmitSelfServiceSettingsFlowBody @@ -52,10 +61,30 @@ func SubmitSelfServiceSettingsFlowWithTotpMethodBodyAsSubmitSelfServiceSettingsF } } +// SubmitSelfServiceSettingsFlowWithWebAuthnMethodBodyAsSubmitSelfServiceSettingsFlowBody is a convenience function that returns SubmitSelfServiceSettingsFlowWithWebAuthnMethodBody wrapped in SubmitSelfServiceSettingsFlowBody +func SubmitSelfServiceSettingsFlowWithWebAuthnMethodBodyAsSubmitSelfServiceSettingsFlowBody(v *SubmitSelfServiceSettingsFlowWithWebAuthnMethodBody) SubmitSelfServiceSettingsFlowBody { + return SubmitSelfServiceSettingsFlowBody{ + SubmitSelfServiceSettingsFlowWithWebAuthnMethodBody: v, + } +} + // Unmarshal JSON data into one of the pointers in the struct func (dst *SubmitSelfServiceSettingsFlowBody) UnmarshalJSON(data []byte) error { var err error match := 0 + // try to unmarshal data into SubmitSelfServiceSettingsFlowWithLookupMethodBody + err = newStrictDecoder(data).Decode(&dst.SubmitSelfServiceSettingsFlowWithLookupMethodBody) + if err == nil { + jsonSubmitSelfServiceSettingsFlowWithLookupMethodBody, _ := json.Marshal(dst.SubmitSelfServiceSettingsFlowWithLookupMethodBody) + if string(jsonSubmitSelfServiceSettingsFlowWithLookupMethodBody) == "{}" { // empty struct + dst.SubmitSelfServiceSettingsFlowWithLookupMethodBody = nil + } else { + match++ + } + } else { + dst.SubmitSelfServiceSettingsFlowWithLookupMethodBody = nil + } + // try to unmarshal data into SubmitSelfServiceSettingsFlowWithOidcMethodBody err = newStrictDecoder(data).Decode(&dst.SubmitSelfServiceSettingsFlowWithOidcMethodBody) if err == nil { @@ -108,12 +137,27 @@ func (dst *SubmitSelfServiceSettingsFlowBody) UnmarshalJSON(data []byte) error { dst.SubmitSelfServiceSettingsFlowWithTotpMethodBody = nil } + // try to unmarshal data into SubmitSelfServiceSettingsFlowWithWebAuthnMethodBody + err = newStrictDecoder(data).Decode(&dst.SubmitSelfServiceSettingsFlowWithWebAuthnMethodBody) + if err == nil { + jsonSubmitSelfServiceSettingsFlowWithWebAuthnMethodBody, _ := json.Marshal(dst.SubmitSelfServiceSettingsFlowWithWebAuthnMethodBody) + if string(jsonSubmitSelfServiceSettingsFlowWithWebAuthnMethodBody) == "{}" { // empty struct + dst.SubmitSelfServiceSettingsFlowWithWebAuthnMethodBody = nil + } else { + match++ + } + } else { + dst.SubmitSelfServiceSettingsFlowWithWebAuthnMethodBody = nil + } + if match > 1 { // more than 1 match // reset to nil + dst.SubmitSelfServiceSettingsFlowWithLookupMethodBody = nil dst.SubmitSelfServiceSettingsFlowWithOidcMethodBody = nil dst.SubmitSelfServiceSettingsFlowWithPasswordMethodBody = nil dst.SubmitSelfServiceSettingsFlowWithProfileMethodBody = nil dst.SubmitSelfServiceSettingsFlowWithTotpMethodBody = nil + dst.SubmitSelfServiceSettingsFlowWithWebAuthnMethodBody = nil return fmt.Errorf("Data matches more than one schema in oneOf(SubmitSelfServiceSettingsFlowBody)") } else if match == 1 { @@ -125,6 +169,10 @@ func (dst *SubmitSelfServiceSettingsFlowBody) UnmarshalJSON(data []byte) error { // Marshal data from the first non-nil pointers in the struct to JSON func (src SubmitSelfServiceSettingsFlowBody) MarshalJSON() ([]byte, error) { + if src.SubmitSelfServiceSettingsFlowWithLookupMethodBody != nil { + return json.Marshal(&src.SubmitSelfServiceSettingsFlowWithLookupMethodBody) + } + if src.SubmitSelfServiceSettingsFlowWithOidcMethodBody != nil { return json.Marshal(&src.SubmitSelfServiceSettingsFlowWithOidcMethodBody) } @@ -141,6 +189,10 @@ func (src SubmitSelfServiceSettingsFlowBody) MarshalJSON() ([]byte, error) { return json.Marshal(&src.SubmitSelfServiceSettingsFlowWithTotpMethodBody) } + if src.SubmitSelfServiceSettingsFlowWithWebAuthnMethodBody != nil { + return json.Marshal(&src.SubmitSelfServiceSettingsFlowWithWebAuthnMethodBody) + } + return nil, nil // no data in oneOf schemas } @@ -149,6 +201,10 @@ func (obj *SubmitSelfServiceSettingsFlowBody) GetActualInstance() interface{} { if obj == nil { return nil } + if obj.SubmitSelfServiceSettingsFlowWithLookupMethodBody != nil { + return obj.SubmitSelfServiceSettingsFlowWithLookupMethodBody + } + if obj.SubmitSelfServiceSettingsFlowWithOidcMethodBody != nil { return obj.SubmitSelfServiceSettingsFlowWithOidcMethodBody } @@ -165,6 +221,10 @@ func (obj *SubmitSelfServiceSettingsFlowBody) GetActualInstance() interface{} { return obj.SubmitSelfServiceSettingsFlowWithTotpMethodBody } + if obj.SubmitSelfServiceSettingsFlowWithWebAuthnMethodBody != nil { + return obj.SubmitSelfServiceSettingsFlowWithWebAuthnMethodBody + } + // all schemas are nil return nil } diff --git a/spec/api.json b/spec/api.json index 730fed24b077..0dc52d0e34cc 100755 --- a/spec/api.json +++ b/spec/api.json @@ -424,6 +424,11 @@ "description": "UpdatedAt is a helper struct field for gobuffalo.pop.", "format": "date-time", "type": "string" + }, + "version": { + "description": "Version refers to the version of the credential. Useful when changing the config schema.", + "format": "int64", + "type": "integer" } }, "type": "object" @@ -609,10 +614,10 @@ "pagination": { "properties": { "page": { - "default": 0, + "default": 1, "description": "Pagination Page", "format": "int64", - "minimum": 0, + "minimum": 1, "type": "integer" }, "per_page": { @@ -1133,6 +1138,9 @@ "sessionAuthenticationMethod": { "description": "A singular authenticator used during authentication / login.", "properties": { + "aal": { + "$ref": "#/components/schemas/authenticatorAssuranceLevel" + }, "completed_at": { "description": "When the authentication challenge was completed.", "format": "date-time", @@ -1201,12 +1209,27 @@ ], "type": "object" }, + "submitSelfServiceFlowWithWebAuthnRegistrationMethod": { + "properties": { + "webauthn_register": { + "description": "Register a WebAuthn Security Key\n\nIt is expected that the JSON returned by the WebAuthn registration process\nis included here.", + "type": "string" + }, + "webauthn_register_displayname": { + "description": "Name of the WebAuthn Security Key to be Added\n\nA human-readable name for the security key which will be added.", + "type": "string" + } + }, + "type": "object" + }, "submitSelfServiceLoginFlowBody": { "discriminator": { "mapping": { + "lookup_secret": "#/components/schemas/submitSelfServiceLoginFlowWithLookupSecretMethodBody", "oidc": "#/components/schemas/submitSelfServiceLoginFlowWithOidcMethodBody", "password": "#/components/schemas/submitSelfServiceLoginFlowWithPasswordMethodBody", - "totp": "#/components/schemas/submitSelfServiceLoginFlowWithTotpMethodBody" + "totp": "#/components/schemas/submitSelfServiceLoginFlowWithTotpMethodBody", + "webauthn": "#/components/schemas/submitSelfServiceLoginFlowWithWebAuthnMethodBody" }, "propertyName": "method" }, @@ -1219,6 +1242,12 @@ }, { "$ref": "#/components/schemas/submitSelfServiceLoginFlowWithTotpMethodBody" + }, + { + "$ref": "#/components/schemas/submitSelfServiceLoginFlowWithWebAuthnMethodBody" + }, + { + "$ref": "#/components/schemas/submitSelfServiceLoginFlowWithLookupSecretMethodBody" } ] }, @@ -1276,6 +1305,10 @@ "description": "Sending the anti-csrf token is only required for browser login flows.", "type": "string" }, + "identifier": { + "description": "Identifier is the email or username of the user trying to log in.", + "type": "string" + }, "method": { "description": "Method should be set to \"password\" when logging in using the identifier and password strategy.", "type": "string" @@ -1285,14 +1318,15 @@ "type": "string" }, "password_identifier": { - "description": "Identifier is the email or username of the user trying to log in.", + "description": "Identifier is the email or username of the user trying to log in.\nThis field is deprecated!", "type": "string" } }, "required": [ "method", "password", - "password_identifier" + "password_identifier", + "identifier" ], "title": "submitSelfServiceLoginFlowWithPasswordMethodBody is used to decode the login form payload.", "type": "object" @@ -1325,6 +1359,10 @@ "description": "Sending the anti-csrf token is only required for browser login flows.", "type": "string" }, + "identifier": { + "description": "Identifier is the email or username of the user trying to log in. This field is\nonly required when using WebAuthn for passwordless login. When using WebAuthn\nfor multi-factor authentication, it is not needed.", + "type": "string" + }, "method": { "description": "Method should be set to \"webAuthn\" when logging in using the WebAuthn strategy.", "type": "string" @@ -1391,7 +1429,8 @@ "discriminator": { "mapping": { "oidc": "#/components/schemas/submitSelfServiceRegistrationFlowWithOidcMethodBody", - "password": "#/components/schemas/submitSelfServiceRegistrationFlowWithPasswordMethodBody" + "password": "#/components/schemas/submitSelfServiceRegistrationFlowWithPasswordMethodBody", + "webauthn": "#/components/schemas/submitSelfServiceRegistrationFlowWithWebAuthnMethodBody" }, "propertyName": "method" }, @@ -1401,6 +1440,9 @@ }, { "$ref": "#/components/schemas/submitSelfServiceRegistrationFlowWithOidcMethodBody" + }, + { + "$ref": "#/components/schemas/submitSelfServiceRegistrationFlowWithWebAuthnMethodBody" } ] }, @@ -1457,13 +1499,44 @@ ], "type": "object" }, + "submitSelfServiceRegistrationFlowWithWebAuthnMethodBody": { + "properties": { + "csrf_token": { + "description": "CSRFToken is the anti-CSRF token", + "type": "string" + }, + "method": { + "description": "Method\n\nShould be set to \"webauthn\" when trying to add, update, or remove a webAuthn pairing.", + "type": "string" + }, + "traits": { + "description": "The identity's traits", + "type": "object" + }, + "webauthn_register": { + "description": "Register a WebAuthn Security Key\n\nIt is expected that the JSON returned by the WebAuthn registration process\nis included here.", + "type": "string" + }, + "webauthn_register_displayname": { + "description": "Name of the WebAuthn Security Key to be Added\n\nA human-readable name for the security key which will be added.", + "type": "string" + } + }, + "required": [ + "traits", + "method" + ], + "type": "object" + }, "submitSelfServiceSettingsFlowBody": { "discriminator": { "mapping": { + "lookup_secret": "#/components/schemas/submitSelfServiceSettingsFlowWithLookupMethodBody", "oidc": "#/components/schemas/submitSelfServiceSettingsFlowWithOidcMethodBody", "password": "#/components/schemas/submitSelfServiceSettingsFlowWithPasswordMethodBody", "profile": "#/components/schemas/submitSelfServiceSettingsFlowWithProfileMethodBody", - "totp": "#/components/schemas/submitSelfServiceSettingsFlowWithTotpMethodBody" + "totp": "#/components/schemas/submitSelfServiceSettingsFlowWithTotpMethodBody", + "webauthn": "#/components/schemas/submitSelfServiceSettingsFlowWithWebAuthnMethodBody" }, "propertyName": "method" }, @@ -1482,6 +1555,12 @@ }, { "$ref": "#/components/schemas/submitSelfServiceSettingsFlowWithTotpMethodBody" + }, + { + "$ref": "#/components/schemas/submitSelfServiceSettingsFlowWithWebAuthnMethodBody" + }, + { + "$ref": "#/components/schemas/submitSelfServiceSettingsFlowWithLookupMethodBody" } ] }, @@ -2247,9 +2326,9 @@ "in": "query", "name": "page", "schema": { - "default": 0, + "default": 1, "format": "int64", - "minimum": 0, + "minimum": 1, "type": "integer" } } @@ -2656,9 +2735,9 @@ "in": "query", "name": "page", "schema": { - "default": 0, + "default": 1, "format": "int64", - "minimum": 0, + "minimum": 1, "type": "integer" } }, @@ -2818,9 +2897,9 @@ "in": "query", "name": "page", "schema": { - "default": 0, + "default": 1, "format": "int64", - "minimum": 0, + "minimum": 1, "type": "integer" } } @@ -4609,9 +4688,9 @@ "in": "query", "name": "page", "schema": { - "default": 0, + "default": 1, "format": "int64", - "minimum": 0, + "minimum": 1, "type": "integer" } } diff --git a/spec/swagger.json b/spec/swagger.json index b46e054e7a7d..fffdcd9f069c 100755 --- a/spec/swagger.json +++ b/spec/swagger.json @@ -129,10 +129,10 @@ "in": "query" }, { - "minimum": 0, + "minimum": 1, "type": "integer", "format": "int64", - "default": 0, + "default": 1, "description": "Pagination Page", "name": "page", "in": "query" @@ -428,10 +428,10 @@ "in": "query" }, { - "minimum": 0, + "minimum": 1, "type": "integer", "format": "int64", - "default": 0, + "default": 1, "description": "Pagination Page", "name": "page", "in": "query" @@ -613,10 +613,10 @@ "in": "query" }, { - "minimum": 0, + "minimum": 1, "type": "integer", "format": "int64", - "default": 0, + "default": 1, "description": "Pagination Page", "name": "page", "in": "query" @@ -2033,10 +2033,10 @@ "in": "query" }, { - "minimum": 0, + "minimum": 1, "type": "integer", "format": "int64", - "default": 0, + "default": 1, "description": "Pagination Page", "name": "page", "in": "query" @@ -2670,6 +2670,11 @@ "description": "UpdatedAt is a helper struct field for gobuffalo.pop.", "type": "string", "format": "date-time" + }, + "version": { + "description": "Version refers to the version of the credential. Useful when changing the config schema.", + "type": "integer", + "format": "int64" } } }, @@ -2848,8 +2853,8 @@ "description": "Pagination Page", "type": "integer", "format": "int64", - "default": 0, - "minimum": 0 + "default": 1, + "minimum": 1 }, "per_page": { "description": "Items per Page\n\nThis is the number of items per page.", @@ -3357,6 +3362,9 @@ "type": "object", "title": "AuthenticationMethod identifies an authentication method", "properties": { + "aal": { + "$ref": "#/definitions/authenticatorAssuranceLevel" + }, "completed_at": { "description": "When the authentication challenge was completed.", "type": "string", @@ -3414,6 +3422,19 @@ } } }, + "submitSelfServiceFlowWithWebAuthnRegistrationMethod": { + "type": "object", + "properties": { + "webauthn_register": { + "description": "Register a WebAuthn Security Key\n\nIt is expected that the JSON returned by the WebAuthn registration process\nis included here.", + "type": "string" + }, + "webauthn_register_displayname": { + "description": "Name of the WebAuthn Security Key to be Added\n\nA human-readable name for the security key which will be added.", + "type": "string" + } + } + }, "submitSelfServiceLoginFlowBody": { "type": "object" }, @@ -3471,13 +3492,18 @@ "required": [ "method", "password", - "password_identifier" + "password_identifier", + "identifier" ], "properties": { "csrf_token": { "description": "Sending the anti-csrf token is only required for browser login flows.", "type": "string" }, + "identifier": { + "description": "Identifier is the email or username of the user trying to log in.", + "type": "string" + }, "method": { "description": "Method should be set to \"password\" when logging in using the identifier and password strategy.", "type": "string" @@ -3487,7 +3513,7 @@ "type": "string" }, "password_identifier": { - "description": "Identifier is the email or username of the user trying to log in.", + "description": "Identifier is the email or username of the user trying to log in.\nThis field is deprecated!", "type": "string" } } @@ -3525,6 +3551,10 @@ "description": "Sending the anti-csrf token is only required for browser login flows.", "type": "string" }, + "identifier": { + "description": "Identifier is the email or username of the user trying to log in. This field is\nonly required when using WebAuthn for passwordless login. When using WebAuthn\nfor multi-factor authentication, it is not needed.", + "type": "string" + }, "method": { "description": "Method should be set to \"webAuthn\" when logging in using the WebAuthn strategy.", "type": "string" @@ -3628,6 +3658,35 @@ } } }, + "submitSelfServiceRegistrationFlowWithWebAuthnMethodBody": { + "type": "object", + "required": [ + "traits", + "method" + ], + "properties": { + "csrf_token": { + "description": "CSRFToken is the anti-CSRF token", + "type": "string" + }, + "method": { + "description": "Method\n\nShould be set to \"webauthn\" when trying to add, update, or remove a webAuthn pairing.", + "type": "string" + }, + "traits": { + "description": "The identity's traits", + "type": "object" + }, + "webauthn_register": { + "description": "Register a WebAuthn Security Key\n\nIt is expected that the JSON returned by the WebAuthn registration process\nis included here.", + "type": "string" + }, + "webauthn_register_displayname": { + "description": "Name of the WebAuthn Security Key to be Added\n\nA human-readable name for the security key which will be added.", + "type": "string" + } + } + }, "submitSelfServiceSettingsFlowBody": { "type": "object" },