diff --git a/KratosSelfService/Controllers/LoginController.cs b/KratosSelfService/Controllers/LoginController.cs index 275834b9..65597ae8 100644 --- a/KratosSelfService/Controllers/LoginController.cs +++ b/KratosSelfService/Controllers/LoginController.cs @@ -36,7 +36,7 @@ public async Task Login( KratosLoginFlow flow; try { - flow = await api.Frontend.GetLoginFlowAsync(flowId.ToString(), Request.Headers.Cookie, cancellationToken); + flow = await api.Frontend.GetLoginFlowAsync(flowId.ToString(), Request.Headers.Cookie, cancellationToken:cancellationToken); } catch (ApiException exception) { @@ -48,7 +48,7 @@ public async Task Login( if (flow.Ui.Messages?.Any(text => text.Id == 4000010) ?? false) // the login requires that the user verifies their email address before logging in // we will create a new verification flow and redirect the user to the verification page - return await RedirectToVerificationFlow(flow, cancellationToken); + return await RedirectToVerificationFlow(flow, cancellationToken:cancellationToken); // Render the data using a view: var initRegistrationQuery = new Dictionary @@ -68,7 +68,7 @@ public async Task Login( string? logoutUrl = null; if (flow.RequestedAal == KratosAuthenticatorAssuranceLevel.Aal2 || flow.Refresh) - logoutUrl = await GetLogoutUrl(flow, cancellationToken); + logoutUrl = await GetLogoutUrl(flow, cancellationToken:cancellationToken); var model = new LoginModel(flow, initRecoveryUrl, initRegistrationUrl, logoutUrl); return View("Login", model); @@ -81,7 +81,7 @@ public async Task Login( // to give the user the option to sign out! try { - var logoutFlow = await api.Frontend.CreateBrowserLogoutFlowAsync(Request.Headers.Cookie, flow.ReturnTo, cancellationToken); + var logoutFlow = await api.Frontend.CreateBrowserLogoutFlowAsync(Request.Headers.Cookie, flow.ReturnTo, cancellationToken:cancellationToken); return logoutFlow.LogoutUrl; } catch (Exception exception) @@ -111,7 +111,7 @@ private async Task RedirectToVerificationFlow(KratosLoginFlow flo try { var response = await api.Frontend - .CreateBrowserVerificationFlowWithHttpInfoAsync(flow.ReturnTo, cancellationToken); + .CreateBrowserVerificationFlowWithHttpInfoAsync(flow.ReturnTo, cancellationToken:cancellationToken); var verificationFlow = response.Data; // we need the csrf cookie from the verification flow Response.Headers.Append(HeaderNames.SetCookie, response.Headers[HeaderNames.SetCookie].ToString()); diff --git a/KratosSelfService/Controllers/LogoutController.cs b/KratosSelfService/Controllers/LogoutController.cs index 4708b749..6c744d93 100644 --- a/KratosSelfService/Controllers/LogoutController.cs +++ b/KratosSelfService/Controllers/LogoutController.cs @@ -19,7 +19,7 @@ public async Task LogoutGet( // end hydra session try { - hydraResponse = await api.HydraOAuth2.AcceptOAuth2LogoutRequestAsync(logoutChallenge, cancellationToken); + hydraResponse = await api.HydraOAuth2.AcceptOAuth2LogoutRequestAsync(logoutChallenge, cancellationToken:cancellationToken); } catch (Ory.Hydra.Client.Client.ApiException exception) { @@ -32,7 +32,7 @@ public async Task LogoutGet( try { var flow = await api.Frontend.CreateBrowserLogoutFlowAsync(Request.Headers.Cookie, - hydraResponse?.RedirectTo, cancellationToken); + hydraResponse?.RedirectTo, cancellationToken:cancellationToken); return Redirect(flow.LogoutUrl); } catch (Ory.Kratos.Client.Client.ApiException exception) diff --git a/KratosSelfService/Controllers/OAuth2Controller.cs b/KratosSelfService/Controllers/OAuth2Controller.cs index 3efe848a..f9edbf1f 100644 --- a/KratosSelfService/Controllers/OAuth2Controller.cs +++ b/KratosSelfService/Controllers/OAuth2Controller.cs @@ -18,7 +18,7 @@ public async Task ConsentGet([FromQuery(Name = "consent_challenge // This section processes consent requests and either shows the consent UI or accepts // the consent request right away if the user has given consent to this app before. - var challengeRequest = await oAuth2Api.GetOAuth2ConsentRequestAsync(challenge, cancellationToken); + var challengeRequest = await oAuth2Api.GetOAuth2ConsentRequestAsync(challenge, cancellationToken:cancellationToken); // If a user has granted this application the requested scope, hydra will tell us to not show the UI. if (!CanSkipConsent(challengeRequest)) { @@ -152,9 +152,9 @@ private async Task AcceptRequest(string challenge, List Profile(CancellationToken cancellationToken) { var session = (KratosSession)HttpContext.Items[typeof(KratosSession)]!; var schema = await schemaService.FetchSchema(session.Identity.SchemaId, - session.Identity.SchemaUrl, cancellationToken); + session.Identity.SchemaUrl, cancellationToken:cancellationToken); return View("Profile", new ProfileModel(session, IdentitySchemaService.GetTraits(schema))); } } \ No newline at end of file diff --git a/KratosSelfService/Controllers/RecoveryController.cs b/KratosSelfService/Controllers/RecoveryController.cs index 9485bb01..129062f4 100644 --- a/KratosSelfService/Controllers/RecoveryController.cs +++ b/KratosSelfService/Controllers/RecoveryController.cs @@ -13,7 +13,7 @@ public class RecoveryController(ILogger logger, ApiService a [AllowAnonymous] public async Task Recovery( [FromQuery(Name = "flow")] Guid? flowId, - [FromQuery(Name = "return_to")] string? returnTo, + [FromQuery(Name = "return_to")] string? returnTo, CancellationToken cancellationToken) { if (flowId == null) @@ -28,7 +28,8 @@ public async Task Recovery( KratosRecoveryFlow flow; try { - flow = await api.Frontend.GetRecoveryFlowAsync(flowId.ToString(), Request.Headers.Cookie, cancellationToken); + flow = await api.Frontend.GetRecoveryFlowAsync(flowId.ToString(), Request.Headers.Cookie, + cancellationToken: cancellationToken); } catch (ApiException exception) { diff --git a/KratosSelfService/Controllers/RegistrationController.cs b/KratosSelfService/Controllers/RegistrationController.cs index 51aef712..2330b70c 100644 --- a/KratosSelfService/Controllers/RegistrationController.cs +++ b/KratosSelfService/Controllers/RegistrationController.cs @@ -41,7 +41,7 @@ public async Task Registration( KratosRegistrationFlow flow; try { - flow = await api.Frontend.GetRegistrationFlowAsync(flowId.ToString(), Request.Headers.Cookie, cancellationToken); + flow = await api.Frontend.GetRegistrationFlowAsync(flowId.ToString(), Request.Headers.Cookie, cancellationToken:cancellationToken); } catch (ApiException exception) { diff --git a/KratosSelfService/Controllers/VerificationController.cs b/KratosSelfService/Controllers/VerificationController.cs index d6ad6dea..ede378cf 100644 --- a/KratosSelfService/Controllers/VerificationController.cs +++ b/KratosSelfService/Controllers/VerificationController.cs @@ -32,7 +32,7 @@ public async Task Verification( KratosVerificationFlow flow; try { - flow = await api.Frontend.GetVerificationFlowAsync(flowId.ToString(), Request.Headers.Cookie, cancellationToken); + flow = await api.Frontend.GetVerificationFlowAsync(flowId.ToString(), Request.Headers.Cookie, cancellationToken:cancellationToken); } catch (ApiException exception) { diff --git a/KratosSelfService/Controllers/WellknownController.cs b/KratosSelfService/Controllers/WellknownController.cs index c44516c6..5d768bc9 100644 --- a/KratosSelfService/Controllers/WellknownController.cs +++ b/KratosSelfService/Controllers/WellknownController.cs @@ -10,7 +10,7 @@ public class WellknownController(ApiService api) : Controller [AllowAnonymous] public async Task Webauthn(CancellationToken cancellationToken) { - var script = await api.Frontend.GetWebAuthnJavaScriptAsync(cancellationToken); + var script = await api.Frontend.GetWebAuthnJavaScriptAsync(cancellationToken:cancellationToken); //Response.ContentType = "text/javascript"; return new ObjectResult(script); } diff --git a/KratosSelfService/KratosSelfService.csproj b/KratosSelfService/KratosSelfService.csproj index 85222d31..c6df3924 100644 --- a/KratosSelfService/KratosSelfService.csproj +++ b/KratosSelfService/KratosSelfService.csproj @@ -71,7 +71,6 @@ - @@ -130,7 +129,11 @@ - + + + + + diff --git a/KratosSelfService/Services/IdentitySchemaService.cs b/KratosSelfService/Services/IdentitySchemaService.cs index f105d8b5..752e24e2 100644 --- a/KratosSelfService/Services/IdentitySchemaService.cs +++ b/KratosSelfService/Services/IdentitySchemaService.cs @@ -12,7 +12,7 @@ public async Task FetchSchema(string schemaId, string schemaUri, Cancel // check if schema object is cached if (_schemaCache.TryGetValue(schemaId, out var schema)) return schema; - var response = await _httpClient.GetStringAsync(schemaUri, cancellationToken); + var response = await _httpClient.GetStringAsync(schemaUri, cancellationToken:cancellationToken); // request and cache new schema object _schemaCache[schemaId] = JSchema.Parse(response); return _schemaCache[schemaId]; diff --git a/KratosSelfService/ViewComponents/KratosUiTextMessages.cs b/KratosSelfService/ViewComponents/KratosUiTextMessages.cs index 5d3eee2a..9ac783e3 100644 --- a/KratosSelfService/ViewComponents/KratosUiTextMessages.cs +++ b/KratosSelfService/ViewComponents/KratosUiTextMessages.cs @@ -1,4 +1,6 @@ -using Microsoft.AspNetCore.Mvc; +using System.Collections.Generic; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.ViewComponents; using Ory.Kratos.Client.Model; diff --git a/KratosSelfService/Views/OAuth2/Consent.cshtml b/KratosSelfService/Views/OAuth2/Consent.cshtml index 0cf6551a..486b04fe 100644 --- a/KratosSelfService/Views/OAuth2/Consent.cshtml +++ b/KratosSelfService/Views/OAuth2/Consent.cshtml @@ -2,8 +2,8 @@ @{ ViewData["Title"] = CustomTranslator.Get("Grant access"); Layout = "_CardLayout"; - var clientName = Model.request._Client.ClientName; - if (string.IsNullOrWhiteSpace(clientName)) clientName = Model.request._Client.ClientId; + var clientName = Model.request.VarClient.ClientName; + if (string.IsNullOrWhiteSpace(clientName)) clientName = Model.request.VarClient.ClientId; }
diff --git a/Ory.Hydra.Client/Client/ApiClient.cs b/Ory.Hydra.Client/Client/ApiClient.cs new file mode 100644 index 00000000..76d98860 --- /dev/null +++ b/Ory.Hydra.Client/Client/ApiClient.cs @@ -0,0 +1,862 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Net; +using System.Reflection; +using System.Runtime.Serialization; +using System.Runtime.Serialization.Formatters; +using System.Text; +using System.Threading; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using System.Web; +using Newtonsoft.Json; +using Newtonsoft.Json.Serialization; +using RestSharp; +using RestSharp.Serializers; +using RestSharpMethod = RestSharp.Method; +using Polly; +using Ory.Hydra.Client.Client.Auth; + +namespace Ory.Hydra.Client.Client +{ + /// + /// Allows RestSharp to Serialize/Deserialize JSON using our custom logic, but only when ContentType is JSON. + /// + internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer + { + private readonly IReadableConfiguration _configuration; + private readonly JsonSerializerSettings _serializerSettings = new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy + { + OverrideSpecifiedNames = false + } + } + }; + + public CustomJsonCodec(IReadableConfiguration configuration) + { + _configuration = configuration; + } + + public CustomJsonCodec(JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) + { + _serializerSettings = serializerSettings; + _configuration = configuration; + } + + /// + /// Serialize the object into a JSON string. + /// + /// Object to be serialized. + /// A JSON string. + public string Serialize(object obj) + { + if (obj != null && obj is Ory.Hydra.Client.Model.AbstractOpenAPISchema) + { + // the object to be serialized is an oneOf/anyOf schema + return ((Ory.Hydra.Client.Model.AbstractOpenAPISchema)obj).ToJson(); + } + else + { + return JsonConvert.SerializeObject(obj, _serializerSettings); + } + } + + public string Serialize(Parameter bodyParameter) => Serialize(bodyParameter.Value); + + public T Deserialize(RestResponse response) + { + var result = (T)Deserialize(response, typeof(T)); + return result; + } + + /// + /// Deserialize the JSON string into a proper object. + /// + /// The HTTP response. + /// Object type. + /// Object representation of the JSON string. + internal object Deserialize(RestResponse response, Type type) + { + if (type == typeof(byte[])) // return byte array + { + return response.RawBytes; + } + + // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) + if (type == typeof(Stream)) + { + var bytes = response.RawBytes; + if (response.Headers != null) + { + var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath) + ? Path.GetTempPath() + : _configuration.TempFolderPath; + var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); + foreach (var header in response.Headers) + { + var match = regex.Match(header.ToString()); + if (match.Success) + { + string fileName = filePath + ClientUtils.SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); + File.WriteAllBytes(fileName, bytes); + return new FileStream(fileName, FileMode.Open); + } + } + } + var stream = new MemoryStream(bytes); + return stream; + } + + if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object + { + return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); + } + + if (type == typeof(string) || type.Name.StartsWith("System.Nullable")) // return primitive type + { + return Convert.ChangeType(response.Content, type); + } + + // at this point, it must be a model (json) + try + { + return JsonConvert.DeserializeObject(response.Content, type, _serializerSettings); + } + catch (Exception e) + { + throw new ApiException(500, e.Message); + } + } + + public ISerializer Serializer => this; + public IDeserializer Deserializer => this; + + public string[] AcceptedContentTypes => RestSharp.ContentType.JsonAccept; + + public SupportsContentType SupportsContentType => contentType => + contentType.Value.EndsWith("json", StringComparison.InvariantCultureIgnoreCase) || + contentType.Value.EndsWith("javascript", StringComparison.InvariantCultureIgnoreCase); + + public ContentType ContentType { get; set; } = RestSharp.ContentType.Json; + + public DataFormat DataFormat => DataFormat.Json; + } + /// + /// Provides a default implementation of an Api client (both synchronous and asynchronous implementations), + /// encapsulating general REST accessor use cases. + /// + public partial class ApiClient : ISynchronousClient, IAsynchronousClient + { + private readonly string _baseUrl; + + /// + /// Specifies the settings on a object. + /// These settings can be adjusted to accommodate custom serialization rules. + /// + public JsonSerializerSettings SerializerSettings { get; set; } = new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy + { + OverrideSpecifiedNames = false + } + } + }; + + /// + /// Allows for extending request processing for generated code. + /// + /// The RestSharp request object + partial void InterceptRequest(RestRequest request); + + /// + /// Allows for extending response processing for generated code. + /// + /// The RestSharp request object + /// The RestSharp response object + partial void InterceptResponse(RestRequest request, RestResponse response); + + /// + /// Initializes a new instance of the , defaulting to the global configurations' base url. + /// + public ApiClient() + { + _baseUrl = Ory.Hydra.Client.Client.GlobalConfiguration.Instance.BasePath; + } + + /// + /// Initializes a new instance of the + /// + /// The target service's base path in URL format. + /// + public ApiClient(string basePath) + { + if (string.IsNullOrEmpty(basePath)) + throw new ArgumentException("basePath cannot be empty"); + + _baseUrl = basePath; + } + + /// + /// Constructs the RestSharp version of an http method + /// + /// Swagger Client Custom HttpMethod + /// RestSharp's HttpMethod instance. + /// + private RestSharpMethod Method(HttpMethod method) + { + RestSharpMethod other; + switch (method) + { + case HttpMethod.Get: + other = RestSharpMethod.Get; + break; + case HttpMethod.Post: + other = RestSharpMethod.Post; + break; + case HttpMethod.Put: + other = RestSharpMethod.Put; + break; + case HttpMethod.Delete: + other = RestSharpMethod.Delete; + break; + case HttpMethod.Head: + other = RestSharpMethod.Head; + break; + case HttpMethod.Options: + other = RestSharpMethod.Options; + break; + case HttpMethod.Patch: + other = RestSharpMethod.Patch; + break; + default: + throw new ArgumentOutOfRangeException("method", method, null); + } + + return other; + } + + /// + /// Provides all logic for constructing a new RestSharp . + /// At this point, all information for querying the service is known. Here, it is simply + /// mapped into the RestSharp request. + /// + /// The http verb. + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// [private] A new RestRequest instance. + /// + private RestRequest NewRequest( + HttpMethod method, + string path, + RequestOptions options, + IReadableConfiguration configuration) + { + if (path == null) throw new ArgumentNullException("path"); + if (options == null) throw new ArgumentNullException("options"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + RestRequest request = new RestRequest(path, Method(method)); + + if (options.PathParameters != null) + { + foreach (var pathParam in options.PathParameters) + { + request.AddParameter(pathParam.Key, pathParam.Value, ParameterType.UrlSegment); + } + } + + if (options.QueryParameters != null) + { + foreach (var queryParam in options.QueryParameters) + { + foreach (var value in queryParam.Value) + { + request.AddQueryParameter(queryParam.Key, value); + } + } + } + + if (configuration.DefaultHeaders != null) + { + foreach (var headerParam in configuration.DefaultHeaders) + { + request.AddHeader(headerParam.Key, headerParam.Value); + } + } + + if (options.HeaderParameters != null) + { + foreach (var headerParam in options.HeaderParameters) + { + foreach (var value in headerParam.Value) + { + request.AddHeader(headerParam.Key, value); + } + } + } + + if (options.FormParameters != null) + { + foreach (var formParam in options.FormParameters) + { + request.AddParameter(formParam.Key, formParam.Value); + } + } + + if (options.Data != null) + { + if (options.Data is Stream stream) + { + var contentType = "application/octet-stream"; + if (options.HeaderParameters != null) + { + var contentTypes = options.HeaderParameters["Content-Type"]; + contentType = contentTypes[0]; + } + + var bytes = ClientUtils.ReadAsBytes(stream); + request.AddParameter(contentType, bytes, ParameterType.RequestBody); + } + else + { + if (options.HeaderParameters != null) + { + var contentTypes = options.HeaderParameters["Content-Type"]; + if (contentTypes == null || contentTypes.Any(header => header.Contains("application/json"))) + { + request.RequestFormat = DataFormat.Json; + } + else + { + // TODO: Generated client user should add additional handlers. RestSharp only supports XML and JSON, with XML as default. + } + } + else + { + // Here, we'll assume JSON APIs are more common. XML can be forced by adding produces/consumes to openapi spec explicitly. + request.RequestFormat = DataFormat.Json; + } + + request.AddJsonBody(options.Data); + } + } + + if (options.FileParameters != null) + { + foreach (var fileParam in options.FileParameters) + { + foreach (var file in fileParam.Value) + { + var bytes = ClientUtils.ReadAsBytes(file); + var fileStream = file as FileStream; + if (fileStream != null) + request.AddFile(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name)); + else + request.AddFile(fileParam.Key, bytes, "no_file_name_provided"); + } + } + } + + return request; + } + + private ApiResponse ToApiResponse(RestResponse response) + { + T result = response.Data; + string rawContent = response.Content; + + var transformed = new ApiResponse(response.StatusCode, new Multimap(), result, rawContent) + { + ErrorText = response.ErrorMessage, + Cookies = new List() + }; + + if (response.Headers != null) + { + foreach (var responseHeader in response.Headers) + { + transformed.Headers.Add(responseHeader.Name, ClientUtils.ParameterToString(responseHeader.Value)); + } + } + + if (response.ContentHeaders != null) + { + foreach (var responseHeader in response.ContentHeaders) + { + transformed.Headers.Add(responseHeader.Name, ClientUtils.ParameterToString(responseHeader.Value)); + } + } + + if (response.Cookies != null) + { + foreach (var responseCookies in response.Cookies.Cast()) + { + transformed.Cookies.Add( + new Cookie( + responseCookies.Name, + responseCookies.Value, + responseCookies.Path, + responseCookies.Domain) + ); + } + } + + return transformed; + } + + private ApiResponse Exec(RestRequest request, RequestOptions options, IReadableConfiguration configuration) + { + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + + var cookies = new CookieContainer(); + + if (options.Cookies != null && options.Cookies.Count > 0) + { + foreach (var cookie in options.Cookies) + { + cookies.Add(new Cookie(cookie.Name, cookie.Value)); + } + } + + var clientOptions = new RestClientOptions(baseUrl) + { + ClientCertificates = configuration.ClientCertificates, + CookieContainer = cookies, + MaxTimeout = configuration.Timeout, + Proxy = configuration.Proxy, + UserAgent = configuration.UserAgent, + UseDefaultCredentials = configuration.UseDefaultCredentials, + RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback + }; + + if (!string.IsNullOrEmpty(configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(configuration.OAuthClientId) && + !string.IsNullOrEmpty(configuration.OAuthClientSecret) && + configuration.OAuthFlow != null) + { + clientOptions.Authenticator = new OAuthAuthenticator( + configuration.OAuthTokenUrl, + configuration.OAuthClientId, + configuration.OAuthClientSecret, + configuration.OAuthFlow, + SerializerSettings, + configuration); + } + + using (RestClient client = new RestClient(clientOptions, + configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)))) + { + InterceptRequest(request); + + RestResponse response; + if (RetryConfiguration.RetryPolicy != null) + { + var policy = RetryConfiguration.RetryPolicy; + var policyResult = policy.ExecuteAndCapture(() => client.Execute(request)); + response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse(request) + { + ErrorException = policyResult.FinalException + }; + } + else + { + response = client.Execute(request); + } + + // if the response type is oneOf/anyOf, call FromJSON to deserialize the data + if (typeof(Ory.Hydra.Client.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) + { + try + { + response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); + } + catch (Exception ex) + { + throw ex.InnerException != null ? ex.InnerException : ex; + } + } + else if (typeof(T).Name == "Stream") // for binary response + { + response.Data = (T)(object)new MemoryStream(response.RawBytes); + } + else if (typeof(T).Name == "Byte[]") // for byte response + { + response.Data = (T)(object)response.RawBytes; + } + else if (typeof(T).Name == "String") // for string response + { + response.Data = (T)(object)response.Content; + } + + InterceptResponse(request, response); + + var result = ToApiResponse(response); + if (response.ErrorMessage != null) + { + result.ErrorText = response.ErrorMessage; + } + + if (response.Cookies != null && response.Cookies.Count > 0) + { + if (result.Cookies == null) result.Cookies = new List(); + foreach (var restResponseCookie in response.Cookies.Cast()) + { + var cookie = new Cookie( + restResponseCookie.Name, + restResponseCookie.Value, + restResponseCookie.Path, + restResponseCookie.Domain + ) + { + Comment = restResponseCookie.Comment, + CommentUri = restResponseCookie.CommentUri, + Discard = restResponseCookie.Discard, + Expired = restResponseCookie.Expired, + Expires = restResponseCookie.Expires, + HttpOnly = restResponseCookie.HttpOnly, + Port = restResponseCookie.Port, + Secure = restResponseCookie.Secure, + Version = restResponseCookie.Version + }; + + result.Cookies.Add(cookie); + } + } + return result; + } + } + + private async Task> ExecAsync(RestRequest request, RequestOptions options, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; + + var clientOptions = new RestClientOptions(baseUrl) + { + ClientCertificates = configuration.ClientCertificates, + MaxTimeout = configuration.Timeout, + Proxy = configuration.Proxy, + UserAgent = configuration.UserAgent, + UseDefaultCredentials = configuration.UseDefaultCredentials, + RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback + }; + + if (!string.IsNullOrEmpty(configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(configuration.OAuthClientId) && + !string.IsNullOrEmpty(configuration.OAuthClientSecret) && + configuration.OAuthFlow != null) + { + clientOptions.Authenticator = new OAuthAuthenticator( + configuration.OAuthTokenUrl, + configuration.OAuthClientId, + configuration.OAuthClientSecret, + configuration.OAuthFlow, + SerializerSettings, + configuration); + } + + using (RestClient client = new RestClient(clientOptions, + configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)))) + { + InterceptRequest(request); + + RestResponse response; + if (RetryConfiguration.AsyncRetryPolicy != null) + { + var policy = RetryConfiguration.AsyncRetryPolicy; + var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(request, ct), cancellationToken).ConfigureAwait(false); + response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse(request) + { + ErrorException = policyResult.FinalException + }; + } + else + { + response = await client.ExecuteAsync(request, cancellationToken).ConfigureAwait(false); + } + + // if the response type is oneOf/anyOf, call FromJSON to deserialize the data + if (typeof(Ory.Hydra.Client.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) + { + response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); + } + else if (typeof(T).Name == "Stream") // for binary response + { + response.Data = (T)(object)new MemoryStream(response.RawBytes); + } + else if (typeof(T).Name == "Byte[]") // for byte response + { + response.Data = (T)(object)response.RawBytes; + } + + InterceptResponse(request, response); + + var result = ToApiResponse(response); + if (response.ErrorMessage != null) + { + result.ErrorText = response.ErrorMessage; + } + + if (response.Cookies != null && response.Cookies.Count > 0) + { + if (result.Cookies == null) result.Cookies = new List(); + foreach (var restResponseCookie in response.Cookies.Cast()) + { + var cookie = new Cookie( + restResponseCookie.Name, + restResponseCookie.Value, + restResponseCookie.Path, + restResponseCookie.Domain + ) + { + Comment = restResponseCookie.Comment, + CommentUri = restResponseCookie.CommentUri, + Discard = restResponseCookie.Discard, + Expired = restResponseCookie.Expired, + Expires = restResponseCookie.Expires, + HttpOnly = restResponseCookie.HttpOnly, + Port = restResponseCookie.Port, + Secure = restResponseCookie.Secure, + Version = restResponseCookie.Version + }; + + result.Cookies.Add(cookie); + } + } + return result; + } + } + + #region IAsynchronousClient + /// + /// Make a HTTP GET request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), options, config, cancellationToken); + } + + /// + /// Make a HTTP POST request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), options, config, cancellationToken); + } + + /// + /// Make a HTTP PUT request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), options, config, cancellationToken); + } + + /// + /// Make a HTTP DELETE request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), options, config, cancellationToken); + } + + /// + /// Make a HTTP HEAD request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), options, config, cancellationToken); + } + + /// + /// Make a HTTP OPTION request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), options, config, cancellationToken); + } + + /// + /// Make a HTTP PATCH request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), options, config, cancellationToken); + } + #endregion IAsynchronousClient + + #region ISynchronousClient + /// + /// Make a HTTP GET request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Get, path, options, config), options, config); + } + + /// + /// Make a HTTP POST request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Post, path, options, config), options, config); + } + + /// + /// Make a HTTP PUT request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Put, path, options, config), options, config); + } + + /// + /// Make a HTTP DELETE request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Delete, path, options, config), options, config); + } + + /// + /// Make a HTTP HEAD request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Head, path, options, config), options, config); + } + + /// + /// Make a HTTP OPTION request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Options, path, options, config), options, config); + } + + /// + /// Make a HTTP PATCH request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Patch, path, options, config), options, config); + } + #endregion ISynchronousClient + } +} diff --git a/Ory.Hydra.Client/Client/ApiException.cs b/Ory.Hydra.Client/Client/ApiException.cs new file mode 100644 index 00000000..5f7a013d --- /dev/null +++ b/Ory.Hydra.Client/Client/ApiException.cs @@ -0,0 +1,68 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; + +namespace Ory.Hydra.Client.Client +{ + /// + /// API Exception + /// + public class ApiException : Exception + { + /// + /// Gets or sets the error code (HTTP status code) + /// + /// The error code (HTTP status code). + public int ErrorCode { get; set; } + + /// + /// Gets or sets the error content (body json object) + /// + /// The error content (Http response body). + public object ErrorContent { get; private set; } + + /// + /// Gets or sets the HTTP headers + /// + /// HTTP headers + public Multimap Headers { get; private set; } + + /// + /// Initializes a new instance of the class. + /// + public ApiException() { } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Error message. + public ApiException(int errorCode, string message) : base(message) + { + this.ErrorCode = errorCode; + } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Error message. + /// Error content. + /// HTTP Headers. + public ApiException(int errorCode, string message, object errorContent = null, Multimap headers = null) : base(message) + { + this.ErrorCode = errorCode; + this.ErrorContent = errorContent; + this.Headers = headers; + } + } + +} diff --git a/Ory.Hydra.Client/Client/ApiResponse.cs b/Ory.Hydra.Client/Client/ApiResponse.cs new file mode 100644 index 00000000..de256245 --- /dev/null +++ b/Ory.Hydra.Client/Client/ApiResponse.cs @@ -0,0 +1,166 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Net; + +namespace Ory.Hydra.Client.Client +{ + /// + /// Provides a non-generic contract for the ApiResponse wrapper. + /// + public interface IApiResponse + { + /// + /// The data type of + /// + Type ResponseType { get; } + + /// + /// The content of this response + /// + Object Content { get; } + + /// + /// Gets or sets the status code (HTTP status code) + /// + /// The status code. + HttpStatusCode StatusCode { get; } + + /// + /// Gets or sets the HTTP headers + /// + /// HTTP headers + Multimap Headers { get; } + + /// + /// Gets or sets any error text defined by the calling client. + /// + string ErrorText { get; set; } + + /// + /// Gets or sets any cookies passed along on the response. + /// + List Cookies { get; set; } + + /// + /// The raw content of this response + /// + string RawContent { get; } + } + + /// + /// API Response + /// + public class ApiResponse : IApiResponse + { + #region Properties + + /// + /// Gets or sets the status code (HTTP status code) + /// + /// The status code. + public HttpStatusCode StatusCode { get; } + + /// + /// Gets or sets the HTTP headers + /// + /// HTTP headers + public Multimap Headers { get; } + + /// + /// Gets or sets the data (parsed HTTP body) + /// + /// The data. + public T Data { get; } + + /// + /// Gets or sets any error text defined by the calling client. + /// + public string ErrorText { get; set; } + + /// + /// Gets or sets any cookies passed along on the response. + /// + public List Cookies { get; set; } + + /// + /// The content of this response + /// + public Type ResponseType + { + get { return typeof(T); } + } + + /// + /// The data type of + /// + public object Content + { + get { return Data; } + } + + /// + /// The raw content + /// + public string RawContent { get; } + + #endregion Properties + + #region Constructors + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// HTTP headers. + /// Data (parsed HTTP body) + /// Raw content. + public ApiResponse(HttpStatusCode statusCode, Multimap headers, T data, string rawContent) + { + StatusCode = statusCode; + Headers = headers; + Data = data; + RawContent = rawContent; + } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// HTTP headers. + /// Data (parsed HTTP body) + public ApiResponse(HttpStatusCode statusCode, Multimap headers, T data) : this(statusCode, headers, data, null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Data (parsed HTTP body) + /// Raw content. + public ApiResponse(HttpStatusCode statusCode, T data, string rawContent) : this(statusCode, null, data, rawContent) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Data (parsed HTTP body) + public ApiResponse(HttpStatusCode statusCode, T data) : this(statusCode, data, null) + { + } + + #endregion Constructors + } +} diff --git a/Ory.Hydra.Client/Client/Auth/OAuthAuthenticator.cs b/Ory.Hydra.Client/Client/Auth/OAuthAuthenticator.cs new file mode 100644 index 00000000..42617842 --- /dev/null +++ b/Ory.Hydra.Client/Client/Auth/OAuthAuthenticator.cs @@ -0,0 +1,105 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; +using RestSharp; +using RestSharp.Authenticators; + +namespace Ory.Hydra.Client.Client.Auth +{ + /// + /// An authenticator for OAuth2 authentication flows + /// + public class OAuthAuthenticator : AuthenticatorBase + { + readonly string _tokenUrl; + readonly string _clientId; + readonly string _clientSecret; + readonly string _grantType; + readonly JsonSerializerSettings _serializerSettings; + readonly IReadableConfiguration _configuration; + + /// + /// Initialize the OAuth2 Authenticator + /// + public OAuthAuthenticator( + string tokenUrl, + string clientId, + string clientSecret, + OAuthFlow? flow, + JsonSerializerSettings serializerSettings, + IReadableConfiguration configuration) : base("") + { + _tokenUrl = tokenUrl; + _clientId = clientId; + _clientSecret = clientSecret; + _serializerSettings = serializerSettings; + _configuration = configuration; + + switch (flow) + { + /*case OAuthFlow.ACCESS_CODE: + _grantType = "authorization_code"; + break; + case OAuthFlow.IMPLICIT: + _grantType = "implicit"; + break; + case OAuthFlow.PASSWORD: + _grantType = "password"; + break;*/ + case OAuthFlow.APPLICATION: + _grantType = "client_credentials"; + break; + default: + break; + } + } + + /// + /// Creates an authentication parameter from an access token. + /// + /// Access token to create a parameter from. + /// An authentication parameter. + protected override async ValueTask GetAuthenticationParameter(string accessToken) + { + var token = string.IsNullOrEmpty(Token) ? await GetToken().ConfigureAwait(false) : Token; + return new HeaderParameter(KnownHeaders.Authorization, token); + } + + /// + /// Gets the token from the OAuth2 server. + /// + /// An authentication token. + async Task GetToken() + { + var client = new RestClient(_tokenUrl, + configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(_serializerSettings, _configuration))); + + var request = new RestRequest() + .AddParameter("grant_type", _grantType) + .AddParameter("client_id", _clientId) + .AddParameter("client_secret", _clientSecret); + var response = await client.PostAsync(request).ConfigureAwait(false); + + // RFC6749 - token_type is case insensitive. + // RFC6750 - In Authorization header Bearer should be capitalized. + // Fix the capitalization irrespective of token_type casing. + switch (response.TokenType?.ToLower()) + { + case "bearer": + return $"Bearer {response.AccessToken}"; + default: + return $"{response.TokenType} {response.AccessToken}"; + } + } + } +} diff --git a/Ory.Hydra.Client/Client/Auth/OAuthFlow.cs b/Ory.Hydra.Client/Client/Auth/OAuthFlow.cs new file mode 100644 index 00000000..133f70c7 --- /dev/null +++ b/Ory.Hydra.Client/Client/Auth/OAuthFlow.cs @@ -0,0 +1,27 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +namespace Ory.Hydra.Client.Client.Auth +{ + /// + /// Available flows for OAuth2 authentication + /// + public enum OAuthFlow + { + /// Authorization code flow + ACCESS_CODE, + /// Implicit flow + IMPLICIT, + /// Password flow + PASSWORD, + /// Client credentials flow + APPLICATION + } +} \ No newline at end of file diff --git a/Ory.Hydra.Client/Client/Auth/TokenResponse.cs b/Ory.Hydra.Client/Client/Auth/TokenResponse.cs new file mode 100644 index 00000000..40781e78 --- /dev/null +++ b/Ory.Hydra.Client/Client/Auth/TokenResponse.cs @@ -0,0 +1,22 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Newtonsoft.Json; + +namespace Ory.Hydra.Client.Client.Auth +{ + class TokenResponse + { + [JsonProperty("token_type")] + public string TokenType { get; set; } + [JsonProperty("access_token")] + public string AccessToken { get; set; } + } +} \ No newline at end of file diff --git a/Ory.Hydra.Client/Client/ClientUtils.cs b/Ory.Hydra.Client/Client/ClientUtils.cs new file mode 100644 index 00000000..d7a87425 --- /dev/null +++ b/Ory.Hydra.Client/Client/ClientUtils.cs @@ -0,0 +1,247 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; + +namespace Ory.Hydra.Client.Client +{ + /// + /// Utility functions providing some benefit to API client consumers. + /// + public static class ClientUtils + { + /// + /// Sanitize filename by removing the path + /// + /// Filename + /// Filename + public static string SanitizeFilename(string filename) + { + Match match = Regex.Match(filename, @".*[/\\](.*)$"); + return match.Success ? match.Groups[1].Value : filename; + } + + /// + /// Convert params to key/value pairs. + /// Use collectionFormat to properly format lists and collections. + /// + /// The swagger-supported collection format, one of: csv, tsv, ssv, pipes, multi + /// Key name. + /// Value object. + /// A multimap of keys with 1..n associated values. + public static Multimap ParameterToMultiMap(string collectionFormat, string name, object value) + { + var parameters = new Multimap(); + + if (value is ICollection collection && collectionFormat == "multi") + { + foreach (var item in collection) + { + parameters.Add(name, ParameterToString(item)); + } + } + else if (value is IDictionary dictionary) + { + if(collectionFormat == "deepObject") { + foreach (DictionaryEntry entry in dictionary) + { + parameters.Add(name + "[" + entry.Key + "]", ParameterToString(entry.Value)); + } + } + else { + foreach (DictionaryEntry entry in dictionary) + { + parameters.Add(entry.Key.ToString(), ParameterToString(entry.Value)); + } + } + } + else + { + parameters.Add(name, ParameterToString(value)); + } + + return parameters; + } + + /// + /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. + /// If parameter is a list, join the list with ",". + /// Otherwise just return the string. + /// + /// The parameter (header, path, query, form). + /// An optional configuration instance, providing formatting options used in processing. + /// Formatted string. + public static string ParameterToString(object obj, IReadableConfiguration configuration = null) + { + if (obj is DateTime dateTime) + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15T13:45:30.0000000 + return dateTime.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); + if (obj is DateTimeOffset dateTimeOffset) + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15T13:45:30.0000000 + return dateTimeOffset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); + if (obj is bool boolean) + return boolean ? "true" : "false"; + if (obj is ICollection collection) { + List entries = new List(); + foreach (var entry in collection) + entries.Add(ParameterToString(entry, configuration)); + return string.Join(",", entries); + } + if (obj is Enum && HasEnumMemberAttrValue(obj)) + return GetEnumMemberAttrValue(obj); + + return Convert.ToString(obj, CultureInfo.InvariantCulture); + } + + /// + /// Serializes the given object when not null. Otherwise return null. + /// + /// The object to serialize. + /// Serialized string. + public static string Serialize(object obj) + { + return obj != null ? Newtonsoft.Json.JsonConvert.SerializeObject(obj) : null; + } + + /// + /// Encode string in base64 format. + /// + /// string to be encoded. + /// Encoded string. + public static string Base64Encode(string text) + { + return Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); + } + + /// + /// Convert stream to byte array + /// + /// Input stream to be converted + /// Byte array + public static byte[] ReadAsBytes(Stream inputStream) + { + using (var ms = new MemoryStream()) + { + inputStream.CopyTo(ms); + return ms.ToArray(); + } + } + + /// + /// Select the Content-Type header's value from the given content-type array: + /// if JSON type exists in the given array, use it; + /// otherwise use the first one defined in 'consumes' + /// + /// The Content-Type array to select from. + /// The Content-Type header to use. + public static string SelectHeaderContentType(string[] contentTypes) + { + if (contentTypes.Length == 0) + return null; + + foreach (var contentType in contentTypes) + { + if (IsJsonMime(contentType)) + return contentType; + } + + return contentTypes[0]; // use the first content type specified in 'consumes' + } + + /// + /// Select the Accept header's value from the given accepts array: + /// if JSON exists in the given array, use it; + /// otherwise use all of them (joining into a string) + /// + /// The accepts array to select from. + /// The Accept header to use. + public static string SelectHeaderAccept(string[] accepts) + { + if (accepts.Length == 0) + return null; + + if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) + return "application/json"; + + return string.Join(",", accepts); + } + + /// + /// Provides a case-insensitive check that a provided content type is a known JSON-like content type. + /// + public static readonly Regex JsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); + + /// + /// Check if the given MIME is a JSON MIME. + /// JSON MIME examples: + /// application/json + /// application/json; charset=UTF8 + /// APPLICATION/JSON + /// application/vnd.company+json + /// + /// MIME + /// Returns True if MIME type is json. + public static bool IsJsonMime(string mime) + { + if (string.IsNullOrWhiteSpace(mime)) return false; + + return JsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json"); + } + + /// + /// Is the Enum decorated with EnumMember Attribute + /// + /// + /// true if found + private static bool HasEnumMemberAttrValue(object enumVal) + { + if (enumVal == null) + throw new ArgumentNullException(nameof(enumVal)); + var enumType = enumVal.GetType(); + var memInfo = enumType.GetMember(enumVal.ToString() ?? throw new InvalidOperationException()); + var attr = memInfo.FirstOrDefault()?.GetCustomAttributes(false).OfType().FirstOrDefault(); + if (attr != null) return true; + return false; + } + + /// + /// Get the EnumMember value + /// + /// + /// EnumMember value as string otherwise null + private static string GetEnumMemberAttrValue(object enumVal) + { + if (enumVal == null) + throw new ArgumentNullException(nameof(enumVal)); + var enumType = enumVal.GetType(); + var memInfo = enumType.GetMember(enumVal.ToString() ?? throw new InvalidOperationException()); + var attr = memInfo.FirstOrDefault()?.GetCustomAttributes(false).OfType().FirstOrDefault(); + if (attr != null) + { + return attr.Value; + } + return null; + } + } +} diff --git a/Ory.Hydra.Client/Client/Configuration.cs b/Ory.Hydra.Client/Client/Configuration.cs new file mode 100644 index 00000000..9995658f --- /dev/null +++ b/Ory.Hydra.Client/Client/Configuration.cs @@ -0,0 +1,641 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using System.Text; +using System.Net.Http; +using System.Net.Security; +using Ory.Hydra.Client.Client.Auth; + +namespace Ory.Hydra.Client.Client +{ + /// + /// Represents a set of configuration settings + /// + public class Configuration : IReadableConfiguration + { + #region Constants + + /// + /// Version of the package. + /// + /// Version of the package. + public const string Version = "2.2.0"; + + /// + /// Identifier for ISO 8601 DateTime Format + /// + /// See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information. + // ReSharper disable once InconsistentNaming + public const string ISO8601_DATETIME_FORMAT = "o"; + + #endregion Constants + + #region Static Members + + /// + /// Default creation of exceptions for a given method name and response object + /// + public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) => + { + var status = (int)response.StatusCode; + if (status >= 400) + { + return new ApiException(status, + string.Format("Error calling {0}: {1}", methodName, response.RawContent), + response.RawContent, response.Headers); + } + if (status == 0) + { + return new ApiException(status, + string.Format("Error calling {0}: {1}", methodName, response.ErrorText), response.ErrorText); + } + return null; + }; + + #endregion Static Members + + #region Private Members + + /// + /// Defines the base path of the target API server. + /// Example: http://localhost:3000/v1/ + /// + private string _basePath; + + private bool _useDefaultCredentials = false; + + /// + /// Gets or sets the API key based on the authentication name. + /// This is the key and value comprising the "secret" for accessing an API. + /// + /// The API key. + private IDictionary _apiKey; + + /// + /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. + /// + /// The prefix of the API key. + private IDictionary _apiKeyPrefix; + + private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; + private string _tempFolderPath = Path.GetTempPath(); + + /// + /// Gets or sets the servers defined in the OpenAPI spec. + /// + /// The servers + private IList> _servers; + + /// + /// Gets or sets the operation servers defined in the OpenAPI spec. + /// + /// The operation servers + private IReadOnlyDictionary>> _operationServers; + + #endregion Private Members + + #region Constructors + + /// + /// Initializes a new instance of the class + /// + [System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] + public Configuration() + { + Proxy = null; + UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/2.2.0/csharp"); + BasePath = "http://localhost"; + DefaultHeaders = new ConcurrentDictionary(); + ApiKey = new ConcurrentDictionary(); + ApiKeyPrefix = new ConcurrentDictionary(); + Servers = new List>() + { + { + new Dictionary { + {"url", ""}, + {"description", "No description provided"}, + } + } + }; + OperationServers = new Dictionary>>() + { + }; + + // Setting Timeout has side effects (forces ApiClient creation). + Timeout = 100000; + } + + /// + /// Initializes a new instance of the class + /// + [System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] + public Configuration( + IDictionary defaultHeaders, + IDictionary apiKey, + IDictionary apiKeyPrefix, + string basePath = "http://localhost") : this() + { + if (string.IsNullOrWhiteSpace(basePath)) + throw new ArgumentException("The provided basePath is invalid.", "basePath"); + if (defaultHeaders == null) + throw new ArgumentNullException("defaultHeaders"); + if (apiKey == null) + throw new ArgumentNullException("apiKey"); + if (apiKeyPrefix == null) + throw new ArgumentNullException("apiKeyPrefix"); + + BasePath = basePath; + + foreach (var keyValuePair in defaultHeaders) + { + DefaultHeaders.Add(keyValuePair); + } + + foreach (var keyValuePair in apiKey) + { + ApiKey.Add(keyValuePair); + } + + foreach (var keyValuePair in apiKeyPrefix) + { + ApiKeyPrefix.Add(keyValuePair); + } + } + + #endregion Constructors + + #region Properties + + /// + /// Gets or sets the base path for API access. + /// + public virtual string BasePath + { + get { return _basePath; } + set { _basePath = value; } + } + + /// + /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false. + /// + public virtual bool UseDefaultCredentials + { + get { return _useDefaultCredentials; } + set { _useDefaultCredentials = value; } + } + + /// + /// Gets or sets the default header. + /// + [Obsolete("Use DefaultHeaders instead.")] + public virtual IDictionary DefaultHeader + { + get + { + return DefaultHeaders; + } + set + { + DefaultHeaders = value; + } + } + + /// + /// Gets or sets the default headers. + /// + public virtual IDictionary DefaultHeaders { get; set; } + + /// + /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. + /// + public virtual int Timeout { get; set; } + + /// + /// Gets or sets the proxy + /// + /// Proxy. + public virtual WebProxy Proxy { get; set; } + + /// + /// Gets or sets the HTTP user agent. + /// + /// Http user agent. + public virtual string UserAgent { get; set; } + + /// + /// Gets or sets the username (HTTP basic authentication). + /// + /// The username. + public virtual string Username { get; set; } + + /// + /// Gets or sets the password (HTTP basic authentication). + /// + /// The password. + public virtual string Password { get; set; } + + /// + /// Gets the API key with prefix. + /// + /// API key identifier (authentication scheme). + /// API key with prefix. + public string GetApiKeyWithPrefix(string apiKeyIdentifier) + { + string apiKeyValue; + ApiKey.TryGetValue(apiKeyIdentifier, out apiKeyValue); + string apiKeyPrefix; + if (ApiKeyPrefix.TryGetValue(apiKeyIdentifier, out apiKeyPrefix)) + { + return apiKeyPrefix + " " + apiKeyValue; + } + + return apiKeyValue; + } + + /// + /// Gets or sets certificate collection to be sent with requests. + /// + /// X509 Certificate collection. + public X509CertificateCollection ClientCertificates { get; set; } + + /// + /// Gets or sets the access token for OAuth2 authentication. + /// + /// This helper property simplifies code generation. + /// + /// The access token. + public virtual string AccessToken { get; set; } + + /// + /// Gets or sets the token URL for OAuth2 authentication. + /// + /// The OAuth Token URL. + public virtual string OAuthTokenUrl { get; set; } + + /// + /// Gets or sets the client ID for OAuth2 authentication. + /// + /// The OAuth Client ID. + public virtual string OAuthClientId { get; set; } + + /// + /// Gets or sets the client secret for OAuth2 authentication. + /// + /// The OAuth Client Secret. + public virtual string OAuthClientSecret { get; set; } + + /// + /// Gets or sets the flow for OAuth2 authentication. + /// + /// The OAuth Flow. + public virtual OAuthFlow? OAuthFlow { get; set; } + + /// + /// Gets or sets the temporary folder path to store the files downloaded from the server. + /// + /// Folder path. + public virtual string TempFolderPath + { + get { return _tempFolderPath; } + + set + { + if (string.IsNullOrEmpty(value)) + { + _tempFolderPath = Path.GetTempPath(); + return; + } + + // create the directory if it does not exist + if (!Directory.Exists(value)) + { + Directory.CreateDirectory(value); + } + + // check if the path contains directory separator at the end + if (value[value.Length - 1] == Path.DirectorySeparatorChar) + { + _tempFolderPath = value; + } + else + { + _tempFolderPath = value + Path.DirectorySeparatorChar; + } + } + } + + /// + /// Gets or sets the date time format used when serializing in the ApiClient + /// By default, it's set to ISO 8601 - "o", for others see: + /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx + /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx + /// No validation is done to ensure that the string you're providing is valid + /// + /// The DateTimeFormat string + public virtual string DateTimeFormat + { + get { return _dateTimeFormat; } + set + { + if (string.IsNullOrEmpty(value)) + { + // Never allow a blank or null string, go back to the default + _dateTimeFormat = ISO8601_DATETIME_FORMAT; + return; + } + + // Caution, no validation when you choose date time format other than ISO 8601 + // Take a look at the above links + _dateTimeFormat = value; + } + } + + /// + /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. + /// + /// Whatever you set here will be prepended to the value defined in AddApiKey. + /// + /// An example invocation here might be: + /// + /// ApiKeyPrefix["Authorization"] = "Bearer"; + /// + /// … where ApiKey["Authorization"] would then be used to set the value of your bearer token. + /// + /// + /// OAuth2 workflows should set tokens via AccessToken. + /// + /// + /// The prefix of the API key. + public virtual IDictionary ApiKeyPrefix + { + get { return _apiKeyPrefix; } + set + { + if (value == null) + { + throw new InvalidOperationException("ApiKeyPrefix collection may not be null."); + } + _apiKeyPrefix = value; + } + } + + /// + /// Gets or sets the API key based on the authentication name. + /// + /// The API key. + public virtual IDictionary ApiKey + { + get { return _apiKey; } + set + { + if (value == null) + { + throw new InvalidOperationException("ApiKey collection may not be null."); + } + _apiKey = value; + } + } + + /// + /// Gets or sets the servers. + /// + /// The servers. + public virtual IList> Servers + { + get { return _servers; } + set + { + if (value == null) + { + throw new InvalidOperationException("Servers may not be null."); + } + _servers = value; + } + } + + /// + /// Gets or sets the operation servers. + /// + /// The operation servers. + public virtual IReadOnlyDictionary>> OperationServers + { + get { return _operationServers; } + set + { + if (value == null) + { + throw new InvalidOperationException("Operation servers may not be null."); + } + _operationServers = value; + } + } + + /// + /// Returns URL based on server settings without providing values + /// for the variables + /// + /// Array index of the server settings. + /// The server URL. + public string GetServerUrl(int index) + { + return GetServerUrl(Servers, index, null); + } + + /// + /// Returns URL based on server settings. + /// + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The server URL. + public string GetServerUrl(int index, Dictionary inputVariables) + { + return GetServerUrl(Servers, index, inputVariables); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index) + { + return GetOperationServerUrl(operation, index, null); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index, Dictionary inputVariables) + { + if (operation != null && OperationServers.TryGetValue(operation, out var operationServer)) + { + return GetServerUrl(operationServer, index, inputVariables); + } + + return null; + } + + /// + /// Returns URL based on server settings. + /// + /// Dictionary of server settings. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The server URL. + private string GetServerUrl(IList> servers, int index, Dictionary inputVariables) + { + if (index < 0 || index >= servers.Count) + { + throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {servers.Count}."); + } + + if (inputVariables == null) + { + inputVariables = new Dictionary(); + } + + IReadOnlyDictionary server = servers[index]; + string url = (string)server["url"]; + + if (server.ContainsKey("variables")) + { + // go through each variable and assign a value + foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + { + + IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); + + if (inputVariables.ContainsKey(variable.Key)) + { + if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + { + url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + } + else + { + throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + } + } + else + { + // use default value + url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); + } + } + } + + return url; + } + + /// + /// Gets and Sets the RemoteCertificateValidationCallback + /// + public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; } + + #endregion Properties + + #region Methods + + /// + /// Returns a string with essential information for debugging. + /// + public static string ToDebugReport() + { + string report = "C# SDK (Ory.Hydra.Client) Debug Report:\n"; + report += " OS: " + System.Environment.OSVersion + "\n"; + report += " .NET Framework Version: " + System.Environment.Version + "\n"; + report += " Version of the API: \n"; + report += " SDK Package Version: 2.2.0\n"; + + return report; + } + + /// + /// Add Api Key Header. + /// + /// Api Key name. + /// Api Key value. + /// + public void AddApiKey(string key, string value) + { + ApiKey[key] = value; + } + + /// + /// Sets the API key prefix. + /// + /// Api Key name. + /// Api Key value. + public void AddApiKeyPrefix(string key, string value) + { + ApiKeyPrefix[key] = value; + } + + #endregion Methods + + #region Static Members + /// + /// Merge configurations. + /// + /// First configuration. + /// Second configuration. + /// Merged configuration. + public static IReadableConfiguration MergeConfigurations(IReadableConfiguration first, IReadableConfiguration second) + { + if (second == null) return first ?? GlobalConfiguration.Instance; + + Dictionary apiKey = first.ApiKey.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); + Dictionary apiKeyPrefix = first.ApiKeyPrefix.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); + Dictionary defaultHeaders = first.DefaultHeaders.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); + + foreach (var kvp in second.ApiKey) apiKey[kvp.Key] = kvp.Value; + foreach (var kvp in second.ApiKeyPrefix) apiKeyPrefix[kvp.Key] = kvp.Value; + foreach (var kvp in second.DefaultHeaders) defaultHeaders[kvp.Key] = kvp.Value; + + var config = new Configuration + { + ApiKey = apiKey, + ApiKeyPrefix = apiKeyPrefix, + DefaultHeaders = defaultHeaders, + BasePath = second.BasePath ?? first.BasePath, + Timeout = second.Timeout, + Proxy = second.Proxy ?? first.Proxy, + UserAgent = second.UserAgent ?? first.UserAgent, + Username = second.Username ?? first.Username, + Password = second.Password ?? first.Password, + AccessToken = second.AccessToken ?? first.AccessToken, + OAuthTokenUrl = second.OAuthTokenUrl ?? first.OAuthTokenUrl, + OAuthClientId = second.OAuthClientId ?? first.OAuthClientId, + OAuthClientSecret = second.OAuthClientSecret ?? first.OAuthClientSecret, + OAuthFlow = second.OAuthFlow ?? first.OAuthFlow, + TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, + DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, + ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, + UseDefaultCredentials = second.UseDefaultCredentials, + RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback, + }; + return config; + } + #endregion Static Members + } +} diff --git a/Ory.Hydra.Client/Client/ExceptionFactory.cs b/Ory.Hydra.Client/Client/ExceptionFactory.cs new file mode 100644 index 00000000..eb9edbaf --- /dev/null +++ b/Ory.Hydra.Client/Client/ExceptionFactory.cs @@ -0,0 +1,22 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; + +namespace Ory.Hydra.Client.Client +{ + /// + /// A delegate to ExceptionFactory method + /// + /// Method name + /// Response + /// Exceptions + public delegate Exception ExceptionFactory(string methodName, IApiResponse response); +} diff --git a/Ory.Hydra.Client/Client/GlobalConfiguration.cs b/Ory.Hydra.Client/Client/GlobalConfiguration.cs new file mode 100644 index 00000000..45e701fb --- /dev/null +++ b/Ory.Hydra.Client/Client/GlobalConfiguration.cs @@ -0,0 +1,67 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System.Collections.Generic; + +namespace Ory.Hydra.Client.Client +{ + /// + /// provides a compile-time extension point for globally configuring + /// API Clients. + /// + /// + /// A customized implementation via partial class may reside in another file and may + /// be excluded from automatic generation via a .openapi-generator-ignore file. + /// + public partial class GlobalConfiguration : Configuration + { + #region Private Members + + private static readonly object GlobalConfigSync = new { }; + private static IReadableConfiguration _globalConfiguration; + + #endregion Private Members + + #region Constructors + + /// + private GlobalConfiguration() + { + } + + /// + public GlobalConfiguration(IDictionary defaultHeader, IDictionary apiKey, IDictionary apiKeyPrefix, string basePath = "http://localhost:3000/api") : base(defaultHeader, apiKey, apiKeyPrefix, basePath) + { + } + + static GlobalConfiguration() + { + Instance = new GlobalConfiguration(); + } + + #endregion Constructors + + /// + /// Gets or sets the default Configuration. + /// + /// Configuration. + public static IReadableConfiguration Instance + { + get { return _globalConfiguration; } + set + { + lock (GlobalConfigSync) + { + _globalConfiguration = value; + } + } + } + } +} diff --git a/Ory.Hydra.Client/Client/HttpMethod.cs b/Ory.Hydra.Client/Client/HttpMethod.cs new file mode 100644 index 00000000..76d6763c --- /dev/null +++ b/Ory.Hydra.Client/Client/HttpMethod.cs @@ -0,0 +1,33 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +namespace Ory.Hydra.Client.Client +{ + /// + /// Http methods supported by swagger + /// + public enum HttpMethod + { + /// HTTP GET request. + Get, + /// HTTP POST request. + Post, + /// HTTP PUT request. + Put, + /// HTTP DELETE request. + Delete, + /// HTTP HEAD request. + Head, + /// HTTP OPTIONS request. + Options, + /// HTTP PATCH request. + Patch + } +} diff --git a/Ory.Hydra.Client/Client/IApiAccessor.cs b/Ory.Hydra.Client/Client/IApiAccessor.cs new file mode 100644 index 00000000..ebae9718 --- /dev/null +++ b/Ory.Hydra.Client/Client/IApiAccessor.cs @@ -0,0 +1,37 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; + +namespace Ory.Hydra.Client.Client +{ + /// + /// Represents configuration aspects required to interact with the API endpoints. + /// + public interface IApiAccessor + { + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + IReadableConfiguration Configuration { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + string GetBasePath(); + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + ExceptionFactory ExceptionFactory { get; set; } + } +} diff --git a/Ory.Hydra.Client/Client/IAsynchronousClient.cs b/Ory.Hydra.Client/Client/IAsynchronousClient.cs new file mode 100644 index 00000000..c963787d --- /dev/null +++ b/Ory.Hydra.Client/Client/IAsynchronousClient.cs @@ -0,0 +1,100 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Threading.Tasks; + +namespace Ory.Hydra.Client.Client +{ + /// + /// Contract for Asynchronous RESTful API interactions. + /// + /// This interface allows consumers to provide a custom API accessor client. + /// + public interface IAsynchronousClient + { + /// + /// Executes a non-blocking call to some using the GET http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// Cancellation Token to cancel the request. + /// The return type. + /// A task eventually representing the response data, decorated with + Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Executes a non-blocking call to some using the POST http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// Cancellation Token to cancel the request. + /// The return type. + /// A task eventually representing the response data, decorated with + Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Executes a non-blocking call to some using the PUT http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// Cancellation Token to cancel the request. + /// The return type. + /// A task eventually representing the response data, decorated with + Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Executes a non-blocking call to some using the DELETE http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// Cancellation Token to cancel the request. + /// The return type. + /// A task eventually representing the response data, decorated with + Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Executes a non-blocking call to some using the HEAD http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// Cancellation Token to cancel the request. + /// The return type. + /// A task eventually representing the response data, decorated with + Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Executes a non-blocking call to some using the OPTIONS http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// Cancellation Token to cancel the request. + /// The return type. + /// A task eventually representing the response data, decorated with + Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Executes a non-blocking call to some using the PATCH http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// Cancellation Token to cancel the request. + /// The return type. + /// A task eventually representing the response data, decorated with + Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } +} diff --git a/Ory.Hydra.Client/Client/IReadableConfiguration.cs b/Ory.Hydra.Client/Client/IReadableConfiguration.cs new file mode 100644 index 00000000..190b3cd9 --- /dev/null +++ b/Ory.Hydra.Client/Client/IReadableConfiguration.cs @@ -0,0 +1,166 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Net; +using System.Net.Security; +using System.Security.Cryptography.X509Certificates; +using Ory.Hydra.Client.Client.Auth; + +namespace Ory.Hydra.Client.Client +{ + /// + /// Represents a readable-only configuration contract. + /// + public interface IReadableConfiguration + { + /// + /// Gets the access token. + /// + /// Access token. + string AccessToken { get; } + + /// + /// Gets the OAuth token URL. + /// + /// OAuth Token URL. + string OAuthTokenUrl { get; } + + /// + /// Gets the OAuth client ID. + /// + /// OAuth Client ID. + string OAuthClientId { get; } + + /// + /// Gets the OAuth client secret. + /// + /// OAuth Client Secret. + string OAuthClientSecret { get; } + + /// + /// Gets the OAuth flow. + /// + /// OAuth Flow. + OAuthFlow? OAuthFlow { get; } + + /// + /// Gets the API key. + /// + /// API key. + IDictionary ApiKey { get; } + + /// + /// Gets the API key prefix. + /// + /// API key prefix. + IDictionary ApiKeyPrefix { get; } + + /// + /// Gets the base path. + /// + /// Base path. + string BasePath { get; } + + /// + /// Gets the date time format. + /// + /// Date time format. + string DateTimeFormat { get; } + + /// + /// Gets the default header. + /// + /// Default header. + [Obsolete("Use DefaultHeaders instead.")] + IDictionary DefaultHeader { get; } + + /// + /// Gets the default headers. + /// + /// Default headers. + IDictionary DefaultHeaders { get; } + + /// + /// Gets the temp folder path. + /// + /// Temp folder path. + string TempFolderPath { get; } + + /// + /// Gets the HTTP connection timeout (in milliseconds) + /// + /// HTTP connection timeout. + int Timeout { get; } + + /// + /// Gets the proxy. + /// + /// Proxy. + WebProxy Proxy { get; } + + /// + /// Gets the user agent. + /// + /// User agent. + string UserAgent { get; } + + /// + /// Gets the username. + /// + /// Username. + string Username { get; } + + /// + /// Gets the password. + /// + /// Password. + string Password { get; } + + /// + /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false. + /// + bool UseDefaultCredentials { get; } + + /// + /// Get the servers associated with the operation. + /// + /// Operation servers. + IReadOnlyDictionary>> OperationServers { get; } + + /// + /// Gets the API key with prefix. + /// + /// API key identifier (authentication scheme). + /// API key with prefix. + string GetApiKeyWithPrefix(string apiKeyIdentifier); + + /// + /// Gets the Operation server url at the provided index. + /// + /// Operation server name. + /// Index of the operation server settings. + /// + string GetOperationServerUrl(string operation, int index); + + /// + /// Gets certificate collection to be sent with requests. + /// + /// X509 Certificate collection. + X509CertificateCollection ClientCertificates { get; } + + /// + /// Callback function for handling the validation of remote certificates. Useful for certificate pinning and + /// overriding certificate errors in the scope of a request. + /// + RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; } + } +} diff --git a/Ory.Hydra.Client/Client/ISynchronousClient.cs b/Ory.Hydra.Client/Client/ISynchronousClient.cs new file mode 100644 index 00000000..34fd648b --- /dev/null +++ b/Ory.Hydra.Client/Client/ISynchronousClient.cs @@ -0,0 +1,93 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.IO; + +namespace Ory.Hydra.Client.Client +{ + /// + /// Contract for Synchronous RESTful API interactions. + /// + /// This interface allows consumers to provide a custom API accessor client. + /// + public interface ISynchronousClient + { + /// + /// Executes a blocking call to some using the GET http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// The return type. + /// The response data, decorated with + ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null); + + /// + /// Executes a blocking call to some using the POST http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// The return type. + /// The response data, decorated with + ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null); + + /// + /// Executes a blocking call to some using the PUT http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// The return type. + /// The response data, decorated with + ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null); + + /// + /// Executes a blocking call to some using the DELETE http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// The return type. + /// The response data, decorated with + ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null); + + /// + /// Executes a blocking call to some using the HEAD http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// The return type. + /// The response data, decorated with + ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null); + + /// + /// Executes a blocking call to some using the OPTIONS http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// The return type. + /// The response data, decorated with + ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null); + + /// + /// Executes a blocking call to some using the PATCH http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// The return type. + /// The response data, decorated with + ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null); + } +} diff --git a/Ory.Hydra.Client/Client/Multimap.cs b/Ory.Hydra.Client/Client/Multimap.cs new file mode 100644 index 00000000..3b19f25b --- /dev/null +++ b/Ory.Hydra.Client/Client/Multimap.cs @@ -0,0 +1,295 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Ory.Hydra.Client.Client +{ + /// + /// A dictionary in which one key has many associated values. + /// + /// The type of the key + /// The type of the value associated with the key. + public class Multimap : IDictionary> + { + #region Private Fields + + private readonly Dictionary> _dictionary; + + #endregion Private Fields + + #region Constructors + + /// + /// Empty Constructor. + /// + public Multimap() + { + _dictionary = new Dictionary>(); + } + + /// + /// Constructor with comparer. + /// + /// + public Multimap(IEqualityComparer comparer) + { + _dictionary = new Dictionary>(comparer); + } + + #endregion Constructors + + #region Enumerators + + /// + /// To get the enumerator. + /// + /// Enumerator + public IEnumerator>> GetEnumerator() + { + return _dictionary.GetEnumerator(); + } + + /// + /// To get the enumerator. + /// + /// Enumerator + IEnumerator IEnumerable.GetEnumerator() + { + return _dictionary.GetEnumerator(); + } + + #endregion Enumerators + + #region Public Members + /// + /// Add values to Multimap + /// + /// Key value pair + public void Add(KeyValuePair> item) + { + if (!TryAdd(item.Key, item.Value)) + throw new InvalidOperationException("Could not add values to Multimap."); + } + + /// + /// Add Multimap to Multimap + /// + /// Multimap + public void Add(Multimap multimap) + { + foreach (var item in multimap) + { + if (!TryAdd(item.Key, item.Value)) + throw new InvalidOperationException("Could not add values to Multimap."); + } + } + + /// + /// Clear Multimap + /// + public void Clear() + { + _dictionary.Clear(); + } + + /// + /// Determines whether Multimap contains the specified item. + /// + /// Key value pair + /// Method needs to be implemented + /// true if the Multimap contains the item; otherwise, false. + public bool Contains(KeyValuePair> item) + { + throw new NotImplementedException(); + } + + /// + /// Copy items of the Multimap to an array, + /// starting at a particular array index. + /// + /// The array that is the destination of the items copied + /// from Multimap. The array must have zero-based indexing. + /// The zero-based index in array at which copying begins. + /// Method needs to be implemented + public void CopyTo(KeyValuePair>[] array, int arrayIndex) + { + throw new NotImplementedException(); + } + + /// + /// Removes the specified item from the Multimap. + /// + /// Key value pair + /// true if the item is successfully removed; otherwise, false. + /// Method needs to be implemented + public bool Remove(KeyValuePair> item) + { + throw new NotImplementedException(); + } + + /// + /// Gets the number of items contained in the Multimap. + /// + public int Count => _dictionary.Count; + + /// + /// Gets a value indicating whether the Multimap is read-only. + /// + public bool IsReadOnly => false; + + /// + /// Adds an item with the provided key and value to the Multimap. + /// + /// The object to use as the key of the item to add. + /// The object to use as the value of the item to add. + /// Thrown when couldn't add the value to Multimap. + public void Add(TKey key, IList value) + { + if (value != null && value.Count > 0) + { + if (_dictionary.TryGetValue(key, out var list)) + { + foreach (var k in value) list.Add(k); + } + else + { + list = new List(value); + if (!TryAdd(key, list)) + throw new InvalidOperationException("Could not add values to Multimap."); + } + } + } + + /// + /// Determines whether the Multimap contains an item with the specified key. + /// + /// The key to locate in the Multimap. + /// true if the Multimap contains an item with + /// the key; otherwise, false. + public bool ContainsKey(TKey key) + { + return _dictionary.ContainsKey(key); + } + + /// + /// Removes item with the specified key from the Multimap. + /// + /// The key to locate in the Multimap. + /// true if the item is successfully removed; otherwise, false. + public bool Remove(TKey key) + { + return TryRemove(key, out var _); + } + + /// + /// Gets the value associated with the specified key. + /// + /// The key whose value to get. + /// When this method returns, the value associated with the specified key, if the + /// key is found; otherwise, the default value for the type of the value parameter. + /// This parameter is passed uninitialized. + /// true if the object that implements Multimap contains + /// an item with the specified key; otherwise, false. + public bool TryGetValue(TKey key, out IList value) + { + return _dictionary.TryGetValue(key, out value); + } + + /// + /// Gets or sets the item with the specified key. + /// + /// The key of the item to get or set. + /// The value of the specified key. + public IList this[TKey key] + { + get => _dictionary[key]; + set => _dictionary[key] = value; + } + + /// + /// Gets a System.Collections.Generic.ICollection containing the keys of the Multimap. + /// + public ICollection Keys => _dictionary.Keys; + + /// + /// Gets a System.Collections.Generic.ICollection containing the values of the Multimap. + /// + public ICollection> Values => _dictionary.Values; + + /// + /// Copy the items of the Multimap to an System.Array, + /// starting at a particular System.Array index. + /// + /// The one-dimensional System.Array that is the destination of the items copied + /// from Multimap. The System.Array must have zero-based indexing. + /// The zero-based index in array at which copying begins. + public void CopyTo(Array array, int index) + { + ((ICollection)_dictionary).CopyTo(array, index); + } + + /// + /// Adds an item with the provided key and value to the Multimap. + /// + /// The object to use as the key of the item to add. + /// The object to use as the value of the item to add. + /// Thrown when couldn't add value to Multimap. + public void Add(TKey key, TValue value) + { + if (value != null) + { + if (_dictionary.TryGetValue(key, out var list)) + { + list.Add(value); + } + else + { + list = new List { value }; + if (!TryAdd(key, list)) + throw new InvalidOperationException("Could not add value to Multimap."); + } + } + } + + #endregion Public Members + + #region Private Members + + /** + * Helper method to encapsulate generator differences between dictionary types. + */ + private bool TryRemove(TKey key, out IList value) + { + _dictionary.TryGetValue(key, out value); + return _dictionary.Remove(key); + } + + /** + * Helper method to encapsulate generator differences between dictionary types. + */ + private bool TryAdd(TKey key, IList value) + { + try + { + _dictionary.Add(key, value); + } + catch (ArgumentException) + { + return false; + } + + return true; + } + #endregion Private Members + } +} diff --git a/Ory.Hydra.Client/Client/OpenAPIDateConverter.cs b/Ory.Hydra.Client/Client/OpenAPIDateConverter.cs new file mode 100644 index 00000000..1017a01b --- /dev/null +++ b/Ory.Hydra.Client/Client/OpenAPIDateConverter.cs @@ -0,0 +1,29 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using Newtonsoft.Json.Converters; + +namespace Ory.Hydra.Client.Client +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + public class OpenAPIDateConverter : IsoDateTimeConverter + { + /// + /// Initializes a new instance of the class. + /// + public OpenAPIDateConverter() + { + // full-date = date-fullyear "-" date-month "-" date-mday + DateTimeFormat = "yyyy-MM-dd"; + } + } +} diff --git a/Ory.Hydra.Client/Client/RequestOptions.cs b/Ory.Hydra.Client/Client/RequestOptions.cs new file mode 100644 index 00000000..379a9511 --- /dev/null +++ b/Ory.Hydra.Client/Client/RequestOptions.cs @@ -0,0 +1,89 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.IO; +using System.Net; + +namespace Ory.Hydra.Client.Client +{ + /// + /// A container for generalized request inputs. This type allows consumers to extend the request functionality + /// by abstracting away from the default (built-in) request framework (e.g. RestSharp). + /// + public class RequestOptions + { + /// + /// Parameters to be bound to path parts of the Request's URL + /// + public Dictionary PathParameters { get; set; } + + /// + /// Query parameters to be applied to the request. + /// Keys may have 1 or more values associated. + /// + public Multimap QueryParameters { get; set; } + + /// + /// Header parameters to be applied to the request. + /// Keys may have 1 or more values associated. + /// + public Multimap HeaderParameters { get; set; } + + /// + /// Form parameters to be sent along with the request. + /// + public Dictionary FormParameters { get; set; } + + /// + /// File parameters to be sent along with the request. + /// + public Multimap FileParameters { get; set; } + + /// + /// Cookies to be sent along with the request. + /// + public List Cookies { get; set; } + + /// + /// Operation associated with the request path. + /// + public string Operation { get; set; } + + /// + /// Index associated with the operation. + /// + public int OperationIndex { get; set; } + + /// + /// Any data associated with a request body. + /// + public Object Data { get; set; } + + /// + /// If request should be authenticated with OAuth. + /// + public bool OAuth { get; set; } + + /// + /// Constructs a new instance of + /// + public RequestOptions() + { + PathParameters = new Dictionary(); + QueryParameters = new Multimap(); + HeaderParameters = new Multimap(); + FormParameters = new Dictionary(); + FileParameters = new Multimap(); + Cookies = new List(); + } + } +} diff --git a/Ory.Hydra.Client/Client/RetryConfiguration.cs b/Ory.Hydra.Client/Client/RetryConfiguration.cs new file mode 100644 index 00000000..f89a63d0 --- /dev/null +++ b/Ory.Hydra.Client/Client/RetryConfiguration.cs @@ -0,0 +1,31 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Polly; +using RestSharp; + +namespace Ory.Hydra.Client.Client +{ + /// + /// Configuration class to set the polly retry policies to be applied to the requests. + /// + public static class RetryConfiguration + { + /// + /// Retry policy + /// + public static Policy RetryPolicy { get; set; } + + /// + /// Async retry policy + /// + public static AsyncPolicy AsyncRetryPolicy { get; set; } + } +} diff --git a/Ory.Hydra.Client/JwkApi.cs b/Ory.Hydra.Client/JwkApi.cs new file mode 100644 index 00000000..e7987dfc --- /dev/null +++ b/Ory.Hydra.Client/JwkApi.cs @@ -0,0 +1,1614 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Client.Auth; +using Ory.Hydra.Client.Model; + +namespace Ory.Hydra.Client.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IJwkApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Create JSON Web Key + /// + /// + /// This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// + /// Index associated with the operation. + /// HydraJsonWebKeySet + HydraJsonWebKeySet CreateJsonWebKeySet(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet, int operationIndex = 0); + + /// + /// Create JSON Web Key + /// + /// + /// This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// + /// Index associated with the operation. + /// ApiResponse of HydraJsonWebKeySet + ApiResponse CreateJsonWebKeySetWithHttpInfo(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet, int operationIndex = 0); + /// + /// Delete JSON Web Key + /// + /// + /// Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// The JSON Web Key ID (kid) + /// Index associated with the operation. + /// + void DeleteJsonWebKey(string set, string kid, int operationIndex = 0); + + /// + /// Delete JSON Web Key + /// + /// + /// Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// The JSON Web Key ID (kid) + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteJsonWebKeyWithHttpInfo(string set, string kid, int operationIndex = 0); + /// + /// Delete JSON Web Key Set + /// + /// + /// Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// Index associated with the operation. + /// + void DeleteJsonWebKeySet(string set, int operationIndex = 0); + + /// + /// Delete JSON Web Key Set + /// + /// + /// Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteJsonWebKeySetWithHttpInfo(string set, int operationIndex = 0); + /// + /// Get JSON Web Key + /// + /// + /// This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid). + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// JSON Web Key ID + /// Index associated with the operation. + /// HydraJsonWebKeySet + HydraJsonWebKeySet GetJsonWebKey(string set, string kid, int operationIndex = 0); + + /// + /// Get JSON Web Key + /// + /// + /// This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid). + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// JSON Web Key ID + /// Index associated with the operation. + /// ApiResponse of HydraJsonWebKeySet + ApiResponse GetJsonWebKeyWithHttpInfo(string set, string kid, int operationIndex = 0); + /// + /// Retrieve a JSON Web Key Set + /// + /// + /// This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// Index associated with the operation. + /// HydraJsonWebKeySet + HydraJsonWebKeySet GetJsonWebKeySet(string set, int operationIndex = 0); + + /// + /// Retrieve a JSON Web Key Set + /// + /// + /// This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// Index associated with the operation. + /// ApiResponse of HydraJsonWebKeySet + ApiResponse GetJsonWebKeySetWithHttpInfo(string set, int operationIndex = 0); + /// + /// Set JSON Web Key + /// + /// + /// Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// JSON Web Key ID + /// (optional) + /// Index associated with the operation. + /// HydraJsonWebKey + HydraJsonWebKey SetJsonWebKey(string set, string kid, HydraJsonWebKey? hydraJsonWebKey = default(HydraJsonWebKey?), int operationIndex = 0); + + /// + /// Set JSON Web Key + /// + /// + /// Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// JSON Web Key ID + /// (optional) + /// Index associated with the operation. + /// ApiResponse of HydraJsonWebKey + ApiResponse SetJsonWebKeyWithHttpInfo(string set, string kid, HydraJsonWebKey? hydraJsonWebKey = default(HydraJsonWebKey?), int operationIndex = 0); + /// + /// Update a JSON Web Key Set + /// + /// + /// Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// (optional) + /// Index associated with the operation. + /// HydraJsonWebKeySet + HydraJsonWebKeySet SetJsonWebKeySet(string set, HydraJsonWebKeySet? hydraJsonWebKeySet = default(HydraJsonWebKeySet?), int operationIndex = 0); + + /// + /// Update a JSON Web Key Set + /// + /// + /// Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// (optional) + /// Index associated with the operation. + /// ApiResponse of HydraJsonWebKeySet + ApiResponse SetJsonWebKeySetWithHttpInfo(string set, HydraJsonWebKeySet? hydraJsonWebKeySet = default(HydraJsonWebKeySet?), int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IJwkApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Create JSON Web Key + /// + /// + /// This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraJsonWebKeySet + System.Threading.Tasks.Task CreateJsonWebKeySetAsync(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create JSON Web Key + /// + /// + /// This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraJsonWebKeySet) + System.Threading.Tasks.Task> CreateJsonWebKeySetWithHttpInfoAsync(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete JSON Web Key + /// + /// + /// Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// The JSON Web Key ID (kid) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteJsonWebKeyAsync(string set, string kid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete JSON Web Key + /// + /// + /// Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// The JSON Web Key ID (kid) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteJsonWebKeyWithHttpInfoAsync(string set, string kid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete JSON Web Key Set + /// + /// + /// Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteJsonWebKeySetAsync(string set, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete JSON Web Key Set + /// + /// + /// Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteJsonWebKeySetWithHttpInfoAsync(string set, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get JSON Web Key + /// + /// + /// This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid). + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// JSON Web Key ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraJsonWebKeySet + System.Threading.Tasks.Task GetJsonWebKeyAsync(string set, string kid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get JSON Web Key + /// + /// + /// This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid). + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// JSON Web Key ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraJsonWebKeySet) + System.Threading.Tasks.Task> GetJsonWebKeyWithHttpInfoAsync(string set, string kid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Retrieve a JSON Web Key Set + /// + /// + /// This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraJsonWebKeySet + System.Threading.Tasks.Task GetJsonWebKeySetAsync(string set, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Retrieve a JSON Web Key Set + /// + /// + /// This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraJsonWebKeySet) + System.Threading.Tasks.Task> GetJsonWebKeySetWithHttpInfoAsync(string set, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Set JSON Web Key + /// + /// + /// Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// JSON Web Key ID + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraJsonWebKey + System.Threading.Tasks.Task SetJsonWebKeyAsync(string set, string kid, HydraJsonWebKey? hydraJsonWebKey = default(HydraJsonWebKey?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Set JSON Web Key + /// + /// + /// Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// JSON Web Key ID + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraJsonWebKey) + System.Threading.Tasks.Task> SetJsonWebKeyWithHttpInfoAsync(string set, string kid, HydraJsonWebKey? hydraJsonWebKey = default(HydraJsonWebKey?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Update a JSON Web Key Set + /// + /// + /// Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraJsonWebKeySet + System.Threading.Tasks.Task SetJsonWebKeySetAsync(string set, HydraJsonWebKeySet? hydraJsonWebKeySet = default(HydraJsonWebKeySet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Update a JSON Web Key Set + /// + /// + /// Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraJsonWebKeySet) + System.Threading.Tasks.Task> SetJsonWebKeySetWithHttpInfoAsync(string set, HydraJsonWebKeySet? hydraJsonWebKeySet = default(HydraJsonWebKeySet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IJwkApi : IJwkApiSync, IJwkApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class JwkApi : IJwkApi + { + private Ory.Hydra.Client.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public JwkApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public JwkApi(string basePath) + { + this.Configuration = Ory.Hydra.Client.Client.Configuration.MergeConfigurations( + Ory.Hydra.Client.Client.GlobalConfiguration.Instance, + new Ory.Hydra.Client.Client.Configuration { BasePath = basePath } + ); + this.Client = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public JwkApi(Ory.Hydra.Client.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Ory.Hydra.Client.Client.Configuration.MergeConfigurations( + Ory.Hydra.Client.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public JwkApi(Ory.Hydra.Client.Client.ISynchronousClient client, Ory.Hydra.Client.Client.IAsynchronousClient asyncClient, Ory.Hydra.Client.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Ory.Hydra.Client.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Ory.Hydra.Client.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Ory.Hydra.Client.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Create JSON Web Key This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// + /// Index associated with the operation. + /// HydraJsonWebKeySet + public HydraJsonWebKeySet CreateJsonWebKeySet(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet, int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = CreateJsonWebKeySetWithHttpInfo(set, hydraCreateJsonWebKeySet); + return localVarResponse.Data; + } + + /// + /// Create JSON Web Key This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// + /// Index associated with the operation. + /// ApiResponse of HydraJsonWebKeySet + public Ory.Hydra.Client.Client.ApiResponse CreateJsonWebKeySetWithHttpInfo(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet, int operationIndex = 0) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->CreateJsonWebKeySet"); + } + + // verify the required parameter 'hydraCreateJsonWebKeySet' is set + if (hydraCreateJsonWebKeySet == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'hydraCreateJsonWebKeySet' when calling JwkApi->CreateJsonWebKeySet"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + localVarRequestOptions.Data = hydraCreateJsonWebKeySet; + + localVarRequestOptions.Operation = "JwkApi.CreateJsonWebKeySet"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Post("/admin/keys/{set}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateJsonWebKeySet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create JSON Web Key This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraJsonWebKeySet + public async System.Threading.Tasks.Task CreateJsonWebKeySetAsync(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await CreateJsonWebKeySetWithHttpInfoAsync(set, hydraCreateJsonWebKeySet, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Create JSON Web Key This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraJsonWebKeySet) + public async System.Threading.Tasks.Task> CreateJsonWebKeySetWithHttpInfoAsync(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->CreateJsonWebKeySet"); + } + + // verify the required parameter 'hydraCreateJsonWebKeySet' is set + if (hydraCreateJsonWebKeySet == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'hydraCreateJsonWebKeySet' when calling JwkApi->CreateJsonWebKeySet"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + localVarRequestOptions.Data = hydraCreateJsonWebKeySet; + + localVarRequestOptions.Operation = "JwkApi.CreateJsonWebKeySet"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/admin/keys/{set}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateJsonWebKeySet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete JSON Web Key Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// The JSON Web Key ID (kid) + /// Index associated with the operation. + /// + public void DeleteJsonWebKey(string set, string kid, int operationIndex = 0) + { + DeleteJsonWebKeyWithHttpInfo(set, kid); + } + + /// + /// Delete JSON Web Key Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// The JSON Web Key ID (kid) + /// Index associated with the operation. + /// ApiResponse of Object(void) + public Ory.Hydra.Client.Client.ApiResponse DeleteJsonWebKeyWithHttpInfo(string set, string kid, int operationIndex = 0) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->DeleteJsonWebKey"); + } + + // verify the required parameter 'kid' is set + if (kid == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'kid' when calling JwkApi->DeleteJsonWebKey"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + localVarRequestOptions.PathParameters.Add("kid", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(kid)); // path parameter + + localVarRequestOptions.Operation = "JwkApi.DeleteJsonWebKey"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Delete("/admin/keys/{set}/{kid}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteJsonWebKey", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete JSON Web Key Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// The JSON Web Key ID (kid) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteJsonWebKeyAsync(string set, string kid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteJsonWebKeyWithHttpInfoAsync(set, kid, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete JSON Web Key Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// The JSON Web Key ID (kid) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteJsonWebKeyWithHttpInfoAsync(string set, string kid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->DeleteJsonWebKey"); + } + + // verify the required parameter 'kid' is set + if (kid == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'kid' when calling JwkApi->DeleteJsonWebKey"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + localVarRequestOptions.PathParameters.Add("kid", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(kid)); // path parameter + + localVarRequestOptions.Operation = "JwkApi.DeleteJsonWebKey"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/admin/keys/{set}/{kid}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteJsonWebKey", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete JSON Web Key Set Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// Index associated with the operation. + /// + public void DeleteJsonWebKeySet(string set, int operationIndex = 0) + { + DeleteJsonWebKeySetWithHttpInfo(set); + } + + /// + /// Delete JSON Web Key Set Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// Index associated with the operation. + /// ApiResponse of Object(void) + public Ory.Hydra.Client.Client.ApiResponse DeleteJsonWebKeySetWithHttpInfo(string set, int operationIndex = 0) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->DeleteJsonWebKeySet"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + + localVarRequestOptions.Operation = "JwkApi.DeleteJsonWebKeySet"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Delete("/admin/keys/{set}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteJsonWebKeySet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete JSON Web Key Set Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteJsonWebKeySetAsync(string set, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteJsonWebKeySetWithHttpInfoAsync(set, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete JSON Web Key Set Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteJsonWebKeySetWithHttpInfoAsync(string set, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->DeleteJsonWebKeySet"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + + localVarRequestOptions.Operation = "JwkApi.DeleteJsonWebKeySet"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/admin/keys/{set}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteJsonWebKeySet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get JSON Web Key This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid). + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// JSON Web Key ID + /// Index associated with the operation. + /// HydraJsonWebKeySet + public HydraJsonWebKeySet GetJsonWebKey(string set, string kid, int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetJsonWebKeyWithHttpInfo(set, kid); + return localVarResponse.Data; + } + + /// + /// Get JSON Web Key This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid). + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// JSON Web Key ID + /// Index associated with the operation. + /// ApiResponse of HydraJsonWebKeySet + public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeyWithHttpInfo(string set, string kid, int operationIndex = 0) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->GetJsonWebKey"); + } + + // verify the required parameter 'kid' is set + if (kid == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'kid' when calling JwkApi->GetJsonWebKey"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + localVarRequestOptions.PathParameters.Add("kid", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(kid)); // path parameter + + localVarRequestOptions.Operation = "JwkApi.GetJsonWebKey"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Get("/admin/keys/{set}/{kid}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetJsonWebKey", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get JSON Web Key This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid). + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// JSON Web Key ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraJsonWebKeySet + public async System.Threading.Tasks.Task GetJsonWebKeyAsync(string set, string kid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetJsonWebKeyWithHttpInfoAsync(set, kid, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get JSON Web Key This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid). + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// JSON Web Key ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraJsonWebKeySet) + public async System.Threading.Tasks.Task> GetJsonWebKeyWithHttpInfoAsync(string set, string kid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->GetJsonWebKey"); + } + + // verify the required parameter 'kid' is set + if (kid == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'kid' when calling JwkApi->GetJsonWebKey"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + localVarRequestOptions.PathParameters.Add("kid", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(kid)); // path parameter + + localVarRequestOptions.Operation = "JwkApi.GetJsonWebKey"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/admin/keys/{set}/{kid}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetJsonWebKey", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Retrieve a JSON Web Key Set This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// Index associated with the operation. + /// HydraJsonWebKeySet + public HydraJsonWebKeySet GetJsonWebKeySet(string set, int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetJsonWebKeySetWithHttpInfo(set); + return localVarResponse.Data; + } + + /// + /// Retrieve a JSON Web Key Set This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// Index associated with the operation. + /// ApiResponse of HydraJsonWebKeySet + public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeySetWithHttpInfo(string set, int operationIndex = 0) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->GetJsonWebKeySet"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + + localVarRequestOptions.Operation = "JwkApi.GetJsonWebKeySet"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Get("/admin/keys/{set}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetJsonWebKeySet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Retrieve a JSON Web Key Set This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraJsonWebKeySet + public async System.Threading.Tasks.Task GetJsonWebKeySetAsync(string set, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetJsonWebKeySetWithHttpInfoAsync(set, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Retrieve a JSON Web Key Set This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraJsonWebKeySet) + public async System.Threading.Tasks.Task> GetJsonWebKeySetWithHttpInfoAsync(string set, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->GetJsonWebKeySet"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + + localVarRequestOptions.Operation = "JwkApi.GetJsonWebKeySet"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/admin/keys/{set}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetJsonWebKeySet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Set JSON Web Key Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// JSON Web Key ID + /// (optional) + /// Index associated with the operation. + /// HydraJsonWebKey + public HydraJsonWebKey SetJsonWebKey(string set, string kid, HydraJsonWebKey? hydraJsonWebKey = default(HydraJsonWebKey?), int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = SetJsonWebKeyWithHttpInfo(set, kid, hydraJsonWebKey); + return localVarResponse.Data; + } + + /// + /// Set JSON Web Key Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// JSON Web Key ID + /// (optional) + /// Index associated with the operation. + /// ApiResponse of HydraJsonWebKey + public Ory.Hydra.Client.Client.ApiResponse SetJsonWebKeyWithHttpInfo(string set, string kid, HydraJsonWebKey? hydraJsonWebKey = default(HydraJsonWebKey?), int operationIndex = 0) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->SetJsonWebKey"); + } + + // verify the required parameter 'kid' is set + if (kid == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'kid' when calling JwkApi->SetJsonWebKey"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + localVarRequestOptions.PathParameters.Add("kid", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(kid)); // path parameter + localVarRequestOptions.Data = hydraJsonWebKey; + + localVarRequestOptions.Operation = "JwkApi.SetJsonWebKey"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Put("/admin/keys/{set}/{kid}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SetJsonWebKey", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Set JSON Web Key Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// JSON Web Key ID + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraJsonWebKey + public async System.Threading.Tasks.Task SetJsonWebKeyAsync(string set, string kid, HydraJsonWebKey? hydraJsonWebKey = default(HydraJsonWebKey?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await SetJsonWebKeyWithHttpInfoAsync(set, kid, hydraJsonWebKey, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Set JSON Web Key Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// JSON Web Key ID + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraJsonWebKey) + public async System.Threading.Tasks.Task> SetJsonWebKeyWithHttpInfoAsync(string set, string kid, HydraJsonWebKey? hydraJsonWebKey = default(HydraJsonWebKey?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->SetJsonWebKey"); + } + + // verify the required parameter 'kid' is set + if (kid == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'kid' when calling JwkApi->SetJsonWebKey"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + localVarRequestOptions.PathParameters.Add("kid", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(kid)); // path parameter + localVarRequestOptions.Data = hydraJsonWebKey; + + localVarRequestOptions.Operation = "JwkApi.SetJsonWebKey"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/keys/{set}/{kid}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SetJsonWebKey", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Update a JSON Web Key Set Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// (optional) + /// Index associated with the operation. + /// HydraJsonWebKeySet + public HydraJsonWebKeySet SetJsonWebKeySet(string set, HydraJsonWebKeySet? hydraJsonWebKeySet = default(HydraJsonWebKeySet?), int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = SetJsonWebKeySetWithHttpInfo(set, hydraJsonWebKeySet); + return localVarResponse.Data; + } + + /// + /// Update a JSON Web Key Set Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// (optional) + /// Index associated with the operation. + /// ApiResponse of HydraJsonWebKeySet + public Ory.Hydra.Client.Client.ApiResponse SetJsonWebKeySetWithHttpInfo(string set, HydraJsonWebKeySet? hydraJsonWebKeySet = default(HydraJsonWebKeySet?), int operationIndex = 0) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->SetJsonWebKeySet"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + localVarRequestOptions.Data = hydraJsonWebKeySet; + + localVarRequestOptions.Operation = "JwkApi.SetJsonWebKeySet"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Put("/admin/keys/{set}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SetJsonWebKeySet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Update a JSON Web Key Set Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraJsonWebKeySet + public async System.Threading.Tasks.Task SetJsonWebKeySetAsync(string set, HydraJsonWebKeySet? hydraJsonWebKeySet = default(HydraJsonWebKeySet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await SetJsonWebKeySetWithHttpInfoAsync(set, hydraJsonWebKeySet, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Update a JSON Web Key Set Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraJsonWebKeySet) + public async System.Threading.Tasks.Task> SetJsonWebKeySetWithHttpInfoAsync(string set, HydraJsonWebKeySet? hydraJsonWebKeySet = default(HydraJsonWebKeySet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->SetJsonWebKeySet"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + localVarRequestOptions.Data = hydraJsonWebKeySet; + + localVarRequestOptions.Operation = "JwkApi.SetJsonWebKeySet"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/keys/{set}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SetJsonWebKeySet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/Ory.Hydra.Client/MetadataApi.cs b/Ory.Hydra.Client/MetadataApi.cs new file mode 100644 index 00000000..1f23f3bb --- /dev/null +++ b/Ory.Hydra.Client/MetadataApi.cs @@ -0,0 +1,670 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Client.Auth; +using Ory.Hydra.Client.Model; + +namespace Ory.Hydra.Client.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IMetadataApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Return Running Software Version. + /// + /// + /// This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// HydraGetVersion200Response + HydraGetVersion200Response GetVersion(int operationIndex = 0); + + /// + /// Return Running Software Version. + /// + /// + /// This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of HydraGetVersion200Response + ApiResponse GetVersionWithHttpInfo(int operationIndex = 0); + /// + /// Check HTTP Server Status + /// + /// + /// This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// HydraHealthStatus + HydraHealthStatus IsAlive(int operationIndex = 0); + + /// + /// Check HTTP Server Status + /// + /// + /// This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of HydraHealthStatus + ApiResponse IsAliveWithHttpInfo(int operationIndex = 0); + /// + /// Check HTTP Server and Database Status + /// + /// + /// This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// HydraIsReady200Response + HydraIsReady200Response IsReady(int operationIndex = 0); + + /// + /// Check HTTP Server and Database Status + /// + /// + /// This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of HydraIsReady200Response + ApiResponse IsReadyWithHttpInfo(int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IMetadataApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Return Running Software Version. + /// + /// + /// This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraGetVersion200Response + System.Threading.Tasks.Task GetVersionAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Return Running Software Version. + /// + /// + /// This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraGetVersion200Response) + System.Threading.Tasks.Task> GetVersionWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Check HTTP Server Status + /// + /// + /// This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraHealthStatus + System.Threading.Tasks.Task IsAliveAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Check HTTP Server Status + /// + /// + /// This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraHealthStatus) + System.Threading.Tasks.Task> IsAliveWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Check HTTP Server and Database Status + /// + /// + /// This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraIsReady200Response + System.Threading.Tasks.Task IsReadyAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Check HTTP Server and Database Status + /// + /// + /// This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraIsReady200Response) + System.Threading.Tasks.Task> IsReadyWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IMetadataApi : IMetadataApiSync, IMetadataApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class MetadataApi : IMetadataApi + { + private Ory.Hydra.Client.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public MetadataApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public MetadataApi(string basePath) + { + this.Configuration = Ory.Hydra.Client.Client.Configuration.MergeConfigurations( + Ory.Hydra.Client.Client.GlobalConfiguration.Instance, + new Ory.Hydra.Client.Client.Configuration { BasePath = basePath } + ); + this.Client = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public MetadataApi(Ory.Hydra.Client.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Ory.Hydra.Client.Client.Configuration.MergeConfigurations( + Ory.Hydra.Client.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public MetadataApi(Ory.Hydra.Client.Client.ISynchronousClient client, Ory.Hydra.Client.Client.IAsynchronousClient asyncClient, Ory.Hydra.Client.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Ory.Hydra.Client.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Ory.Hydra.Client.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Ory.Hydra.Client.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Return Running Software Version. This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// HydraGetVersion200Response + public HydraGetVersion200Response GetVersion(int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetVersionWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Return Running Software Version. This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of HydraGetVersion200Response + public Ory.Hydra.Client.Client.ApiResponse GetVersionWithHttpInfo(int operationIndex = 0) + { + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "MetadataApi.GetVersion"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Get("/version", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetVersion", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Return Running Software Version. This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraGetVersion200Response + public async System.Threading.Tasks.Task GetVersionAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetVersionWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Return Running Software Version. This endpoint returns the version of Ory Hydra. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraGetVersion200Response) + public async System.Threading.Tasks.Task> GetVersionWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "MetadataApi.GetVersion"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/version", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetVersion", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Check HTTP Server Status This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// HydraHealthStatus + public HydraHealthStatus IsAlive(int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = IsAliveWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Check HTTP Server Status This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of HydraHealthStatus + public Ory.Hydra.Client.Client.ApiResponse IsAliveWithHttpInfo(int operationIndex = 0) + { + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "MetadataApi.IsAlive"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Get("/health/alive", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("IsAlive", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Check HTTP Server Status This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraHealthStatus + public async System.Threading.Tasks.Task IsAliveAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await IsAliveWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Check HTTP Server Status This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraHealthStatus) + public async System.Threading.Tasks.Task> IsAliveWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "MetadataApi.IsAlive"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/health/alive", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("IsAlive", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Check HTTP Server and Database Status This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// HydraIsReady200Response + public HydraIsReady200Response IsReady(int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = IsReadyWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Check HTTP Server and Database Status This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of HydraIsReady200Response + public Ory.Hydra.Client.Client.ApiResponse IsReadyWithHttpInfo(int operationIndex = 0) + { + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "MetadataApi.IsReady"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Get("/health/ready", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("IsReady", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Check HTTP Server and Database Status This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraIsReady200Response + public async System.Threading.Tasks.Task IsReadyAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await IsReadyWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Check HTTP Server and Database Status This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Hydra, the health status will never refer to the cluster state, only to a single instance. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraIsReady200Response) + public async System.Threading.Tasks.Task> IsReadyWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "MetadataApi.IsReady"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/health/ready", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("IsReady", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/Ory.Hydra.Client/Model/AbstractOpenAPISchema.cs b/Ory.Hydra.Client/Model/AbstractOpenAPISchema.cs new file mode 100644 index 00000000..0b5cb9f8 --- /dev/null +++ b/Ory.Hydra.Client/Model/AbstractOpenAPISchema.cs @@ -0,0 +1,76 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using Newtonsoft.Json; +using Newtonsoft.Json.Serialization; + +namespace Ory.Hydra.Client.Model +{ + /// + /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification + /// + public abstract partial class AbstractOpenAPISchema + { + /// + /// Custom JSON serializer + /// + static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + MissingMemberHandling = MissingMemberHandling.Error, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy + { + OverrideSpecifiedNames = false + } + } + }; + + /// + /// Custom JSON serializer for objects with additional properties + /// + static public readonly JsonSerializerSettings AdditionalPropertiesSerializerSettings = new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + MissingMemberHandling = MissingMemberHandling.Ignore, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy + { + OverrideSpecifiedNames = false + } + } + }; + + /// + /// Gets or Sets the actual instance + /// + public abstract Object ActualInstance { get; set; } + + /// + /// Gets or Sets IsNullable to indicate whether the instance is nullable + /// + public bool IsNullable { get; protected set; } + + /// + /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` + /// + public string SchemaType { get; protected set; } + + /// + /// Converts the instance into JSON string. + /// + public abstract string ToJson(); + } +} diff --git a/Ory.Hydra.Client/Model/HydraAcceptOAuth2ConsentRequest.cs b/Ory.Hydra.Client/Model/HydraAcceptOAuth2ConsentRequest.cs new file mode 100644 index 00000000..a6db1dc5 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraAcceptOAuth2ConsentRequest.cs @@ -0,0 +1,138 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraAcceptOAuth2ConsentRequest + /// + [DataContract(Name = "acceptOAuth2ConsentRequest")] + public partial class HydraAcceptOAuth2ConsentRequest : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// context. + /// grantAccessTokenAudience. + /// grantScope. + /// handledAt. + /// Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope.. + /// RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely.. + /// session. + public HydraAcceptOAuth2ConsentRequest(Object context = default(Object), List grantAccessTokenAudience = default(List), List grantScope = default(List), DateTime handledAt = default(DateTime), bool remember = default(bool), long rememberFor = default(long), HydraAcceptOAuth2ConsentRequestSession session = default(HydraAcceptOAuth2ConsentRequestSession)) + { + this.Context = context; + this.GrantAccessTokenAudience = grantAccessTokenAudience; + this.GrantScope = grantScope; + this.HandledAt = handledAt; + this.Remember = remember; + this.RememberFor = rememberFor; + this.Session = session; + } + + /// + /// Gets or Sets Context + /// + [DataMember(Name = "context", EmitDefaultValue = true)] + public Object Context { get; set; } + + /// + /// Gets or Sets GrantAccessTokenAudience + /// + [DataMember(Name = "grant_access_token_audience", EmitDefaultValue = false)] + public List GrantAccessTokenAudience { get; set; } + + /// + /// Gets or Sets GrantScope + /// + [DataMember(Name = "grant_scope", EmitDefaultValue = false)] + public List GrantScope { get; set; } + + /// + /// Gets or Sets HandledAt + /// + [DataMember(Name = "handled_at", EmitDefaultValue = false)] + public DateTime HandledAt { get; set; } + + /// + /// Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope. + /// + /// Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope. + [DataMember(Name = "remember", EmitDefaultValue = true)] + public bool Remember { get; set; } + + /// + /// RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. + /// + /// RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. + [DataMember(Name = "remember_for", EmitDefaultValue = false)] + public long RememberFor { get; set; } + + /// + /// Gets or Sets Session + /// + [DataMember(Name = "session", EmitDefaultValue = false)] + public HydraAcceptOAuth2ConsentRequestSession Session { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraAcceptOAuth2ConsentRequest {\n"); + sb.Append(" Context: ").Append(Context).Append("\n"); + sb.Append(" GrantAccessTokenAudience: ").Append(GrantAccessTokenAudience).Append("\n"); + sb.Append(" GrantScope: ").Append(GrantScope).Append("\n"); + sb.Append(" HandledAt: ").Append(HandledAt).Append("\n"); + sb.Append(" Remember: ").Append(Remember).Append("\n"); + sb.Append(" RememberFor: ").Append(RememberFor).Append("\n"); + sb.Append(" Session: ").Append(Session).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraAcceptOAuth2ConsentRequestSession.cs b/Ory.Hydra.Client/Model/HydraAcceptOAuth2ConsentRequestSession.cs new file mode 100644 index 00000000..85eb5e1c --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraAcceptOAuth2ConsentRequestSession.cs @@ -0,0 +1,93 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraAcceptOAuth2ConsentRequestSession + /// + [DataContract(Name = "acceptOAuth2ConsentRequestSession")] + public partial class HydraAcceptOAuth2ConsentRequestSession : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// AccessToken sets session data for the access and refresh token, as well as any future tokens issued by the refresh grant. Keep in mind that this data will be available to anyone performing OAuth 2.0 Challenge Introspection. If only your services can perform OAuth 2.0 Challenge Introspection, this is usually fine. But if third parties can access that endpoint as well, sensitive data from the session might be exposed to them. Use with care!. + /// IDToken sets session data for the OpenID Connect ID token. Keep in mind that the session'id payloads are readable by anyone that has access to the ID Challenge. Use with care!. + public HydraAcceptOAuth2ConsentRequestSession(Object accessToken = default(Object), Object idToken = default(Object)) + { + this.AccessToken = accessToken; + this.IdToken = idToken; + } + + /// + /// AccessToken sets session data for the access and refresh token, as well as any future tokens issued by the refresh grant. Keep in mind that this data will be available to anyone performing OAuth 2.0 Challenge Introspection. If only your services can perform OAuth 2.0 Challenge Introspection, this is usually fine. But if third parties can access that endpoint as well, sensitive data from the session might be exposed to them. Use with care! + /// + /// AccessToken sets session data for the access and refresh token, as well as any future tokens issued by the refresh grant. Keep in mind that this data will be available to anyone performing OAuth 2.0 Challenge Introspection. If only your services can perform OAuth 2.0 Challenge Introspection, this is usually fine. But if third parties can access that endpoint as well, sensitive data from the session might be exposed to them. Use with care! + [DataMember(Name = "access_token", EmitDefaultValue = true)] + public Object AccessToken { get; set; } + + /// + /// IDToken sets session data for the OpenID Connect ID token. Keep in mind that the session'id payloads are readable by anyone that has access to the ID Challenge. Use with care! + /// + /// IDToken sets session data for the OpenID Connect ID token. Keep in mind that the session'id payloads are readable by anyone that has access to the ID Challenge. Use with care! + [DataMember(Name = "id_token", EmitDefaultValue = true)] + public Object IdToken { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraAcceptOAuth2ConsentRequestSession {\n"); + sb.Append(" AccessToken: ").Append(AccessToken).Append("\n"); + sb.Append(" IdToken: ").Append(IdToken).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraAcceptOAuth2LoginRequest.cs b/Ory.Hydra.Client/Model/HydraAcceptOAuth2LoginRequest.cs new file mode 100644 index 00000000..0abf4af5 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraAcceptOAuth2LoginRequest.cs @@ -0,0 +1,171 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraAcceptOAuth2LoginRequest + /// + [DataContract(Name = "acceptOAuth2LoginRequest")] + public partial class HydraAcceptOAuth2LoginRequest : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected HydraAcceptOAuth2LoginRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// ACR sets the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication.. + /// amr. + /// context. + /// Extend OAuth2 authentication session lifespan If set to `true`, the OAuth2 authentication cookie lifespan is extended. This is for example useful if you want the user to be able to use `prompt=none` continuously. This value can only be set to `true` if the user has an authentication, which is the case if the `skip` value is `true`.. + /// ForceSubjectIdentifier forces the \"pairwise\" user ID of the end-user that authenticated. The \"pairwise\" user ID refers to the (Pairwise Identifier Algorithm)[http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg] of the OpenID Connect specification. It allows you to set an obfuscated subject (\"user\") identifier that is unique to the client. Please note that this changes the user ID on endpoint /userinfo and sub claim of the ID Token. It does not change the sub claim in the OAuth 2.0 Introspection. Per default, ORY Hydra handles this value with its own algorithm. In case you want to set this yourself you can use this field. Please note that setting this field has no effect if `pairwise` is not configured in ORY Hydra or the OAuth 2.0 Client does not expect a pairwise identifier (set via `subject_type` key in the client's configuration). Please also be aware that ORY Hydra is unable to properly compute this value during authentication. This implies that you have to compute this value on every authentication process (probably depending on the client ID or some other unique value). If you fail to compute the proper value, then authentication processes which have id_token_hint set might fail.. + /// IdentityProviderSessionID is the session ID of the end-user that authenticated. If specified, we will use this value to propagate the logout.. + /// Remember, if set to true, tells ORY Hydra to remember this user by telling the user agent (browser) to store a cookie with authentication data. If the same user performs another OAuth 2.0 Authorization Request, he/she will not be asked to log in again.. + /// RememberFor sets how long the authentication should be remembered for in seconds. If set to `0`, the authorization will be remembered for the duration of the browser session (using a session cookie).. + /// Subject is the user ID of the end-user that authenticated. (required). + public HydraAcceptOAuth2LoginRequest(string acr = default(string), List amr = default(List), Object context = default(Object), bool extendSessionLifespan = default(bool), string forceSubjectIdentifier = default(string), string identityProviderSessionId = default(string), bool remember = default(bool), long rememberFor = default(long), string subject = default(string)) + { + // to ensure "subject" is required (not null) + if (subject == null) + { + throw new ArgumentNullException("subject is a required property for HydraAcceptOAuth2LoginRequest and cannot be null"); + } + this.Subject = subject; + this.Acr = acr; + this.Amr = amr; + this.Context = context; + this.ExtendSessionLifespan = extendSessionLifespan; + this.ForceSubjectIdentifier = forceSubjectIdentifier; + this.IdentityProviderSessionId = identityProviderSessionId; + this.Remember = remember; + this.RememberFor = rememberFor; + } + + /// + /// ACR sets the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication. + /// + /// ACR sets the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication. + [DataMember(Name = "acr", EmitDefaultValue = false)] + public string Acr { get; set; } + + /// + /// Gets or Sets Amr + /// + [DataMember(Name = "amr", EmitDefaultValue = false)] + public List Amr { get; set; } + + /// + /// Gets or Sets Context + /// + [DataMember(Name = "context", EmitDefaultValue = true)] + public Object Context { get; set; } + + /// + /// Extend OAuth2 authentication session lifespan If set to `true`, the OAuth2 authentication cookie lifespan is extended. This is for example useful if you want the user to be able to use `prompt=none` continuously. This value can only be set to `true` if the user has an authentication, which is the case if the `skip` value is `true`. + /// + /// Extend OAuth2 authentication session lifespan If set to `true`, the OAuth2 authentication cookie lifespan is extended. This is for example useful if you want the user to be able to use `prompt=none` continuously. This value can only be set to `true` if the user has an authentication, which is the case if the `skip` value is `true`. + [DataMember(Name = "extend_session_lifespan", EmitDefaultValue = true)] + public bool ExtendSessionLifespan { get; set; } + + /// + /// ForceSubjectIdentifier forces the \"pairwise\" user ID of the end-user that authenticated. The \"pairwise\" user ID refers to the (Pairwise Identifier Algorithm)[http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg] of the OpenID Connect specification. It allows you to set an obfuscated subject (\"user\") identifier that is unique to the client. Please note that this changes the user ID on endpoint /userinfo and sub claim of the ID Token. It does not change the sub claim in the OAuth 2.0 Introspection. Per default, ORY Hydra handles this value with its own algorithm. In case you want to set this yourself you can use this field. Please note that setting this field has no effect if `pairwise` is not configured in ORY Hydra or the OAuth 2.0 Client does not expect a pairwise identifier (set via `subject_type` key in the client's configuration). Please also be aware that ORY Hydra is unable to properly compute this value during authentication. This implies that you have to compute this value on every authentication process (probably depending on the client ID or some other unique value). If you fail to compute the proper value, then authentication processes which have id_token_hint set might fail. + /// + /// ForceSubjectIdentifier forces the \"pairwise\" user ID of the end-user that authenticated. The \"pairwise\" user ID refers to the (Pairwise Identifier Algorithm)[http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg] of the OpenID Connect specification. It allows you to set an obfuscated subject (\"user\") identifier that is unique to the client. Please note that this changes the user ID on endpoint /userinfo and sub claim of the ID Token. It does not change the sub claim in the OAuth 2.0 Introspection. Per default, ORY Hydra handles this value with its own algorithm. In case you want to set this yourself you can use this field. Please note that setting this field has no effect if `pairwise` is not configured in ORY Hydra or the OAuth 2.0 Client does not expect a pairwise identifier (set via `subject_type` key in the client's configuration). Please also be aware that ORY Hydra is unable to properly compute this value during authentication. This implies that you have to compute this value on every authentication process (probably depending on the client ID or some other unique value). If you fail to compute the proper value, then authentication processes which have id_token_hint set might fail. + [DataMember(Name = "force_subject_identifier", EmitDefaultValue = false)] + public string ForceSubjectIdentifier { get; set; } + + /// + /// IdentityProviderSessionID is the session ID of the end-user that authenticated. If specified, we will use this value to propagate the logout. + /// + /// IdentityProviderSessionID is the session ID of the end-user that authenticated. If specified, we will use this value to propagate the logout. + [DataMember(Name = "identity_provider_session_id", EmitDefaultValue = false)] + public string IdentityProviderSessionId { get; set; } + + /// + /// Remember, if set to true, tells ORY Hydra to remember this user by telling the user agent (browser) to store a cookie with authentication data. If the same user performs another OAuth 2.0 Authorization Request, he/she will not be asked to log in again. + /// + /// Remember, if set to true, tells ORY Hydra to remember this user by telling the user agent (browser) to store a cookie with authentication data. If the same user performs another OAuth 2.0 Authorization Request, he/she will not be asked to log in again. + [DataMember(Name = "remember", EmitDefaultValue = true)] + public bool Remember { get; set; } + + /// + /// RememberFor sets how long the authentication should be remembered for in seconds. If set to `0`, the authorization will be remembered for the duration of the browser session (using a session cookie). + /// + /// RememberFor sets how long the authentication should be remembered for in seconds. If set to `0`, the authorization will be remembered for the duration of the browser session (using a session cookie). + [DataMember(Name = "remember_for", EmitDefaultValue = false)] + public long RememberFor { get; set; } + + /// + /// Subject is the user ID of the end-user that authenticated. + /// + /// Subject is the user ID of the end-user that authenticated. + [DataMember(Name = "subject", IsRequired = true, EmitDefaultValue = true)] + public string Subject { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraAcceptOAuth2LoginRequest {\n"); + sb.Append(" Acr: ").Append(Acr).Append("\n"); + sb.Append(" Amr: ").Append(Amr).Append("\n"); + sb.Append(" Context: ").Append(Context).Append("\n"); + sb.Append(" ExtendSessionLifespan: ").Append(ExtendSessionLifespan).Append("\n"); + sb.Append(" ForceSubjectIdentifier: ").Append(ForceSubjectIdentifier).Append("\n"); + sb.Append(" IdentityProviderSessionId: ").Append(IdentityProviderSessionId).Append("\n"); + sb.Append(" Remember: ").Append(Remember).Append("\n"); + sb.Append(" RememberFor: ").Append(RememberFor).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraCreateJsonWebKeySet.cs b/Ory.Hydra.Client/Model/HydraCreateJsonWebKeySet.cs new file mode 100644 index 00000000..418827f2 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraCreateJsonWebKeySet.cs @@ -0,0 +1,123 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// Create JSON Web Key Set Request Body + /// + [DataContract(Name = "createJsonWebKeySet")] + public partial class HydraCreateJsonWebKeySet : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected HydraCreateJsonWebKeySet() { } + /// + /// Initializes a new instance of the class. + /// + /// JSON Web Key Algorithm The algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`. (required). + /// JSON Web Key ID The Key ID of the key to be created. (required). + /// JSON Web Key Use The \"use\" (public key use) parameter identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Valid values are \"enc\" and \"sig\". (required). + public HydraCreateJsonWebKeySet(string alg = default(string), string kid = default(string), string use = default(string)) + { + // to ensure "alg" is required (not null) + if (alg == null) + { + throw new ArgumentNullException("alg is a required property for HydraCreateJsonWebKeySet and cannot be null"); + } + this.Alg = alg; + // to ensure "kid" is required (not null) + if (kid == null) + { + throw new ArgumentNullException("kid is a required property for HydraCreateJsonWebKeySet and cannot be null"); + } + this.Kid = kid; + // to ensure "use" is required (not null) + if (use == null) + { + throw new ArgumentNullException("use is a required property for HydraCreateJsonWebKeySet and cannot be null"); + } + this.Use = use; + } + + /// + /// JSON Web Key Algorithm The algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`. + /// + /// JSON Web Key Algorithm The algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`. + [DataMember(Name = "alg", IsRequired = true, EmitDefaultValue = true)] + public string Alg { get; set; } + + /// + /// JSON Web Key ID The Key ID of the key to be created. + /// + /// JSON Web Key ID The Key ID of the key to be created. + [DataMember(Name = "kid", IsRequired = true, EmitDefaultValue = true)] + public string Kid { get; set; } + + /// + /// JSON Web Key Use The \"use\" (public key use) parameter identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Valid values are \"enc\" and \"sig\". + /// + /// JSON Web Key Use The \"use\" (public key use) parameter identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Valid values are \"enc\" and \"sig\". + [DataMember(Name = "use", IsRequired = true, EmitDefaultValue = true)] + public string Use { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraCreateJsonWebKeySet {\n"); + sb.Append(" Alg: ").Append(Alg).Append("\n"); + sb.Append(" Kid: ").Append(Kid).Append("\n"); + sb.Append(" Use: ").Append(Use).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraCreateVerifiableCredentialRequestBody.cs b/Ory.Hydra.Client/Model/HydraCreateVerifiableCredentialRequestBody.cs new file mode 100644 index 00000000..2ea0dafd --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraCreateVerifiableCredentialRequestBody.cs @@ -0,0 +1,100 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraCreateVerifiableCredentialRequestBody + /// + [DataContract(Name = "CreateVerifiableCredentialRequestBody")] + public partial class HydraCreateVerifiableCredentialRequestBody : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// format. + /// proof. + /// types. + public HydraCreateVerifiableCredentialRequestBody(string format = default(string), HydraVerifiableCredentialProof proof = default(HydraVerifiableCredentialProof), List types = default(List)) + { + this.Format = format; + this.Proof = proof; + this.Types = types; + } + + /// + /// Gets or Sets Format + /// + [DataMember(Name = "format", EmitDefaultValue = false)] + public string Format { get; set; } + + /// + /// Gets or Sets Proof + /// + [DataMember(Name = "proof", EmitDefaultValue = false)] + public HydraVerifiableCredentialProof Proof { get; set; } + + /// + /// Gets or Sets Types + /// + [DataMember(Name = "types", EmitDefaultValue = false)] + public List Types { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraCreateVerifiableCredentialRequestBody {\n"); + sb.Append(" Format: ").Append(Format).Append("\n"); + sb.Append(" Proof: ").Append(Proof).Append("\n"); + sb.Append(" Types: ").Append(Types).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraCredentialSupportedDraft00.cs b/Ory.Hydra.Client/Model/HydraCredentialSupportedDraft00.cs new file mode 100644 index 00000000..3aff8b44 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraCredentialSupportedDraft00.cs @@ -0,0 +1,113 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// Includes information about the supported verifiable credentials. + /// + [DataContract(Name = "credentialSupportedDraft00")] + public partial class HydraCredentialSupportedDraft00 : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// OpenID Connect Verifiable Credentials Cryptographic Binding Methods Supported Contains a list of cryptographic binding methods supported for signing the proof.. + /// OpenID Connect Verifiable Credentials Cryptographic Suites Supported Contains a list of cryptographic suites methods supported for signing the proof.. + /// OpenID Connect Verifiable Credentials Format Contains the format that is supported by this authorization server.. + /// OpenID Connect Verifiable Credentials Types Contains the types of verifiable credentials supported.. + public HydraCredentialSupportedDraft00(List cryptographicBindingMethodsSupported = default(List), List cryptographicSuitesSupported = default(List), string format = default(string), List types = default(List)) + { + this.CryptographicBindingMethodsSupported = cryptographicBindingMethodsSupported; + this.CryptographicSuitesSupported = cryptographicSuitesSupported; + this.Format = format; + this.Types = types; + } + + /// + /// OpenID Connect Verifiable Credentials Cryptographic Binding Methods Supported Contains a list of cryptographic binding methods supported for signing the proof. + /// + /// OpenID Connect Verifiable Credentials Cryptographic Binding Methods Supported Contains a list of cryptographic binding methods supported for signing the proof. + [DataMember(Name = "cryptographic_binding_methods_supported", EmitDefaultValue = false)] + public List CryptographicBindingMethodsSupported { get; set; } + + /// + /// OpenID Connect Verifiable Credentials Cryptographic Suites Supported Contains a list of cryptographic suites methods supported for signing the proof. + /// + /// OpenID Connect Verifiable Credentials Cryptographic Suites Supported Contains a list of cryptographic suites methods supported for signing the proof. + [DataMember(Name = "cryptographic_suites_supported", EmitDefaultValue = false)] + public List CryptographicSuitesSupported { get; set; } + + /// + /// OpenID Connect Verifiable Credentials Format Contains the format that is supported by this authorization server. + /// + /// OpenID Connect Verifiable Credentials Format Contains the format that is supported by this authorization server. + [DataMember(Name = "format", EmitDefaultValue = false)] + public string Format { get; set; } + + /// + /// OpenID Connect Verifiable Credentials Types Contains the types of verifiable credentials supported. + /// + /// OpenID Connect Verifiable Credentials Types Contains the types of verifiable credentials supported. + [DataMember(Name = "types", EmitDefaultValue = false)] + public List Types { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraCredentialSupportedDraft00 {\n"); + sb.Append(" CryptographicBindingMethodsSupported: ").Append(CryptographicBindingMethodsSupported).Append("\n"); + sb.Append(" CryptographicSuitesSupported: ").Append(CryptographicSuitesSupported).Append("\n"); + sb.Append(" Format: ").Append(Format).Append("\n"); + sb.Append(" Types: ").Append(Types).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraErrorOAuth2.cs b/Ory.Hydra.Client/Model/HydraErrorOAuth2.cs new file mode 100644 index 00000000..f91df69a --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraErrorOAuth2.cs @@ -0,0 +1,125 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// Error + /// + [DataContract(Name = "errorOAuth2")] + public partial class HydraErrorOAuth2 : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Error. + /// Error Debug Information Only available in dev mode.. + /// Error Description. + /// Error Hint Helps the user identify the error cause.. + /// HTTP Status Code. + public HydraErrorOAuth2(string error = default(string), string errorDebug = default(string), string errorDescription = default(string), string errorHint = default(string), long statusCode = default(long)) + { + this.Error = error; + this.ErrorDebug = errorDebug; + this.ErrorDescription = errorDescription; + this.ErrorHint = errorHint; + this.StatusCode = statusCode; + } + + /// + /// Error + /// + /// Error + [DataMember(Name = "error", EmitDefaultValue = false)] + public string Error { get; set; } + + /// + /// Error Debug Information Only available in dev mode. + /// + /// Error Debug Information Only available in dev mode. + [DataMember(Name = "error_debug", EmitDefaultValue = false)] + public string ErrorDebug { get; set; } + + /// + /// Error Description + /// + /// Error Description + [DataMember(Name = "error_description", EmitDefaultValue = false)] + public string ErrorDescription { get; set; } + + /// + /// Error Hint Helps the user identify the error cause. + /// + /// Error Hint Helps the user identify the error cause. + /// The redirect URL is not allowed. + [DataMember(Name = "error_hint", EmitDefaultValue = false)] + public string ErrorHint { get; set; } + + /// + /// HTTP Status Code + /// + /// HTTP Status Code + /// 401 + [DataMember(Name = "status_code", EmitDefaultValue = false)] + public long StatusCode { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraErrorOAuth2 {\n"); + sb.Append(" Error: ").Append(Error).Append("\n"); + sb.Append(" ErrorDebug: ").Append(ErrorDebug).Append("\n"); + sb.Append(" ErrorDescription: ").Append(ErrorDescription).Append("\n"); + sb.Append(" ErrorHint: ").Append(ErrorHint).Append("\n"); + sb.Append(" StatusCode: ").Append(StatusCode).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraGenericError.cs b/Ory.Hydra.Client/Model/HydraGenericError.cs new file mode 100644 index 00000000..b49e6f77 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraGenericError.cs @@ -0,0 +1,169 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraGenericError + /// + [DataContract(Name = "genericError")] + public partial class HydraGenericError : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected HydraGenericError() { } + /// + /// Initializes a new instance of the class. + /// + /// The status code. + /// Debug information This field is often not exposed to protect against leaking sensitive information.. + /// Further error details. + /// The error ID Useful when trying to identify various errors in application logic.. + /// Error message The error's message. (required). + /// A human-readable reason for the error. + /// The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID.. + /// The status description. + public HydraGenericError(long code = default(long), string debug = default(string), Object details = default(Object), string id = default(string), string message = default(string), string reason = default(string), string request = default(string), string status = default(string)) + { + // to ensure "message" is required (not null) + if (message == null) + { + throw new ArgumentNullException("message is a required property for HydraGenericError and cannot be null"); + } + this.Message = message; + this.Code = code; + this.Debug = debug; + this.Details = details; + this.Id = id; + this.Reason = reason; + this.Request = request; + this.Status = status; + } + + /// + /// The status code + /// + /// The status code + /// 404 + [DataMember(Name = "code", EmitDefaultValue = false)] + public long Code { get; set; } + + /// + /// Debug information This field is often not exposed to protect against leaking sensitive information. + /// + /// Debug information This field is often not exposed to protect against leaking sensitive information. + /// SQL field "foo" is not a bool. + [DataMember(Name = "debug", EmitDefaultValue = false)] + public string Debug { get; set; } + + /// + /// Further error details + /// + /// Further error details + [DataMember(Name = "details", EmitDefaultValue = true)] + public Object Details { get; set; } + + /// + /// The error ID Useful when trying to identify various errors in application logic. + /// + /// The error ID Useful when trying to identify various errors in application logic. + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// + /// Error message The error's message. + /// + /// Error message The error's message. + /// The resource could not be found + [DataMember(Name = "message", IsRequired = true, EmitDefaultValue = true)] + public string Message { get; set; } + + /// + /// A human-readable reason for the error + /// + /// A human-readable reason for the error + /// User with ID 1234 does not exist. + [DataMember(Name = "reason", EmitDefaultValue = false)] + public string Reason { get; set; } + + /// + /// The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. + /// + /// The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. + /// d7ef54b1-ec15-46e6-bccb-524b82c035e6 + [DataMember(Name = "request", EmitDefaultValue = false)] + public string Request { get; set; } + + /// + /// The status description + /// + /// The status description + /// Not Found + [DataMember(Name = "status", EmitDefaultValue = false)] + public string Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraGenericError {\n"); + sb.Append(" Code: ").Append(Code).Append("\n"); + sb.Append(" Debug: ").Append(Debug).Append("\n"); + sb.Append(" Details: ").Append(Details).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Reason: ").Append(Reason).Append("\n"); + sb.Append(" Request: ").Append(Request).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraGetVersion200Response.cs b/Ory.Hydra.Client/Model/HydraGetVersion200Response.cs new file mode 100644 index 00000000..d05c86ca --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraGetVersion200Response.cs @@ -0,0 +1,83 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraGetVersion200Response + /// + [DataContract(Name = "getVersion_200_response")] + public partial class HydraGetVersion200Response : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The version of Ory Hydra.. + public HydraGetVersion200Response(string varVersion = default(string)) + { + this.VarVersion = varVersion; + } + + /// + /// The version of Ory Hydra. + /// + /// The version of Ory Hydra. + [DataMember(Name = "version", EmitDefaultValue = false)] + public string VarVersion { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraGetVersion200Response {\n"); + sb.Append(" VarVersion: ").Append(VarVersion).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraHealthNotReadyStatus.cs b/Ory.Hydra.Client/Model/HydraHealthNotReadyStatus.cs new file mode 100644 index 00000000..eeeb2ea3 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraHealthNotReadyStatus.cs @@ -0,0 +1,83 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraHealthNotReadyStatus + /// + [DataContract(Name = "healthNotReadyStatus")] + public partial class HydraHealthNotReadyStatus : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Errors contains a list of errors that caused the not ready status.. + public HydraHealthNotReadyStatus(Dictionary errors = default(Dictionary)) + { + this.Errors = errors; + } + + /// + /// Errors contains a list of errors that caused the not ready status. + /// + /// Errors contains a list of errors that caused the not ready status. + [DataMember(Name = "errors", EmitDefaultValue = false)] + public Dictionary Errors { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraHealthNotReadyStatus {\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraHealthStatus.cs b/Ory.Hydra.Client/Model/HydraHealthStatus.cs new file mode 100644 index 00000000..27d262c8 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraHealthStatus.cs @@ -0,0 +1,83 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraHealthStatus + /// + [DataContract(Name = "healthStatus")] + public partial class HydraHealthStatus : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Status always contains \"ok\".. + public HydraHealthStatus(string status = default(string)) + { + this.Status = status; + } + + /// + /// Status always contains \"ok\". + /// + /// Status always contains \"ok\". + [DataMember(Name = "status", EmitDefaultValue = false)] + public string Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraHealthStatus {\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraIntrospectedOAuth2Token.cs b/Ory.Hydra.Client/Model/HydraIntrospectedOAuth2Token.cs new file mode 100644 index 00000000..47903702 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraIntrospectedOAuth2Token.cs @@ -0,0 +1,218 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// Introspection contains an access token's session data as specified by [IETF RFC 7662](https://tools.ietf.org/html/rfc7662) + /// + [DataContract(Name = "introspectedOAuth2Token")] + public partial class HydraIntrospectedOAuth2Token : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected HydraIntrospectedOAuth2Token() { } + /// + /// Initializes a new instance of the class. + /// + /// Active is a boolean indicator of whether or not the presented token is currently active. The specifics of a token's \"active\" state will vary depending on the implementation of the authorization server and the information it keeps about its tokens, but a \"true\" value return for the \"active\" property will generally indicate that a given token has been issued by this authorization server, has not been revoked by the resource owner, and is within its given time window of validity (e.g., after its issuance time and before its expiration time). (required). + /// Audience contains a list of the token's intended audiences.. + /// ID is aclient identifier for the OAuth 2.0 client that requested this token.. + /// Expires at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token will expire.. + /// Extra is arbitrary data set by the session.. + /// Issued at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token was originally issued.. + /// IssuerURL is a string representing the issuer of this token. + /// NotBefore is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token is not to be used before.. + /// ObfuscatedSubject is set when the subject identifier algorithm was set to \"pairwise\" during authorization. It is the `sub` value of the ID Token that was issued.. + /// Scope is a JSON string containing a space-separated list of scopes associated with this token.. + /// Subject of the token, as defined in JWT [RFC7519]. Usually a machine-readable identifier of the resource owner who authorized this token.. + /// TokenType is the introspected token's type, typically `Bearer`.. + /// TokenUse is the introspected token's use, for example `access_token` or `refresh_token`.. + /// Username is a human-readable identifier for the resource owner who authorized this token.. + public HydraIntrospectedOAuth2Token(bool active = default(bool), List aud = default(List), string clientId = default(string), long exp = default(long), Dictionary ext = default(Dictionary), long iat = default(long), string iss = default(string), long nbf = default(long), string obfuscatedSubject = default(string), string scope = default(string), string sub = default(string), string tokenType = default(string), string tokenUse = default(string), string username = default(string)) + { + this.Active = active; + this.Aud = aud; + this.ClientId = clientId; + this.Exp = exp; + this.Ext = ext; + this.Iat = iat; + this.Iss = iss; + this.Nbf = nbf; + this.ObfuscatedSubject = obfuscatedSubject; + this.Scope = scope; + this.Sub = sub; + this.TokenType = tokenType; + this.TokenUse = tokenUse; + this.Username = username; + } + + /// + /// Active is a boolean indicator of whether or not the presented token is currently active. The specifics of a token's \"active\" state will vary depending on the implementation of the authorization server and the information it keeps about its tokens, but a \"true\" value return for the \"active\" property will generally indicate that a given token has been issued by this authorization server, has not been revoked by the resource owner, and is within its given time window of validity (e.g., after its issuance time and before its expiration time). + /// + /// Active is a boolean indicator of whether or not the presented token is currently active. The specifics of a token's \"active\" state will vary depending on the implementation of the authorization server and the information it keeps about its tokens, but a \"true\" value return for the \"active\" property will generally indicate that a given token has been issued by this authorization server, has not been revoked by the resource owner, and is within its given time window of validity (e.g., after its issuance time and before its expiration time). + [DataMember(Name = "active", IsRequired = true, EmitDefaultValue = true)] + public bool Active { get; set; } + + /// + /// Audience contains a list of the token's intended audiences. + /// + /// Audience contains a list of the token's intended audiences. + [DataMember(Name = "aud", EmitDefaultValue = false)] + public List Aud { get; set; } + + /// + /// ID is aclient identifier for the OAuth 2.0 client that requested this token. + /// + /// ID is aclient identifier for the OAuth 2.0 client that requested this token. + [DataMember(Name = "client_id", EmitDefaultValue = false)] + public string ClientId { get; set; } + + /// + /// Expires at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token will expire. + /// + /// Expires at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token will expire. + [DataMember(Name = "exp", EmitDefaultValue = false)] + public long Exp { get; set; } + + /// + /// Extra is arbitrary data set by the session. + /// + /// Extra is arbitrary data set by the session. + [DataMember(Name = "ext", EmitDefaultValue = false)] + public Dictionary Ext { get; set; } + + /// + /// Issued at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token was originally issued. + /// + /// Issued at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token was originally issued. + [DataMember(Name = "iat", EmitDefaultValue = false)] + public long Iat { get; set; } + + /// + /// IssuerURL is a string representing the issuer of this token + /// + /// IssuerURL is a string representing the issuer of this token + [DataMember(Name = "iss", EmitDefaultValue = false)] + public string Iss { get; set; } + + /// + /// NotBefore is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token is not to be used before. + /// + /// NotBefore is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token is not to be used before. + [DataMember(Name = "nbf", EmitDefaultValue = false)] + public long Nbf { get; set; } + + /// + /// ObfuscatedSubject is set when the subject identifier algorithm was set to \"pairwise\" during authorization. It is the `sub` value of the ID Token that was issued. + /// + /// ObfuscatedSubject is set when the subject identifier algorithm was set to \"pairwise\" during authorization. It is the `sub` value of the ID Token that was issued. + [DataMember(Name = "obfuscated_subject", EmitDefaultValue = false)] + public string ObfuscatedSubject { get; set; } + + /// + /// Scope is a JSON string containing a space-separated list of scopes associated with this token. + /// + /// Scope is a JSON string containing a space-separated list of scopes associated with this token. + [DataMember(Name = "scope", EmitDefaultValue = false)] + public string Scope { get; set; } + + /// + /// Subject of the token, as defined in JWT [RFC7519]. Usually a machine-readable identifier of the resource owner who authorized this token. + /// + /// Subject of the token, as defined in JWT [RFC7519]. Usually a machine-readable identifier of the resource owner who authorized this token. + [DataMember(Name = "sub", EmitDefaultValue = false)] + public string Sub { get; set; } + + /// + /// TokenType is the introspected token's type, typically `Bearer`. + /// + /// TokenType is the introspected token's type, typically `Bearer`. + [DataMember(Name = "token_type", EmitDefaultValue = false)] + public string TokenType { get; set; } + + /// + /// TokenUse is the introspected token's use, for example `access_token` or `refresh_token`. + /// + /// TokenUse is the introspected token's use, for example `access_token` or `refresh_token`. + [DataMember(Name = "token_use", EmitDefaultValue = false)] + public string TokenUse { get; set; } + + /// + /// Username is a human-readable identifier for the resource owner who authorized this token. + /// + /// Username is a human-readable identifier for the resource owner who authorized this token. + [DataMember(Name = "username", EmitDefaultValue = false)] + public string Username { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraIntrospectedOAuth2Token {\n"); + sb.Append(" Active: ").Append(Active).Append("\n"); + sb.Append(" Aud: ").Append(Aud).Append("\n"); + sb.Append(" ClientId: ").Append(ClientId).Append("\n"); + sb.Append(" Exp: ").Append(Exp).Append("\n"); + sb.Append(" Ext: ").Append(Ext).Append("\n"); + sb.Append(" Iat: ").Append(Iat).Append("\n"); + sb.Append(" Iss: ").Append(Iss).Append("\n"); + sb.Append(" Nbf: ").Append(Nbf).Append("\n"); + sb.Append(" ObfuscatedSubject: ").Append(ObfuscatedSubject).Append("\n"); + sb.Append(" Scope: ").Append(Scope).Append("\n"); + sb.Append(" Sub: ").Append(Sub).Append("\n"); + sb.Append(" TokenType: ").Append(TokenType).Append("\n"); + sb.Append(" TokenUse: ").Append(TokenUse).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraIsReady200Response.cs b/Ory.Hydra.Client/Model/HydraIsReady200Response.cs new file mode 100644 index 00000000..38623e5d --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraIsReady200Response.cs @@ -0,0 +1,83 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraIsReady200Response + /// + [DataContract(Name = "isReady_200_response")] + public partial class HydraIsReady200Response : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Always \"ok\".. + public HydraIsReady200Response(string status = default(string)) + { + this.Status = status; + } + + /// + /// Always \"ok\". + /// + /// Always \"ok\". + [DataMember(Name = "status", EmitDefaultValue = false)] + public string Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraIsReady200Response {\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraIsReady503Response.cs b/Ory.Hydra.Client/Model/HydraIsReady503Response.cs new file mode 100644 index 00000000..b532fc5b --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraIsReady503Response.cs @@ -0,0 +1,83 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraIsReady503Response + /// + [DataContract(Name = "isReady_503_response")] + public partial class HydraIsReady503Response : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Errors contains a list of errors that caused the not ready status.. + public HydraIsReady503Response(Dictionary errors = default(Dictionary)) + { + this.Errors = errors; + } + + /// + /// Errors contains a list of errors that caused the not ready status. + /// + /// Errors contains a list of errors that caused the not ready status. + [DataMember(Name = "errors", EmitDefaultValue = false)] + public Dictionary Errors { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraIsReady503Response {\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraJsonPatch.cs b/Ory.Hydra.Client/Model/HydraJsonPatch.cs new file mode 100644 index 00000000..d47bc099 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraJsonPatch.cs @@ -0,0 +1,132 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// A JSONPatch document as defined by RFC 6902 + /// + [DataContract(Name = "jsonPatch")] + public partial class HydraJsonPatch : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected HydraJsonPatch() { } + /// + /// Initializes a new instance of the class. + /// + /// This field is used together with operation \"move\" and uses JSON Pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).. + /// The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". (required). + /// The path to the target path. Uses JSON pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). (required). + /// The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).. + public HydraJsonPatch(string from = default(string), string op = default(string), string path = default(string), Object value = default(Object)) + { + // to ensure "op" is required (not null) + if (op == null) + { + throw new ArgumentNullException("op is a required property for HydraJsonPatch and cannot be null"); + } + this.Op = op; + // to ensure "path" is required (not null) + if (path == null) + { + throw new ArgumentNullException("path is a required property for HydraJsonPatch and cannot be null"); + } + this.Path = path; + this.From = from; + this.Value = value; + } + + /// + /// This field is used together with operation \"move\" and uses JSON Pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). + /// + /// This field is used together with operation \"move\" and uses JSON Pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). + /// /name + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". + /// + /// The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". + /// replace + [DataMember(Name = "op", IsRequired = true, EmitDefaultValue = true)] + public string Op { get; set; } + + /// + /// The path to the target path. Uses JSON pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). + /// + /// The path to the target path. Uses JSON pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). + /// /name + [DataMember(Name = "path", IsRequired = true, EmitDefaultValue = true)] + public string Path { get; set; } + + /// + /// The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). + /// + /// The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). + /// foobar + [DataMember(Name = "value", EmitDefaultValue = true)] + public Object Value { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraJsonPatch {\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" Op: ").Append(Op).Append("\n"); + sb.Append(" Path: ").Append(Path).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraJsonWebKey.cs b/Ory.Hydra.Client/Model/HydraJsonWebKey.cs new file mode 100644 index 00000000..835302b8 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraJsonWebKey.cs @@ -0,0 +1,272 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraJsonWebKey + /// + [DataContract(Name = "jsonWebKey")] + public partial class HydraJsonWebKey : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected HydraJsonWebKey() { } + /// + /// Initializes a new instance of the class. + /// + /// The \"alg\" (algorithm) parameter identifies the algorithm intended for use with the key. The values used should either be registered in the IANA \"JSON Web Signature and Encryption Algorithms\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. (required). + /// crv. + /// d. + /// dp. + /// dq. + /// e. + /// k. + /// The \"kid\" (key ID) parameter is used to match a specific key. This is used, for instance, to choose among a set of keys within a JWK Set during key rollover. The structure of the \"kid\" value is unspecified. When \"kid\" values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct \"kid\" values. (One example in which different keys might use the same \"kid\" value is if they have different \"kty\" (key type) values but are considered to be equivalent alternatives by the application using them.) The \"kid\" value is a case-sensitive string. (required). + /// The \"kty\" (key type) parameter identifies the cryptographic algorithm family used with the key, such as \"RSA\" or \"EC\". \"kty\" values should either be registered in the IANA \"JSON Web Key Types\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. The \"kty\" value is a case-sensitive string. (required). + /// n. + /// p. + /// q. + /// qi. + /// Use (\"public key use\") identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly \"sig\" (signature) or \"enc\" (encryption). (required). + /// x. + /// The \"x5c\" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280]. The certificate chain is represented as a JSON array of certificate value strings. Each string in the array is a base64-encoded (Section 4 of [RFC4648] - - not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate.. + /// y. + public HydraJsonWebKey(string alg = default(string), string crv = default(string), string d = default(string), string dp = default(string), string dq = default(string), string e = default(string), string k = default(string), string kid = default(string), string kty = default(string), string n = default(string), string p = default(string), string q = default(string), string qi = default(string), string use = default(string), string x = default(string), List x5c = default(List), string y = default(string)) + { + // to ensure "alg" is required (not null) + if (alg == null) + { + throw new ArgumentNullException("alg is a required property for HydraJsonWebKey and cannot be null"); + } + this.Alg = alg; + // to ensure "kid" is required (not null) + if (kid == null) + { + throw new ArgumentNullException("kid is a required property for HydraJsonWebKey and cannot be null"); + } + this.Kid = kid; + // to ensure "kty" is required (not null) + if (kty == null) + { + throw new ArgumentNullException("kty is a required property for HydraJsonWebKey and cannot be null"); + } + this.Kty = kty; + // to ensure "use" is required (not null) + if (use == null) + { + throw new ArgumentNullException("use is a required property for HydraJsonWebKey and cannot be null"); + } + this.Use = use; + this.Crv = crv; + this.D = d; + this.Dp = dp; + this.Dq = dq; + this.E = e; + this.K = k; + this.N = n; + this.P = p; + this.Q = q; + this.Qi = qi; + this.X = x; + this.X5c = x5c; + this.Y = y; + } + + /// + /// The \"alg\" (algorithm) parameter identifies the algorithm intended for use with the key. The values used should either be registered in the IANA \"JSON Web Signature and Encryption Algorithms\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. + /// + /// The \"alg\" (algorithm) parameter identifies the algorithm intended for use with the key. The values used should either be registered in the IANA \"JSON Web Signature and Encryption Algorithms\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. + /// RS256 + [DataMember(Name = "alg", IsRequired = true, EmitDefaultValue = true)] + public string Alg { get; set; } + + /// + /// Gets or Sets Crv + /// + /// P-256 + [DataMember(Name = "crv", EmitDefaultValue = false)] + public string Crv { get; set; } + + /// + /// Gets or Sets D + /// + /// T_N8I-6He3M8a7X1vWt6TGIx4xB_GP3Mb4SsZSA4v-orvJzzRiQhLlRR81naWYxfQAYt5isDI6_C2L9bdWo4FFPjGQFvNoRX-_sBJyBI_rl-TBgsZYoUlAj3J92WmY2inbA-PwyJfsaIIDceYBC-eX-xiCu6qMqkZi3MwQAFL6bMdPEM0z4JBcwFT3VdiWAIRUuACWQwrXMq672x7fMuaIaHi7XDGgt1ith23CLfaREmJku9PQcchbt_uEY-hqrFY6ntTtS4paWWQj86xLL94S-Tf6v6xkL918PfLSOTq6XCzxvlFwzBJqApnAhbwqLjpPhgUG04EDRrqrSBc5Y1BLevn6Ip5h1AhessBp3wLkQgz_roeckt-ybvzKTjESMuagnpqLvOT7Y9veIug2MwPJZI2VjczRc1vzMs25XrFQ8DpUy-bNdp89TmvAXwctUMiJdgHloJw23Cv03gIUAkDnsTqZmkpbIf-crpgNKFmQP_EDKoe8p_PXZZgfbRri3NoEVGP7Mk6yEu8LjJhClhZaBNjuWw2-KlBfOA3g79mhfBnkInee5KO9mGR50qPk1V-MorUYNTFMZIm0kFE6eYVWFBwJHLKYhHU34DoiK1VP-svZpC2uAMFNA_UJEwM9CQ2b8qe4-5e9aywMvwcuArRkAB5mBIfOaOJao3mfukKAE + [DataMember(Name = "d", EmitDefaultValue = false)] + public string D { get; set; } + + /// + /// Gets or Sets Dp + /// + /// G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0 + [DataMember(Name = "dp", EmitDefaultValue = false)] + public string Dp { get; set; } + + /// + /// Gets or Sets Dq + /// + /// s9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk + [DataMember(Name = "dq", EmitDefaultValue = false)] + public string Dq { get; set; } + + /// + /// Gets or Sets E + /// + /// AQAB + [DataMember(Name = "e", EmitDefaultValue = false)] + public string E { get; set; } + + /// + /// Gets or Sets K + /// + /// GawgguFyGrWKav7AX4VKUg + [DataMember(Name = "k", EmitDefaultValue = false)] + public string K { get; set; } + + /// + /// The \"kid\" (key ID) parameter is used to match a specific key. This is used, for instance, to choose among a set of keys within a JWK Set during key rollover. The structure of the \"kid\" value is unspecified. When \"kid\" values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct \"kid\" values. (One example in which different keys might use the same \"kid\" value is if they have different \"kty\" (key type) values but are considered to be equivalent alternatives by the application using them.) The \"kid\" value is a case-sensitive string. + /// + /// The \"kid\" (key ID) parameter is used to match a specific key. This is used, for instance, to choose among a set of keys within a JWK Set during key rollover. The structure of the \"kid\" value is unspecified. When \"kid\" values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct \"kid\" values. (One example in which different keys might use the same \"kid\" value is if they have different \"kty\" (key type) values but are considered to be equivalent alternatives by the application using them.) The \"kid\" value is a case-sensitive string. + /// 1603dfe0af8f4596 + [DataMember(Name = "kid", IsRequired = true, EmitDefaultValue = true)] + public string Kid { get; set; } + + /// + /// The \"kty\" (key type) parameter identifies the cryptographic algorithm family used with the key, such as \"RSA\" or \"EC\". \"kty\" values should either be registered in the IANA \"JSON Web Key Types\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. The \"kty\" value is a case-sensitive string. + /// + /// The \"kty\" (key type) parameter identifies the cryptographic algorithm family used with the key, such as \"RSA\" or \"EC\". \"kty\" values should either be registered in the IANA \"JSON Web Key Types\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. The \"kty\" value is a case-sensitive string. + /// RSA + [DataMember(Name = "kty", IsRequired = true, EmitDefaultValue = true)] + public string Kty { get; set; } + + /// + /// Gets or Sets N + /// + /// vTqrxUyQPl_20aqf5kXHwDZrel-KovIp8s7ewJod2EXHl8tWlRB3_Rem34KwBfqlKQGp1nqah-51H4Jzruqe0cFP58hPEIt6WqrvnmJCXxnNuIB53iX_uUUXXHDHBeaPCSRoNJzNysjoJ30TIUsKBiirhBa7f235PXbKiHducLevV6PcKxJ5cY8zO286qJLBWSPm-OIevwqsIsSIH44Qtm9sioFikhkbLwoqwWORGAY0nl6XvVOlhADdLjBSqSAeT1FPuCDCnXwzCDR8N9IFB_IjdStFkC-rVt2K5BYfPd0c3yFp_vHR15eRd0zJ8XQ7woBC8Vnsac6Et1pKS59pX6256DPWu8UDdEOolKAPgcd_g2NpA76cAaF_jcT80j9KrEzw8Tv0nJBGesuCjPNjGs_KzdkWTUXt23Hn9QJsdc1MZuaW0iqXBepHYfYoqNelzVte117t4BwVp0kUM6we0IqyXClaZgOI8S-WDBw2_Ovdm8e5NmhYAblEVoygcX8Y46oH6bKiaCQfKCFDMcRgChme7AoE1yZZYsPbaG_3IjPrC4LBMHQw8rM9dWjJ8ImjicvZ1pAm0dx-KHCP3y5PVKrxBDf1zSOsBRkOSjB8TPODnJMz6-jd5hTtZxpZPwPoIdCanTZ3ZD6uRBpTmDwtpRGm63UQs1m5FWPwb0T2IF0 + [DataMember(Name = "n", EmitDefaultValue = false)] + public string N { get; set; } + + /// + /// Gets or Sets P + /// + /// 6NbkXwDWUhi-eR55Cgbf27FkQDDWIamOaDr0rj1q0f1fFEz1W5A_09YvG09Fiv1AO2-D8Rl8gS1Vkz2i0zCSqnyy8A025XOcRviOMK7nIxE4OH_PEsko8dtIrb3TmE2hUXvCkmzw9EsTF1LQBOGC6iusLTXepIC1x9ukCKFZQvdgtEObQ5kzd9Nhq-cdqmSeMVLoxPLd1blviVT9Vm8-y12CtYpeJHOaIDtVPLlBhJiBoPKWg3vxSm4XxIliNOefqegIlsmTIa3MpS6WWlCK3yHhat0Q-rRxDxdyiVdG_wzJvp0Iw_2wms7pe-PgNPYvUWH9JphWP5K38YqEBiJFXQ + [DataMember(Name = "p", EmitDefaultValue = false)] + public string P { get; set; } + + /// + /// Gets or Sets Q + /// + /// 0A1FmpOWR91_RAWpqreWSavNaZb9nXeKiBo0DQGBz32DbqKqQ8S4aBJmbRhJcctjCLjain-ivut477tAUMmzJwVJDDq2MZFwC9Q-4VYZmFU4HJityQuSzHYe64RjN-E_NQ02TWhG3QGW6roq6c57c99rrUsETwJJiwS8M5p15Miuz53DaOjv-uqqFAFfywN5WkxHbraBcjHtMiQuyQbQqkCFh-oanHkwYNeytsNhTu2mQmwR5DR2roZ2nPiFjC6nsdk-A7E3S3wMzYYFw7jvbWWoYWo9vB40_MY2Y0FYQSqcDzcBIcq_0tnnasf3VW4Fdx6m80RzOb2Fsnln7vKXAQ + [DataMember(Name = "q", EmitDefaultValue = false)] + public string Q { get; set; } + + /// + /// Gets or Sets Qi + /// + /// GyM_p6JrXySiz1toFgKbWV-JdI3jQ4ypu9rbMWx3rQJBfmt0FoYzgUIZEVFEcOqwemRN81zoDAaa-Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rxyR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU + [DataMember(Name = "qi", EmitDefaultValue = false)] + public string Qi { get; set; } + + /// + /// Use (\"public key use\") identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly \"sig\" (signature) or \"enc\" (encryption). + /// + /// Use (\"public key use\") identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly \"sig\" (signature) or \"enc\" (encryption). + /// sig + [DataMember(Name = "use", IsRequired = true, EmitDefaultValue = true)] + public string Use { get; set; } + + /// + /// Gets or Sets X + /// + /// f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU + [DataMember(Name = "x", EmitDefaultValue = false)] + public string X { get; set; } + + /// + /// The \"x5c\" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280]. The certificate chain is represented as a JSON array of certificate value strings. Each string in the array is a base64-encoded (Section 4 of [RFC4648] - - not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate. + /// + /// The \"x5c\" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280]. The certificate chain is represented as a JSON array of certificate value strings. Each string in the array is a base64-encoded (Section 4 of [RFC4648] - - not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate. + [DataMember(Name = "x5c", EmitDefaultValue = false)] + public List X5c { get; set; } + + /// + /// Gets or Sets Y + /// + /// x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0 + [DataMember(Name = "y", EmitDefaultValue = false)] + public string Y { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraJsonWebKey {\n"); + sb.Append(" Alg: ").Append(Alg).Append("\n"); + sb.Append(" Crv: ").Append(Crv).Append("\n"); + sb.Append(" D: ").Append(D).Append("\n"); + sb.Append(" Dp: ").Append(Dp).Append("\n"); + sb.Append(" Dq: ").Append(Dq).Append("\n"); + sb.Append(" E: ").Append(E).Append("\n"); + sb.Append(" K: ").Append(K).Append("\n"); + sb.Append(" Kid: ").Append(Kid).Append("\n"); + sb.Append(" Kty: ").Append(Kty).Append("\n"); + sb.Append(" N: ").Append(N).Append("\n"); + sb.Append(" P: ").Append(P).Append("\n"); + sb.Append(" Q: ").Append(Q).Append("\n"); + sb.Append(" Qi: ").Append(Qi).Append("\n"); + sb.Append(" Use: ").Append(Use).Append("\n"); + sb.Append(" X: ").Append(X).Append("\n"); + sb.Append(" X5c: ").Append(X5c).Append("\n"); + sb.Append(" Y: ").Append(Y).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraJsonWebKeySet.cs b/Ory.Hydra.Client/Model/HydraJsonWebKeySet.cs new file mode 100644 index 00000000..a1465086 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraJsonWebKeySet.cs @@ -0,0 +1,83 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// JSON Web Key Set + /// + [DataContract(Name = "jsonWebKeySet")] + public partial class HydraJsonWebKeySet : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// List of JSON Web Keys The value of the \"keys\" parameter is an array of JSON Web Key (JWK) values. By default, the order of the JWK values within the array does not imply an order of preference among them, although applications of JWK Sets can choose to assign a meaning to the order for their purposes, if desired.. + public HydraJsonWebKeySet(List keys = default(List)) + { + this.Keys = keys; + } + + /// + /// List of JSON Web Keys The value of the \"keys\" parameter is an array of JSON Web Key (JWK) values. By default, the order of the JWK values within the array does not imply an order of preference among them, although applications of JWK Sets can choose to assign a meaning to the order for their purposes, if desired. + /// + /// List of JSON Web Keys The value of the \"keys\" parameter is an array of JSON Web Key (JWK) values. By default, the order of the JWK values within the array does not imply an order of preference among them, although applications of JWK Sets can choose to assign a meaning to the order for their purposes, if desired. + [DataMember(Name = "keys", EmitDefaultValue = false)] + public List Keys { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraJsonWebKeySet {\n"); + sb.Append(" Keys: ").Append(Keys).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraOAuth2Client.cs b/Ory.Hydra.Client/Model/HydraOAuth2Client.cs new file mode 100644 index 00000000..d883c13c --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraOAuth2Client.cs @@ -0,0 +1,636 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + [DataContract(Name = "oAuth2Client")] + public partial class HydraOAuth2Client : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// OAuth 2.0 Access Token Strategy AccessTokenStrategy is the strategy used to generate access tokens. Valid options are `jwt` and `opaque`. `jwt` is a bad idea, see https://www.ory.sh/docs/hydra/advanced#json-web-tokens Setting the stragegy here overrides the global setting in `strategies.access_token`.. + /// allowedCorsOrigins. + /// audience. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// OpenID Connect Back-Channel Logout Session Required Boolean value specifying whether the RP requires that a sid (session ID) Claim be included in the Logout Token to identify the RP session with the OP when the backchannel_logout_uri is used. If omitted, the default value is false.. + /// OpenID Connect Back-Channel Logout URI RP URL that will cause the RP to log itself out when sent a Logout Token by the OP.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// OAuth 2.0 Client ID The ID is immutable. If no ID is provided, a UUID4 will be generated.. + /// OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization.. + /// OAuth 2.0 Client Secret The secret will be included in the create request as cleartext, and then never again. The secret is kept in hashed format and is not recoverable once lost.. + /// OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0.. + /// OAuth 2.0 Client URI ClientURI is a URL string of a web page providing information about the client. If present, the server SHOULD display this URL to the end-user in a clickable fashion.. + /// contacts. + /// OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation.. + /// OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the RP requires that iss (issuer) and sid (session ID) query parameters be included to identify the RP session with the OP when the frontchannel_logout_uri is used. If omitted, the default value is false.. + /// OpenID Connect Front-Channel Logout URI RP URL that will cause the RP to log itself out when rendered in an iframe by the OP. An iss (issuer) query parameter and a sid (session ID) query parameter MAY be included by the OP to enable the RP to validate the request and to determine which of the potentially multiple sessions is to be logged out; if either is included, both MUST be.. + /// grantTypes. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// OAuth 2.0 Client JSON Web Key Set Client's JSON Web Key Set [JWK] document, passed by value. The semantics of the jwks parameter are the same as the jwks_uri parameter, other than that the JWK Set is passed by value, rather than by reference. This parameter is intended only to be used by Clients that, for some reason, are unable to use the jwks_uri parameter, for instance, by native applications that might not have a location to host the contents of the JWK Set. If a Client can use jwks_uri, it MUST NOT use jwks. One significant downside of jwks is that it does not enable key rotation (which jwks_uri does, as described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The jwks_uri and jwks parameters MUST NOT be used together.. + /// OAuth 2.0 Client JSON Web Key Set URL URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// OAuth 2.0 Client Logo URI A URL string referencing the client's logo.. + /// metadata. + /// OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client.. + /// OAuth 2.0 Client Policy URI PolicyURI is a URL string that points to a human-readable privacy policy document that describes how the deployment organization collects, uses, retains, and discloses personal data.. + /// postLogoutRedirectUris. + /// redirectUris. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// OpenID Connect Dynamic Client Registration Access Token RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. It is sent when creating a client using Dynamic Client Registration.. + /// OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client.. + /// OpenID Connect Request Object Signing Algorithm JWS [JWS] alg algorithm [JWA] that MUST be used for signing Request Objects sent to the OP. All Request Objects from this Client MUST be rejected, if not signed with this algorithm.. + /// requestUris. + /// responseTypes. + /// OAuth 2.0 Client Scope Scope is a string containing a space-separated list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client can use when requesting access tokens.. + /// OpenID Connect Sector Identifier URI URL using the https scheme to be used in calculating Pseudonymous Identifiers by the OP. The URL references a file with a single JSON array of redirect_uri values.. + /// SkipConsent skips the consent screen for this client. This field can only be set from the admin API.. + /// SkipLogoutConsent skips the logout consent screen for this client. This field can only be set from the admin API.. + /// OpenID Connect Subject Type The `subject_types_supported` Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`.. + /// OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_basic`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `client_secret_post`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `private_key_jwt`: Use JSON Web Tokens to authenticate the client. `none`: Used for public clients (native apps, mobile apps) which can not have secrets. (default to "client_secret_basic"). + /// OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint.. + /// OAuth 2.0 Client Terms of Service URI A URL string pointing to a human-readable terms of service document for the client that describes a contractual relationship between the end-user and the client that the end-user accepts when authorizing the client.. + /// OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update.. + /// OpenID Connect Request Userinfo Signed Response Algorithm JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT [JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims as a UTF-8 encoded JSON object using the application/json content-type.. + public HydraOAuth2Client(string accessTokenStrategy = default(string), List allowedCorsOrigins = default(List), List audience = default(List), string authorizationCodeGrantAccessTokenLifespan = default(string), string authorizationCodeGrantIdTokenLifespan = default(string), string authorizationCodeGrantRefreshTokenLifespan = default(string), bool backchannelLogoutSessionRequired = default(bool), string backchannelLogoutUri = default(string), string clientCredentialsGrantAccessTokenLifespan = default(string), string clientId = default(string), string clientName = default(string), string clientSecret = default(string), long clientSecretExpiresAt = default(long), string clientUri = default(string), List contacts = default(List), DateTime createdAt = default(DateTime), bool frontchannelLogoutSessionRequired = default(bool), string frontchannelLogoutUri = default(string), List grantTypes = default(List), string implicitGrantAccessTokenLifespan = default(string), string implicitGrantIdTokenLifespan = default(string), Object jwks = default(Object), string jwksUri = default(string), string jwtBearerGrantAccessTokenLifespan = default(string), string logoUri = default(string), Object metadata = default(Object), string owner = default(string), string policyUri = default(string), List postLogoutRedirectUris = default(List), List redirectUris = default(List), string refreshTokenGrantAccessTokenLifespan = default(string), string refreshTokenGrantIdTokenLifespan = default(string), string refreshTokenGrantRefreshTokenLifespan = default(string), string registrationAccessToken = default(string), string registrationClientUri = default(string), string requestObjectSigningAlg = default(string), List requestUris = default(List), List responseTypes = default(List), string scope = default(string), string sectorIdentifierUri = default(string), bool skipConsent = default(bool), bool skipLogoutConsent = default(bool), string subjectType = default(string), string tokenEndpointAuthMethod = @"client_secret_basic", string tokenEndpointAuthSigningAlg = default(string), string tosUri = default(string), DateTime updatedAt = default(DateTime), string userinfoSignedResponseAlg = default(string)) + { + this.AccessTokenStrategy = accessTokenStrategy; + this.AllowedCorsOrigins = allowedCorsOrigins; + this.Audience = audience; + this.AuthorizationCodeGrantAccessTokenLifespan = authorizationCodeGrantAccessTokenLifespan; + this.AuthorizationCodeGrantIdTokenLifespan = authorizationCodeGrantIdTokenLifespan; + this.AuthorizationCodeGrantRefreshTokenLifespan = authorizationCodeGrantRefreshTokenLifespan; + this.BackchannelLogoutSessionRequired = backchannelLogoutSessionRequired; + this.BackchannelLogoutUri = backchannelLogoutUri; + this.ClientCredentialsGrantAccessTokenLifespan = clientCredentialsGrantAccessTokenLifespan; + this.ClientId = clientId; + this.ClientName = clientName; + this.ClientSecret = clientSecret; + this.ClientSecretExpiresAt = clientSecretExpiresAt; + this.ClientUri = clientUri; + this.Contacts = contacts; + this.CreatedAt = createdAt; + this.FrontchannelLogoutSessionRequired = frontchannelLogoutSessionRequired; + this.FrontchannelLogoutUri = frontchannelLogoutUri; + this.GrantTypes = grantTypes; + this.ImplicitGrantAccessTokenLifespan = implicitGrantAccessTokenLifespan; + this.ImplicitGrantIdTokenLifespan = implicitGrantIdTokenLifespan; + this.Jwks = jwks; + this.JwksUri = jwksUri; + this.JwtBearerGrantAccessTokenLifespan = jwtBearerGrantAccessTokenLifespan; + this.LogoUri = logoUri; + this.Metadata = metadata; + this.Owner = owner; + this.PolicyUri = policyUri; + this.PostLogoutRedirectUris = postLogoutRedirectUris; + this.RedirectUris = redirectUris; + this.RefreshTokenGrantAccessTokenLifespan = refreshTokenGrantAccessTokenLifespan; + this.RefreshTokenGrantIdTokenLifespan = refreshTokenGrantIdTokenLifespan; + this.RefreshTokenGrantRefreshTokenLifespan = refreshTokenGrantRefreshTokenLifespan; + this.RegistrationAccessToken = registrationAccessToken; + this.RegistrationClientUri = registrationClientUri; + this.RequestObjectSigningAlg = requestObjectSigningAlg; + this.RequestUris = requestUris; + this.ResponseTypes = responseTypes; + this.Scope = scope; + this.SectorIdentifierUri = sectorIdentifierUri; + this.SkipConsent = skipConsent; + this.SkipLogoutConsent = skipLogoutConsent; + this.SubjectType = subjectType; + // use default value if no "tokenEndpointAuthMethod" provided + this.TokenEndpointAuthMethod = tokenEndpointAuthMethod ?? @"client_secret_basic"; + this.TokenEndpointAuthSigningAlg = tokenEndpointAuthSigningAlg; + this.TosUri = tosUri; + this.UpdatedAt = updatedAt; + this.UserinfoSignedResponseAlg = userinfoSignedResponseAlg; + } + + /// + /// OAuth 2.0 Access Token Strategy AccessTokenStrategy is the strategy used to generate access tokens. Valid options are `jwt` and `opaque`. `jwt` is a bad idea, see https://www.ory.sh/docs/hydra/advanced#json-web-tokens Setting the stragegy here overrides the global setting in `strategies.access_token`. + /// + /// OAuth 2.0 Access Token Strategy AccessTokenStrategy is the strategy used to generate access tokens. Valid options are `jwt` and `opaque`. `jwt` is a bad idea, see https://www.ory.sh/docs/hydra/advanced#json-web-tokens Setting the stragegy here overrides the global setting in `strategies.access_token`. + [DataMember(Name = "access_token_strategy", EmitDefaultValue = false)] + public string AccessTokenStrategy { get; set; } + + /// + /// Gets or Sets AllowedCorsOrigins + /// + [DataMember(Name = "allowed_cors_origins", EmitDefaultValue = false)] + public List AllowedCorsOrigins { get; set; } + + /// + /// Gets or Sets Audience + /// + [DataMember(Name = "audience", EmitDefaultValue = false)] + public List Audience { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "authorization_code_grant_access_token_lifespan", EmitDefaultValue = false)] + public string AuthorizationCodeGrantAccessTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "authorization_code_grant_id_token_lifespan", EmitDefaultValue = false)] + public string AuthorizationCodeGrantIdTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "authorization_code_grant_refresh_token_lifespan", EmitDefaultValue = false)] + public string AuthorizationCodeGrantRefreshTokenLifespan { get; set; } + + /// + /// OpenID Connect Back-Channel Logout Session Required Boolean value specifying whether the RP requires that a sid (session ID) Claim be included in the Logout Token to identify the RP session with the OP when the backchannel_logout_uri is used. If omitted, the default value is false. + /// + /// OpenID Connect Back-Channel Logout Session Required Boolean value specifying whether the RP requires that a sid (session ID) Claim be included in the Logout Token to identify the RP session with the OP when the backchannel_logout_uri is used. If omitted, the default value is false. + [DataMember(Name = "backchannel_logout_session_required", EmitDefaultValue = true)] + public bool BackchannelLogoutSessionRequired { get; set; } + + /// + /// OpenID Connect Back-Channel Logout URI RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. + /// + /// OpenID Connect Back-Channel Logout URI RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. + [DataMember(Name = "backchannel_logout_uri", EmitDefaultValue = false)] + public string BackchannelLogoutUri { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "client_credentials_grant_access_token_lifespan", EmitDefaultValue = false)] + public string ClientCredentialsGrantAccessTokenLifespan { get; set; } + + /// + /// OAuth 2.0 Client ID The ID is immutable. If no ID is provided, a UUID4 will be generated. + /// + /// OAuth 2.0 Client ID The ID is immutable. If no ID is provided, a UUID4 will be generated. + [DataMember(Name = "client_id", EmitDefaultValue = false)] + public string ClientId { get; set; } + + /// + /// OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization. + /// + /// OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization. + [DataMember(Name = "client_name", EmitDefaultValue = false)] + public string ClientName { get; set; } + + /// + /// OAuth 2.0 Client Secret The secret will be included in the create request as cleartext, and then never again. The secret is kept in hashed format and is not recoverable once lost. + /// + /// OAuth 2.0 Client Secret The secret will be included in the create request as cleartext, and then never again. The secret is kept in hashed format and is not recoverable once lost. + [DataMember(Name = "client_secret", EmitDefaultValue = false)] + public string ClientSecret { get; set; } + + /// + /// OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0. + /// + /// OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0. + [DataMember(Name = "client_secret_expires_at", EmitDefaultValue = false)] + public long ClientSecretExpiresAt { get; set; } + + /// + /// OAuth 2.0 Client URI ClientURI is a URL string of a web page providing information about the client. If present, the server SHOULD display this URL to the end-user in a clickable fashion. + /// + /// OAuth 2.0 Client URI ClientURI is a URL string of a web page providing information about the client. If present, the server SHOULD display this URL to the end-user in a clickable fashion. + [DataMember(Name = "client_uri", EmitDefaultValue = false)] + public string ClientUri { get; set; } + + /// + /// Gets or Sets Contacts + /// + [DataMember(Name = "contacts", EmitDefaultValue = false)] + public List Contacts { get; set; } + + /// + /// OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation. + /// + /// OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation. + [DataMember(Name = "created_at", EmitDefaultValue = false)] + public DateTime CreatedAt { get; set; } + + /// + /// OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the RP requires that iss (issuer) and sid (session ID) query parameters be included to identify the RP session with the OP when the frontchannel_logout_uri is used. If omitted, the default value is false. + /// + /// OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the RP requires that iss (issuer) and sid (session ID) query parameters be included to identify the RP session with the OP when the frontchannel_logout_uri is used. If omitted, the default value is false. + [DataMember(Name = "frontchannel_logout_session_required", EmitDefaultValue = true)] + public bool FrontchannelLogoutSessionRequired { get; set; } + + /// + /// OpenID Connect Front-Channel Logout URI RP URL that will cause the RP to log itself out when rendered in an iframe by the OP. An iss (issuer) query parameter and a sid (session ID) query parameter MAY be included by the OP to enable the RP to validate the request and to determine which of the potentially multiple sessions is to be logged out; if either is included, both MUST be. + /// + /// OpenID Connect Front-Channel Logout URI RP URL that will cause the RP to log itself out when rendered in an iframe by the OP. An iss (issuer) query parameter and a sid (session ID) query parameter MAY be included by the OP to enable the RP to validate the request and to determine which of the potentially multiple sessions is to be logged out; if either is included, both MUST be. + [DataMember(Name = "frontchannel_logout_uri", EmitDefaultValue = false)] + public string FrontchannelLogoutUri { get; set; } + + /// + /// Gets or Sets GrantTypes + /// + [DataMember(Name = "grant_types", EmitDefaultValue = false)] + public List GrantTypes { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "implicit_grant_access_token_lifespan", EmitDefaultValue = false)] + public string ImplicitGrantAccessTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "implicit_grant_id_token_lifespan", EmitDefaultValue = false)] + public string ImplicitGrantIdTokenLifespan { get; set; } + + /// + /// OAuth 2.0 Client JSON Web Key Set Client's JSON Web Key Set [JWK] document, passed by value. The semantics of the jwks parameter are the same as the jwks_uri parameter, other than that the JWK Set is passed by value, rather than by reference. This parameter is intended only to be used by Clients that, for some reason, are unable to use the jwks_uri parameter, for instance, by native applications that might not have a location to host the contents of the JWK Set. If a Client can use jwks_uri, it MUST NOT use jwks. One significant downside of jwks is that it does not enable key rotation (which jwks_uri does, as described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The jwks_uri and jwks parameters MUST NOT be used together. + /// + /// OAuth 2.0 Client JSON Web Key Set Client's JSON Web Key Set [JWK] document, passed by value. The semantics of the jwks parameter are the same as the jwks_uri parameter, other than that the JWK Set is passed by value, rather than by reference. This parameter is intended only to be used by Clients that, for some reason, are unable to use the jwks_uri parameter, for instance, by native applications that might not have a location to host the contents of the JWK Set. If a Client can use jwks_uri, it MUST NOT use jwks. One significant downside of jwks is that it does not enable key rotation (which jwks_uri does, as described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The jwks_uri and jwks parameters MUST NOT be used together. + [DataMember(Name = "jwks", EmitDefaultValue = true)] + public Object Jwks { get; set; } + + /// + /// OAuth 2.0 Client JSON Web Key Set URL URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. + /// + /// OAuth 2.0 Client JSON Web Key Set URL URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. + [DataMember(Name = "jwks_uri", EmitDefaultValue = false)] + public string JwksUri { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "jwt_bearer_grant_access_token_lifespan", EmitDefaultValue = false)] + public string JwtBearerGrantAccessTokenLifespan { get; set; } + + /// + /// OAuth 2.0 Client Logo URI A URL string referencing the client's logo. + /// + /// OAuth 2.0 Client Logo URI A URL string referencing the client's logo. + [DataMember(Name = "logo_uri", EmitDefaultValue = false)] + public string LogoUri { get; set; } + + /// + /// Gets or Sets Metadata + /// + [DataMember(Name = "metadata", EmitDefaultValue = true)] + public Object Metadata { get; set; } + + /// + /// OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client. + /// + /// OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client. + [DataMember(Name = "owner", EmitDefaultValue = false)] + public string Owner { get; set; } + + /// + /// OAuth 2.0 Client Policy URI PolicyURI is a URL string that points to a human-readable privacy policy document that describes how the deployment organization collects, uses, retains, and discloses personal data. + /// + /// OAuth 2.0 Client Policy URI PolicyURI is a URL string that points to a human-readable privacy policy document that describes how the deployment organization collects, uses, retains, and discloses personal data. + [DataMember(Name = "policy_uri", EmitDefaultValue = false)] + public string PolicyUri { get; set; } + + /// + /// Gets or Sets PostLogoutRedirectUris + /// + [DataMember(Name = "post_logout_redirect_uris", EmitDefaultValue = false)] + public List PostLogoutRedirectUris { get; set; } + + /// + /// Gets or Sets RedirectUris + /// + [DataMember(Name = "redirect_uris", EmitDefaultValue = false)] + public List RedirectUris { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "refresh_token_grant_access_token_lifespan", EmitDefaultValue = false)] + public string RefreshTokenGrantAccessTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "refresh_token_grant_id_token_lifespan", EmitDefaultValue = false)] + public string RefreshTokenGrantIdTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "refresh_token_grant_refresh_token_lifespan", EmitDefaultValue = false)] + public string RefreshTokenGrantRefreshTokenLifespan { get; set; } + + /// + /// OpenID Connect Dynamic Client Registration Access Token RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. It is sent when creating a client using Dynamic Client Registration. + /// + /// OpenID Connect Dynamic Client Registration Access Token RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. It is sent when creating a client using Dynamic Client Registration. + [DataMember(Name = "registration_access_token", EmitDefaultValue = false)] + public string RegistrationAccessToken { get; set; } + + /// + /// OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. + /// + /// OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. + [DataMember(Name = "registration_client_uri", EmitDefaultValue = false)] + public string RegistrationClientUri { get; set; } + + /// + /// OpenID Connect Request Object Signing Algorithm JWS [JWS] alg algorithm [JWA] that MUST be used for signing Request Objects sent to the OP. All Request Objects from this Client MUST be rejected, if not signed with this algorithm. + /// + /// OpenID Connect Request Object Signing Algorithm JWS [JWS] alg algorithm [JWA] that MUST be used for signing Request Objects sent to the OP. All Request Objects from this Client MUST be rejected, if not signed with this algorithm. + [DataMember(Name = "request_object_signing_alg", EmitDefaultValue = false)] + public string RequestObjectSigningAlg { get; set; } + + /// + /// Gets or Sets RequestUris + /// + [DataMember(Name = "request_uris", EmitDefaultValue = false)] + public List RequestUris { get; set; } + + /// + /// Gets or Sets ResponseTypes + /// + [DataMember(Name = "response_types", EmitDefaultValue = false)] + public List ResponseTypes { get; set; } + + /// + /// OAuth 2.0 Client Scope Scope is a string containing a space-separated list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client can use when requesting access tokens. + /// + /// OAuth 2.0 Client Scope Scope is a string containing a space-separated list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client can use when requesting access tokens. + /// scope1 scope-2 scope.3 scope:4 + [DataMember(Name = "scope", EmitDefaultValue = false)] + public string Scope { get; set; } + + /// + /// OpenID Connect Sector Identifier URI URL using the https scheme to be used in calculating Pseudonymous Identifiers by the OP. The URL references a file with a single JSON array of redirect_uri values. + /// + /// OpenID Connect Sector Identifier URI URL using the https scheme to be used in calculating Pseudonymous Identifiers by the OP. The URL references a file with a single JSON array of redirect_uri values. + [DataMember(Name = "sector_identifier_uri", EmitDefaultValue = false)] + public string SectorIdentifierUri { get; set; } + + /// + /// SkipConsent skips the consent screen for this client. This field can only be set from the admin API. + /// + /// SkipConsent skips the consent screen for this client. This field can only be set from the admin API. + [DataMember(Name = "skip_consent", EmitDefaultValue = true)] + public bool SkipConsent { get; set; } + + /// + /// SkipLogoutConsent skips the logout consent screen for this client. This field can only be set from the admin API. + /// + /// SkipLogoutConsent skips the logout consent screen for this client. This field can only be set from the admin API. + [DataMember(Name = "skip_logout_consent", EmitDefaultValue = true)] + public bool SkipLogoutConsent { get; set; } + + /// + /// OpenID Connect Subject Type The `subject_types_supported` Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`. + /// + /// OpenID Connect Subject Type The `subject_types_supported` Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`. + [DataMember(Name = "subject_type", EmitDefaultValue = false)] + public string SubjectType { get; set; } + + /// + /// OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_basic`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `client_secret_post`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `private_key_jwt`: Use JSON Web Tokens to authenticate the client. `none`: Used for public clients (native apps, mobile apps) which can not have secrets. + /// + /// OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_basic`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `client_secret_post`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `private_key_jwt`: Use JSON Web Tokens to authenticate the client. `none`: Used for public clients (native apps, mobile apps) which can not have secrets. + [DataMember(Name = "token_endpoint_auth_method", EmitDefaultValue = false)] + public string TokenEndpointAuthMethod { get; set; } + + /// + /// OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint. + /// + /// OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint. + [DataMember(Name = "token_endpoint_auth_signing_alg", EmitDefaultValue = false)] + public string TokenEndpointAuthSigningAlg { get; set; } + + /// + /// OAuth 2.0 Client Terms of Service URI A URL string pointing to a human-readable terms of service document for the client that describes a contractual relationship between the end-user and the client that the end-user accepts when authorizing the client. + /// + /// OAuth 2.0 Client Terms of Service URI A URL string pointing to a human-readable terms of service document for the client that describes a contractual relationship between the end-user and the client that the end-user accepts when authorizing the client. + [DataMember(Name = "tos_uri", EmitDefaultValue = false)] + public string TosUri { get; set; } + + /// + /// OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update. + /// + /// OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update. + [DataMember(Name = "updated_at", EmitDefaultValue = false)] + public DateTime UpdatedAt { get; set; } + + /// + /// OpenID Connect Request Userinfo Signed Response Algorithm JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT [JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims as a UTF-8 encoded JSON object using the application/json content-type. + /// + /// OpenID Connect Request Userinfo Signed Response Algorithm JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT [JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims as a UTF-8 encoded JSON object using the application/json content-type. + [DataMember(Name = "userinfo_signed_response_alg", EmitDefaultValue = false)] + public string UserinfoSignedResponseAlg { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraOAuth2Client {\n"); + sb.Append(" AccessTokenStrategy: ").Append(AccessTokenStrategy).Append("\n"); + sb.Append(" AllowedCorsOrigins: ").Append(AllowedCorsOrigins).Append("\n"); + sb.Append(" Audience: ").Append(Audience).Append("\n"); + sb.Append(" AuthorizationCodeGrantAccessTokenLifespan: ").Append(AuthorizationCodeGrantAccessTokenLifespan).Append("\n"); + sb.Append(" AuthorizationCodeGrantIdTokenLifespan: ").Append(AuthorizationCodeGrantIdTokenLifespan).Append("\n"); + sb.Append(" AuthorizationCodeGrantRefreshTokenLifespan: ").Append(AuthorizationCodeGrantRefreshTokenLifespan).Append("\n"); + sb.Append(" BackchannelLogoutSessionRequired: ").Append(BackchannelLogoutSessionRequired).Append("\n"); + sb.Append(" BackchannelLogoutUri: ").Append(BackchannelLogoutUri).Append("\n"); + sb.Append(" ClientCredentialsGrantAccessTokenLifespan: ").Append(ClientCredentialsGrantAccessTokenLifespan).Append("\n"); + sb.Append(" ClientId: ").Append(ClientId).Append("\n"); + sb.Append(" ClientName: ").Append(ClientName).Append("\n"); + sb.Append(" ClientSecret: ").Append(ClientSecret).Append("\n"); + sb.Append(" ClientSecretExpiresAt: ").Append(ClientSecretExpiresAt).Append("\n"); + sb.Append(" ClientUri: ").Append(ClientUri).Append("\n"); + sb.Append(" Contacts: ").Append(Contacts).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" FrontchannelLogoutSessionRequired: ").Append(FrontchannelLogoutSessionRequired).Append("\n"); + sb.Append(" FrontchannelLogoutUri: ").Append(FrontchannelLogoutUri).Append("\n"); + sb.Append(" GrantTypes: ").Append(GrantTypes).Append("\n"); + sb.Append(" ImplicitGrantAccessTokenLifespan: ").Append(ImplicitGrantAccessTokenLifespan).Append("\n"); + sb.Append(" ImplicitGrantIdTokenLifespan: ").Append(ImplicitGrantIdTokenLifespan).Append("\n"); + sb.Append(" Jwks: ").Append(Jwks).Append("\n"); + sb.Append(" JwksUri: ").Append(JwksUri).Append("\n"); + sb.Append(" JwtBearerGrantAccessTokenLifespan: ").Append(JwtBearerGrantAccessTokenLifespan).Append("\n"); + sb.Append(" LogoUri: ").Append(LogoUri).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" Owner: ").Append(Owner).Append("\n"); + sb.Append(" PolicyUri: ").Append(PolicyUri).Append("\n"); + sb.Append(" PostLogoutRedirectUris: ").Append(PostLogoutRedirectUris).Append("\n"); + sb.Append(" RedirectUris: ").Append(RedirectUris).Append("\n"); + sb.Append(" RefreshTokenGrantAccessTokenLifespan: ").Append(RefreshTokenGrantAccessTokenLifespan).Append("\n"); + sb.Append(" RefreshTokenGrantIdTokenLifespan: ").Append(RefreshTokenGrantIdTokenLifespan).Append("\n"); + sb.Append(" RefreshTokenGrantRefreshTokenLifespan: ").Append(RefreshTokenGrantRefreshTokenLifespan).Append("\n"); + sb.Append(" RegistrationAccessToken: ").Append(RegistrationAccessToken).Append("\n"); + sb.Append(" RegistrationClientUri: ").Append(RegistrationClientUri).Append("\n"); + sb.Append(" RequestObjectSigningAlg: ").Append(RequestObjectSigningAlg).Append("\n"); + sb.Append(" RequestUris: ").Append(RequestUris).Append("\n"); + sb.Append(" ResponseTypes: ").Append(ResponseTypes).Append("\n"); + sb.Append(" Scope: ").Append(Scope).Append("\n"); + sb.Append(" SectorIdentifierUri: ").Append(SectorIdentifierUri).Append("\n"); + sb.Append(" SkipConsent: ").Append(SkipConsent).Append("\n"); + sb.Append(" SkipLogoutConsent: ").Append(SkipLogoutConsent).Append("\n"); + sb.Append(" SubjectType: ").Append(SubjectType).Append("\n"); + sb.Append(" TokenEndpointAuthMethod: ").Append(TokenEndpointAuthMethod).Append("\n"); + sb.Append(" TokenEndpointAuthSigningAlg: ").Append(TokenEndpointAuthSigningAlg).Append("\n"); + sb.Append(" TosUri: ").Append(TosUri).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append(" UserinfoSignedResponseAlg: ").Append(UserinfoSignedResponseAlg).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + if (this.AuthorizationCodeGrantAccessTokenLifespan != null) { + // AuthorizationCodeGrantAccessTokenLifespan (string) pattern + Regex regexAuthorizationCodeGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexAuthorizationCodeGrantAccessTokenLifespan.Match(this.AuthorizationCodeGrantAccessTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AuthorizationCodeGrantAccessTokenLifespan, must match a pattern of " + regexAuthorizationCodeGrantAccessTokenLifespan, new [] { "AuthorizationCodeGrantAccessTokenLifespan" }); + } + } + + if (this.AuthorizationCodeGrantIdTokenLifespan != null) { + // AuthorizationCodeGrantIdTokenLifespan (string) pattern + Regex regexAuthorizationCodeGrantIdTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexAuthorizationCodeGrantIdTokenLifespan.Match(this.AuthorizationCodeGrantIdTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AuthorizationCodeGrantIdTokenLifespan, must match a pattern of " + regexAuthorizationCodeGrantIdTokenLifespan, new [] { "AuthorizationCodeGrantIdTokenLifespan" }); + } + } + + if (this.AuthorizationCodeGrantRefreshTokenLifespan != null) { + // AuthorizationCodeGrantRefreshTokenLifespan (string) pattern + Regex regexAuthorizationCodeGrantRefreshTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexAuthorizationCodeGrantRefreshTokenLifespan.Match(this.AuthorizationCodeGrantRefreshTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AuthorizationCodeGrantRefreshTokenLifespan, must match a pattern of " + regexAuthorizationCodeGrantRefreshTokenLifespan, new [] { "AuthorizationCodeGrantRefreshTokenLifespan" }); + } + } + + if (this.ClientCredentialsGrantAccessTokenLifespan != null) { + // ClientCredentialsGrantAccessTokenLifespan (string) pattern + Regex regexClientCredentialsGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexClientCredentialsGrantAccessTokenLifespan.Match(this.ClientCredentialsGrantAccessTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClientCredentialsGrantAccessTokenLifespan, must match a pattern of " + regexClientCredentialsGrantAccessTokenLifespan, new [] { "ClientCredentialsGrantAccessTokenLifespan" }); + } + } + + if (this.ImplicitGrantAccessTokenLifespan != null) { + // ImplicitGrantAccessTokenLifespan (string) pattern + Regex regexImplicitGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexImplicitGrantAccessTokenLifespan.Match(this.ImplicitGrantAccessTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ImplicitGrantAccessTokenLifespan, must match a pattern of " + regexImplicitGrantAccessTokenLifespan, new [] { "ImplicitGrantAccessTokenLifespan" }); + } + } + + if (this.ImplicitGrantIdTokenLifespan != null) { + // ImplicitGrantIdTokenLifespan (string) pattern + Regex regexImplicitGrantIdTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexImplicitGrantIdTokenLifespan.Match(this.ImplicitGrantIdTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ImplicitGrantIdTokenLifespan, must match a pattern of " + regexImplicitGrantIdTokenLifespan, new [] { "ImplicitGrantIdTokenLifespan" }); + } + } + + if (this.JwtBearerGrantAccessTokenLifespan != null) { + // JwtBearerGrantAccessTokenLifespan (string) pattern + Regex regexJwtBearerGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexJwtBearerGrantAccessTokenLifespan.Match(this.JwtBearerGrantAccessTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for JwtBearerGrantAccessTokenLifespan, must match a pattern of " + regexJwtBearerGrantAccessTokenLifespan, new [] { "JwtBearerGrantAccessTokenLifespan" }); + } + } + + if (this.RefreshTokenGrantAccessTokenLifespan != null) { + // RefreshTokenGrantAccessTokenLifespan (string) pattern + Regex regexRefreshTokenGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexRefreshTokenGrantAccessTokenLifespan.Match(this.RefreshTokenGrantAccessTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RefreshTokenGrantAccessTokenLifespan, must match a pattern of " + regexRefreshTokenGrantAccessTokenLifespan, new [] { "RefreshTokenGrantAccessTokenLifespan" }); + } + } + + if (this.RefreshTokenGrantIdTokenLifespan != null) { + // RefreshTokenGrantIdTokenLifespan (string) pattern + Regex regexRefreshTokenGrantIdTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexRefreshTokenGrantIdTokenLifespan.Match(this.RefreshTokenGrantIdTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RefreshTokenGrantIdTokenLifespan, must match a pattern of " + regexRefreshTokenGrantIdTokenLifespan, new [] { "RefreshTokenGrantIdTokenLifespan" }); + } + } + + if (this.RefreshTokenGrantRefreshTokenLifespan != null) { + // RefreshTokenGrantRefreshTokenLifespan (string) pattern + Regex regexRefreshTokenGrantRefreshTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexRefreshTokenGrantRefreshTokenLifespan.Match(this.RefreshTokenGrantRefreshTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RefreshTokenGrantRefreshTokenLifespan, must match a pattern of " + regexRefreshTokenGrantRefreshTokenLifespan, new [] { "RefreshTokenGrantRefreshTokenLifespan" }); + } + } + + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraOAuth2ClientTokenLifespans.cs b/Ory.Hydra.Client/Model/HydraOAuth2ClientTokenLifespans.cs new file mode 100644 index 00000000..4c6a16b6 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraOAuth2ClientTokenLifespans.cs @@ -0,0 +1,263 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// Lifespans of different token types issued for this OAuth 2.0 Client. + /// + [DataContract(Name = "oAuth2ClientTokenLifespans")] + public partial class HydraOAuth2ClientTokenLifespans : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + public HydraOAuth2ClientTokenLifespans(string authorizationCodeGrantAccessTokenLifespan = default(string), string authorizationCodeGrantIdTokenLifespan = default(string), string authorizationCodeGrantRefreshTokenLifespan = default(string), string clientCredentialsGrantAccessTokenLifespan = default(string), string implicitGrantAccessTokenLifespan = default(string), string implicitGrantIdTokenLifespan = default(string), string jwtBearerGrantAccessTokenLifespan = default(string), string refreshTokenGrantAccessTokenLifespan = default(string), string refreshTokenGrantIdTokenLifespan = default(string), string refreshTokenGrantRefreshTokenLifespan = default(string)) + { + this.AuthorizationCodeGrantAccessTokenLifespan = authorizationCodeGrantAccessTokenLifespan; + this.AuthorizationCodeGrantIdTokenLifespan = authorizationCodeGrantIdTokenLifespan; + this.AuthorizationCodeGrantRefreshTokenLifespan = authorizationCodeGrantRefreshTokenLifespan; + this.ClientCredentialsGrantAccessTokenLifespan = clientCredentialsGrantAccessTokenLifespan; + this.ImplicitGrantAccessTokenLifespan = implicitGrantAccessTokenLifespan; + this.ImplicitGrantIdTokenLifespan = implicitGrantIdTokenLifespan; + this.JwtBearerGrantAccessTokenLifespan = jwtBearerGrantAccessTokenLifespan; + this.RefreshTokenGrantAccessTokenLifespan = refreshTokenGrantAccessTokenLifespan; + this.RefreshTokenGrantIdTokenLifespan = refreshTokenGrantIdTokenLifespan; + this.RefreshTokenGrantRefreshTokenLifespan = refreshTokenGrantRefreshTokenLifespan; + } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "authorization_code_grant_access_token_lifespan", EmitDefaultValue = false)] + public string AuthorizationCodeGrantAccessTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "authorization_code_grant_id_token_lifespan", EmitDefaultValue = false)] + public string AuthorizationCodeGrantIdTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "authorization_code_grant_refresh_token_lifespan", EmitDefaultValue = false)] + public string AuthorizationCodeGrantRefreshTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "client_credentials_grant_access_token_lifespan", EmitDefaultValue = false)] + public string ClientCredentialsGrantAccessTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "implicit_grant_access_token_lifespan", EmitDefaultValue = false)] + public string ImplicitGrantAccessTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "implicit_grant_id_token_lifespan", EmitDefaultValue = false)] + public string ImplicitGrantIdTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "jwt_bearer_grant_access_token_lifespan", EmitDefaultValue = false)] + public string JwtBearerGrantAccessTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "refresh_token_grant_access_token_lifespan", EmitDefaultValue = false)] + public string RefreshTokenGrantAccessTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "refresh_token_grant_id_token_lifespan", EmitDefaultValue = false)] + public string RefreshTokenGrantIdTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "refresh_token_grant_refresh_token_lifespan", EmitDefaultValue = false)] + public string RefreshTokenGrantRefreshTokenLifespan { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraOAuth2ClientTokenLifespans {\n"); + sb.Append(" AuthorizationCodeGrantAccessTokenLifespan: ").Append(AuthorizationCodeGrantAccessTokenLifespan).Append("\n"); + sb.Append(" AuthorizationCodeGrantIdTokenLifespan: ").Append(AuthorizationCodeGrantIdTokenLifespan).Append("\n"); + sb.Append(" AuthorizationCodeGrantRefreshTokenLifespan: ").Append(AuthorizationCodeGrantRefreshTokenLifespan).Append("\n"); + sb.Append(" ClientCredentialsGrantAccessTokenLifespan: ").Append(ClientCredentialsGrantAccessTokenLifespan).Append("\n"); + sb.Append(" ImplicitGrantAccessTokenLifespan: ").Append(ImplicitGrantAccessTokenLifespan).Append("\n"); + sb.Append(" ImplicitGrantIdTokenLifespan: ").Append(ImplicitGrantIdTokenLifespan).Append("\n"); + sb.Append(" JwtBearerGrantAccessTokenLifespan: ").Append(JwtBearerGrantAccessTokenLifespan).Append("\n"); + sb.Append(" RefreshTokenGrantAccessTokenLifespan: ").Append(RefreshTokenGrantAccessTokenLifespan).Append("\n"); + sb.Append(" RefreshTokenGrantIdTokenLifespan: ").Append(RefreshTokenGrantIdTokenLifespan).Append("\n"); + sb.Append(" RefreshTokenGrantRefreshTokenLifespan: ").Append(RefreshTokenGrantRefreshTokenLifespan).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + if (this.AuthorizationCodeGrantAccessTokenLifespan != null) { + // AuthorizationCodeGrantAccessTokenLifespan (string) pattern + Regex regexAuthorizationCodeGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexAuthorizationCodeGrantAccessTokenLifespan.Match(this.AuthorizationCodeGrantAccessTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AuthorizationCodeGrantAccessTokenLifespan, must match a pattern of " + regexAuthorizationCodeGrantAccessTokenLifespan, new [] { "AuthorizationCodeGrantAccessTokenLifespan" }); + } + } + + if (this.AuthorizationCodeGrantIdTokenLifespan != null) { + // AuthorizationCodeGrantIdTokenLifespan (string) pattern + Regex regexAuthorizationCodeGrantIdTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexAuthorizationCodeGrantIdTokenLifespan.Match(this.AuthorizationCodeGrantIdTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AuthorizationCodeGrantIdTokenLifespan, must match a pattern of " + regexAuthorizationCodeGrantIdTokenLifespan, new [] { "AuthorizationCodeGrantIdTokenLifespan" }); + } + } + + if (this.AuthorizationCodeGrantRefreshTokenLifespan != null) { + // AuthorizationCodeGrantRefreshTokenLifespan (string) pattern + Regex regexAuthorizationCodeGrantRefreshTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexAuthorizationCodeGrantRefreshTokenLifespan.Match(this.AuthorizationCodeGrantRefreshTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AuthorizationCodeGrantRefreshTokenLifespan, must match a pattern of " + regexAuthorizationCodeGrantRefreshTokenLifespan, new [] { "AuthorizationCodeGrantRefreshTokenLifespan" }); + } + } + + if (this.ClientCredentialsGrantAccessTokenLifespan != null) { + // ClientCredentialsGrantAccessTokenLifespan (string) pattern + Regex regexClientCredentialsGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexClientCredentialsGrantAccessTokenLifespan.Match(this.ClientCredentialsGrantAccessTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClientCredentialsGrantAccessTokenLifespan, must match a pattern of " + regexClientCredentialsGrantAccessTokenLifespan, new [] { "ClientCredentialsGrantAccessTokenLifespan" }); + } + } + + if (this.ImplicitGrantAccessTokenLifespan != null) { + // ImplicitGrantAccessTokenLifespan (string) pattern + Regex regexImplicitGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexImplicitGrantAccessTokenLifespan.Match(this.ImplicitGrantAccessTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ImplicitGrantAccessTokenLifespan, must match a pattern of " + regexImplicitGrantAccessTokenLifespan, new [] { "ImplicitGrantAccessTokenLifespan" }); + } + } + + if (this.ImplicitGrantIdTokenLifespan != null) { + // ImplicitGrantIdTokenLifespan (string) pattern + Regex regexImplicitGrantIdTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexImplicitGrantIdTokenLifespan.Match(this.ImplicitGrantIdTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ImplicitGrantIdTokenLifespan, must match a pattern of " + regexImplicitGrantIdTokenLifespan, new [] { "ImplicitGrantIdTokenLifespan" }); + } + } + + if (this.JwtBearerGrantAccessTokenLifespan != null) { + // JwtBearerGrantAccessTokenLifespan (string) pattern + Regex regexJwtBearerGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexJwtBearerGrantAccessTokenLifespan.Match(this.JwtBearerGrantAccessTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for JwtBearerGrantAccessTokenLifespan, must match a pattern of " + regexJwtBearerGrantAccessTokenLifespan, new [] { "JwtBearerGrantAccessTokenLifespan" }); + } + } + + if (this.RefreshTokenGrantAccessTokenLifespan != null) { + // RefreshTokenGrantAccessTokenLifespan (string) pattern + Regex regexRefreshTokenGrantAccessTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexRefreshTokenGrantAccessTokenLifespan.Match(this.RefreshTokenGrantAccessTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RefreshTokenGrantAccessTokenLifespan, must match a pattern of " + regexRefreshTokenGrantAccessTokenLifespan, new [] { "RefreshTokenGrantAccessTokenLifespan" }); + } + } + + if (this.RefreshTokenGrantIdTokenLifespan != null) { + // RefreshTokenGrantIdTokenLifespan (string) pattern + Regex regexRefreshTokenGrantIdTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexRefreshTokenGrantIdTokenLifespan.Match(this.RefreshTokenGrantIdTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RefreshTokenGrantIdTokenLifespan, must match a pattern of " + regexRefreshTokenGrantIdTokenLifespan, new [] { "RefreshTokenGrantIdTokenLifespan" }); + } + } + + if (this.RefreshTokenGrantRefreshTokenLifespan != null) { + // RefreshTokenGrantRefreshTokenLifespan (string) pattern + Regex regexRefreshTokenGrantRefreshTokenLifespan = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexRefreshTokenGrantRefreshTokenLifespan.Match(this.RefreshTokenGrantRefreshTokenLifespan).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RefreshTokenGrantRefreshTokenLifespan, must match a pattern of " + regexRefreshTokenGrantRefreshTokenLifespan, new [] { "RefreshTokenGrantRefreshTokenLifespan" }); + } + } + + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraOAuth2ConsentRequest.cs b/Ory.Hydra.Client/Model/HydraOAuth2ConsentRequest.cs new file mode 100644 index 00000000..929bb6b3 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraOAuth2ConsentRequest.cs @@ -0,0 +1,207 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraOAuth2ConsentRequest + /// + [DataContract(Name = "oAuth2ConsentRequest")] + public partial class HydraOAuth2ConsentRequest : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected HydraOAuth2ConsentRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// ACR represents the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication.. + /// amr. + /// ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session. (required). + /// varClient. + /// context. + /// LoginChallenge is the login challenge this consent challenge belongs to. It can be used to associate a login and consent request in the login & consent app.. + /// LoginSessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user.. + /// oidcContext. + /// RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters.. + /// requestedAccessTokenAudience. + /// requestedScope. + /// Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you must not ask the user to grant the requested scopes. You must however either allow or deny the consent request using the usual API call.. + /// Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client.. + public HydraOAuth2ConsentRequest(string acr = default(string), List amr = default(List), string challenge = default(string), HydraOAuth2Client varClient = default(HydraOAuth2Client), Object context = default(Object), string loginChallenge = default(string), string loginSessionId = default(string), HydraOAuth2ConsentRequestOpenIDConnectContext oidcContext = default(HydraOAuth2ConsentRequestOpenIDConnectContext), string requestUrl = default(string), List requestedAccessTokenAudience = default(List), List requestedScope = default(List), bool skip = default(bool), string subject = default(string)) + { + // to ensure "challenge" is required (not null) + if (challenge == null) + { + throw new ArgumentNullException("challenge is a required property for HydraOAuth2ConsentRequest and cannot be null"); + } + this.Challenge = challenge; + this.Acr = acr; + this.Amr = amr; + this.VarClient = varClient; + this.Context = context; + this.LoginChallenge = loginChallenge; + this.LoginSessionId = loginSessionId; + this.OidcContext = oidcContext; + this.RequestUrl = requestUrl; + this.RequestedAccessTokenAudience = requestedAccessTokenAudience; + this.RequestedScope = requestedScope; + this.Skip = skip; + this.Subject = subject; + } + + /// + /// ACR represents the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication. + /// + /// ACR represents the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication. + [DataMember(Name = "acr", EmitDefaultValue = false)] + public string Acr { get; set; } + + /// + /// Gets or Sets Amr + /// + [DataMember(Name = "amr", EmitDefaultValue = false)] + public List Amr { get; set; } + + /// + /// ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session. + /// + /// ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session. + [DataMember(Name = "challenge", IsRequired = true, EmitDefaultValue = true)] + public string Challenge { get; set; } + + /// + /// Gets or Sets VarClient + /// + [DataMember(Name = "client", EmitDefaultValue = false)] + public HydraOAuth2Client VarClient { get; set; } + + /// + /// Gets or Sets Context + /// + [DataMember(Name = "context", EmitDefaultValue = true)] + public Object Context { get; set; } + + /// + /// LoginChallenge is the login challenge this consent challenge belongs to. It can be used to associate a login and consent request in the login & consent app. + /// + /// LoginChallenge is the login challenge this consent challenge belongs to. It can be used to associate a login and consent request in the login & consent app. + [DataMember(Name = "login_challenge", EmitDefaultValue = false)] + public string LoginChallenge { get; set; } + + /// + /// LoginSessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user. + /// + /// LoginSessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user. + [DataMember(Name = "login_session_id", EmitDefaultValue = false)] + public string LoginSessionId { get; set; } + + /// + /// Gets or Sets OidcContext + /// + [DataMember(Name = "oidc_context", EmitDefaultValue = false)] + public HydraOAuth2ConsentRequestOpenIDConnectContext OidcContext { get; set; } + + /// + /// RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. + /// + /// RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. + [DataMember(Name = "request_url", EmitDefaultValue = false)] + public string RequestUrl { get; set; } + + /// + /// Gets or Sets RequestedAccessTokenAudience + /// + [DataMember(Name = "requested_access_token_audience", EmitDefaultValue = false)] + public List RequestedAccessTokenAudience { get; set; } + + /// + /// Gets or Sets RequestedScope + /// + [DataMember(Name = "requested_scope", EmitDefaultValue = false)] + public List RequestedScope { get; set; } + + /// + /// Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you must not ask the user to grant the requested scopes. You must however either allow or deny the consent request using the usual API call. + /// + /// Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you must not ask the user to grant the requested scopes. You must however either allow or deny the consent request using the usual API call. + [DataMember(Name = "skip", EmitDefaultValue = true)] + public bool Skip { get; set; } + + /// + /// Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client. + /// + /// Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client. + [DataMember(Name = "subject", EmitDefaultValue = false)] + public string Subject { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraOAuth2ConsentRequest {\n"); + sb.Append(" Acr: ").Append(Acr).Append("\n"); + sb.Append(" Amr: ").Append(Amr).Append("\n"); + sb.Append(" Challenge: ").Append(Challenge).Append("\n"); + sb.Append(" VarClient: ").Append(VarClient).Append("\n"); + sb.Append(" Context: ").Append(Context).Append("\n"); + sb.Append(" LoginChallenge: ").Append(LoginChallenge).Append("\n"); + sb.Append(" LoginSessionId: ").Append(LoginSessionId).Append("\n"); + sb.Append(" OidcContext: ").Append(OidcContext).Append("\n"); + sb.Append(" RequestUrl: ").Append(RequestUrl).Append("\n"); + sb.Append(" RequestedAccessTokenAudience: ").Append(RequestedAccessTokenAudience).Append("\n"); + sb.Append(" RequestedScope: ").Append(RequestedScope).Append("\n"); + sb.Append(" Skip: ").Append(Skip).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraOAuth2ConsentRequestOpenIDConnectContext.cs b/Ory.Hydra.Client/Model/HydraOAuth2ConsentRequestOpenIDConnectContext.cs new file mode 100644 index 00000000..49e57f6e --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraOAuth2ConsentRequestOpenIDConnectContext.cs @@ -0,0 +1,123 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraOAuth2ConsentRequestOpenIDConnectContext + /// + [DataContract(Name = "oAuth2ConsentRequestOpenIDConnectContext")] + public partial class HydraOAuth2ConsentRequestOpenIDConnectContext : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request. It is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required. OpenID Connect defines it as follows: > Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values that the Authorization Server is being requested to use for processing this Authentication Request, with the values appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a Voluntary Claim by this parameter.. + /// Display is a string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User. The defined values are: page: The Authorization Server SHOULD display the authentication and consent UI consistent with a full User Agent page view. If the display parameter is not specified, this is the default display mode. popup: The Authorization Server SHOULD display the authentication and consent UI consistent with a popup User Agent window. The popup User Agent window should be of an appropriate size for a login-focused dialog and should not obscure the entire window that it is popping up over. touch: The Authorization Server SHOULD display the authentication and consent UI consistent with a device that leverages a touch interface. wap: The Authorization Server SHOULD display the authentication and consent UI consistent with a \"feature phone\" type display. The Authorization Server MAY also attempt to detect the capabilities of the User Agent and present an appropriate display.. + /// IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the End-User's current or past authenticated session with the Client.. + /// LoginHint hints about the login identifier the End-User might use to log in (if necessary). This hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier) and then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a phone number in the format specified for the phone_number Claim. The use of this parameter is optional.. + /// UILocales is the End-User'id preferred languages and scripts for the user interface, represented as a space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value \"fr-CA fr en\" represents a preference for French as spoken in Canada, then French (without a region designation), followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested locales are not supported by the OpenID Provider.. + public HydraOAuth2ConsentRequestOpenIDConnectContext(List acrValues = default(List), string display = default(string), Dictionary idTokenHintClaims = default(Dictionary), string loginHint = default(string), List uiLocales = default(List)) + { + this.AcrValues = acrValues; + this.Display = display; + this.IdTokenHintClaims = idTokenHintClaims; + this.LoginHint = loginHint; + this.UiLocales = uiLocales; + } + + /// + /// ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request. It is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required. OpenID Connect defines it as follows: > Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values that the Authorization Server is being requested to use for processing this Authentication Request, with the values appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a Voluntary Claim by this parameter. + /// + /// ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request. It is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required. OpenID Connect defines it as follows: > Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values that the Authorization Server is being requested to use for processing this Authentication Request, with the values appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a Voluntary Claim by this parameter. + [DataMember(Name = "acr_values", EmitDefaultValue = false)] + public List AcrValues { get; set; } + + /// + /// Display is a string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User. The defined values are: page: The Authorization Server SHOULD display the authentication and consent UI consistent with a full User Agent page view. If the display parameter is not specified, this is the default display mode. popup: The Authorization Server SHOULD display the authentication and consent UI consistent with a popup User Agent window. The popup User Agent window should be of an appropriate size for a login-focused dialog and should not obscure the entire window that it is popping up over. touch: The Authorization Server SHOULD display the authentication and consent UI consistent with a device that leverages a touch interface. wap: The Authorization Server SHOULD display the authentication and consent UI consistent with a \"feature phone\" type display. The Authorization Server MAY also attempt to detect the capabilities of the User Agent and present an appropriate display. + /// + /// Display is a string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User. The defined values are: page: The Authorization Server SHOULD display the authentication and consent UI consistent with a full User Agent page view. If the display parameter is not specified, this is the default display mode. popup: The Authorization Server SHOULD display the authentication and consent UI consistent with a popup User Agent window. The popup User Agent window should be of an appropriate size for a login-focused dialog and should not obscure the entire window that it is popping up over. touch: The Authorization Server SHOULD display the authentication and consent UI consistent with a device that leverages a touch interface. wap: The Authorization Server SHOULD display the authentication and consent UI consistent with a \"feature phone\" type display. The Authorization Server MAY also attempt to detect the capabilities of the User Agent and present an appropriate display. + [DataMember(Name = "display", EmitDefaultValue = false)] + public string Display { get; set; } + + /// + /// IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the End-User's current or past authenticated session with the Client. + /// + /// IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the End-User's current or past authenticated session with the Client. + [DataMember(Name = "id_token_hint_claims", EmitDefaultValue = false)] + public Dictionary IdTokenHintClaims { get; set; } + + /// + /// LoginHint hints about the login identifier the End-User might use to log in (if necessary). This hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier) and then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a phone number in the format specified for the phone_number Claim. The use of this parameter is optional. + /// + /// LoginHint hints about the login identifier the End-User might use to log in (if necessary). This hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier) and then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a phone number in the format specified for the phone_number Claim. The use of this parameter is optional. + [DataMember(Name = "login_hint", EmitDefaultValue = false)] + public string LoginHint { get; set; } + + /// + /// UILocales is the End-User'id preferred languages and scripts for the user interface, represented as a space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value \"fr-CA fr en\" represents a preference for French as spoken in Canada, then French (without a region designation), followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested locales are not supported by the OpenID Provider. + /// + /// UILocales is the End-User'id preferred languages and scripts for the user interface, represented as a space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value \"fr-CA fr en\" represents a preference for French as spoken in Canada, then French (without a region designation), followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested locales are not supported by the OpenID Provider. + [DataMember(Name = "ui_locales", EmitDefaultValue = false)] + public List UiLocales { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraOAuth2ConsentRequestOpenIDConnectContext {\n"); + sb.Append(" AcrValues: ").Append(AcrValues).Append("\n"); + sb.Append(" Display: ").Append(Display).Append("\n"); + sb.Append(" IdTokenHintClaims: ").Append(IdTokenHintClaims).Append("\n"); + sb.Append(" LoginHint: ").Append(LoginHint).Append("\n"); + sb.Append(" UiLocales: ").Append(UiLocales).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraOAuth2ConsentSession.cs b/Ory.Hydra.Client/Model/HydraOAuth2ConsentSession.cs new file mode 100644 index 00000000..822c9df9 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraOAuth2ConsentSession.cs @@ -0,0 +1,156 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// A completed OAuth 2.0 Consent Session. + /// + [DataContract(Name = "oAuth2ConsentSession")] + public partial class HydraOAuth2ConsentSession : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// consentRequest. + /// context. + /// expiresAt. + /// grantAccessTokenAudience. + /// grantScope. + /// handledAt. + /// Remember Consent Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope.. + /// Remember Consent For RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely.. + /// session. + public HydraOAuth2ConsentSession(HydraOAuth2ConsentRequest consentRequest = default(HydraOAuth2ConsentRequest), Object context = default(Object), HydraOAuth2ConsentSessionExpiresAt expiresAt = default(HydraOAuth2ConsentSessionExpiresAt), List grantAccessTokenAudience = default(List), List grantScope = default(List), DateTime handledAt = default(DateTime), bool remember = default(bool), long rememberFor = default(long), HydraAcceptOAuth2ConsentRequestSession session = default(HydraAcceptOAuth2ConsentRequestSession)) + { + this.ConsentRequest = consentRequest; + this.Context = context; + this.ExpiresAt = expiresAt; + this.GrantAccessTokenAudience = grantAccessTokenAudience; + this.GrantScope = grantScope; + this.HandledAt = handledAt; + this.Remember = remember; + this.RememberFor = rememberFor; + this.Session = session; + } + + /// + /// Gets or Sets ConsentRequest + /// + [DataMember(Name = "consent_request", EmitDefaultValue = false)] + public HydraOAuth2ConsentRequest ConsentRequest { get; set; } + + /// + /// Gets or Sets Context + /// + [DataMember(Name = "context", EmitDefaultValue = true)] + public Object Context { get; set; } + + /// + /// Gets or Sets ExpiresAt + /// + [DataMember(Name = "expires_at", EmitDefaultValue = false)] + public HydraOAuth2ConsentSessionExpiresAt ExpiresAt { get; set; } + + /// + /// Gets or Sets GrantAccessTokenAudience + /// + [DataMember(Name = "grant_access_token_audience", EmitDefaultValue = false)] + public List GrantAccessTokenAudience { get; set; } + + /// + /// Gets or Sets GrantScope + /// + [DataMember(Name = "grant_scope", EmitDefaultValue = false)] + public List GrantScope { get; set; } + + /// + /// Gets or Sets HandledAt + /// + [DataMember(Name = "handled_at", EmitDefaultValue = false)] + public DateTime HandledAt { get; set; } + + /// + /// Remember Consent Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope. + /// + /// Remember Consent Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope. + [DataMember(Name = "remember", EmitDefaultValue = true)] + public bool Remember { get; set; } + + /// + /// Remember Consent For RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. + /// + /// Remember Consent For RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. + [DataMember(Name = "remember_for", EmitDefaultValue = false)] + public long RememberFor { get; set; } + + /// + /// Gets or Sets Session + /// + [DataMember(Name = "session", EmitDefaultValue = false)] + public HydraAcceptOAuth2ConsentRequestSession Session { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraOAuth2ConsentSession {\n"); + sb.Append(" ConsentRequest: ").Append(ConsentRequest).Append("\n"); + sb.Append(" Context: ").Append(Context).Append("\n"); + sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); + sb.Append(" GrantAccessTokenAudience: ").Append(GrantAccessTokenAudience).Append("\n"); + sb.Append(" GrantScope: ").Append(GrantScope).Append("\n"); + sb.Append(" HandledAt: ").Append(HandledAt).Append("\n"); + sb.Append(" Remember: ").Append(Remember).Append("\n"); + sb.Append(" RememberFor: ").Append(RememberFor).Append("\n"); + sb.Append(" Session: ").Append(Session).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraOAuth2ConsentSessionExpiresAt.cs b/Ory.Hydra.Client/Model/HydraOAuth2ConsentSessionExpiresAt.cs new file mode 100644 index 00000000..1f2bbcfa --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraOAuth2ConsentSessionExpiresAt.cs @@ -0,0 +1,118 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraOAuth2ConsentSessionExpiresAt + /// + [DataContract(Name = "oAuth2ConsentSession_expires_at")] + public partial class HydraOAuth2ConsentSessionExpiresAt : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// accessToken. + /// authorizeCode. + /// idToken. + /// parContext. + /// refreshToken. + public HydraOAuth2ConsentSessionExpiresAt(DateTime accessToken = default(DateTime), DateTime authorizeCode = default(DateTime), DateTime idToken = default(DateTime), DateTime parContext = default(DateTime), DateTime refreshToken = default(DateTime)) + { + this.AccessToken = accessToken; + this.AuthorizeCode = authorizeCode; + this.IdToken = idToken; + this.ParContext = parContext; + this.RefreshToken = refreshToken; + } + + /// + /// Gets or Sets AccessToken + /// + [DataMember(Name = "access_token", EmitDefaultValue = false)] + public DateTime AccessToken { get; set; } + + /// + /// Gets or Sets AuthorizeCode + /// + [DataMember(Name = "authorize_code", EmitDefaultValue = false)] + public DateTime AuthorizeCode { get; set; } + + /// + /// Gets or Sets IdToken + /// + [DataMember(Name = "id_token", EmitDefaultValue = false)] + public DateTime IdToken { get; set; } + + /// + /// Gets or Sets ParContext + /// + [DataMember(Name = "par_context", EmitDefaultValue = false)] + public DateTime ParContext { get; set; } + + /// + /// Gets or Sets RefreshToken + /// + [DataMember(Name = "refresh_token", EmitDefaultValue = false)] + public DateTime RefreshToken { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraOAuth2ConsentSessionExpiresAt {\n"); + sb.Append(" AccessToken: ").Append(AccessToken).Append("\n"); + sb.Append(" AuthorizeCode: ").Append(AuthorizeCode).Append("\n"); + sb.Append(" IdToken: ").Append(IdToken).Append("\n"); + sb.Append(" ParContext: ").Append(ParContext).Append("\n"); + sb.Append(" RefreshToken: ").Append(RefreshToken).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraOAuth2LoginRequest.cs b/Ory.Hydra.Client/Model/HydraOAuth2LoginRequest.cs new file mode 100644 index 00000000..af42d212 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraOAuth2LoginRequest.cs @@ -0,0 +1,184 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraOAuth2LoginRequest + /// + [DataContract(Name = "oAuth2LoginRequest")] + public partial class HydraOAuth2LoginRequest : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected HydraOAuth2LoginRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. (required). + /// varClient (required). + /// oidcContext. + /// RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. (required). + /// requestedAccessTokenAudience. + /// requestedScope. + /// SessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user.. + /// Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect URL. This feature allows you to update / set session information. (required). + /// Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client. If this value is set and `skip` is true, you MUST include this subject type when accepting the login request, or the request will fail. (required). + public HydraOAuth2LoginRequest(string challenge = default(string), HydraOAuth2Client varClient = default(HydraOAuth2Client), HydraOAuth2ConsentRequestOpenIDConnectContext oidcContext = default(HydraOAuth2ConsentRequestOpenIDConnectContext), string requestUrl = default(string), List requestedAccessTokenAudience = default(List), List requestedScope = default(List), string sessionId = default(string), bool skip = default(bool), string subject = default(string)) + { + // to ensure "challenge" is required (not null) + if (challenge == null) + { + throw new ArgumentNullException("challenge is a required property for HydraOAuth2LoginRequest and cannot be null"); + } + this.Challenge = challenge; + // to ensure "varClient" is required (not null) + if (varClient == null) + { + throw new ArgumentNullException("varClient is a required property for HydraOAuth2LoginRequest and cannot be null"); + } + this.VarClient = varClient; + // to ensure "requestUrl" is required (not null) + if (requestUrl == null) + { + throw new ArgumentNullException("requestUrl is a required property for HydraOAuth2LoginRequest and cannot be null"); + } + this.RequestUrl = requestUrl; + this.Skip = skip; + // to ensure "subject" is required (not null) + if (subject == null) + { + throw new ArgumentNullException("subject is a required property for HydraOAuth2LoginRequest and cannot be null"); + } + this.Subject = subject; + this.OidcContext = oidcContext; + this.RequestedAccessTokenAudience = requestedAccessTokenAudience; + this.RequestedScope = requestedScope; + this.SessionId = sessionId; + } + + /// + /// ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. + /// + /// ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. + [DataMember(Name = "challenge", IsRequired = true, EmitDefaultValue = true)] + public string Challenge { get; set; } + + /// + /// Gets or Sets VarClient + /// + [DataMember(Name = "client", IsRequired = true, EmitDefaultValue = true)] + public HydraOAuth2Client VarClient { get; set; } + + /// + /// Gets or Sets OidcContext + /// + [DataMember(Name = "oidc_context", EmitDefaultValue = false)] + public HydraOAuth2ConsentRequestOpenIDConnectContext OidcContext { get; set; } + + /// + /// RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. + /// + /// RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. + [DataMember(Name = "request_url", IsRequired = true, EmitDefaultValue = true)] + public string RequestUrl { get; set; } + + /// + /// Gets or Sets RequestedAccessTokenAudience + /// + [DataMember(Name = "requested_access_token_audience", EmitDefaultValue = false)] + public List RequestedAccessTokenAudience { get; set; } + + /// + /// Gets or Sets RequestedScope + /// + [DataMember(Name = "requested_scope", EmitDefaultValue = false)] + public List RequestedScope { get; set; } + + /// + /// SessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user. + /// + /// SessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user. + [DataMember(Name = "session_id", EmitDefaultValue = false)] + public string SessionId { get; set; } + + /// + /// Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect URL. This feature allows you to update / set session information. + /// + /// Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect URL. This feature allows you to update / set session information. + [DataMember(Name = "skip", IsRequired = true, EmitDefaultValue = true)] + public bool Skip { get; set; } + + /// + /// Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client. If this value is set and `skip` is true, you MUST include this subject type when accepting the login request, or the request will fail. + /// + /// Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client. If this value is set and `skip` is true, you MUST include this subject type when accepting the login request, or the request will fail. + [DataMember(Name = "subject", IsRequired = true, EmitDefaultValue = true)] + public string Subject { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraOAuth2LoginRequest {\n"); + sb.Append(" Challenge: ").Append(Challenge).Append("\n"); + sb.Append(" VarClient: ").Append(VarClient).Append("\n"); + sb.Append(" OidcContext: ").Append(OidcContext).Append("\n"); + sb.Append(" RequestUrl: ").Append(RequestUrl).Append("\n"); + sb.Append(" RequestedAccessTokenAudience: ").Append(RequestedAccessTokenAudience).Append("\n"); + sb.Append(" RequestedScope: ").Append(RequestedScope).Append("\n"); + sb.Append(" SessionId: ").Append(SessionId).Append("\n"); + sb.Append(" Skip: ").Append(Skip).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraOAuth2LogoutRequest.cs b/Ory.Hydra.Client/Model/HydraOAuth2LogoutRequest.cs new file mode 100644 index 00000000..1122e768 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraOAuth2LogoutRequest.cs @@ -0,0 +1,132 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraOAuth2LogoutRequest + /// + [DataContract(Name = "oAuth2LogoutRequest")] + public partial class HydraOAuth2LogoutRequest : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to identify the session.. + /// varClient. + /// RequestURL is the original Logout URL requested.. + /// RPInitiated is set to true if the request was initiated by a Relying Party (RP), also known as an OAuth 2.0 Client.. + /// SessionID is the login session ID that was requested to log out.. + /// Subject is the user for whom the logout was request.. + public HydraOAuth2LogoutRequest(string challenge = default(string), HydraOAuth2Client varClient = default(HydraOAuth2Client), string requestUrl = default(string), bool rpInitiated = default(bool), string sid = default(string), string subject = default(string)) + { + this.Challenge = challenge; + this.VarClient = varClient; + this.RequestUrl = requestUrl; + this.RpInitiated = rpInitiated; + this.Sid = sid; + this.Subject = subject; + } + + /// + /// Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to identify the session. + /// + /// Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to identify the session. + [DataMember(Name = "challenge", EmitDefaultValue = false)] + public string Challenge { get; set; } + + /// + /// Gets or Sets VarClient + /// + [DataMember(Name = "client", EmitDefaultValue = false)] + public HydraOAuth2Client VarClient { get; set; } + + /// + /// RequestURL is the original Logout URL requested. + /// + /// RequestURL is the original Logout URL requested. + [DataMember(Name = "request_url", EmitDefaultValue = false)] + public string RequestUrl { get; set; } + + /// + /// RPInitiated is set to true if the request was initiated by a Relying Party (RP), also known as an OAuth 2.0 Client. + /// + /// RPInitiated is set to true if the request was initiated by a Relying Party (RP), also known as an OAuth 2.0 Client. + [DataMember(Name = "rp_initiated", EmitDefaultValue = true)] + public bool RpInitiated { get; set; } + + /// + /// SessionID is the login session ID that was requested to log out. + /// + /// SessionID is the login session ID that was requested to log out. + [DataMember(Name = "sid", EmitDefaultValue = false)] + public string Sid { get; set; } + + /// + /// Subject is the user for whom the logout was request. + /// + /// Subject is the user for whom the logout was request. + [DataMember(Name = "subject", EmitDefaultValue = false)] + public string Subject { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraOAuth2LogoutRequest {\n"); + sb.Append(" Challenge: ").Append(Challenge).Append("\n"); + sb.Append(" VarClient: ").Append(VarClient).Append("\n"); + sb.Append(" RequestUrl: ").Append(RequestUrl).Append("\n"); + sb.Append(" RpInitiated: ").Append(RpInitiated).Append("\n"); + sb.Append(" Sid: ").Append(Sid).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraOAuth2RedirectTo.cs b/Ory.Hydra.Client/Model/HydraOAuth2RedirectTo.cs new file mode 100644 index 00000000..828eb07c --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraOAuth2RedirectTo.cs @@ -0,0 +1,93 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// Contains a redirect URL used to complete a login, consent, or logout request. + /// + [DataContract(Name = "oAuth2RedirectTo")] + public partial class HydraOAuth2RedirectTo : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected HydraOAuth2RedirectTo() { } + /// + /// Initializes a new instance of the class. + /// + /// RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed. (required). + public HydraOAuth2RedirectTo(string redirectTo = default(string)) + { + // to ensure "redirectTo" is required (not null) + if (redirectTo == null) + { + throw new ArgumentNullException("redirectTo is a required property for HydraOAuth2RedirectTo and cannot be null"); + } + this.RedirectTo = redirectTo; + } + + /// + /// RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed. + /// + /// RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed. + [DataMember(Name = "redirect_to", IsRequired = true, EmitDefaultValue = true)] + public string RedirectTo { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraOAuth2RedirectTo {\n"); + sb.Append(" RedirectTo: ").Append(RedirectTo).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraOAuth2TokenExchange.cs b/Ory.Hydra.Client/Model/HydraOAuth2TokenExchange.cs new file mode 100644 index 00000000..472c81bf --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraOAuth2TokenExchange.cs @@ -0,0 +1,133 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// OAuth2 Token Exchange Result + /// + [DataContract(Name = "oAuth2TokenExchange")] + public partial class HydraOAuth2TokenExchange : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The access token issued by the authorization server.. + /// The lifetime in seconds of the access token. For example, the value \"3600\" denotes that the access token will expire in one hour from the time the response was generated.. + /// To retrieve a refresh token request the id_token scope.. + /// The refresh token, which can be used to obtain new access tokens. To retrieve it add the scope \"offline\" to your access token request.. + /// The scope of the access token. + /// The type of the token issued. + public HydraOAuth2TokenExchange(string accessToken = default(string), long expiresIn = default(long), string idToken = default(string), string refreshToken = default(string), string scope = default(string), string tokenType = default(string)) + { + this.AccessToken = accessToken; + this.ExpiresIn = expiresIn; + this.IdToken = idToken; + this.RefreshToken = refreshToken; + this.Scope = scope; + this.TokenType = tokenType; + } + + /// + /// The access token issued by the authorization server. + /// + /// The access token issued by the authorization server. + [DataMember(Name = "access_token", EmitDefaultValue = false)] + public string AccessToken { get; set; } + + /// + /// The lifetime in seconds of the access token. For example, the value \"3600\" denotes that the access token will expire in one hour from the time the response was generated. + /// + /// The lifetime in seconds of the access token. For example, the value \"3600\" denotes that the access token will expire in one hour from the time the response was generated. + [DataMember(Name = "expires_in", EmitDefaultValue = false)] + public long ExpiresIn { get; set; } + + /// + /// To retrieve a refresh token request the id_token scope. + /// + /// To retrieve a refresh token request the id_token scope. + [DataMember(Name = "id_token", EmitDefaultValue = false)] + public string IdToken { get; set; } + + /// + /// The refresh token, which can be used to obtain new access tokens. To retrieve it add the scope \"offline\" to your access token request. + /// + /// The refresh token, which can be used to obtain new access tokens. To retrieve it add the scope \"offline\" to your access token request. + [DataMember(Name = "refresh_token", EmitDefaultValue = false)] + public string RefreshToken { get; set; } + + /// + /// The scope of the access token + /// + /// The scope of the access token + [DataMember(Name = "scope", EmitDefaultValue = false)] + public string Scope { get; set; } + + /// + /// The type of the token issued + /// + /// The type of the token issued + [DataMember(Name = "token_type", EmitDefaultValue = false)] + public string TokenType { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraOAuth2TokenExchange {\n"); + sb.Append(" AccessToken: ").Append(AccessToken).Append("\n"); + sb.Append(" ExpiresIn: ").Append(ExpiresIn).Append("\n"); + sb.Append(" IdToken: ").Append(IdToken).Append("\n"); + sb.Append(" RefreshToken: ").Append(RefreshToken).Append("\n"); + sb.Append(" Scope: ").Append(Scope).Append("\n"); + sb.Append(" TokenType: ").Append(TokenType).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraOidcConfiguration.cs b/Ory.Hydra.Client/Model/HydraOidcConfiguration.cs new file mode 100644 index 00000000..3dd9aa67 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraOidcConfiguration.cs @@ -0,0 +1,438 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms among others. + /// + [DataContract(Name = "oidcConfiguration")] + public partial class HydraOidcConfiguration : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected HydraOidcConfiguration() { } + /// + /// Initializes a new instance of the class. + /// + /// OAuth 2.0 Authorization Endpoint URL (required). + /// OpenID Connect Back-Channel Logout Session Required Boolean value specifying whether the OP can pass a sid (session ID) Claim in the Logout Token to identify the RP session with the OP. If supported, the sid Claim is also included in ID Tokens issued by the OP. + /// OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support.. + /// OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support.. + /// OpenID Connect Supported Claims JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.. + /// OAuth 2.0 PKCE Supported Code Challenge Methods JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server.. + /// OpenID Connect Verifiable Credentials Endpoint Contains the URL of the Verifiable Credentials Endpoint.. + /// OpenID Connect Verifiable Credentials Supported JSON array containing a list of the Verifiable Credentials supported by this authorization server.. + /// OpenID Connect End-Session Endpoint URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP.. + /// OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the OP can pass iss (issuer) and sid (session ID) query parameters to identify the RP session with the OP when the frontchannel_logout_uri is used. If supported, the sid Claim is also included in ID Tokens issued by the OP.. + /// OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support.. + /// OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports.. + /// OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. (required). + /// OpenID Connect Supported ID Token Signing Algorithms JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. (required). + /// OpenID Connect Issuer URL An URL using the https scheme with no query or fragment component that the OP asserts as its IssuerURL Identifier. If IssuerURL discovery is supported , this value MUST be identical to the issuer value returned by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this IssuerURL. (required). + /// OpenID Connect Well-Known JSON Web Keys URL URL of the OP's JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to validate signatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs to encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. (required). + /// OpenID Connect Dynamic Client Registration Endpoint URL. + /// OpenID Connect Supported Request Object Signing Algorithms JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter).. + /// OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support.. + /// OpenID Connect Request URI Parameter Supported Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support.. + /// OpenID Connect Requires Request URI Registration Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter.. + /// OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports.. + /// OAuth 2.0 Supported Response Types JSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values. (required). + /// OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint.. + /// OAuth 2.0 Supported Scope Values JSON array containing a list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used. + /// OpenID Connect Supported Subject Types JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. (required). + /// OAuth 2.0 Token Endpoint URL (required). + /// OAuth 2.0 Supported Client Authentication Methods JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0. + /// OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint.. + /// OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. (required). + /// OpenID Connect Supported Userinfo Signing Algorithm JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].. + public HydraOidcConfiguration(string authorizationEndpoint = default(string), bool backchannelLogoutSessionSupported = default(bool), bool backchannelLogoutSupported = default(bool), bool claimsParameterSupported = default(bool), List claimsSupported = default(List), List codeChallengeMethodsSupported = default(List), string credentialsEndpointDraft00 = default(string), List credentialsSupportedDraft00 = default(List), string endSessionEndpoint = default(string), bool frontchannelLogoutSessionSupported = default(bool), bool frontchannelLogoutSupported = default(bool), List grantTypesSupported = default(List), List idTokenSignedResponseAlg = default(List), List idTokenSigningAlgValuesSupported = default(List), string issuer = default(string), string jwksUri = default(string), string registrationEndpoint = default(string), List requestObjectSigningAlgValuesSupported = default(List), bool requestParameterSupported = default(bool), bool requestUriParameterSupported = default(bool), bool requireRequestUriRegistration = default(bool), List responseModesSupported = default(List), List responseTypesSupported = default(List), string revocationEndpoint = default(string), List scopesSupported = default(List), List subjectTypesSupported = default(List), string tokenEndpoint = default(string), List tokenEndpointAuthMethodsSupported = default(List), string userinfoEndpoint = default(string), List userinfoSignedResponseAlg = default(List), List userinfoSigningAlgValuesSupported = default(List)) + { + // to ensure "authorizationEndpoint" is required (not null) + if (authorizationEndpoint == null) + { + throw new ArgumentNullException("authorizationEndpoint is a required property for HydraOidcConfiguration and cannot be null"); + } + this.AuthorizationEndpoint = authorizationEndpoint; + // to ensure "idTokenSignedResponseAlg" is required (not null) + if (idTokenSignedResponseAlg == null) + { + throw new ArgumentNullException("idTokenSignedResponseAlg is a required property for HydraOidcConfiguration and cannot be null"); + } + this.IdTokenSignedResponseAlg = idTokenSignedResponseAlg; + // to ensure "idTokenSigningAlgValuesSupported" is required (not null) + if (idTokenSigningAlgValuesSupported == null) + { + throw new ArgumentNullException("idTokenSigningAlgValuesSupported is a required property for HydraOidcConfiguration and cannot be null"); + } + this.IdTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; + // to ensure "issuer" is required (not null) + if (issuer == null) + { + throw new ArgumentNullException("issuer is a required property for HydraOidcConfiguration and cannot be null"); + } + this.Issuer = issuer; + // to ensure "jwksUri" is required (not null) + if (jwksUri == null) + { + throw new ArgumentNullException("jwksUri is a required property for HydraOidcConfiguration and cannot be null"); + } + this.JwksUri = jwksUri; + // to ensure "responseTypesSupported" is required (not null) + if (responseTypesSupported == null) + { + throw new ArgumentNullException("responseTypesSupported is a required property for HydraOidcConfiguration and cannot be null"); + } + this.ResponseTypesSupported = responseTypesSupported; + // to ensure "subjectTypesSupported" is required (not null) + if (subjectTypesSupported == null) + { + throw new ArgumentNullException("subjectTypesSupported is a required property for HydraOidcConfiguration and cannot be null"); + } + this.SubjectTypesSupported = subjectTypesSupported; + // to ensure "tokenEndpoint" is required (not null) + if (tokenEndpoint == null) + { + throw new ArgumentNullException("tokenEndpoint is a required property for HydraOidcConfiguration and cannot be null"); + } + this.TokenEndpoint = tokenEndpoint; + // to ensure "userinfoSignedResponseAlg" is required (not null) + if (userinfoSignedResponseAlg == null) + { + throw new ArgumentNullException("userinfoSignedResponseAlg is a required property for HydraOidcConfiguration and cannot be null"); + } + this.UserinfoSignedResponseAlg = userinfoSignedResponseAlg; + this.BackchannelLogoutSessionSupported = backchannelLogoutSessionSupported; + this.BackchannelLogoutSupported = backchannelLogoutSupported; + this.ClaimsParameterSupported = claimsParameterSupported; + this.ClaimsSupported = claimsSupported; + this.CodeChallengeMethodsSupported = codeChallengeMethodsSupported; + this.CredentialsEndpointDraft00 = credentialsEndpointDraft00; + this.CredentialsSupportedDraft00 = credentialsSupportedDraft00; + this.EndSessionEndpoint = endSessionEndpoint; + this.FrontchannelLogoutSessionSupported = frontchannelLogoutSessionSupported; + this.FrontchannelLogoutSupported = frontchannelLogoutSupported; + this.GrantTypesSupported = grantTypesSupported; + this.RegistrationEndpoint = registrationEndpoint; + this.RequestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; + this.RequestParameterSupported = requestParameterSupported; + this.RequestUriParameterSupported = requestUriParameterSupported; + this.RequireRequestUriRegistration = requireRequestUriRegistration; + this.ResponseModesSupported = responseModesSupported; + this.RevocationEndpoint = revocationEndpoint; + this.ScopesSupported = scopesSupported; + this.TokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; + this.UserinfoEndpoint = userinfoEndpoint; + this.UserinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; + } + + /// + /// OAuth 2.0 Authorization Endpoint URL + /// + /// OAuth 2.0 Authorization Endpoint URL + /// https://playground.ory.sh/ory-hydra/public/oauth2/auth + [DataMember(Name = "authorization_endpoint", IsRequired = true, EmitDefaultValue = true)] + public string AuthorizationEndpoint { get; set; } + + /// + /// OpenID Connect Back-Channel Logout Session Required Boolean value specifying whether the OP can pass a sid (session ID) Claim in the Logout Token to identify the RP session with the OP. If supported, the sid Claim is also included in ID Tokens issued by the OP + /// + /// OpenID Connect Back-Channel Logout Session Required Boolean value specifying whether the OP can pass a sid (session ID) Claim in the Logout Token to identify the RP session with the OP. If supported, the sid Claim is also included in ID Tokens issued by the OP + [DataMember(Name = "backchannel_logout_session_supported", EmitDefaultValue = true)] + public bool BackchannelLogoutSessionSupported { get; set; } + + /// + /// OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support. + /// + /// OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support. + [DataMember(Name = "backchannel_logout_supported", EmitDefaultValue = true)] + public bool BackchannelLogoutSupported { get; set; } + + /// + /// OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. + /// + /// OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. + [DataMember(Name = "claims_parameter_supported", EmitDefaultValue = true)] + public bool ClaimsParameterSupported { get; set; } + + /// + /// OpenID Connect Supported Claims JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. + /// + /// OpenID Connect Supported Claims JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. + [DataMember(Name = "claims_supported", EmitDefaultValue = false)] + public List ClaimsSupported { get; set; } + + /// + /// OAuth 2.0 PKCE Supported Code Challenge Methods JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server. + /// + /// OAuth 2.0 PKCE Supported Code Challenge Methods JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server. + [DataMember(Name = "code_challenge_methods_supported", EmitDefaultValue = false)] + public List CodeChallengeMethodsSupported { get; set; } + + /// + /// OpenID Connect Verifiable Credentials Endpoint Contains the URL of the Verifiable Credentials Endpoint. + /// + /// OpenID Connect Verifiable Credentials Endpoint Contains the URL of the Verifiable Credentials Endpoint. + [DataMember(Name = "credentials_endpoint_draft_00", EmitDefaultValue = false)] + public string CredentialsEndpointDraft00 { get; set; } + + /// + /// OpenID Connect Verifiable Credentials Supported JSON array containing a list of the Verifiable Credentials supported by this authorization server. + /// + /// OpenID Connect Verifiable Credentials Supported JSON array containing a list of the Verifiable Credentials supported by this authorization server. + [DataMember(Name = "credentials_supported_draft_00", EmitDefaultValue = false)] + public List CredentialsSupportedDraft00 { get; set; } + + /// + /// OpenID Connect End-Session Endpoint URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP. + /// + /// OpenID Connect End-Session Endpoint URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP. + [DataMember(Name = "end_session_endpoint", EmitDefaultValue = false)] + public string EndSessionEndpoint { get; set; } + + /// + /// OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the OP can pass iss (issuer) and sid (session ID) query parameters to identify the RP session with the OP when the frontchannel_logout_uri is used. If supported, the sid Claim is also included in ID Tokens issued by the OP. + /// + /// OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the OP can pass iss (issuer) and sid (session ID) query parameters to identify the RP session with the OP when the frontchannel_logout_uri is used. If supported, the sid Claim is also included in ID Tokens issued by the OP. + [DataMember(Name = "frontchannel_logout_session_supported", EmitDefaultValue = true)] + public bool FrontchannelLogoutSessionSupported { get; set; } + + /// + /// OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. + /// + /// OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. + [DataMember(Name = "frontchannel_logout_supported", EmitDefaultValue = true)] + public bool FrontchannelLogoutSupported { get; set; } + + /// + /// OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. + /// + /// OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. + [DataMember(Name = "grant_types_supported", EmitDefaultValue = false)] + public List GrantTypesSupported { get; set; } + + /// + /// OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. + /// + /// OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. + [DataMember(Name = "id_token_signed_response_alg", IsRequired = true, EmitDefaultValue = true)] + public List IdTokenSignedResponseAlg { get; set; } + + /// + /// OpenID Connect Supported ID Token Signing Algorithms JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. + /// + /// OpenID Connect Supported ID Token Signing Algorithms JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. + [DataMember(Name = "id_token_signing_alg_values_supported", IsRequired = true, EmitDefaultValue = true)] + public List IdTokenSigningAlgValuesSupported { get; set; } + + /// + /// OpenID Connect Issuer URL An URL using the https scheme with no query or fragment component that the OP asserts as its IssuerURL Identifier. If IssuerURL discovery is supported , this value MUST be identical to the issuer value returned by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this IssuerURL. + /// + /// OpenID Connect Issuer URL An URL using the https scheme with no query or fragment component that the OP asserts as its IssuerURL Identifier. If IssuerURL discovery is supported , this value MUST be identical to the issuer value returned by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this IssuerURL. + /// https://playground.ory.sh/ory-hydra/public/ + [DataMember(Name = "issuer", IsRequired = true, EmitDefaultValue = true)] + public string Issuer { get; set; } + + /// + /// OpenID Connect Well-Known JSON Web Keys URL URL of the OP's JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to validate signatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs to encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. + /// + /// OpenID Connect Well-Known JSON Web Keys URL URL of the OP's JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to validate signatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs to encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. + /// https://{slug}.projects.oryapis.com/.well-known/jwks.json + [DataMember(Name = "jwks_uri", IsRequired = true, EmitDefaultValue = true)] + public string JwksUri { get; set; } + + /// + /// OpenID Connect Dynamic Client Registration Endpoint URL + /// + /// OpenID Connect Dynamic Client Registration Endpoint URL + /// https://playground.ory.sh/ory-hydra/admin/client + [DataMember(Name = "registration_endpoint", EmitDefaultValue = false)] + public string RegistrationEndpoint { get; set; } + + /// + /// OpenID Connect Supported Request Object Signing Algorithms JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). + /// + /// OpenID Connect Supported Request Object Signing Algorithms JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). + [DataMember(Name = "request_object_signing_alg_values_supported", EmitDefaultValue = false)] + public List RequestObjectSigningAlgValuesSupported { get; set; } + + /// + /// OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. + /// + /// OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. + [DataMember(Name = "request_parameter_supported", EmitDefaultValue = true)] + public bool RequestParameterSupported { get; set; } + + /// + /// OpenID Connect Request URI Parameter Supported Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. + /// + /// OpenID Connect Request URI Parameter Supported Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. + [DataMember(Name = "request_uri_parameter_supported", EmitDefaultValue = true)] + public bool RequestUriParameterSupported { get; set; } + + /// + /// OpenID Connect Requires Request URI Registration Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter. + /// + /// OpenID Connect Requires Request URI Registration Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter. + [DataMember(Name = "require_request_uri_registration", EmitDefaultValue = true)] + public bool RequireRequestUriRegistration { get; set; } + + /// + /// OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. + /// + /// OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. + [DataMember(Name = "response_modes_supported", EmitDefaultValue = false)] + public List ResponseModesSupported { get; set; } + + /// + /// OAuth 2.0 Supported Response Types JSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values. + /// + /// OAuth 2.0 Supported Response Types JSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values. + [DataMember(Name = "response_types_supported", IsRequired = true, EmitDefaultValue = true)] + public List ResponseTypesSupported { get; set; } + + /// + /// OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint. + /// + /// OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint. + [DataMember(Name = "revocation_endpoint", EmitDefaultValue = false)] + public string RevocationEndpoint { get; set; } + + /// + /// OAuth 2.0 Supported Scope Values JSON array containing a list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used + /// + /// OAuth 2.0 Supported Scope Values JSON array containing a list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used + [DataMember(Name = "scopes_supported", EmitDefaultValue = false)] + public List ScopesSupported { get; set; } + + /// + /// OpenID Connect Supported Subject Types JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. + /// + /// OpenID Connect Supported Subject Types JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. + [DataMember(Name = "subject_types_supported", IsRequired = true, EmitDefaultValue = true)] + public List SubjectTypesSupported { get; set; } + + /// + /// OAuth 2.0 Token Endpoint URL + /// + /// OAuth 2.0 Token Endpoint URL + /// https://playground.ory.sh/ory-hydra/public/oauth2/token + [DataMember(Name = "token_endpoint", IsRequired = true, EmitDefaultValue = true)] + public string TokenEndpoint { get; set; } + + /// + /// OAuth 2.0 Supported Client Authentication Methods JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 + /// + /// OAuth 2.0 Supported Client Authentication Methods JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 + [DataMember(Name = "token_endpoint_auth_methods_supported", EmitDefaultValue = false)] + public List TokenEndpointAuthMethodsSupported { get; set; } + + /// + /// OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint. + /// + /// OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint. + [DataMember(Name = "userinfo_endpoint", EmitDefaultValue = false)] + public string UserinfoEndpoint { get; set; } + + /// + /// OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. + /// + /// OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. + [DataMember(Name = "userinfo_signed_response_alg", IsRequired = true, EmitDefaultValue = true)] + public List UserinfoSignedResponseAlg { get; set; } + + /// + /// OpenID Connect Supported Userinfo Signing Algorithm JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + /// + /// OpenID Connect Supported Userinfo Signing Algorithm JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. + [DataMember(Name = "userinfo_signing_alg_values_supported", EmitDefaultValue = false)] + public List UserinfoSigningAlgValuesSupported { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraOidcConfiguration {\n"); + sb.Append(" AuthorizationEndpoint: ").Append(AuthorizationEndpoint).Append("\n"); + sb.Append(" BackchannelLogoutSessionSupported: ").Append(BackchannelLogoutSessionSupported).Append("\n"); + sb.Append(" BackchannelLogoutSupported: ").Append(BackchannelLogoutSupported).Append("\n"); + sb.Append(" ClaimsParameterSupported: ").Append(ClaimsParameterSupported).Append("\n"); + sb.Append(" ClaimsSupported: ").Append(ClaimsSupported).Append("\n"); + sb.Append(" CodeChallengeMethodsSupported: ").Append(CodeChallengeMethodsSupported).Append("\n"); + sb.Append(" CredentialsEndpointDraft00: ").Append(CredentialsEndpointDraft00).Append("\n"); + sb.Append(" CredentialsSupportedDraft00: ").Append(CredentialsSupportedDraft00).Append("\n"); + sb.Append(" EndSessionEndpoint: ").Append(EndSessionEndpoint).Append("\n"); + sb.Append(" FrontchannelLogoutSessionSupported: ").Append(FrontchannelLogoutSessionSupported).Append("\n"); + sb.Append(" FrontchannelLogoutSupported: ").Append(FrontchannelLogoutSupported).Append("\n"); + sb.Append(" GrantTypesSupported: ").Append(GrantTypesSupported).Append("\n"); + sb.Append(" IdTokenSignedResponseAlg: ").Append(IdTokenSignedResponseAlg).Append("\n"); + sb.Append(" IdTokenSigningAlgValuesSupported: ").Append(IdTokenSigningAlgValuesSupported).Append("\n"); + sb.Append(" Issuer: ").Append(Issuer).Append("\n"); + sb.Append(" JwksUri: ").Append(JwksUri).Append("\n"); + sb.Append(" RegistrationEndpoint: ").Append(RegistrationEndpoint).Append("\n"); + sb.Append(" RequestObjectSigningAlgValuesSupported: ").Append(RequestObjectSigningAlgValuesSupported).Append("\n"); + sb.Append(" RequestParameterSupported: ").Append(RequestParameterSupported).Append("\n"); + sb.Append(" RequestUriParameterSupported: ").Append(RequestUriParameterSupported).Append("\n"); + sb.Append(" RequireRequestUriRegistration: ").Append(RequireRequestUriRegistration).Append("\n"); + sb.Append(" ResponseModesSupported: ").Append(ResponseModesSupported).Append("\n"); + sb.Append(" ResponseTypesSupported: ").Append(ResponseTypesSupported).Append("\n"); + sb.Append(" RevocationEndpoint: ").Append(RevocationEndpoint).Append("\n"); + sb.Append(" ScopesSupported: ").Append(ScopesSupported).Append("\n"); + sb.Append(" SubjectTypesSupported: ").Append(SubjectTypesSupported).Append("\n"); + sb.Append(" TokenEndpoint: ").Append(TokenEndpoint).Append("\n"); + sb.Append(" TokenEndpointAuthMethodsSupported: ").Append(TokenEndpointAuthMethodsSupported).Append("\n"); + sb.Append(" UserinfoEndpoint: ").Append(UserinfoEndpoint).Append("\n"); + sb.Append(" UserinfoSignedResponseAlg: ").Append(UserinfoSignedResponseAlg).Append("\n"); + sb.Append(" UserinfoSigningAlgValuesSupported: ").Append(UserinfoSigningAlgValuesSupported).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraOidcUserInfo.cs b/Ory.Hydra.Client/Model/HydraOidcUserInfo.cs new file mode 100644 index 00000000..ce5b7d60 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraOidcUserInfo.cs @@ -0,0 +1,263 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// OpenID Connect Userinfo + /// + [DataContract(Name = "oidcUserInfo")] + public partial class HydraOidcUserInfo : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// End-User's birthday, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format. The year MAY be 0000, indicating that it is omitted. To represent only the year, YYYY format is allowed. Note that depending on the underlying platform's date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates.. + /// End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7.. + /// True if the End-User's e-mail address has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this e-mail address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating.. + /// Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters.. + /// End-User's gender. Values defined by this specification are female and male. Other values MAY be used when neither of the defined values are applicable.. + /// Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters.. + /// End-User's locale, represented as a BCP47 [RFC5646] language tag. This is typically an ISO 639-1 Alpha-2 [ISO639‑1] language code in lowercase and an ISO 3166-1 Alpha-2 [ISO3166‑1] country code in uppercase, separated by a dash. For example, en-US or fr-CA. As a compatibility note, some implementations have used an underscore as the separator rather than a dash, for example, en_US; Relying Parties MAY choose to accept this locale syntax as well.. + /// Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used.. + /// End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences.. + /// Casual name of the End-User that may or may not be the same as the given_name. For instance, a nickname value of Mike might be returned alongside a given_name value of Michael.. + /// End-User's preferred telephone number. E.164 [E.164] is RECOMMENDED as the format of this Claim, for example, +1 (425) 555-1212 or +56 (2) 687 2400. If the phone number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678.. + /// True if the End-User's phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format.. + /// URL of the End-User's profile picture. This URL MUST refer to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image. Note that this URL SHOULD specifically reference a profile photo of the End-User suitable for displaying when describing the End-User, rather than an arbitrary photo taken by the End-User.. + /// Non-unique shorthand name by which the End-User wishes to be referred to at the RP, such as janedoe or j.doe. This value MAY be any valid JSON string including special characters such as @, /, or whitespace.. + /// URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User.. + /// Subject - Identifier for the End-User at the IssuerURL.. + /// Time the End-User's information was last updated. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time.. + /// URL of the End-User's Web page or blog. This Web page SHOULD contain information published by the End-User or an organization that the End-User is affiliated with.. + /// String from zoneinfo [zoneinfo] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles.. + public HydraOidcUserInfo(string birthdate = default(string), string email = default(string), bool emailVerified = default(bool), string familyName = default(string), string gender = default(string), string givenName = default(string), string locale = default(string), string middleName = default(string), string name = default(string), string nickname = default(string), string phoneNumber = default(string), bool phoneNumberVerified = default(bool), string picture = default(string), string preferredUsername = default(string), string profile = default(string), string sub = default(string), long updatedAt = default(long), string website = default(string), string zoneinfo = default(string)) + { + this.Birthdate = birthdate; + this.Email = email; + this.EmailVerified = emailVerified; + this.FamilyName = familyName; + this.Gender = gender; + this.GivenName = givenName; + this.Locale = locale; + this.MiddleName = middleName; + this.Name = name; + this.Nickname = nickname; + this.PhoneNumber = phoneNumber; + this.PhoneNumberVerified = phoneNumberVerified; + this.Picture = picture; + this.PreferredUsername = preferredUsername; + this.Profile = profile; + this.Sub = sub; + this.UpdatedAt = updatedAt; + this.Website = website; + this.Zoneinfo = zoneinfo; + } + + /// + /// End-User's birthday, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format. The year MAY be 0000, indicating that it is omitted. To represent only the year, YYYY format is allowed. Note that depending on the underlying platform's date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates. + /// + /// End-User's birthday, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format. The year MAY be 0000, indicating that it is omitted. To represent only the year, YYYY format is allowed. Note that depending on the underlying platform's date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates. + [DataMember(Name = "birthdate", EmitDefaultValue = false)] + public string Birthdate { get; set; } + + /// + /// End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7. + /// + /// End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7. + [DataMember(Name = "email", EmitDefaultValue = false)] + public string Email { get; set; } + + /// + /// True if the End-User's e-mail address has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this e-mail address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. + /// + /// True if the End-User's e-mail address has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this e-mail address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. + [DataMember(Name = "email_verified", EmitDefaultValue = true)] + public bool EmailVerified { get; set; } + + /// + /// Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters. + /// + /// Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters. + [DataMember(Name = "family_name", EmitDefaultValue = false)] + public string FamilyName { get; set; } + + /// + /// End-User's gender. Values defined by this specification are female and male. Other values MAY be used when neither of the defined values are applicable. + /// + /// End-User's gender. Values defined by this specification are female and male. Other values MAY be used when neither of the defined values are applicable. + [DataMember(Name = "gender", EmitDefaultValue = false)] + public string Gender { get; set; } + + /// + /// Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters. + /// + /// Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters. + [DataMember(Name = "given_name", EmitDefaultValue = false)] + public string GivenName { get; set; } + + /// + /// End-User's locale, represented as a BCP47 [RFC5646] language tag. This is typically an ISO 639-1 Alpha-2 [ISO639‑1] language code in lowercase and an ISO 3166-1 Alpha-2 [ISO3166‑1] country code in uppercase, separated by a dash. For example, en-US or fr-CA. As a compatibility note, some implementations have used an underscore as the separator rather than a dash, for example, en_US; Relying Parties MAY choose to accept this locale syntax as well. + /// + /// End-User's locale, represented as a BCP47 [RFC5646] language tag. This is typically an ISO 639-1 Alpha-2 [ISO639‑1] language code in lowercase and an ISO 3166-1 Alpha-2 [ISO3166‑1] country code in uppercase, separated by a dash. For example, en-US or fr-CA. As a compatibility note, some implementations have used an underscore as the separator rather than a dash, for example, en_US; Relying Parties MAY choose to accept this locale syntax as well. + [DataMember(Name = "locale", EmitDefaultValue = false)] + public string Locale { get; set; } + + /// + /// Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used. + /// + /// Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used. + [DataMember(Name = "middle_name", EmitDefaultValue = false)] + public string MiddleName { get; set; } + + /// + /// End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences. + /// + /// End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences. + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Casual name of the End-User that may or may not be the same as the given_name. For instance, a nickname value of Mike might be returned alongside a given_name value of Michael. + /// + /// Casual name of the End-User that may or may not be the same as the given_name. For instance, a nickname value of Mike might be returned alongside a given_name value of Michael. + [DataMember(Name = "nickname", EmitDefaultValue = false)] + public string Nickname { get; set; } + + /// + /// End-User's preferred telephone number. E.164 [E.164] is RECOMMENDED as the format of this Claim, for example, +1 (425) 555-1212 or +56 (2) 687 2400. If the phone number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678. + /// + /// End-User's preferred telephone number. E.164 [E.164] is RECOMMENDED as the format of this Claim, for example, +1 (425) 555-1212 or +56 (2) 687 2400. If the phone number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678. + [DataMember(Name = "phone_number", EmitDefaultValue = false)] + public string PhoneNumber { get; set; } + + /// + /// True if the End-User's phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format. + /// + /// True if the End-User's phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format. + [DataMember(Name = "phone_number_verified", EmitDefaultValue = true)] + public bool PhoneNumberVerified { get; set; } + + /// + /// URL of the End-User's profile picture. This URL MUST refer to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image. Note that this URL SHOULD specifically reference a profile photo of the End-User suitable for displaying when describing the End-User, rather than an arbitrary photo taken by the End-User. + /// + /// URL of the End-User's profile picture. This URL MUST refer to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image. Note that this URL SHOULD specifically reference a profile photo of the End-User suitable for displaying when describing the End-User, rather than an arbitrary photo taken by the End-User. + [DataMember(Name = "picture", EmitDefaultValue = false)] + public string Picture { get; set; } + + /// + /// Non-unique shorthand name by which the End-User wishes to be referred to at the RP, such as janedoe or j.doe. This value MAY be any valid JSON string including special characters such as @, /, or whitespace. + /// + /// Non-unique shorthand name by which the End-User wishes to be referred to at the RP, such as janedoe or j.doe. This value MAY be any valid JSON string including special characters such as @, /, or whitespace. + [DataMember(Name = "preferred_username", EmitDefaultValue = false)] + public string PreferredUsername { get; set; } + + /// + /// URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User. + /// + /// URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User. + [DataMember(Name = "profile", EmitDefaultValue = false)] + public string Profile { get; set; } + + /// + /// Subject - Identifier for the End-User at the IssuerURL. + /// + /// Subject - Identifier for the End-User at the IssuerURL. + [DataMember(Name = "sub", EmitDefaultValue = false)] + public string Sub { get; set; } + + /// + /// Time the End-User's information was last updated. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time. + /// + /// Time the End-User's information was last updated. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time. + [DataMember(Name = "updated_at", EmitDefaultValue = false)] + public long UpdatedAt { get; set; } + + /// + /// URL of the End-User's Web page or blog. This Web page SHOULD contain information published by the End-User or an organization that the End-User is affiliated with. + /// + /// URL of the End-User's Web page or blog. This Web page SHOULD contain information published by the End-User or an organization that the End-User is affiliated with. + [DataMember(Name = "website", EmitDefaultValue = false)] + public string Website { get; set; } + + /// + /// String from zoneinfo [zoneinfo] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles. + /// + /// String from zoneinfo [zoneinfo] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles. + [DataMember(Name = "zoneinfo", EmitDefaultValue = false)] + public string Zoneinfo { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraOidcUserInfo {\n"); + sb.Append(" Birthdate: ").Append(Birthdate).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" EmailVerified: ").Append(EmailVerified).Append("\n"); + sb.Append(" FamilyName: ").Append(FamilyName).Append("\n"); + sb.Append(" Gender: ").Append(Gender).Append("\n"); + sb.Append(" GivenName: ").Append(GivenName).Append("\n"); + sb.Append(" Locale: ").Append(Locale).Append("\n"); + sb.Append(" MiddleName: ").Append(MiddleName).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); + sb.Append(" PhoneNumberVerified: ").Append(PhoneNumberVerified).Append("\n"); + sb.Append(" Picture: ").Append(Picture).Append("\n"); + sb.Append(" PreferredUsername: ").Append(PreferredUsername).Append("\n"); + sb.Append(" Profile: ").Append(Profile).Append("\n"); + sb.Append(" Sub: ").Append(Sub).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append(" Website: ").Append(Website).Append("\n"); + sb.Append(" Zoneinfo: ").Append(Zoneinfo).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraPagination.cs b/Ory.Hydra.Client/Model/HydraPagination.cs new file mode 100644 index 00000000..48bf892c --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraPagination.cs @@ -0,0 +1,106 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraPagination + /// + [DataContract(Name = "pagination")] + public partial class HydraPagination : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (default to 250). + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (default to "1"). + public HydraPagination(long pageSize = 250, string pageToken = @"1") + { + this.PageSize = pageSize; + // use default value if no "pageToken" provided + this.PageToken = pageToken ?? @"1"; + } + + /// + /// Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + /// + /// Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + [DataMember(Name = "page_size", EmitDefaultValue = false)] + public long PageSize { get; set; } + + /// + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + /// + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + [DataMember(Name = "page_token", EmitDefaultValue = false)] + public string PageToken { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraPagination {\n"); + sb.Append(" PageSize: ").Append(PageSize).Append("\n"); + sb.Append(" PageToken: ").Append(PageToken).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // PageSize (long) maximum + if (this.PageSize > (long)1000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PageSize, must be a value less than or equal to 1000.", new [] { "PageSize" }); + } + + // PageSize (long) minimum + if (this.PageSize < (long)1) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PageSize, must be a value greater than or equal to 1.", new [] { "PageSize" }); + } + + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraPaginationHeaders.cs b/Ory.Hydra.Client/Model/HydraPaginationHeaders.cs new file mode 100644 index 00000000..5de51d4e --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraPaginationHeaders.cs @@ -0,0 +1,93 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraPaginationHeaders + /// + [DataContract(Name = "paginationHeaders")] + public partial class HydraPaginationHeaders : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). in: header. + /// The total number of clients. in: header. + public HydraPaginationHeaders(string link = default(string), string xTotalCount = default(string)) + { + this.Link = link; + this.XTotalCount = xTotalCount; + } + + /// + /// The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). in: header + /// + /// The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). in: header + [DataMember(Name = "link", EmitDefaultValue = false)] + public string Link { get; set; } + + /// + /// The total number of clients. in: header + /// + /// The total number of clients. in: header + [DataMember(Name = "x-total-count", EmitDefaultValue = false)] + public string XTotalCount { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraPaginationHeaders {\n"); + sb.Append(" Link: ").Append(Link).Append("\n"); + sb.Append(" XTotalCount: ").Append(XTotalCount).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraRFC6749ErrorJson.cs b/Ory.Hydra.Client/Model/HydraRFC6749ErrorJson.cs new file mode 100644 index 00000000..83f148a1 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraRFC6749ErrorJson.cs @@ -0,0 +1,118 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraRFC6749ErrorJson + /// + [DataContract(Name = "RFC6749ErrorJson")] + public partial class HydraRFC6749ErrorJson : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// error. + /// errorDebug. + /// errorDescription. + /// errorHint. + /// statusCode. + public HydraRFC6749ErrorJson(string error = default(string), string errorDebug = default(string), string errorDescription = default(string), string errorHint = default(string), long statusCode = default(long)) + { + this.Error = error; + this.ErrorDebug = errorDebug; + this.ErrorDescription = errorDescription; + this.ErrorHint = errorHint; + this.StatusCode = statusCode; + } + + /// + /// Gets or Sets Error + /// + [DataMember(Name = "error", EmitDefaultValue = false)] + public string Error { get; set; } + + /// + /// Gets or Sets ErrorDebug + /// + [DataMember(Name = "error_debug", EmitDefaultValue = false)] + public string ErrorDebug { get; set; } + + /// + /// Gets or Sets ErrorDescription + /// + [DataMember(Name = "error_description", EmitDefaultValue = false)] + public string ErrorDescription { get; set; } + + /// + /// Gets or Sets ErrorHint + /// + [DataMember(Name = "error_hint", EmitDefaultValue = false)] + public string ErrorHint { get; set; } + + /// + /// Gets or Sets StatusCode + /// + [DataMember(Name = "status_code", EmitDefaultValue = false)] + public long StatusCode { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraRFC6749ErrorJson {\n"); + sb.Append(" Error: ").Append(Error).Append("\n"); + sb.Append(" ErrorDebug: ").Append(ErrorDebug).Append("\n"); + sb.Append(" ErrorDescription: ").Append(ErrorDescription).Append("\n"); + sb.Append(" ErrorHint: ").Append(ErrorHint).Append("\n"); + sb.Append(" StatusCode: ").Append(StatusCode).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraRejectOAuth2Request.cs b/Ory.Hydra.Client/Model/HydraRejectOAuth2Request.cs new file mode 100644 index 00000000..0eebdc5a --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraRejectOAuth2Request.cs @@ -0,0 +1,123 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraRejectOAuth2Request + /// + [DataContract(Name = "rejectOAuth2Request")] + public partial class HydraRejectOAuth2Request : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). Defaults to `request_denied`.. + /// Debug contains information to help resolve the problem as a developer. Usually not exposed to the public but only in the server logs.. + /// Description of the error in a human readable format.. + /// Hint to help resolve the error.. + /// Represents the HTTP status code of the error (e.g. 401 or 403) Defaults to 400. + public HydraRejectOAuth2Request(string error = default(string), string errorDebug = default(string), string errorDescription = default(string), string errorHint = default(string), long statusCode = default(long)) + { + this.Error = error; + this.ErrorDebug = errorDebug; + this.ErrorDescription = errorDescription; + this.ErrorHint = errorHint; + this.StatusCode = statusCode; + } + + /// + /// The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). Defaults to `request_denied`. + /// + /// The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). Defaults to `request_denied`. + [DataMember(Name = "error", EmitDefaultValue = false)] + public string Error { get; set; } + + /// + /// Debug contains information to help resolve the problem as a developer. Usually not exposed to the public but only in the server logs. + /// + /// Debug contains information to help resolve the problem as a developer. Usually not exposed to the public but only in the server logs. + [DataMember(Name = "error_debug", EmitDefaultValue = false)] + public string ErrorDebug { get; set; } + + /// + /// Description of the error in a human readable format. + /// + /// Description of the error in a human readable format. + [DataMember(Name = "error_description", EmitDefaultValue = false)] + public string ErrorDescription { get; set; } + + /// + /// Hint to help resolve the error. + /// + /// Hint to help resolve the error. + [DataMember(Name = "error_hint", EmitDefaultValue = false)] + public string ErrorHint { get; set; } + + /// + /// Represents the HTTP status code of the error (e.g. 401 or 403) Defaults to 400 + /// + /// Represents the HTTP status code of the error (e.g. 401 or 403) Defaults to 400 + [DataMember(Name = "status_code", EmitDefaultValue = false)] + public long StatusCode { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraRejectOAuth2Request {\n"); + sb.Append(" Error: ").Append(Error).Append("\n"); + sb.Append(" ErrorDebug: ").Append(ErrorDebug).Append("\n"); + sb.Append(" ErrorDescription: ").Append(ErrorDescription).Append("\n"); + sb.Append(" ErrorHint: ").Append(ErrorHint).Append("\n"); + sb.Append(" StatusCode: ").Append(StatusCode).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraTokenPagination.cs b/Ory.Hydra.Client/Model/HydraTokenPagination.cs new file mode 100644 index 00000000..b4b8a743 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraTokenPagination.cs @@ -0,0 +1,106 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraTokenPagination + /// + [DataContract(Name = "tokenPagination")] + public partial class HydraTokenPagination : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (default to 250). + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (default to "1"). + public HydraTokenPagination(long pageSize = 250, string pageToken = @"1") + { + this.PageSize = pageSize; + // use default value if no "pageToken" provided + this.PageToken = pageToken ?? @"1"; + } + + /// + /// Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + /// + /// Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + [DataMember(Name = "page_size", EmitDefaultValue = false)] + public long PageSize { get; set; } + + /// + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + /// + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + [DataMember(Name = "page_token", EmitDefaultValue = false)] + public string PageToken { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraTokenPagination {\n"); + sb.Append(" PageSize: ").Append(PageSize).Append("\n"); + sb.Append(" PageToken: ").Append(PageToken).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // PageSize (long) maximum + if (this.PageSize > (long)1000) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PageSize, must be a value less than or equal to 1000.", new [] { "PageSize" }); + } + + // PageSize (long) minimum + if (this.PageSize < (long)1) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PageSize, must be a value greater than or equal to 1.", new [] { "PageSize" }); + } + + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraTokenPaginationHeaders.cs b/Ory.Hydra.Client/Model/HydraTokenPaginationHeaders.cs new file mode 100644 index 00000000..f0408638 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraTokenPaginationHeaders.cs @@ -0,0 +1,93 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraTokenPaginationHeaders + /// + [DataContract(Name = "tokenPaginationHeaders")] + public partial class HydraTokenPaginationHeaders : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). in: header. + /// The total number of clients. in: header. + public HydraTokenPaginationHeaders(string link = default(string), string xTotalCount = default(string)) + { + this.Link = link; + this.XTotalCount = xTotalCount; + } + + /// + /// The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). in: header + /// + /// The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). in: header + [DataMember(Name = "link", EmitDefaultValue = false)] + public string Link { get; set; } + + /// + /// The total number of clients. in: header + /// + /// The total number of clients. in: header + [DataMember(Name = "x-total-count", EmitDefaultValue = false)] + public string XTotalCount { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraTokenPaginationHeaders {\n"); + sb.Append(" Link: ").Append(Link).Append("\n"); + sb.Append(" XTotalCount: ").Append(XTotalCount).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraTokenPaginationRequestParameters.cs b/Ory.Hydra.Client/Model/HydraTokenPaginationRequestParameters.cs new file mode 100644 index 00000000..2f7325da --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraTokenPaginationRequestParameters.cs @@ -0,0 +1,106 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: `<https://{project-slug}.projects.oryapis.com/admin/clients?page_size={limit}&page_token={offset}>; rel=\"{page}\"` For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + /// + [DataContract(Name = "tokenPaginationRequestParameters")] + public partial class HydraTokenPaginationRequestParameters : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (default to 250). + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (default to "1"). + public HydraTokenPaginationRequestParameters(long pageSize = 250, string pageToken = @"1") + { + this.PageSize = pageSize; + // use default value if no "pageToken" provided + this.PageToken = pageToken ?? @"1"; + } + + /// + /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + /// + /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + [DataMember(Name = "page_size", EmitDefaultValue = false)] + public long PageSize { get; set; } + + /// + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + /// + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + [DataMember(Name = "page_token", EmitDefaultValue = false)] + public string PageToken { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraTokenPaginationRequestParameters {\n"); + sb.Append(" PageSize: ").Append(PageSize).Append("\n"); + sb.Append(" PageToken: ").Append(PageToken).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + // PageSize (long) maximum + if (this.PageSize > (long)500) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PageSize, must be a value less than or equal to 500.", new [] { "PageSize" }); + } + + // PageSize (long) minimum + if (this.PageSize < (long)1) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PageSize, must be a value greater than or equal to 1.", new [] { "PageSize" }); + } + + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraTokenPaginationResponseHeaders.cs b/Ory.Hydra.Client/Model/HydraTokenPaginationResponseHeaders.cs new file mode 100644 index 00000000..af480980 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraTokenPaginationResponseHeaders.cs @@ -0,0 +1,93 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: `<https://{project-slug}.projects.oryapis.com/admin/clients?page_size={limit}&page_token={offset}>; rel=\"{page}\"` For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). + /// + [DataContract(Name = "tokenPaginationResponseHeaders")] + public partial class HydraTokenPaginationResponseHeaders : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The Link HTTP Header The `Link` header contains a comma-delimited list of links to the following pages: first: The first page of results. next: The next page of results. prev: The previous page of results. last: The last page of results. Pages are omitted if they do not exist. For example, if there is no next page, the `next` link is omitted. Examples: </clients?page_size=5&page_token=0>; rel=\"first\",</clients?page_size=5&page_token=15>; rel=\"next\",</clients?page_size=5&page_token=5>; rel=\"prev\",</clients?page_size=5&page_token=20>; rel=\"last\". + /// The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection.. + public HydraTokenPaginationResponseHeaders(string link = default(string), long xTotalCount = default(long)) + { + this.Link = link; + this.XTotalCount = xTotalCount; + } + + /// + /// The Link HTTP Header The `Link` header contains a comma-delimited list of links to the following pages: first: The first page of results. next: The next page of results. prev: The previous page of results. last: The last page of results. Pages are omitted if they do not exist. For example, if there is no next page, the `next` link is omitted. Examples: </clients?page_size=5&page_token=0>; rel=\"first\",</clients?page_size=5&page_token=15>; rel=\"next\",</clients?page_size=5&page_token=5>; rel=\"prev\",</clients?page_size=5&page_token=20>; rel=\"last\" + /// + /// The Link HTTP Header The `Link` header contains a comma-delimited list of links to the following pages: first: The first page of results. next: The next page of results. prev: The previous page of results. last: The last page of results. Pages are omitted if they do not exist. For example, if there is no next page, the `next` link is omitted. Examples: </clients?page_size=5&page_token=0>; rel=\"first\",</clients?page_size=5&page_token=15>; rel=\"next\",</clients?page_size=5&page_token=5>; rel=\"prev\",</clients?page_size=5&page_token=20>; rel=\"last\" + [DataMember(Name = "link", EmitDefaultValue = false)] + public string Link { get; set; } + + /// + /// The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection. + /// + /// The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection. + [DataMember(Name = "x-total-count", EmitDefaultValue = false)] + public long XTotalCount { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraTokenPaginationResponseHeaders {\n"); + sb.Append(" Link: ").Append(Link).Append("\n"); + sb.Append(" XTotalCount: ").Append(XTotalCount).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraTrustOAuth2JwtGrantIssuer.cs b/Ory.Hydra.Client/Model/HydraTrustOAuth2JwtGrantIssuer.cs new file mode 100644 index 00000000..e4c3d44d --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraTrustOAuth2JwtGrantIssuer.cs @@ -0,0 +1,155 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// Trust OAuth2 JWT Bearer Grant Type Issuer Request Body + /// + [DataContract(Name = "trustOAuth2JwtGrantIssuer")] + public partial class HydraTrustOAuth2JwtGrantIssuer : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected HydraTrustOAuth2JwtGrantIssuer() { } + /// + /// Initializes a new instance of the class. + /// + /// The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT.. + /// The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". (required). + /// The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). (required). + /// jwk (required). + /// The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) (required). + /// The \"subject\" identifies the principal that is the subject of the JWT.. + public HydraTrustOAuth2JwtGrantIssuer(bool allowAnySubject = default(bool), DateTime expiresAt = default(DateTime), string issuer = default(string), HydraJsonWebKey jwk = default(HydraJsonWebKey), List scope = default(List), string subject = default(string)) + { + this.ExpiresAt = expiresAt; + // to ensure "issuer" is required (not null) + if (issuer == null) + { + throw new ArgumentNullException("issuer is a required property for HydraTrustOAuth2JwtGrantIssuer and cannot be null"); + } + this.Issuer = issuer; + // to ensure "jwk" is required (not null) + if (jwk == null) + { + throw new ArgumentNullException("jwk is a required property for HydraTrustOAuth2JwtGrantIssuer and cannot be null"); + } + this.Jwk = jwk; + // to ensure "scope" is required (not null) + if (scope == null) + { + throw new ArgumentNullException("scope is a required property for HydraTrustOAuth2JwtGrantIssuer and cannot be null"); + } + this.Scope = scope; + this.AllowAnySubject = allowAnySubject; + this.Subject = subject; + } + + /// + /// The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. + /// + /// The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. + [DataMember(Name = "allow_any_subject", EmitDefaultValue = true)] + public bool AllowAnySubject { get; set; } + + /// + /// The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". + /// + /// The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". + [DataMember(Name = "expires_at", IsRequired = true, EmitDefaultValue = true)] + public DateTime ExpiresAt { get; set; } + + /// + /// The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). + /// + /// The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). + /// https://jwt-idp.example.com + [DataMember(Name = "issuer", IsRequired = true, EmitDefaultValue = true)] + public string Issuer { get; set; } + + /// + /// Gets or Sets Jwk + /// + [DataMember(Name = "jwk", IsRequired = true, EmitDefaultValue = true)] + public HydraJsonWebKey Jwk { get; set; } + + /// + /// The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) + /// + /// The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) + /// ["openid","offline"] + [DataMember(Name = "scope", IsRequired = true, EmitDefaultValue = true)] + public List Scope { get; set; } + + /// + /// The \"subject\" identifies the principal that is the subject of the JWT. + /// + /// The \"subject\" identifies the principal that is the subject of the JWT. + /// mike@example.com + [DataMember(Name = "subject", EmitDefaultValue = false)] + public string Subject { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraTrustOAuth2JwtGrantIssuer {\n"); + sb.Append(" AllowAnySubject: ").Append(AllowAnySubject).Append("\n"); + sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); + sb.Append(" Issuer: ").Append(Issuer).Append("\n"); + sb.Append(" Jwk: ").Append(Jwk).Append("\n"); + sb.Append(" Scope: ").Append(Scope).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraTrustedOAuth2JwtGrantIssuer.cs b/Ory.Hydra.Client/Model/HydraTrustedOAuth2JwtGrantIssuer.cs new file mode 100644 index 00000000..7f5a6218 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraTrustedOAuth2JwtGrantIssuer.cs @@ -0,0 +1,155 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// OAuth2 JWT Bearer Grant Type Issuer Trust Relationship + /// + [DataContract(Name = "trustedOAuth2JwtGrantIssuer")] + public partial class HydraTrustedOAuth2JwtGrantIssuer : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT.. + /// The \"created_at\" indicates, when grant was created.. + /// The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\".. + /// id. + /// The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT).. + /// publicKey. + /// The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]). + /// The \"subject\" identifies the principal that is the subject of the JWT.. + public HydraTrustedOAuth2JwtGrantIssuer(bool allowAnySubject = default(bool), DateTime createdAt = default(DateTime), DateTime expiresAt = default(DateTime), string id = default(string), string issuer = default(string), HydraTrustedOAuth2JwtGrantJsonWebKey publicKey = default(HydraTrustedOAuth2JwtGrantJsonWebKey), List scope = default(List), string subject = default(string)) + { + this.AllowAnySubject = allowAnySubject; + this.CreatedAt = createdAt; + this.ExpiresAt = expiresAt; + this.Id = id; + this.Issuer = issuer; + this.PublicKey = publicKey; + this.Scope = scope; + this.Subject = subject; + } + + /// + /// The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. + /// + /// The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. + [DataMember(Name = "allow_any_subject", EmitDefaultValue = true)] + public bool AllowAnySubject { get; set; } + + /// + /// The \"created_at\" indicates, when grant was created. + /// + /// The \"created_at\" indicates, when grant was created. + [DataMember(Name = "created_at", EmitDefaultValue = false)] + public DateTime CreatedAt { get; set; } + + /// + /// The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". + /// + /// The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". + [DataMember(Name = "expires_at", EmitDefaultValue = false)] + public DateTime ExpiresAt { get; set; } + + /// + /// Gets or Sets Id + /// + /// 9edc811f-4e28-453c-9b46-4de65f00217f + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// + /// The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). + /// + /// The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). + /// https://jwt-idp.example.com + [DataMember(Name = "issuer", EmitDefaultValue = false)] + public string Issuer { get; set; } + + /// + /// Gets or Sets PublicKey + /// + [DataMember(Name = "public_key", EmitDefaultValue = false)] + public HydraTrustedOAuth2JwtGrantJsonWebKey PublicKey { get; set; } + + /// + /// The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) + /// + /// The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) + /// ["openid","offline"] + [DataMember(Name = "scope", EmitDefaultValue = false)] + public List Scope { get; set; } + + /// + /// The \"subject\" identifies the principal that is the subject of the JWT. + /// + /// The \"subject\" identifies the principal that is the subject of the JWT. + /// mike@example.com + [DataMember(Name = "subject", EmitDefaultValue = false)] + public string Subject { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraTrustedOAuth2JwtGrantIssuer {\n"); + sb.Append(" AllowAnySubject: ").Append(AllowAnySubject).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Issuer: ").Append(Issuer).Append("\n"); + sb.Append(" PublicKey: ").Append(PublicKey).Append("\n"); + sb.Append(" Scope: ").Append(Scope).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraTrustedOAuth2JwtGrantJsonWebKey.cs b/Ory.Hydra.Client/Model/HydraTrustedOAuth2JwtGrantJsonWebKey.cs new file mode 100644 index 00000000..4e4645ff --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraTrustedOAuth2JwtGrantJsonWebKey.cs @@ -0,0 +1,95 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key + /// + [DataContract(Name = "trustedOAuth2JwtGrantJsonWebKey")] + public partial class HydraTrustedOAuth2JwtGrantJsonWebKey : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The \"key_id\" is key unique identifier (same as kid header in jws/jwt).. + /// The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant.. + public HydraTrustedOAuth2JwtGrantJsonWebKey(string kid = default(string), string set = default(string)) + { + this.Kid = kid; + this.Set = set; + } + + /// + /// The \"key_id\" is key unique identifier (same as kid header in jws/jwt). + /// + /// The \"key_id\" is key unique identifier (same as kid header in jws/jwt). + /// 123e4567-e89b-12d3-a456-426655440000 + [DataMember(Name = "kid", EmitDefaultValue = false)] + public string Kid { get; set; } + + /// + /// The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant. + /// + /// The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant. + /// https://jwt-idp.example.com + [DataMember(Name = "set", EmitDefaultValue = false)] + public string Set { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraTrustedOAuth2JwtGrantJsonWebKey {\n"); + sb.Append(" Kid: ").Append(Kid).Append("\n"); + sb.Append(" Set: ").Append(Set).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraVerifiableCredentialPrimingResponse.cs b/Ory.Hydra.Client/Model/HydraVerifiableCredentialPrimingResponse.cs new file mode 100644 index 00000000..f8b58697 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraVerifiableCredentialPrimingResponse.cs @@ -0,0 +1,145 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraVerifiableCredentialPrimingResponse + /// + [DataContract(Name = "verifiableCredentialPrimingResponse")] + public partial class HydraVerifiableCredentialPrimingResponse : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// cNonce. + /// cNonceExpiresIn. + /// error. + /// errorDebug. + /// errorDescription. + /// errorHint. + /// format. + /// statusCode. + public HydraVerifiableCredentialPrimingResponse(string cNonce = default(string), long cNonceExpiresIn = default(long), string error = default(string), string errorDebug = default(string), string errorDescription = default(string), string errorHint = default(string), string format = default(string), long statusCode = default(long)) + { + this.CNonce = cNonce; + this.CNonceExpiresIn = cNonceExpiresIn; + this.Error = error; + this.ErrorDebug = errorDebug; + this.ErrorDescription = errorDescription; + this.ErrorHint = errorHint; + this.Format = format; + this.StatusCode = statusCode; + } + + /// + /// Gets or Sets CNonce + /// + [DataMember(Name = "c_nonce", EmitDefaultValue = false)] + public string CNonce { get; set; } + + /// + /// Gets or Sets CNonceExpiresIn + /// + [DataMember(Name = "c_nonce_expires_in", EmitDefaultValue = false)] + public long CNonceExpiresIn { get; set; } + + /// + /// Gets or Sets Error + /// + [DataMember(Name = "error", EmitDefaultValue = false)] + public string Error { get; set; } + + /// + /// Gets or Sets ErrorDebug + /// + [DataMember(Name = "error_debug", EmitDefaultValue = false)] + public string ErrorDebug { get; set; } + + /// + /// Gets or Sets ErrorDescription + /// + [DataMember(Name = "error_description", EmitDefaultValue = false)] + public string ErrorDescription { get; set; } + + /// + /// Gets or Sets ErrorHint + /// + [DataMember(Name = "error_hint", EmitDefaultValue = false)] + public string ErrorHint { get; set; } + + /// + /// Gets or Sets Format + /// + [DataMember(Name = "format", EmitDefaultValue = false)] + public string Format { get; set; } + + /// + /// Gets or Sets StatusCode + /// + [DataMember(Name = "status_code", EmitDefaultValue = false)] + public long StatusCode { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraVerifiableCredentialPrimingResponse {\n"); + sb.Append(" CNonce: ").Append(CNonce).Append("\n"); + sb.Append(" CNonceExpiresIn: ").Append(CNonceExpiresIn).Append("\n"); + sb.Append(" Error: ").Append(Error).Append("\n"); + sb.Append(" ErrorDebug: ").Append(ErrorDebug).Append("\n"); + sb.Append(" ErrorDescription: ").Append(ErrorDescription).Append("\n"); + sb.Append(" ErrorHint: ").Append(ErrorHint).Append("\n"); + sb.Append(" Format: ").Append(Format).Append("\n"); + sb.Append(" StatusCode: ").Append(StatusCode).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraVerifiableCredentialProof.cs b/Ory.Hydra.Client/Model/HydraVerifiableCredentialProof.cs new file mode 100644 index 00000000..7a90b91f --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraVerifiableCredentialProof.cs @@ -0,0 +1,91 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraVerifiableCredentialProof + /// + [DataContract(Name = "VerifiableCredentialProof")] + public partial class HydraVerifiableCredentialProof : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// jwt. + /// proofType. + public HydraVerifiableCredentialProof(string jwt = default(string), string proofType = default(string)) + { + this.Jwt = jwt; + this.ProofType = proofType; + } + + /// + /// Gets or Sets Jwt + /// + [DataMember(Name = "jwt", EmitDefaultValue = false)] + public string Jwt { get; set; } + + /// + /// Gets or Sets ProofType + /// + [DataMember(Name = "proof_type", EmitDefaultValue = false)] + public string ProofType { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraVerifiableCredentialProof {\n"); + sb.Append(" Jwt: ").Append(Jwt).Append("\n"); + sb.Append(" ProofType: ").Append(ProofType).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraVerifiableCredentialResponse.cs b/Ory.Hydra.Client/Model/HydraVerifiableCredentialResponse.cs new file mode 100644 index 00000000..424930c9 --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraVerifiableCredentialResponse.cs @@ -0,0 +1,91 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraVerifiableCredentialResponse + /// + [DataContract(Name = "verifiableCredentialResponse")] + public partial class HydraVerifiableCredentialResponse : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// credentialDraft00. + /// format. + public HydraVerifiableCredentialResponse(string credentialDraft00 = default(string), string format = default(string)) + { + this.CredentialDraft00 = credentialDraft00; + this.Format = format; + } + + /// + /// Gets or Sets CredentialDraft00 + /// + [DataMember(Name = "credential_draft_00", EmitDefaultValue = false)] + public string CredentialDraft00 { get; set; } + + /// + /// Gets or Sets Format + /// + [DataMember(Name = "format", EmitDefaultValue = false)] + public string Format { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraVerifiableCredentialResponse {\n"); + sb.Append(" CredentialDraft00: ").Append(CredentialDraft00).Append("\n"); + sb.Append(" Format: ").Append(Format).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/Model/HydraVersion.cs b/Ory.Hydra.Client/Model/HydraVersion.cs new file mode 100644 index 00000000..2d51383e --- /dev/null +++ b/Ory.Hydra.Client/Model/HydraVersion.cs @@ -0,0 +1,83 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Hydra.Client.Client.OpenAPIDateConverter; + +namespace Ory.Hydra.Client.Model +{ + /// + /// HydraVersion + /// + [DataContract(Name = "version")] + public partial class HydraVersion : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Version is the service's version.. + public HydraVersion(string varVersion = default(string)) + { + this.VarVersion = varVersion; + } + + /// + /// Version is the service's version. + /// + /// Version is the service's version. + [DataMember(Name = "version", EmitDefaultValue = false)] + public string VarVersion { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class HydraVersion {\n"); + sb.Append(" VarVersion: ").Append(VarVersion).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Hydra.Client/OAuth2Api.cs b/Ory.Hydra.Client/OAuth2Api.cs new file mode 100644 index 00000000..47ead078 --- /dev/null +++ b/Ory.Hydra.Client/OAuth2Api.cs @@ -0,0 +1,5964 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Client.Auth; +using Ory.Hydra.Client.Model; + +namespace Ory.Hydra.Client.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IOAuth2ApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Accept OAuth 2.0 Consent Request + /// + /// + /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// Index associated with the operation. + /// HydraOAuth2RedirectTo + HydraOAuth2RedirectTo AcceptOAuth2ConsentRequest(string consentChallenge, HydraAcceptOAuth2ConsentRequest? hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest?), int operationIndex = 0); + + /// + /// Accept OAuth 2.0 Consent Request + /// + /// + /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2RedirectTo + ApiResponse AcceptOAuth2ConsentRequestWithHttpInfo(string consentChallenge, HydraAcceptOAuth2ConsentRequest? hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest?), int operationIndex = 0); + /// + /// Accept OAuth 2.0 Login Request + /// + /// + /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has successfully authenticated and includes additional information such as the subject's ID and if Ory should remember the subject's subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// Index associated with the operation. + /// HydraOAuth2RedirectTo + HydraOAuth2RedirectTo AcceptOAuth2LoginRequest(string loginChallenge, HydraAcceptOAuth2LoginRequest? hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest?), int operationIndex = 0); + + /// + /// Accept OAuth 2.0 Login Request + /// + /// + /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has successfully authenticated and includes additional information such as the subject's ID and if Ory should remember the subject's subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2RedirectTo + ApiResponse AcceptOAuth2LoginRequestWithHttpInfo(string loginChallenge, HydraAcceptOAuth2LoginRequest? hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest?), int operationIndex = 0); + /// + /// Accept OAuth 2.0 Session Logout Request + /// + /// + /// When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request. The response contains a redirect URL which the consent provider should redirect the user-agent to. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Logout Request Challenge + /// Index associated with the operation. + /// HydraOAuth2RedirectTo + HydraOAuth2RedirectTo AcceptOAuth2LogoutRequest(string logoutChallenge, int operationIndex = 0); + + /// + /// Accept OAuth 2.0 Session Logout Request + /// + /// + /// When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request. The response contains a redirect URL which the consent provider should redirect the user-agent to. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Logout Request Challenge + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2RedirectTo + ApiResponse AcceptOAuth2LogoutRequestWithHttpInfo(string logoutChallenge, int operationIndex = 0); + /// + /// Create OAuth 2.0 Client + /// + /// + /// Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client Request Body + /// Index associated with the operation. + /// HydraOAuth2Client + HydraOAuth2Client CreateOAuth2Client(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0); + + /// + /// Create OAuth 2.0 Client + /// + /// + /// Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client Request Body + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2Client + ApiResponse CreateOAuth2ClientWithHttpInfo(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0); + /// + /// Delete OAuth 2.0 Client + /// + /// + /// Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. Make sure that this endpoint is well protected and only callable by first-party components. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// + void DeleteOAuth2Client(string id, int operationIndex = 0); + + /// + /// Delete OAuth 2.0 Client + /// + /// + /// Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. Make sure that this endpoint is well protected and only callable by first-party components. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteOAuth2ClientWithHttpInfo(string id, int operationIndex = 0); + /// + /// Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client + /// + /// + /// This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// Index associated with the operation. + /// + void DeleteOAuth2Token(string clientId, int operationIndex = 0); + + /// + /// Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client + /// + /// + /// This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteOAuth2TokenWithHttpInfo(string clientId, int operationIndex = 0); + /// + /// Delete Trusted OAuth2 JWT Bearer Grant Type Issuer + /// + /// + /// Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// Index associated with the operation. + /// + void DeleteTrustedOAuth2JwtGrantIssuer(string id, int operationIndex = 0); + + /// + /// Delete Trusted OAuth2 JWT Bearer Grant Type Issuer + /// + /// + /// Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfo(string id, int operationIndex = 0); + /// + /// Get an OAuth 2.0 Client + /// + /// + /// Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// HydraOAuth2Client + HydraOAuth2Client GetOAuth2Client(string id, int operationIndex = 0); + + /// + /// Get an OAuth 2.0 Client + /// + /// + /// Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2Client + ApiResponse GetOAuth2ClientWithHttpInfo(string id, int operationIndex = 0); + /// + /// Get OAuth 2.0 Consent Request + /// + /// + /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// Index associated with the operation. + /// HydraOAuth2ConsentRequest + HydraOAuth2ConsentRequest GetOAuth2ConsentRequest(string consentChallenge, int operationIndex = 0); + + /// + /// Get OAuth 2.0 Consent Request + /// + /// + /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2ConsentRequest + ApiResponse GetOAuth2ConsentRequestWithHttpInfo(string consentChallenge, int operationIndex = 0); + /// + /// Get OAuth 2.0 Login Request + /// + /// + /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. Per default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// Index associated with the operation. + /// HydraOAuth2LoginRequest + HydraOAuth2LoginRequest GetOAuth2LoginRequest(string loginChallenge, int operationIndex = 0); + + /// + /// Get OAuth 2.0 Login Request + /// + /// + /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. Per default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2LoginRequest + ApiResponse GetOAuth2LoginRequestWithHttpInfo(string loginChallenge, int operationIndex = 0); + /// + /// Get OAuth 2.0 Session Logout Request + /// + /// + /// Use this endpoint to fetch an Ory OAuth 2.0 logout request. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// HydraOAuth2LogoutRequest + HydraOAuth2LogoutRequest GetOAuth2LogoutRequest(string logoutChallenge, int operationIndex = 0); + + /// + /// Get OAuth 2.0 Session Logout Request + /// + /// + /// Use this endpoint to fetch an Ory OAuth 2.0 logout request. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2LogoutRequest + ApiResponse GetOAuth2LogoutRequestWithHttpInfo(string logoutChallenge, int operationIndex = 0); + /// + /// Get Trusted OAuth2 JWT Bearer Grant Type Issuer + /// + /// + /// Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// Index associated with the operation. + /// HydraTrustedOAuth2JwtGrantIssuer + HydraTrustedOAuth2JwtGrantIssuer GetTrustedOAuth2JwtGrantIssuer(string id, int operationIndex = 0); + + /// + /// Get Trusted OAuth2 JWT Bearer Grant Type Issuer + /// + /// + /// Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// Index associated with the operation. + /// ApiResponse of HydraTrustedOAuth2JwtGrantIssuer + ApiResponse GetTrustedOAuth2JwtGrantIssuerWithHttpInfo(string id, int operationIndex = 0); + /// + /// Introspect OAuth2 Access and Refresh Tokens + /// + /// + /// The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `session.access_token` during the consent flow. + /// + /// Thrown when fails to make API call + /// The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. + /// An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) + /// Index associated with the operation. + /// HydraIntrospectedOAuth2Token + HydraIntrospectedOAuth2Token IntrospectOAuth2Token(string token, string? scope = default(string?), int operationIndex = 0); + + /// + /// Introspect OAuth2 Access and Refresh Tokens + /// + /// + /// The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `session.access_token` during the consent flow. + /// + /// Thrown when fails to make API call + /// The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. + /// An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) + /// Index associated with the operation. + /// ApiResponse of HydraIntrospectedOAuth2Token + ApiResponse IntrospectOAuth2TokenWithHttpInfo(string token, string? scope = default(string?), int operationIndex = 0); + /// + /// List OAuth 2.0 Clients + /// + /// + /// This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. + /// + /// Thrown when fails to make API call + /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") + /// The name of the clients to filter by. (optional) + /// The owner of the clients to filter by. (optional) + /// Index associated with the operation. + /// List<HydraOAuth2Client> + List ListOAuth2Clients(long? pageSize = default(long?), string? pageToken = default(string?), string? clientName = default(string?), string? owner = default(string?), int operationIndex = 0); + + /// + /// List OAuth 2.0 Clients + /// + /// + /// This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. + /// + /// Thrown when fails to make API call + /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") + /// The name of the clients to filter by. (optional) + /// The owner of the clients to filter by. (optional) + /// Index associated with the operation. + /// ApiResponse of List<HydraOAuth2Client> + ApiResponse> ListOAuth2ClientsWithHttpInfo(long? pageSize = default(long?), string? pageToken = default(string?), string? clientName = default(string?), string? owner = default(string?), int operationIndex = 0); + /// + /// List OAuth 2.0 Consent Sessions of a Subject + /// + /// + /// This endpoint lists all subject's granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK. + /// + /// Thrown when fails to make API call + /// The subject to list the consent sessions for. + /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") + /// The login session id to list the consent sessions for. (optional) + /// Index associated with the operation. + /// List<HydraOAuth2ConsentSession> + List ListOAuth2ConsentSessions(string subject, long? pageSize = default(long?), string? pageToken = default(string?), string? loginSessionId = default(string?), int operationIndex = 0); + + /// + /// List OAuth 2.0 Consent Sessions of a Subject + /// + /// + /// This endpoint lists all subject's granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK. + /// + /// Thrown when fails to make API call + /// The subject to list the consent sessions for. + /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") + /// The login session id to list the consent sessions for. (optional) + /// Index associated with the operation. + /// ApiResponse of List<HydraOAuth2ConsentSession> + ApiResponse> ListOAuth2ConsentSessionsWithHttpInfo(string subject, long? pageSize = default(long?), string? pageToken = default(string?), string? loginSessionId = default(string?), int operationIndex = 0); + /// + /// List Trusted OAuth2 JWT Bearer Grant Type Issuers + /// + /// + /// Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + /// Index associated with the operation. + /// List<HydraTrustedOAuth2JwtGrantIssuer> + List ListTrustedOAuth2JwtGrantIssuers(long? maxItems = default(long?), long? defaultItems = default(long?), string? issuer = default(string?), int operationIndex = 0); + + /// + /// List Trusted OAuth2 JWT Bearer Grant Type Issuers + /// + /// + /// Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + /// Index associated with the operation. + /// ApiResponse of List<HydraTrustedOAuth2JwtGrantIssuer> + ApiResponse> ListTrustedOAuth2JwtGrantIssuersWithHttpInfo(long? maxItems = default(long?), long? defaultItems = default(long?), string? issuer = default(string?), int operationIndex = 0); + /// + /// OAuth 2.0 Authorize Endpoint + /// + /// + /// Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// HydraErrorOAuth2 + HydraErrorOAuth2 OAuth2Authorize(int operationIndex = 0); + + /// + /// OAuth 2.0 Authorize Endpoint + /// + /// + /// Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of HydraErrorOAuth2 + ApiResponse OAuth2AuthorizeWithHttpInfo(int operationIndex = 0); + /// + /// The OAuth 2.0 Token Endpoint + /// + /// + /// Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries here https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// HydraOAuth2TokenExchange + HydraOAuth2TokenExchange Oauth2TokenExchange(string grantType, string? clientId = default(string?), string? code = default(string?), string? redirectUri = default(string?), string? refreshToken = default(string?), int operationIndex = 0); + + /// + /// The OAuth 2.0 Token Endpoint + /// + /// + /// Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries here https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2TokenExchange + ApiResponse Oauth2TokenExchangeWithHttpInfo(string grantType, string? clientId = default(string?), string? code = default(string?), string? redirectUri = default(string?), string? refreshToken = default(string?), int operationIndex = 0); + /// + /// Patch OAuth 2.0 Client + /// + /// + /// Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// OAuth 2.0 Client JSON Patch Body + /// Index associated with the operation. + /// HydraOAuth2Client + HydraOAuth2Client PatchOAuth2Client(string id, List hydraJsonPatch, int operationIndex = 0); + + /// + /// Patch OAuth 2.0 Client + /// + /// + /// Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// OAuth 2.0 Client JSON Patch Body + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2Client + ApiResponse PatchOAuth2ClientWithHttpInfo(string id, List hydraJsonPatch, int operationIndex = 0); + /// + /// Reject OAuth 2.0 Consent Request + /// + /// + /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// Index associated with the operation. + /// HydraOAuth2RedirectTo + HydraOAuth2RedirectTo RejectOAuth2ConsentRequest(string consentChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0); + + /// + /// Reject OAuth 2.0 Consent Request + /// + /// + /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2RedirectTo + ApiResponse RejectOAuth2ConsentRequestWithHttpInfo(string consentChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0); + /// + /// Reject OAuth 2.0 Login Request + /// + /// + /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication was denied. The response contains a redirect URL which the login provider should redirect the user-agent to. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// Index associated with the operation. + /// HydraOAuth2RedirectTo + HydraOAuth2RedirectTo RejectOAuth2LoginRequest(string loginChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0); + + /// + /// Reject OAuth 2.0 Login Request + /// + /// + /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication was denied. The response contains a redirect URL which the login provider should redirect the user-agent to. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2RedirectTo + ApiResponse RejectOAuth2LoginRequestWithHttpInfo(string loginChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0); + /// + /// Reject OAuth 2.0 Session Logout Request + /// + /// + /// When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request. No HTTP request body is required. The response is empty as the logout provider has to chose what action to perform next. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + void RejectOAuth2LogoutRequest(string logoutChallenge, int operationIndex = 0); + + /// + /// Reject OAuth 2.0 Session Logout Request + /// + /// + /// When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request. No HTTP request body is required. The response is empty as the logout provider has to chose what action to perform next. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse RejectOAuth2LogoutRequestWithHttpInfo(string logoutChallenge, int operationIndex = 0); + /// + /// Revoke OAuth 2.0 Consent Sessions of a Subject + /// + /// + /// This endpoint revokes a subject's granted consent sessions and invalidates all associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. + /// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) + /// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + /// Index associated with the operation. + /// + void RevokeOAuth2ConsentSessions(string subject, string? varClient = default(string?), bool? all = default(bool?), int operationIndex = 0); + + /// + /// Revoke OAuth 2.0 Consent Sessions of a Subject + /// + /// + /// This endpoint revokes a subject's granted consent sessions and invalidates all associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. + /// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) + /// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse RevokeOAuth2ConsentSessionsWithHttpInfo(string subject, string? varClient = default(string?), bool? all = default(bool?), int operationIndex = 0); + /// + /// Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID + /// + /// + /// This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens. If you send the subject in a query param, all authentication sessions that belong to that subject are revoked. No OpenID Connect Front- or Back-channel logout is performed in this case. Alternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected to that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + /// Index associated with the operation. + /// + void RevokeOAuth2LoginSessions(string? subject = default(string?), string? sid = default(string?), int operationIndex = 0); + + /// + /// Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID + /// + /// + /// This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens. If you send the subject in a query param, all authentication sessions that belong to that subject are revoked. No OpenID Connect Front- or Back-channel logout is performed in this case. Alternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected to that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse RevokeOAuth2LoginSessionsWithHttpInfo(string? subject = default(string?), string? sid = default(string?), int operationIndex = 0); + /// + /// Revoke OAuth 2.0 Access or Refresh Token + /// + /// + /// Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for. + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// Index associated with the operation. + /// + void RevokeOAuth2Token(string token, string? clientId = default(string?), string? clientSecret = default(string?), int operationIndex = 0); + + /// + /// Revoke OAuth 2.0 Access or Refresh Token + /// + /// + /// Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for. + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse RevokeOAuth2TokenWithHttpInfo(string token, string? clientId = default(string?), string? clientSecret = default(string?), int operationIndex = 0); + /// + /// Set OAuth 2.0 Client + /// + /// + /// Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// Index associated with the operation. + /// HydraOAuth2Client + HydraOAuth2Client SetOAuth2Client(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0); + + /// + /// Set OAuth 2.0 Client + /// + /// + /// Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2Client + ApiResponse SetOAuth2ClientWithHttpInfo(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0); + /// + /// Set OAuth2 Client Token Lifespans + /// + /// + /// Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// (optional) + /// Index associated with the operation. + /// HydraOAuth2Client + HydraOAuth2Client SetOAuth2ClientLifespans(string id, HydraOAuth2ClientTokenLifespans? hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans?), int operationIndex = 0); + + /// + /// Set OAuth2 Client Token Lifespans + /// + /// + /// Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// (optional) + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2Client + ApiResponse SetOAuth2ClientLifespansWithHttpInfo(string id, HydraOAuth2ClientTokenLifespans? hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans?), int operationIndex = 0); + /// + /// Trust OAuth2 JWT Bearer Grant Type Issuer + /// + /// + /// Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523). + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// HydraTrustedOAuth2JwtGrantIssuer + HydraTrustedOAuth2JwtGrantIssuer TrustOAuth2JwtGrantIssuer(HydraTrustOAuth2JwtGrantIssuer? hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer?), int operationIndex = 0); + + /// + /// Trust OAuth2 JWT Bearer Grant Type Issuer + /// + /// + /// Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523). + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// ApiResponse of HydraTrustedOAuth2JwtGrantIssuer + ApiResponse TrustOAuth2JwtGrantIssuerWithHttpInfo(HydraTrustOAuth2JwtGrantIssuer? hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer?), int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IOAuth2ApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Accept OAuth 2.0 Consent Request + /// + /// + /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2RedirectTo + System.Threading.Tasks.Task AcceptOAuth2ConsentRequestAsync(string consentChallenge, HydraAcceptOAuth2ConsentRequest? hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Accept OAuth 2.0 Consent Request + /// + /// + /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2RedirectTo) + System.Threading.Tasks.Task> AcceptOAuth2ConsentRequestWithHttpInfoAsync(string consentChallenge, HydraAcceptOAuth2ConsentRequest? hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Accept OAuth 2.0 Login Request + /// + /// + /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has successfully authenticated and includes additional information such as the subject's ID and if Ory should remember the subject's subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2RedirectTo + System.Threading.Tasks.Task AcceptOAuth2LoginRequestAsync(string loginChallenge, HydraAcceptOAuth2LoginRequest? hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Accept OAuth 2.0 Login Request + /// + /// + /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has successfully authenticated and includes additional information such as the subject's ID and if Ory should remember the subject's subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2RedirectTo) + System.Threading.Tasks.Task> AcceptOAuth2LoginRequestWithHttpInfoAsync(string loginChallenge, HydraAcceptOAuth2LoginRequest? hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Accept OAuth 2.0 Session Logout Request + /// + /// + /// When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request. The response contains a redirect URL which the consent provider should redirect the user-agent to. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Logout Request Challenge + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2RedirectTo + System.Threading.Tasks.Task AcceptOAuth2LogoutRequestAsync(string logoutChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Accept OAuth 2.0 Session Logout Request + /// + /// + /// When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request. The response contains a redirect URL which the consent provider should redirect the user-agent to. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Logout Request Challenge + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2RedirectTo) + System.Threading.Tasks.Task> AcceptOAuth2LogoutRequestWithHttpInfoAsync(string logoutChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Create OAuth 2.0 Client + /// + /// + /// Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client Request Body + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2Client + System.Threading.Tasks.Task CreateOAuth2ClientAsync(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create OAuth 2.0 Client + /// + /// + /// Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client Request Body + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2Client) + System.Threading.Tasks.Task> CreateOAuth2ClientWithHttpInfoAsync(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete OAuth 2.0 Client + /// + /// + /// Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. Make sure that this endpoint is well protected and only callable by first-party components. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteOAuth2ClientAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete OAuth 2.0 Client + /// + /// + /// Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. Make sure that this endpoint is well protected and only callable by first-party components. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteOAuth2ClientWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client + /// + /// + /// This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteOAuth2TokenAsync(string clientId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client + /// + /// + /// This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteOAuth2TokenWithHttpInfoAsync(string clientId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete Trusted OAuth2 JWT Bearer Grant Type Issuer + /// + /// + /// Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteTrustedOAuth2JwtGrantIssuerAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete Trusted OAuth2 JWT Bearer Grant Type Issuer + /// + /// + /// Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get an OAuth 2.0 Client + /// + /// + /// Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2Client + System.Threading.Tasks.Task GetOAuth2ClientAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get an OAuth 2.0 Client + /// + /// + /// Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2Client) + System.Threading.Tasks.Task> GetOAuth2ClientWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get OAuth 2.0 Consent Request + /// + /// + /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2ConsentRequest + System.Threading.Tasks.Task GetOAuth2ConsentRequestAsync(string consentChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get OAuth 2.0 Consent Request + /// + /// + /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2ConsentRequest) + System.Threading.Tasks.Task> GetOAuth2ConsentRequestWithHttpInfoAsync(string consentChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get OAuth 2.0 Login Request + /// + /// + /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. Per default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2LoginRequest + System.Threading.Tasks.Task GetOAuth2LoginRequestAsync(string loginChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get OAuth 2.0 Login Request + /// + /// + /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. Per default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2LoginRequest) + System.Threading.Tasks.Task> GetOAuth2LoginRequestWithHttpInfoAsync(string loginChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get OAuth 2.0 Session Logout Request + /// + /// + /// Use this endpoint to fetch an Ory OAuth 2.0 logout request. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2LogoutRequest + System.Threading.Tasks.Task GetOAuth2LogoutRequestAsync(string logoutChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get OAuth 2.0 Session Logout Request + /// + /// + /// Use this endpoint to fetch an Ory OAuth 2.0 logout request. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2LogoutRequest) + System.Threading.Tasks.Task> GetOAuth2LogoutRequestWithHttpInfoAsync(string logoutChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get Trusted OAuth2 JWT Bearer Grant Type Issuer + /// + /// + /// Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraTrustedOAuth2JwtGrantIssuer + System.Threading.Tasks.Task GetTrustedOAuth2JwtGrantIssuerAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get Trusted OAuth2 JWT Bearer Grant Type Issuer + /// + /// + /// Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraTrustedOAuth2JwtGrantIssuer) + System.Threading.Tasks.Task> GetTrustedOAuth2JwtGrantIssuerWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Introspect OAuth2 Access and Refresh Tokens + /// + /// + /// The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `session.access_token` during the consent flow. + /// + /// Thrown when fails to make API call + /// The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. + /// An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraIntrospectedOAuth2Token + System.Threading.Tasks.Task IntrospectOAuth2TokenAsync(string token, string? scope = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Introspect OAuth2 Access and Refresh Tokens + /// + /// + /// The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `session.access_token` during the consent flow. + /// + /// Thrown when fails to make API call + /// The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. + /// An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraIntrospectedOAuth2Token) + System.Threading.Tasks.Task> IntrospectOAuth2TokenWithHttpInfoAsync(string token, string? scope = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// List OAuth 2.0 Clients + /// + /// + /// This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. + /// + /// Thrown when fails to make API call + /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") + /// The name of the clients to filter by. (optional) + /// The owner of the clients to filter by. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<HydraOAuth2Client> + System.Threading.Tasks.Task> ListOAuth2ClientsAsync(long? pageSize = default(long?), string? pageToken = default(string?), string? clientName = default(string?), string? owner = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// List OAuth 2.0 Clients + /// + /// + /// This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. + /// + /// Thrown when fails to make API call + /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") + /// The name of the clients to filter by. (optional) + /// The owner of the clients to filter by. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<HydraOAuth2Client>) + System.Threading.Tasks.Task>> ListOAuth2ClientsWithHttpInfoAsync(long? pageSize = default(long?), string? pageToken = default(string?), string? clientName = default(string?), string? owner = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// List OAuth 2.0 Consent Sessions of a Subject + /// + /// + /// This endpoint lists all subject's granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK. + /// + /// Thrown when fails to make API call + /// The subject to list the consent sessions for. + /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") + /// The login session id to list the consent sessions for. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<HydraOAuth2ConsentSession> + System.Threading.Tasks.Task> ListOAuth2ConsentSessionsAsync(string subject, long? pageSize = default(long?), string? pageToken = default(string?), string? loginSessionId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// List OAuth 2.0 Consent Sessions of a Subject + /// + /// + /// This endpoint lists all subject's granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK. + /// + /// Thrown when fails to make API call + /// The subject to list the consent sessions for. + /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") + /// The login session id to list the consent sessions for. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<HydraOAuth2ConsentSession>) + System.Threading.Tasks.Task>> ListOAuth2ConsentSessionsWithHttpInfoAsync(string subject, long? pageSize = default(long?), string? pageToken = default(string?), string? loginSessionId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// List Trusted OAuth2 JWT Bearer Grant Type Issuers + /// + /// + /// Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<HydraTrustedOAuth2JwtGrantIssuer> + System.Threading.Tasks.Task> ListTrustedOAuth2JwtGrantIssuersAsync(long? maxItems = default(long?), long? defaultItems = default(long?), string? issuer = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// List Trusted OAuth2 JWT Bearer Grant Type Issuers + /// + /// + /// Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<HydraTrustedOAuth2JwtGrantIssuer>) + System.Threading.Tasks.Task>> ListTrustedOAuth2JwtGrantIssuersWithHttpInfoAsync(long? maxItems = default(long?), long? defaultItems = default(long?), string? issuer = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// OAuth 2.0 Authorize Endpoint + /// + /// + /// Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraErrorOAuth2 + System.Threading.Tasks.Task OAuth2AuthorizeAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// OAuth 2.0 Authorize Endpoint + /// + /// + /// Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraErrorOAuth2) + System.Threading.Tasks.Task> OAuth2AuthorizeWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// The OAuth 2.0 Token Endpoint + /// + /// + /// Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries here https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2TokenExchange + System.Threading.Tasks.Task Oauth2TokenExchangeAsync(string grantType, string? clientId = default(string?), string? code = default(string?), string? redirectUri = default(string?), string? refreshToken = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// The OAuth 2.0 Token Endpoint + /// + /// + /// Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries here https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2TokenExchange) + System.Threading.Tasks.Task> Oauth2TokenExchangeWithHttpInfoAsync(string grantType, string? clientId = default(string?), string? code = default(string?), string? redirectUri = default(string?), string? refreshToken = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Patch OAuth 2.0 Client + /// + /// + /// Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// OAuth 2.0 Client JSON Patch Body + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2Client + System.Threading.Tasks.Task PatchOAuth2ClientAsync(string id, List hydraJsonPatch, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Patch OAuth 2.0 Client + /// + /// + /// Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// OAuth 2.0 Client JSON Patch Body + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2Client) + System.Threading.Tasks.Task> PatchOAuth2ClientWithHttpInfoAsync(string id, List hydraJsonPatch, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Reject OAuth 2.0 Consent Request + /// + /// + /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2RedirectTo + System.Threading.Tasks.Task RejectOAuth2ConsentRequestAsync(string consentChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Reject OAuth 2.0 Consent Request + /// + /// + /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2RedirectTo) + System.Threading.Tasks.Task> RejectOAuth2ConsentRequestWithHttpInfoAsync(string consentChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Reject OAuth 2.0 Login Request + /// + /// + /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication was denied. The response contains a redirect URL which the login provider should redirect the user-agent to. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2RedirectTo + System.Threading.Tasks.Task RejectOAuth2LoginRequestAsync(string loginChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Reject OAuth 2.0 Login Request + /// + /// + /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication was denied. The response contains a redirect URL which the login provider should redirect the user-agent to. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2RedirectTo) + System.Threading.Tasks.Task> RejectOAuth2LoginRequestWithHttpInfoAsync(string loginChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Reject OAuth 2.0 Session Logout Request + /// + /// + /// When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request. No HTTP request body is required. The response is empty as the logout provider has to chose what action to perform next. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task RejectOAuth2LogoutRequestAsync(string logoutChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Reject OAuth 2.0 Session Logout Request + /// + /// + /// When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request. No HTTP request body is required. The response is empty as the logout provider has to chose what action to perform next. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> RejectOAuth2LogoutRequestWithHttpInfoAsync(string logoutChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Revoke OAuth 2.0 Consent Sessions of a Subject + /// + /// + /// This endpoint revokes a subject's granted consent sessions and invalidates all associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. + /// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) + /// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task RevokeOAuth2ConsentSessionsAsync(string subject, string? varClient = default(string?), bool? all = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Revoke OAuth 2.0 Consent Sessions of a Subject + /// + /// + /// This endpoint revokes a subject's granted consent sessions and invalidates all associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. + /// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) + /// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> RevokeOAuth2ConsentSessionsWithHttpInfoAsync(string subject, string? varClient = default(string?), bool? all = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID + /// + /// + /// This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens. If you send the subject in a query param, all authentication sessions that belong to that subject are revoked. No OpenID Connect Front- or Back-channel logout is performed in this case. Alternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected to that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task RevokeOAuth2LoginSessionsAsync(string? subject = default(string?), string? sid = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID + /// + /// + /// This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens. If you send the subject in a query param, all authentication sessions that belong to that subject are revoked. No OpenID Connect Front- or Back-channel logout is performed in this case. Alternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected to that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> RevokeOAuth2LoginSessionsWithHttpInfoAsync(string? subject = default(string?), string? sid = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Revoke OAuth 2.0 Access or Refresh Token + /// + /// + /// Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for. + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task RevokeOAuth2TokenAsync(string token, string? clientId = default(string?), string? clientSecret = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Revoke OAuth 2.0 Access or Refresh Token + /// + /// + /// Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for. + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> RevokeOAuth2TokenWithHttpInfoAsync(string token, string? clientId = default(string?), string? clientSecret = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Set OAuth 2.0 Client + /// + /// + /// Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2Client + System.Threading.Tasks.Task SetOAuth2ClientAsync(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Set OAuth 2.0 Client + /// + /// + /// Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2Client) + System.Threading.Tasks.Task> SetOAuth2ClientWithHttpInfoAsync(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Set OAuth2 Client Token Lifespans + /// + /// + /// Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2Client + System.Threading.Tasks.Task SetOAuth2ClientLifespansAsync(string id, HydraOAuth2ClientTokenLifespans? hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Set OAuth2 Client Token Lifespans + /// + /// + /// Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2Client) + System.Threading.Tasks.Task> SetOAuth2ClientLifespansWithHttpInfoAsync(string id, HydraOAuth2ClientTokenLifespans? hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Trust OAuth2 JWT Bearer Grant Type Issuer + /// + /// + /// Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523). + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraTrustedOAuth2JwtGrantIssuer + System.Threading.Tasks.Task TrustOAuth2JwtGrantIssuerAsync(HydraTrustOAuth2JwtGrantIssuer? hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Trust OAuth2 JWT Bearer Grant Type Issuer + /// + /// + /// Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523). + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraTrustedOAuth2JwtGrantIssuer) + System.Threading.Tasks.Task> TrustOAuth2JwtGrantIssuerWithHttpInfoAsync(HydraTrustOAuth2JwtGrantIssuer? hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IOAuth2Api : IOAuth2ApiSync, IOAuth2ApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class OAuth2Api : IOAuth2Api + { + private Ory.Hydra.Client.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public OAuth2Api() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public OAuth2Api(string basePath) + { + this.Configuration = Ory.Hydra.Client.Client.Configuration.MergeConfigurations( + Ory.Hydra.Client.Client.GlobalConfiguration.Instance, + new Ory.Hydra.Client.Client.Configuration { BasePath = basePath } + ); + this.Client = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public OAuth2Api(Ory.Hydra.Client.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Ory.Hydra.Client.Client.Configuration.MergeConfigurations( + Ory.Hydra.Client.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public OAuth2Api(Ory.Hydra.Client.Client.ISynchronousClient client, Ory.Hydra.Client.Client.IAsynchronousClient asyncClient, Ory.Hydra.Client.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Ory.Hydra.Client.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Ory.Hydra.Client.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Ory.Hydra.Client.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Accept OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// Index associated with the operation. + /// HydraOAuth2RedirectTo + public HydraOAuth2RedirectTo AcceptOAuth2ConsentRequest(string consentChallenge, HydraAcceptOAuth2ConsentRequest? hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest?), int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = AcceptOAuth2ConsentRequestWithHttpInfo(consentChallenge, hydraAcceptOAuth2ConsentRequest); + return localVarResponse.Data; + } + + /// + /// Accept OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2RedirectTo + public Ory.Hydra.Client.Client.ApiResponse AcceptOAuth2ConsentRequestWithHttpInfo(string consentChallenge, HydraAcceptOAuth2ConsentRequest? hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest?), int operationIndex = 0) + { + // verify the required parameter 'consentChallenge' is set + if (consentChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'consentChallenge' when calling OAuth2Api->AcceptOAuth2ConsentRequest"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "consent_challenge", consentChallenge)); + localVarRequestOptions.Data = hydraAcceptOAuth2ConsentRequest; + + localVarRequestOptions.Operation = "OAuth2Api.AcceptOAuth2ConsentRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Put("/admin/oauth2/auth/requests/consent/accept", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AcceptOAuth2ConsentRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Accept OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2RedirectTo + public async System.Threading.Tasks.Task AcceptOAuth2ConsentRequestAsync(string consentChallenge, HydraAcceptOAuth2ConsentRequest? hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await AcceptOAuth2ConsentRequestWithHttpInfoAsync(consentChallenge, hydraAcceptOAuth2ConsentRequest, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Accept OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2RedirectTo) + public async System.Threading.Tasks.Task> AcceptOAuth2ConsentRequestWithHttpInfoAsync(string consentChallenge, HydraAcceptOAuth2ConsentRequest? hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'consentChallenge' is set + if (consentChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'consentChallenge' when calling OAuth2Api->AcceptOAuth2ConsentRequest"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "consent_challenge", consentChallenge)); + localVarRequestOptions.Data = hydraAcceptOAuth2ConsentRequest; + + localVarRequestOptions.Operation = "OAuth2Api.AcceptOAuth2ConsentRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/oauth2/auth/requests/consent/accept", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AcceptOAuth2ConsentRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Accept OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has successfully authenticated and includes additional information such as the subject's ID and if Ory should remember the subject's subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// Index associated with the operation. + /// HydraOAuth2RedirectTo + public HydraOAuth2RedirectTo AcceptOAuth2LoginRequest(string loginChallenge, HydraAcceptOAuth2LoginRequest? hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest?), int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = AcceptOAuth2LoginRequestWithHttpInfo(loginChallenge, hydraAcceptOAuth2LoginRequest); + return localVarResponse.Data; + } + + /// + /// Accept OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has successfully authenticated and includes additional information such as the subject's ID and if Ory should remember the subject's subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2RedirectTo + public Ory.Hydra.Client.Client.ApiResponse AcceptOAuth2LoginRequestWithHttpInfo(string loginChallenge, HydraAcceptOAuth2LoginRequest? hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest?), int operationIndex = 0) + { + // verify the required parameter 'loginChallenge' is set + if (loginChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'loginChallenge' when calling OAuth2Api->AcceptOAuth2LoginRequest"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_challenge", loginChallenge)); + localVarRequestOptions.Data = hydraAcceptOAuth2LoginRequest; + + localVarRequestOptions.Operation = "OAuth2Api.AcceptOAuth2LoginRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Put("/admin/oauth2/auth/requests/login/accept", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AcceptOAuth2LoginRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Accept OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has successfully authenticated and includes additional information such as the subject's ID and if Ory should remember the subject's subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2RedirectTo + public async System.Threading.Tasks.Task AcceptOAuth2LoginRequestAsync(string loginChallenge, HydraAcceptOAuth2LoginRequest? hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await AcceptOAuth2LoginRequestWithHttpInfoAsync(loginChallenge, hydraAcceptOAuth2LoginRequest, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Accept OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has successfully authenticated and includes additional information such as the subject's ID and if Ory should remember the subject's subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2RedirectTo) + public async System.Threading.Tasks.Task> AcceptOAuth2LoginRequestWithHttpInfoAsync(string loginChallenge, HydraAcceptOAuth2LoginRequest? hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'loginChallenge' is set + if (loginChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'loginChallenge' when calling OAuth2Api->AcceptOAuth2LoginRequest"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_challenge", loginChallenge)); + localVarRequestOptions.Data = hydraAcceptOAuth2LoginRequest; + + localVarRequestOptions.Operation = "OAuth2Api.AcceptOAuth2LoginRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/oauth2/auth/requests/login/accept", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AcceptOAuth2LoginRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Accept OAuth 2.0 Session Logout Request When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request. The response contains a redirect URL which the consent provider should redirect the user-agent to. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Logout Request Challenge + /// Index associated with the operation. + /// HydraOAuth2RedirectTo + public HydraOAuth2RedirectTo AcceptOAuth2LogoutRequest(string logoutChallenge, int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = AcceptOAuth2LogoutRequestWithHttpInfo(logoutChallenge); + return localVarResponse.Data; + } + + /// + /// Accept OAuth 2.0 Session Logout Request When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request. The response contains a redirect URL which the consent provider should redirect the user-agent to. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Logout Request Challenge + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2RedirectTo + public Ory.Hydra.Client.Client.ApiResponse AcceptOAuth2LogoutRequestWithHttpInfo(string logoutChallenge, int operationIndex = 0) + { + // verify the required parameter 'logoutChallenge' is set + if (logoutChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'logoutChallenge' when calling OAuth2Api->AcceptOAuth2LogoutRequest"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "logout_challenge", logoutChallenge)); + + localVarRequestOptions.Operation = "OAuth2Api.AcceptOAuth2LogoutRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Put("/admin/oauth2/auth/requests/logout/accept", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AcceptOAuth2LogoutRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Accept OAuth 2.0 Session Logout Request When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request. The response contains a redirect URL which the consent provider should redirect the user-agent to. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Logout Request Challenge + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2RedirectTo + public async System.Threading.Tasks.Task AcceptOAuth2LogoutRequestAsync(string logoutChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await AcceptOAuth2LogoutRequestWithHttpInfoAsync(logoutChallenge, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Accept OAuth 2.0 Session Logout Request When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request. The response contains a redirect URL which the consent provider should redirect the user-agent to. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Logout Request Challenge + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2RedirectTo) + public async System.Threading.Tasks.Task> AcceptOAuth2LogoutRequestWithHttpInfoAsync(string logoutChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'logoutChallenge' is set + if (logoutChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'logoutChallenge' when calling OAuth2Api->AcceptOAuth2LogoutRequest"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "logout_challenge", logoutChallenge)); + + localVarRequestOptions.Operation = "OAuth2Api.AcceptOAuth2LogoutRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/oauth2/auth/requests/logout/accept", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AcceptOAuth2LogoutRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create OAuth 2.0 Client Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client Request Body + /// Index associated with the operation. + /// HydraOAuth2Client + public HydraOAuth2Client CreateOAuth2Client(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = CreateOAuth2ClientWithHttpInfo(hydraOAuth2Client); + return localVarResponse.Data; + } + + /// + /// Create OAuth 2.0 Client Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client Request Body + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2Client + public Ory.Hydra.Client.Client.ApiResponse CreateOAuth2ClientWithHttpInfo(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0) + { + // verify the required parameter 'hydraOAuth2Client' is set + if (hydraOAuth2Client == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'hydraOAuth2Client' when calling OAuth2Api->CreateOAuth2Client"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = hydraOAuth2Client; + + localVarRequestOptions.Operation = "OAuth2Api.CreateOAuth2Client"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Post("/admin/clients", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateOAuth2Client", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create OAuth 2.0 Client Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client Request Body + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2Client + public async System.Threading.Tasks.Task CreateOAuth2ClientAsync(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await CreateOAuth2ClientWithHttpInfoAsync(hydraOAuth2Client, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Create OAuth 2.0 Client Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client Request Body + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2Client) + public async System.Threading.Tasks.Task> CreateOAuth2ClientWithHttpInfoAsync(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'hydraOAuth2Client' is set + if (hydraOAuth2Client == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'hydraOAuth2Client' when calling OAuth2Api->CreateOAuth2Client"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = hydraOAuth2Client; + + localVarRequestOptions.Operation = "OAuth2Api.CreateOAuth2Client"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/admin/clients", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateOAuth2Client", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete OAuth 2.0 Client Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. Make sure that this endpoint is well protected and only callable by first-party components. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// + public void DeleteOAuth2Client(string id, int operationIndex = 0) + { + DeleteOAuth2ClientWithHttpInfo(id); + } + + /// + /// Delete OAuth 2.0 Client Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. Make sure that this endpoint is well protected and only callable by first-party components. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// ApiResponse of Object(void) + public Ory.Hydra.Client.Client.ApiResponse DeleteOAuth2ClientWithHttpInfo(string id, int operationIndex = 0) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->DeleteOAuth2Client"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "OAuth2Api.DeleteOAuth2Client"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Delete("/admin/clients/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteOAuth2Client", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete OAuth 2.0 Client Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. Make sure that this endpoint is well protected and only callable by first-party components. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteOAuth2ClientAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteOAuth2ClientWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete OAuth 2.0 Client Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. Make sure that this endpoint is well protected and only callable by first-party components. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteOAuth2ClientWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->DeleteOAuth2Client"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "OAuth2Api.DeleteOAuth2Client"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/admin/clients/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteOAuth2Client", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// Index associated with the operation. + /// + public void DeleteOAuth2Token(string clientId, int operationIndex = 0) + { + DeleteOAuth2TokenWithHttpInfo(clientId); + } + + /// + /// Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// Index associated with the operation. + /// ApiResponse of Object(void) + public Ory.Hydra.Client.Client.ApiResponse DeleteOAuth2TokenWithHttpInfo(string clientId, int operationIndex = 0) + { + // verify the required parameter 'clientId' is set + if (clientId == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'clientId' when calling OAuth2Api->DeleteOAuth2Token"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "client_id", clientId)); + + localVarRequestOptions.Operation = "OAuth2Api.DeleteOAuth2Token"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Delete("/admin/oauth2/tokens", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteOAuth2Token", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteOAuth2TokenAsync(string clientId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteOAuth2TokenWithHttpInfoAsync(clientId, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteOAuth2TokenWithHttpInfoAsync(string clientId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'clientId' is set + if (clientId == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'clientId' when calling OAuth2Api->DeleteOAuth2Token"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "client_id", clientId)); + + localVarRequestOptions.Operation = "OAuth2Api.DeleteOAuth2Token"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/admin/oauth2/tokens", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteOAuth2Token", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete Trusted OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// Index associated with the operation. + /// + public void DeleteTrustedOAuth2JwtGrantIssuer(string id, int operationIndex = 0) + { + DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfo(id); + } + + /// + /// Delete Trusted OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// Index associated with the operation. + /// ApiResponse of Object(void) + public Ory.Hydra.Client.Client.ApiResponse DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfo(string id, int operationIndex = 0) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->DeleteTrustedOAuth2JwtGrantIssuer"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "OAuth2Api.DeleteTrustedOAuth2JwtGrantIssuer"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Delete("/admin/trust/grants/jwt-bearer/issuers/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteTrustedOAuth2JwtGrantIssuer", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete Trusted OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteTrustedOAuth2JwtGrantIssuerAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete Trusted OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->DeleteTrustedOAuth2JwtGrantIssuer"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "OAuth2Api.DeleteTrustedOAuth2JwtGrantIssuer"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/admin/trust/grants/jwt-bearer/issuers/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteTrustedOAuth2JwtGrantIssuer", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get an OAuth 2.0 Client Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// HydraOAuth2Client + public HydraOAuth2Client GetOAuth2Client(string id, int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetOAuth2ClientWithHttpInfo(id); + return localVarResponse.Data; + } + + /// + /// Get an OAuth 2.0 Client Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2Client + public Ory.Hydra.Client.Client.ApiResponse GetOAuth2ClientWithHttpInfo(string id, int operationIndex = 0) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->GetOAuth2Client"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "OAuth2Api.GetOAuth2Client"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Get("/admin/clients/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOAuth2Client", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get an OAuth 2.0 Client Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2Client + public async System.Threading.Tasks.Task GetOAuth2ClientAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOAuth2ClientWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get an OAuth 2.0 Client Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2Client) + public async System.Threading.Tasks.Task> GetOAuth2ClientWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->GetOAuth2Client"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "OAuth2Api.GetOAuth2Client"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/admin/clients/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOAuth2Client", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// Index associated with the operation. + /// HydraOAuth2ConsentRequest + public HydraOAuth2ConsentRequest GetOAuth2ConsentRequest(string consentChallenge, int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetOAuth2ConsentRequestWithHttpInfo(consentChallenge); + return localVarResponse.Data; + } + + /// + /// Get OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2ConsentRequest + public Ory.Hydra.Client.Client.ApiResponse GetOAuth2ConsentRequestWithHttpInfo(string consentChallenge, int operationIndex = 0) + { + // verify the required parameter 'consentChallenge' is set + if (consentChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'consentChallenge' when calling OAuth2Api->GetOAuth2ConsentRequest"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "consent_challenge", consentChallenge)); + + localVarRequestOptions.Operation = "OAuth2Api.GetOAuth2ConsentRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Get("/admin/oauth2/auth/requests/consent", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOAuth2ConsentRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2ConsentRequest + public async System.Threading.Tasks.Task GetOAuth2ConsentRequestAsync(string consentChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOAuth2ConsentRequestWithHttpInfoAsync(consentChallenge, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2ConsentRequest) + public async System.Threading.Tasks.Task> GetOAuth2ConsentRequestWithHttpInfoAsync(string consentChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'consentChallenge' is set + if (consentChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'consentChallenge' when calling OAuth2Api->GetOAuth2ConsentRequest"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "consent_challenge", consentChallenge)); + + localVarRequestOptions.Operation = "OAuth2Api.GetOAuth2ConsentRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/admin/oauth2/auth/requests/consent", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOAuth2ConsentRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. Per default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// Index associated with the operation. + /// HydraOAuth2LoginRequest + public HydraOAuth2LoginRequest GetOAuth2LoginRequest(string loginChallenge, int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetOAuth2LoginRequestWithHttpInfo(loginChallenge); + return localVarResponse.Data; + } + + /// + /// Get OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. Per default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2LoginRequest + public Ory.Hydra.Client.Client.ApiResponse GetOAuth2LoginRequestWithHttpInfo(string loginChallenge, int operationIndex = 0) + { + // verify the required parameter 'loginChallenge' is set + if (loginChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'loginChallenge' when calling OAuth2Api->GetOAuth2LoginRequest"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_challenge", loginChallenge)); + + localVarRequestOptions.Operation = "OAuth2Api.GetOAuth2LoginRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Get("/admin/oauth2/auth/requests/login", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOAuth2LoginRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. Per default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2LoginRequest + public async System.Threading.Tasks.Task GetOAuth2LoginRequestAsync(string loginChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOAuth2LoginRequestWithHttpInfoAsync(loginChallenge, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. Per default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2LoginRequest) + public async System.Threading.Tasks.Task> GetOAuth2LoginRequestWithHttpInfoAsync(string loginChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'loginChallenge' is set + if (loginChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'loginChallenge' when calling OAuth2Api->GetOAuth2LoginRequest"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_challenge", loginChallenge)); + + localVarRequestOptions.Operation = "OAuth2Api.GetOAuth2LoginRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/admin/oauth2/auth/requests/login", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOAuth2LoginRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get OAuth 2.0 Session Logout Request Use this endpoint to fetch an Ory OAuth 2.0 logout request. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// HydraOAuth2LogoutRequest + public HydraOAuth2LogoutRequest GetOAuth2LogoutRequest(string logoutChallenge, int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetOAuth2LogoutRequestWithHttpInfo(logoutChallenge); + return localVarResponse.Data; + } + + /// + /// Get OAuth 2.0 Session Logout Request Use this endpoint to fetch an Ory OAuth 2.0 logout request. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2LogoutRequest + public Ory.Hydra.Client.Client.ApiResponse GetOAuth2LogoutRequestWithHttpInfo(string logoutChallenge, int operationIndex = 0) + { + // verify the required parameter 'logoutChallenge' is set + if (logoutChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'logoutChallenge' when calling OAuth2Api->GetOAuth2LogoutRequest"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "logout_challenge", logoutChallenge)); + + localVarRequestOptions.Operation = "OAuth2Api.GetOAuth2LogoutRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Get("/admin/oauth2/auth/requests/logout", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOAuth2LogoutRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get OAuth 2.0 Session Logout Request Use this endpoint to fetch an Ory OAuth 2.0 logout request. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2LogoutRequest + public async System.Threading.Tasks.Task GetOAuth2LogoutRequestAsync(string logoutChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOAuth2LogoutRequestWithHttpInfoAsync(logoutChallenge, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get OAuth 2.0 Session Logout Request Use this endpoint to fetch an Ory OAuth 2.0 logout request. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2LogoutRequest) + public async System.Threading.Tasks.Task> GetOAuth2LogoutRequestWithHttpInfoAsync(string logoutChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'logoutChallenge' is set + if (logoutChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'logoutChallenge' when calling OAuth2Api->GetOAuth2LogoutRequest"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "logout_challenge", logoutChallenge)); + + localVarRequestOptions.Operation = "OAuth2Api.GetOAuth2LogoutRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/admin/oauth2/auth/requests/logout", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOAuth2LogoutRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get Trusted OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// Index associated with the operation. + /// HydraTrustedOAuth2JwtGrantIssuer + public HydraTrustedOAuth2JwtGrantIssuer GetTrustedOAuth2JwtGrantIssuer(string id, int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetTrustedOAuth2JwtGrantIssuerWithHttpInfo(id); + return localVarResponse.Data; + } + + /// + /// Get Trusted OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// Index associated with the operation. + /// ApiResponse of HydraTrustedOAuth2JwtGrantIssuer + public Ory.Hydra.Client.Client.ApiResponse GetTrustedOAuth2JwtGrantIssuerWithHttpInfo(string id, int operationIndex = 0) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->GetTrustedOAuth2JwtGrantIssuer"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "OAuth2Api.GetTrustedOAuth2JwtGrantIssuer"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Get("/admin/trust/grants/jwt-bearer/issuers/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTrustedOAuth2JwtGrantIssuer", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get Trusted OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraTrustedOAuth2JwtGrantIssuer + public async System.Threading.Tasks.Task GetTrustedOAuth2JwtGrantIssuerAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetTrustedOAuth2JwtGrantIssuerWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get Trusted OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraTrustedOAuth2JwtGrantIssuer) + public async System.Threading.Tasks.Task> GetTrustedOAuth2JwtGrantIssuerWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->GetTrustedOAuth2JwtGrantIssuer"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "OAuth2Api.GetTrustedOAuth2JwtGrantIssuer"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/admin/trust/grants/jwt-bearer/issuers/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTrustedOAuth2JwtGrantIssuer", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Introspect OAuth2 Access and Refresh Tokens The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `session.access_token` during the consent flow. + /// + /// Thrown when fails to make API call + /// The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. + /// An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) + /// Index associated with the operation. + /// HydraIntrospectedOAuth2Token + public HydraIntrospectedOAuth2Token IntrospectOAuth2Token(string token, string? scope = default(string?), int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = IntrospectOAuth2TokenWithHttpInfo(token, scope); + return localVarResponse.Data; + } + + /// + /// Introspect OAuth2 Access and Refresh Tokens The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `session.access_token` during the consent flow. + /// + /// Thrown when fails to make API call + /// The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. + /// An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) + /// Index associated with the operation. + /// ApiResponse of HydraIntrospectedOAuth2Token + public Ory.Hydra.Client.Client.ApiResponse IntrospectOAuth2TokenWithHttpInfo(string token, string? scope = default(string?), int operationIndex = 0) + { + // verify the required parameter 'token' is set + if (token == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'token' when calling OAuth2Api->IntrospectOAuth2Token"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/x-www-form-urlencoded" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (scope != null) + { + localVarRequestOptions.FormParameters.Add("scope", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(scope)); // form parameter + } + localVarRequestOptions.FormParameters.Add("token", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(token)); // form parameter + + localVarRequestOptions.Operation = "OAuth2Api.IntrospectOAuth2Token"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Post("/admin/oauth2/introspect", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("IntrospectOAuth2Token", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Introspect OAuth2 Access and Refresh Tokens The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `session.access_token` during the consent flow. + /// + /// Thrown when fails to make API call + /// The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. + /// An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraIntrospectedOAuth2Token + public async System.Threading.Tasks.Task IntrospectOAuth2TokenAsync(string token, string? scope = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await IntrospectOAuth2TokenWithHttpInfoAsync(token, scope, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Introspect OAuth2 Access and Refresh Tokens The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `session.access_token` during the consent flow. + /// + /// Thrown when fails to make API call + /// The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. + /// An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraIntrospectedOAuth2Token) + public async System.Threading.Tasks.Task> IntrospectOAuth2TokenWithHttpInfoAsync(string token, string? scope = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'token' is set + if (token == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'token' when calling OAuth2Api->IntrospectOAuth2Token"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/x-www-form-urlencoded" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (scope != null) + { + localVarRequestOptions.FormParameters.Add("scope", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(scope)); // form parameter + } + localVarRequestOptions.FormParameters.Add("token", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(token)); // form parameter + + localVarRequestOptions.Operation = "OAuth2Api.IntrospectOAuth2Token"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/admin/oauth2/introspect", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("IntrospectOAuth2Token", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List OAuth 2.0 Clients This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. + /// + /// Thrown when fails to make API call + /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") + /// The name of the clients to filter by. (optional) + /// The owner of the clients to filter by. (optional) + /// Index associated with the operation. + /// List<HydraOAuth2Client> + public List ListOAuth2Clients(long? pageSize = default(long?), string? pageToken = default(string?), string? clientName = default(string?), string? owner = default(string?), int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse> localVarResponse = ListOAuth2ClientsWithHttpInfo(pageSize, pageToken, clientName, owner); + return localVarResponse.Data; + } + + /// + /// List OAuth 2.0 Clients This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. + /// + /// Thrown when fails to make API call + /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") + /// The name of the clients to filter by. (optional) + /// The owner of the clients to filter by. (optional) + /// Index associated with the operation. + /// ApiResponse of List<HydraOAuth2Client> + public Ory.Hydra.Client.Client.ApiResponse> ListOAuth2ClientsWithHttpInfo(long? pageSize = default(long?), string? pageToken = default(string?), string? clientName = default(string?), string? owner = default(string?), int operationIndex = 0) + { + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (pageSize != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + if (pageToken != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "page_token", pageToken)); + } + if (clientName != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "client_name", clientName)); + } + if (owner != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "owner", owner)); + } + + localVarRequestOptions.Operation = "OAuth2Api.ListOAuth2Clients"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Get>("/admin/clients", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListOAuth2Clients", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List OAuth 2.0 Clients This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. + /// + /// Thrown when fails to make API call + /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") + /// The name of the clients to filter by. (optional) + /// The owner of the clients to filter by. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<HydraOAuth2Client> + public async System.Threading.Tasks.Task> ListOAuth2ClientsAsync(long? pageSize = default(long?), string? pageToken = default(string?), string? clientName = default(string?), string? owner = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse> localVarResponse = await ListOAuth2ClientsWithHttpInfoAsync(pageSize, pageToken, clientName, owner, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// List OAuth 2.0 Clients This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. + /// + /// Thrown when fails to make API call + /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") + /// The name of the clients to filter by. (optional) + /// The owner of the clients to filter by. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<HydraOAuth2Client>) + public async System.Threading.Tasks.Task>> ListOAuth2ClientsWithHttpInfoAsync(long? pageSize = default(long?), string? pageToken = default(string?), string? clientName = default(string?), string? owner = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (pageSize != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + if (pageToken != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "page_token", pageToken)); + } + if (clientName != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "client_name", clientName)); + } + if (owner != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "owner", owner)); + } + + localVarRequestOptions.Operation = "OAuth2Api.ListOAuth2Clients"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/admin/clients", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListOAuth2Clients", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List OAuth 2.0 Consent Sessions of a Subject This endpoint lists all subject's granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK. + /// + /// Thrown when fails to make API call + /// The subject to list the consent sessions for. + /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") + /// The login session id to list the consent sessions for. (optional) + /// Index associated with the operation. + /// List<HydraOAuth2ConsentSession> + public List ListOAuth2ConsentSessions(string subject, long? pageSize = default(long?), string? pageToken = default(string?), string? loginSessionId = default(string?), int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse> localVarResponse = ListOAuth2ConsentSessionsWithHttpInfo(subject, pageSize, pageToken, loginSessionId); + return localVarResponse.Data; + } + + /// + /// List OAuth 2.0 Consent Sessions of a Subject This endpoint lists all subject's granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK. + /// + /// Thrown when fails to make API call + /// The subject to list the consent sessions for. + /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") + /// The login session id to list the consent sessions for. (optional) + /// Index associated with the operation. + /// ApiResponse of List<HydraOAuth2ConsentSession> + public Ory.Hydra.Client.Client.ApiResponse> ListOAuth2ConsentSessionsWithHttpInfo(string subject, long? pageSize = default(long?), string? pageToken = default(string?), string? loginSessionId = default(string?), int operationIndex = 0) + { + // verify the required parameter 'subject' is set + if (subject == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'subject' when calling OAuth2Api->ListOAuth2ConsentSessions"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (pageSize != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + if (pageToken != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "page_token", pageToken)); + } + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "subject", subject)); + if (loginSessionId != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_session_id", loginSessionId)); + } + + localVarRequestOptions.Operation = "OAuth2Api.ListOAuth2ConsentSessions"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Get>("/admin/oauth2/auth/sessions/consent", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListOAuth2ConsentSessions", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List OAuth 2.0 Consent Sessions of a Subject This endpoint lists all subject's granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK. + /// + /// Thrown when fails to make API call + /// The subject to list the consent sessions for. + /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") + /// The login session id to list the consent sessions for. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<HydraOAuth2ConsentSession> + public async System.Threading.Tasks.Task> ListOAuth2ConsentSessionsAsync(string subject, long? pageSize = default(long?), string? pageToken = default(string?), string? loginSessionId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse> localVarResponse = await ListOAuth2ConsentSessionsWithHttpInfoAsync(subject, pageSize, pageToken, loginSessionId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// List OAuth 2.0 Consent Sessions of a Subject This endpoint lists all subject's granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK. + /// + /// Thrown when fails to make API call + /// The subject to list the consent sessions for. + /// Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) + /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") + /// The login session id to list the consent sessions for. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<HydraOAuth2ConsentSession>) + public async System.Threading.Tasks.Task>> ListOAuth2ConsentSessionsWithHttpInfoAsync(string subject, long? pageSize = default(long?), string? pageToken = default(string?), string? loginSessionId = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'subject' is set + if (subject == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'subject' when calling OAuth2Api->ListOAuth2ConsentSessions"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (pageSize != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + if (pageToken != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "page_token", pageToken)); + } + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "subject", subject)); + if (loginSessionId != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_session_id", loginSessionId)); + } + + localVarRequestOptions.Operation = "OAuth2Api.ListOAuth2ConsentSessions"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/admin/oauth2/auth/sessions/consent", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListOAuth2ConsentSessions", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List Trusted OAuth2 JWT Bearer Grant Type Issuers Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + /// Index associated with the operation. + /// List<HydraTrustedOAuth2JwtGrantIssuer> + public List ListTrustedOAuth2JwtGrantIssuers(long? maxItems = default(long?), long? defaultItems = default(long?), string? issuer = default(string?), int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse> localVarResponse = ListTrustedOAuth2JwtGrantIssuersWithHttpInfo(maxItems, defaultItems, issuer); + return localVarResponse.Data; + } + + /// + /// List Trusted OAuth2 JWT Bearer Grant Type Issuers Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + /// Index associated with the operation. + /// ApiResponse of List<HydraTrustedOAuth2JwtGrantIssuer> + public Ory.Hydra.Client.Client.ApiResponse> ListTrustedOAuth2JwtGrantIssuersWithHttpInfo(long? maxItems = default(long?), long? defaultItems = default(long?), string? issuer = default(string?), int operationIndex = 0) + { + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (maxItems != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "MaxItems", maxItems)); + } + if (defaultItems != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "DefaultItems", defaultItems)); + } + if (issuer != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "issuer", issuer)); + } + + localVarRequestOptions.Operation = "OAuth2Api.ListTrustedOAuth2JwtGrantIssuers"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Get>("/admin/trust/grants/jwt-bearer/issuers", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListTrustedOAuth2JwtGrantIssuers", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List Trusted OAuth2 JWT Bearer Grant Type Issuers Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of List<HydraTrustedOAuth2JwtGrantIssuer> + public async System.Threading.Tasks.Task> ListTrustedOAuth2JwtGrantIssuersAsync(long? maxItems = default(long?), long? defaultItems = default(long?), string? issuer = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse> localVarResponse = await ListTrustedOAuth2JwtGrantIssuersWithHttpInfoAsync(maxItems, defaultItems, issuer, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// List Trusted OAuth2 JWT Bearer Grant Type Issuers Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<HydraTrustedOAuth2JwtGrantIssuer>) + public async System.Threading.Tasks.Task>> ListTrustedOAuth2JwtGrantIssuersWithHttpInfoAsync(long? maxItems = default(long?), long? defaultItems = default(long?), string? issuer = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (maxItems != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "MaxItems", maxItems)); + } + if (defaultItems != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "DefaultItems", defaultItems)); + } + if (issuer != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "issuer", issuer)); + } + + localVarRequestOptions.Operation = "OAuth2Api.ListTrustedOAuth2JwtGrantIssuers"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/admin/trust/grants/jwt-bearer/issuers", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListTrustedOAuth2JwtGrantIssuers", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// OAuth 2.0 Authorize Endpoint Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// HydraErrorOAuth2 + public HydraErrorOAuth2 OAuth2Authorize(int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = OAuth2AuthorizeWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// OAuth 2.0 Authorize Endpoint Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of HydraErrorOAuth2 + public Ory.Hydra.Client.Client.ApiResponse OAuth2AuthorizeWithHttpInfo(int operationIndex = 0) + { + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "OAuth2Api.OAuth2Authorize"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Get("/oauth2/auth", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("OAuth2Authorize", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// OAuth 2.0 Authorize Endpoint Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraErrorOAuth2 + public async System.Threading.Tasks.Task OAuth2AuthorizeAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await OAuth2AuthorizeWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// OAuth 2.0 Authorize Endpoint Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraErrorOAuth2) + public async System.Threading.Tasks.Task> OAuth2AuthorizeWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "OAuth2Api.OAuth2Authorize"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/oauth2/auth", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("OAuth2Authorize", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// The OAuth 2.0 Token Endpoint Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries here https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// HydraOAuth2TokenExchange + public HydraOAuth2TokenExchange Oauth2TokenExchange(string grantType, string? clientId = default(string?), string? code = default(string?), string? redirectUri = default(string?), string? refreshToken = default(string?), int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = Oauth2TokenExchangeWithHttpInfo(grantType, clientId, code, redirectUri, refreshToken); + return localVarResponse.Data; + } + + /// + /// The OAuth 2.0 Token Endpoint Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries here https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2TokenExchange + public Ory.Hydra.Client.Client.ApiResponse Oauth2TokenExchangeWithHttpInfo(string grantType, string? clientId = default(string?), string? code = default(string?), string? redirectUri = default(string?), string? refreshToken = default(string?), int operationIndex = 0) + { + // verify the required parameter 'grantType' is set + if (grantType == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'grantType' when calling OAuth2Api->Oauth2TokenExchange"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/x-www-form-urlencoded" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (clientId != null) + { + localVarRequestOptions.FormParameters.Add("client_id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(clientId)); // form parameter + } + if (code != null) + { + localVarRequestOptions.FormParameters.Add("code", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(code)); // form parameter + } + localVarRequestOptions.FormParameters.Add("grant_type", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(grantType)); // form parameter + if (redirectUri != null) + { + localVarRequestOptions.FormParameters.Add("redirect_uri", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(redirectUri)); // form parameter + } + if (refreshToken != null) + { + localVarRequestOptions.FormParameters.Add("refresh_token", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(refreshToken)); // form parameter + } + + localVarRequestOptions.Operation = "OAuth2Api.Oauth2TokenExchange"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (basic) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Ory.Hydra.Client.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/oauth2/token", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("Oauth2TokenExchange", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// The OAuth 2.0 Token Endpoint Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries here https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2TokenExchange + public async System.Threading.Tasks.Task Oauth2TokenExchangeAsync(string grantType, string? clientId = default(string?), string? code = default(string?), string? redirectUri = default(string?), string? refreshToken = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await Oauth2TokenExchangeWithHttpInfoAsync(grantType, clientId, code, redirectUri, refreshToken, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// The OAuth 2.0 Token Endpoint Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries here https://oauth.net/code/ The Ory SDK is not yet able to this endpoint properly. + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2TokenExchange) + public async System.Threading.Tasks.Task> Oauth2TokenExchangeWithHttpInfoAsync(string grantType, string? clientId = default(string?), string? code = default(string?), string? redirectUri = default(string?), string? refreshToken = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'grantType' is set + if (grantType == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'grantType' when calling OAuth2Api->Oauth2TokenExchange"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/x-www-form-urlencoded" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (clientId != null) + { + localVarRequestOptions.FormParameters.Add("client_id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(clientId)); // form parameter + } + if (code != null) + { + localVarRequestOptions.FormParameters.Add("code", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(code)); // form parameter + } + localVarRequestOptions.FormParameters.Add("grant_type", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(grantType)); // form parameter + if (redirectUri != null) + { + localVarRequestOptions.FormParameters.Add("redirect_uri", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(redirectUri)); // form parameter + } + if (refreshToken != null) + { + localVarRequestOptions.FormParameters.Add("refresh_token", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(refreshToken)); // form parameter + } + + localVarRequestOptions.Operation = "OAuth2Api.Oauth2TokenExchange"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (basic) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Ory.Hydra.Client.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/oauth2/token", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("Oauth2TokenExchange", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Patch OAuth 2.0 Client Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// OAuth 2.0 Client JSON Patch Body + /// Index associated with the operation. + /// HydraOAuth2Client + public HydraOAuth2Client PatchOAuth2Client(string id, List hydraJsonPatch, int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = PatchOAuth2ClientWithHttpInfo(id, hydraJsonPatch); + return localVarResponse.Data; + } + + /// + /// Patch OAuth 2.0 Client Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// OAuth 2.0 Client JSON Patch Body + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2Client + public Ory.Hydra.Client.Client.ApiResponse PatchOAuth2ClientWithHttpInfo(string id, List hydraJsonPatch, int operationIndex = 0) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->PatchOAuth2Client"); + } + + // verify the required parameter 'hydraJsonPatch' is set + if (hydraJsonPatch == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'hydraJsonPatch' when calling OAuth2Api->PatchOAuth2Client"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Data = hydraJsonPatch; + + localVarRequestOptions.Operation = "OAuth2Api.PatchOAuth2Client"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Patch("/admin/clients/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("PatchOAuth2Client", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Patch OAuth 2.0 Client Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// OAuth 2.0 Client JSON Patch Body + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2Client + public async System.Threading.Tasks.Task PatchOAuth2ClientAsync(string id, List hydraJsonPatch, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await PatchOAuth2ClientWithHttpInfoAsync(id, hydraJsonPatch, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Patch OAuth 2.0 Client Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// OAuth 2.0 Client JSON Patch Body + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2Client) + public async System.Threading.Tasks.Task> PatchOAuth2ClientWithHttpInfoAsync(string id, List hydraJsonPatch, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->PatchOAuth2Client"); + } + + // verify the required parameter 'hydraJsonPatch' is set + if (hydraJsonPatch == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'hydraJsonPatch' when calling OAuth2Api->PatchOAuth2Client"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Data = hydraJsonPatch; + + localVarRequestOptions.Operation = "OAuth2Api.PatchOAuth2Client"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PatchAsync("/admin/clients/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("PatchOAuth2Client", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Reject OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// Index associated with the operation. + /// HydraOAuth2RedirectTo + public HydraOAuth2RedirectTo RejectOAuth2ConsentRequest(string consentChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = RejectOAuth2ConsentRequestWithHttpInfo(consentChallenge, hydraRejectOAuth2Request); + return localVarResponse.Data; + } + + /// + /// Reject OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2RedirectTo + public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2ConsentRequestWithHttpInfo(string consentChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0) + { + // verify the required parameter 'consentChallenge' is set + if (consentChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'consentChallenge' when calling OAuth2Api->RejectOAuth2ConsentRequest"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "consent_challenge", consentChallenge)); + localVarRequestOptions.Data = hydraRejectOAuth2Request; + + localVarRequestOptions.Operation = "OAuth2Api.RejectOAuth2ConsentRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Put("/admin/oauth2/auth/requests/consent/reject", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RejectOAuth2ConsentRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Reject OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2RedirectTo + public async System.Threading.Tasks.Task RejectOAuth2ConsentRequestAsync(string consentChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await RejectOAuth2ConsentRequestWithHttpInfoAsync(consentChallenge, hydraRejectOAuth2Request, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Reject OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2RedirectTo) + public async System.Threading.Tasks.Task> RejectOAuth2ConsentRequestWithHttpInfoAsync(string consentChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'consentChallenge' is set + if (consentChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'consentChallenge' when calling OAuth2Api->RejectOAuth2ConsentRequest"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "consent_challenge", consentChallenge)); + localVarRequestOptions.Data = hydraRejectOAuth2Request; + + localVarRequestOptions.Operation = "OAuth2Api.RejectOAuth2ConsentRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/oauth2/auth/requests/consent/reject", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RejectOAuth2ConsentRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Reject OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication was denied. The response contains a redirect URL which the login provider should redirect the user-agent to. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// Index associated with the operation. + /// HydraOAuth2RedirectTo + public HydraOAuth2RedirectTo RejectOAuth2LoginRequest(string loginChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = RejectOAuth2LoginRequestWithHttpInfo(loginChallenge, hydraRejectOAuth2Request); + return localVarResponse.Data; + } + + /// + /// Reject OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication was denied. The response contains a redirect URL which the login provider should redirect the user-agent to. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2RedirectTo + public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LoginRequestWithHttpInfo(string loginChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0) + { + // verify the required parameter 'loginChallenge' is set + if (loginChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'loginChallenge' when calling OAuth2Api->RejectOAuth2LoginRequest"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_challenge", loginChallenge)); + localVarRequestOptions.Data = hydraRejectOAuth2Request; + + localVarRequestOptions.Operation = "OAuth2Api.RejectOAuth2LoginRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Put("/admin/oauth2/auth/requests/login/reject", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RejectOAuth2LoginRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Reject OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication was denied. The response contains a redirect URL which the login provider should redirect the user-agent to. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2RedirectTo + public async System.Threading.Tasks.Task RejectOAuth2LoginRequestAsync(string loginChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await RejectOAuth2LoginRequestWithHttpInfoAsync(loginChallenge, hydraRejectOAuth2Request, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Reject OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication was denied. The response contains a redirect URL which the login provider should redirect the user-agent to. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2RedirectTo) + public async System.Threading.Tasks.Task> RejectOAuth2LoginRequestWithHttpInfoAsync(string loginChallenge, HydraRejectOAuth2Request? hydraRejectOAuth2Request = default(HydraRejectOAuth2Request?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'loginChallenge' is set + if (loginChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'loginChallenge' when calling OAuth2Api->RejectOAuth2LoginRequest"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_challenge", loginChallenge)); + localVarRequestOptions.Data = hydraRejectOAuth2Request; + + localVarRequestOptions.Operation = "OAuth2Api.RejectOAuth2LoginRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/oauth2/auth/requests/login/reject", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RejectOAuth2LoginRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Reject OAuth 2.0 Session Logout Request When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request. No HTTP request body is required. The response is empty as the logout provider has to chose what action to perform next. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// + public void RejectOAuth2LogoutRequest(string logoutChallenge, int operationIndex = 0) + { + RejectOAuth2LogoutRequestWithHttpInfo(logoutChallenge); + } + + /// + /// Reject OAuth 2.0 Session Logout Request When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request. No HTTP request body is required. The response is empty as the logout provider has to chose what action to perform next. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// ApiResponse of Object(void) + public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWithHttpInfo(string logoutChallenge, int operationIndex = 0) + { + // verify the required parameter 'logoutChallenge' is set + if (logoutChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'logoutChallenge' when calling OAuth2Api->RejectOAuth2LogoutRequest"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "logout_challenge", logoutChallenge)); + + localVarRequestOptions.Operation = "OAuth2Api.RejectOAuth2LogoutRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Put("/admin/oauth2/auth/requests/logout/reject", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RejectOAuth2LogoutRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Reject OAuth 2.0 Session Logout Request When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request. No HTTP request body is required. The response is empty as the logout provider has to chose what action to perform next. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task RejectOAuth2LogoutRequestAsync(string logoutChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await RejectOAuth2LogoutRequestWithHttpInfoAsync(logoutChallenge, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Reject OAuth 2.0 Session Logout Request When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request. No HTTP request body is required. The response is empty as the logout provider has to chose what action to perform next. + /// + /// Thrown when fails to make API call + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> RejectOAuth2LogoutRequestWithHttpInfoAsync(string logoutChallenge, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'logoutChallenge' is set + if (logoutChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'logoutChallenge' when calling OAuth2Api->RejectOAuth2LogoutRequest"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "logout_challenge", logoutChallenge)); + + localVarRequestOptions.Operation = "OAuth2Api.RejectOAuth2LogoutRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/oauth2/auth/requests/logout/reject", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RejectOAuth2LogoutRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Revoke OAuth 2.0 Consent Sessions of a Subject This endpoint revokes a subject's granted consent sessions and invalidates all associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. + /// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) + /// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + /// Index associated with the operation. + /// + public void RevokeOAuth2ConsentSessions(string subject, string? varClient = default(string?), bool? all = default(bool?), int operationIndex = 0) + { + RevokeOAuth2ConsentSessionsWithHttpInfo(subject, varClient, all); + } + + /// + /// Revoke OAuth 2.0 Consent Sessions of a Subject This endpoint revokes a subject's granted consent sessions and invalidates all associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. + /// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) + /// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + /// Index associated with the operation. + /// ApiResponse of Object(void) + public Ory.Hydra.Client.Client.ApiResponse RevokeOAuth2ConsentSessionsWithHttpInfo(string subject, string? varClient = default(string?), bool? all = default(bool?), int operationIndex = 0) + { + // verify the required parameter 'subject' is set + if (subject == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'subject' when calling OAuth2Api->RevokeOAuth2ConsentSessions"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "subject", subject)); + if (varClient != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "client", varClient)); + } + if (all != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "all", all)); + } + + localVarRequestOptions.Operation = "OAuth2Api.RevokeOAuth2ConsentSessions"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Delete("/admin/oauth2/auth/sessions/consent", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RevokeOAuth2ConsentSessions", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Revoke OAuth 2.0 Consent Sessions of a Subject This endpoint revokes a subject's granted consent sessions and invalidates all associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. + /// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) + /// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task RevokeOAuth2ConsentSessionsAsync(string subject, string? varClient = default(string?), bool? all = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await RevokeOAuth2ConsentSessionsWithHttpInfoAsync(subject, varClient, all, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Revoke OAuth 2.0 Consent Sessions of a Subject This endpoint revokes a subject's granted consent sessions and invalidates all associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. + /// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. (optional) + /// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> RevokeOAuth2ConsentSessionsWithHttpInfoAsync(string subject, string? varClient = default(string?), bool? all = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'subject' is set + if (subject == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'subject' when calling OAuth2Api->RevokeOAuth2ConsentSessions"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "subject", subject)); + if (varClient != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "client", varClient)); + } + if (all != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "all", all)); + } + + localVarRequestOptions.Operation = "OAuth2Api.RevokeOAuth2ConsentSessions"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/admin/oauth2/auth/sessions/consent", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RevokeOAuth2ConsentSessions", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens. If you send the subject in a query param, all authentication sessions that belong to that subject are revoked. No OpenID Connect Front- or Back-channel logout is performed in this case. Alternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected to that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + /// Index associated with the operation. + /// + public void RevokeOAuth2LoginSessions(string? subject = default(string?), string? sid = default(string?), int operationIndex = 0) + { + RevokeOAuth2LoginSessionsWithHttpInfo(subject, sid); + } + + /// + /// Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens. If you send the subject in a query param, all authentication sessions that belong to that subject are revoked. No OpenID Connect Front- or Back-channel logout is performed in this case. Alternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected to that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + /// Index associated with the operation. + /// ApiResponse of Object(void) + public Ory.Hydra.Client.Client.ApiResponse RevokeOAuth2LoginSessionsWithHttpInfo(string? subject = default(string?), string? sid = default(string?), int operationIndex = 0) + { + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (subject != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "subject", subject)); + } + if (sid != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "sid", sid)); + } + + localVarRequestOptions.Operation = "OAuth2Api.RevokeOAuth2LoginSessions"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Delete("/admin/oauth2/auth/sessions/login", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RevokeOAuth2LoginSessions", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens. If you send the subject in a query param, all authentication sessions that belong to that subject are revoked. No OpenID Connect Front- or Back-channel logout is performed in this case. Alternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected to that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task RevokeOAuth2LoginSessionsAsync(string? subject = default(string?), string? sid = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await RevokeOAuth2LoginSessionsWithHttpInfoAsync(subject, sid, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens. If you send the subject in a query param, all authentication sessions that belong to that subject are revoked. No OpenID Connect Front- or Back-channel logout is performed in this case. Alternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected to that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + /// OAuth 2.0 Subject The subject to revoke authentication sessions for. (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> RevokeOAuth2LoginSessionsWithHttpInfoAsync(string? subject = default(string?), string? sid = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (subject != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "subject", subject)); + } + if (sid != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "sid", sid)); + } + + localVarRequestOptions.Operation = "OAuth2Api.RevokeOAuth2LoginSessions"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/admin/oauth2/auth/sessions/login", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RevokeOAuth2LoginSessions", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Revoke OAuth 2.0 Access or Refresh Token Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for. + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// Index associated with the operation. + /// + public void RevokeOAuth2Token(string token, string? clientId = default(string?), string? clientSecret = default(string?), int operationIndex = 0) + { + RevokeOAuth2TokenWithHttpInfo(token, clientId, clientSecret); + } + + /// + /// Revoke OAuth 2.0 Access or Refresh Token Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for. + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// Index associated with the operation. + /// ApiResponse of Object(void) + public Ory.Hydra.Client.Client.ApiResponse RevokeOAuth2TokenWithHttpInfo(string token, string? clientId = default(string?), string? clientSecret = default(string?), int operationIndex = 0) + { + // verify the required parameter 'token' is set + if (token == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'token' when calling OAuth2Api->RevokeOAuth2Token"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/x-www-form-urlencoded" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (clientId != null) + { + localVarRequestOptions.FormParameters.Add("client_id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(clientId)); // form parameter + } + if (clientSecret != null) + { + localVarRequestOptions.FormParameters.Add("client_secret", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(clientSecret)); // form parameter + } + localVarRequestOptions.FormParameters.Add("token", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(token)); // form parameter + + localVarRequestOptions.Operation = "OAuth2Api.RevokeOAuth2Token"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (basic) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Ory.Hydra.Client.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/oauth2/revoke", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RevokeOAuth2Token", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Revoke OAuth 2.0 Access or Refresh Token Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for. + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task RevokeOAuth2TokenAsync(string token, string? clientId = default(string?), string? clientSecret = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await RevokeOAuth2TokenWithHttpInfoAsync(token, clientId, clientSecret, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Revoke OAuth 2.0 Access or Refresh Token Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for. + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> RevokeOAuth2TokenWithHttpInfoAsync(string token, string? clientId = default(string?), string? clientSecret = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'token' is set + if (token == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'token' when calling OAuth2Api->RevokeOAuth2Token"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/x-www-form-urlencoded" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (clientId != null) + { + localVarRequestOptions.FormParameters.Add("client_id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(clientId)); // form parameter + } + if (clientSecret != null) + { + localVarRequestOptions.FormParameters.Add("client_secret", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(clientSecret)); // form parameter + } + localVarRequestOptions.FormParameters.Add("token", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(token)); // form parameter + + localVarRequestOptions.Operation = "OAuth2Api.RevokeOAuth2Token"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (basic) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Ory.Hydra.Client.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/oauth2/revoke", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RevokeOAuth2Token", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Set OAuth 2.0 Client Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// Index associated with the operation. + /// HydraOAuth2Client + public HydraOAuth2Client SetOAuth2Client(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = SetOAuth2ClientWithHttpInfo(id, hydraOAuth2Client); + return localVarResponse.Data; + } + + /// + /// Set OAuth 2.0 Client Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2Client + public Ory.Hydra.Client.Client.ApiResponse SetOAuth2ClientWithHttpInfo(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->SetOAuth2Client"); + } + + // verify the required parameter 'hydraOAuth2Client' is set + if (hydraOAuth2Client == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'hydraOAuth2Client' when calling OAuth2Api->SetOAuth2Client"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Data = hydraOAuth2Client; + + localVarRequestOptions.Operation = "OAuth2Api.SetOAuth2Client"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Put("/admin/clients/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SetOAuth2Client", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Set OAuth 2.0 Client Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2Client + public async System.Threading.Tasks.Task SetOAuth2ClientAsync(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await SetOAuth2ClientWithHttpInfoAsync(id, hydraOAuth2Client, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Set OAuth 2.0 Client Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2Client) + public async System.Threading.Tasks.Task> SetOAuth2ClientWithHttpInfoAsync(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->SetOAuth2Client"); + } + + // verify the required parameter 'hydraOAuth2Client' is set + if (hydraOAuth2Client == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'hydraOAuth2Client' when calling OAuth2Api->SetOAuth2Client"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Data = hydraOAuth2Client; + + localVarRequestOptions.Operation = "OAuth2Api.SetOAuth2Client"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/clients/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SetOAuth2Client", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Set OAuth2 Client Token Lifespans Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// (optional) + /// Index associated with the operation. + /// HydraOAuth2Client + public HydraOAuth2Client SetOAuth2ClientLifespans(string id, HydraOAuth2ClientTokenLifespans? hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans?), int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = SetOAuth2ClientLifespansWithHttpInfo(id, hydraOAuth2ClientTokenLifespans); + return localVarResponse.Data; + } + + /// + /// Set OAuth2 Client Token Lifespans Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// (optional) + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2Client + public Ory.Hydra.Client.Client.ApiResponse SetOAuth2ClientLifespansWithHttpInfo(string id, HydraOAuth2ClientTokenLifespans? hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans?), int operationIndex = 0) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->SetOAuth2ClientLifespans"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Data = hydraOAuth2ClientTokenLifespans; + + localVarRequestOptions.Operation = "OAuth2Api.SetOAuth2ClientLifespans"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Put("/admin/clients/{id}/lifespans", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SetOAuth2ClientLifespans", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Set OAuth2 Client Token Lifespans Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2Client + public async System.Threading.Tasks.Task SetOAuth2ClientLifespansAsync(string id, HydraOAuth2ClientTokenLifespans? hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await SetOAuth2ClientLifespansWithHttpInfoAsync(id, hydraOAuth2ClientTokenLifespans, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Set OAuth2 Client Token Lifespans Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2Client) + public async System.Threading.Tasks.Task> SetOAuth2ClientLifespansWithHttpInfoAsync(string id, HydraOAuth2ClientTokenLifespans? hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->SetOAuth2ClientLifespans"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Data = hydraOAuth2ClientTokenLifespans; + + localVarRequestOptions.Operation = "OAuth2Api.SetOAuth2ClientLifespans"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/clients/{id}/lifespans", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SetOAuth2ClientLifespans", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Trust OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523). + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// HydraTrustedOAuth2JwtGrantIssuer + public HydraTrustedOAuth2JwtGrantIssuer TrustOAuth2JwtGrantIssuer(HydraTrustOAuth2JwtGrantIssuer? hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer?), int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = TrustOAuth2JwtGrantIssuerWithHttpInfo(hydraTrustOAuth2JwtGrantIssuer); + return localVarResponse.Data; + } + + /// + /// Trust OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523). + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// ApiResponse of HydraTrustedOAuth2JwtGrantIssuer + public Ory.Hydra.Client.Client.ApiResponse TrustOAuth2JwtGrantIssuerWithHttpInfo(HydraTrustOAuth2JwtGrantIssuer? hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer?), int operationIndex = 0) + { + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = hydraTrustOAuth2JwtGrantIssuer; + + localVarRequestOptions.Operation = "OAuth2Api.TrustOAuth2JwtGrantIssuer"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Post("/admin/trust/grants/jwt-bearer/issuers", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TrustOAuth2JwtGrantIssuer", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Trust OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523). + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraTrustedOAuth2JwtGrantIssuer + public async System.Threading.Tasks.Task TrustOAuth2JwtGrantIssuerAsync(HydraTrustOAuth2JwtGrantIssuer? hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await TrustOAuth2JwtGrantIssuerWithHttpInfoAsync(hydraTrustOAuth2JwtGrantIssuer, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Trust OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523). + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraTrustedOAuth2JwtGrantIssuer) + public async System.Threading.Tasks.Task> TrustOAuth2JwtGrantIssuerWithHttpInfoAsync(HydraTrustOAuth2JwtGrantIssuer? hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = hydraTrustOAuth2JwtGrantIssuer; + + localVarRequestOptions.Operation = "OAuth2Api.TrustOAuth2JwtGrantIssuer"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/admin/trust/grants/jwt-bearer/issuers", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TrustOAuth2JwtGrantIssuer", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/Ory.Hydra.Client/OidcApi.cs b/Ory.Hydra.Client/OidcApi.cs new file mode 100644 index 00000000..e17b0f2e --- /dev/null +++ b/Ory.Hydra.Client/OidcApi.cs @@ -0,0 +1,1708 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Client.Auth; +using Ory.Hydra.Client.Model; + +namespace Ory.Hydra.Client.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IOidcApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Register OAuth2 Client using OpenID Dynamic Client Registration + /// + /// + /// This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or `client_secret_post`. The `client_secret` will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe. + /// + /// Thrown when fails to make API call + /// Dynamic Client Registration Request Body + /// Index associated with the operation. + /// HydraOAuth2Client + HydraOAuth2Client CreateOidcDynamicClient(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0); + + /// + /// Register OAuth2 Client using OpenID Dynamic Client Registration + /// + /// + /// This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or `client_secret_post`. The `client_secret` will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe. + /// + /// Thrown when fails to make API call + /// Dynamic Client Registration Request Body + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2Client + ApiResponse CreateOidcDynamicClientWithHttpInfo(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0); + /// + /// Issues a Verifiable Credential + /// + /// + /// This endpoint creates a verifiable credential that attests that the user authenticated with the provided access token owns a certain public/private key pair. More information can be found at https://openid.net/specs/openid-connect-userinfo-vc-1_0.html. + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// HydraVerifiableCredentialResponse + HydraVerifiableCredentialResponse CreateVerifiableCredential(HydraCreateVerifiableCredentialRequestBody? hydraCreateVerifiableCredentialRequestBody = default(HydraCreateVerifiableCredentialRequestBody?), int operationIndex = 0); + + /// + /// Issues a Verifiable Credential + /// + /// + /// This endpoint creates a verifiable credential that attests that the user authenticated with the provided access token owns a certain public/private key pair. More information can be found at https://openid.net/specs/openid-connect-userinfo-vc-1_0.html. + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// ApiResponse of HydraVerifiableCredentialResponse + ApiResponse CreateVerifiableCredentialWithHttpInfo(HydraCreateVerifiableCredentialRequestBody? hydraCreateVerifiableCredentialRequestBody = default(HydraCreateVerifiableCredentialRequestBody?), int operationIndex = 0); + /// + /// Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol + /// + /// + /// This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// + void DeleteOidcDynamicClient(string id, int operationIndex = 0); + + /// + /// Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol + /// + /// + /// This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteOidcDynamicClientWithHttpInfo(string id, int operationIndex = 0); + /// + /// OpenID Connect Discovery + /// + /// + /// A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// HydraOidcConfiguration + HydraOidcConfiguration DiscoverOidcConfiguration(int operationIndex = 0); + + /// + /// OpenID Connect Discovery + /// + /// + /// A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of HydraOidcConfiguration + ApiResponse DiscoverOidcConfigurationWithHttpInfo(int operationIndex = 0); + /// + /// Get OAuth2 Client using OpenID Dynamic Client Registration + /// + /// + /// This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// HydraOAuth2Client + HydraOAuth2Client GetOidcDynamicClient(string id, int operationIndex = 0); + + /// + /// Get OAuth2 Client using OpenID Dynamic Client Registration + /// + /// + /// This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2Client + ApiResponse GetOidcDynamicClientWithHttpInfo(string id, int operationIndex = 0); + /// + /// OpenID Connect Userinfo + /// + /// + /// This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token's consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// HydraOidcUserInfo + HydraOidcUserInfo GetOidcUserInfo(int operationIndex = 0); + + /// + /// OpenID Connect Userinfo + /// + /// + /// This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token's consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of HydraOidcUserInfo + ApiResponse GetOidcUserInfoWithHttpInfo(int operationIndex = 0); + /// + /// OpenID Connect Front- and Back-channel Enabled Logout + /// + /// + /// This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// + void RevokeOidcSession(int operationIndex = 0); + + /// + /// OpenID Connect Front- and Back-channel Enabled Logout + /// + /// + /// This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse RevokeOidcSessionWithHttpInfo(int operationIndex = 0); + /// + /// Set OAuth2 Client using OpenID Dynamic Client Registration + /// + /// + /// This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the public internet directly to be used by third parties. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature is disabled per default. It can be enabled by a system administrator. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// Index associated with the operation. + /// HydraOAuth2Client + HydraOAuth2Client SetOidcDynamicClient(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0); + + /// + /// Set OAuth2 Client using OpenID Dynamic Client Registration + /// + /// + /// This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the public internet directly to be used by third parties. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature is disabled per default. It can be enabled by a system administrator. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2Client + ApiResponse SetOidcDynamicClientWithHttpInfo(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IOidcApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Register OAuth2 Client using OpenID Dynamic Client Registration + /// + /// + /// This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or `client_secret_post`. The `client_secret` will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe. + /// + /// Thrown when fails to make API call + /// Dynamic Client Registration Request Body + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2Client + System.Threading.Tasks.Task CreateOidcDynamicClientAsync(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Register OAuth2 Client using OpenID Dynamic Client Registration + /// + /// + /// This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or `client_secret_post`. The `client_secret` will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe. + /// + /// Thrown when fails to make API call + /// Dynamic Client Registration Request Body + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2Client) + System.Threading.Tasks.Task> CreateOidcDynamicClientWithHttpInfoAsync(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Issues a Verifiable Credential + /// + /// + /// This endpoint creates a verifiable credential that attests that the user authenticated with the provided access token owns a certain public/private key pair. More information can be found at https://openid.net/specs/openid-connect-userinfo-vc-1_0.html. + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraVerifiableCredentialResponse + System.Threading.Tasks.Task CreateVerifiableCredentialAsync(HydraCreateVerifiableCredentialRequestBody? hydraCreateVerifiableCredentialRequestBody = default(HydraCreateVerifiableCredentialRequestBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Issues a Verifiable Credential + /// + /// + /// This endpoint creates a verifiable credential that attests that the user authenticated with the provided access token owns a certain public/private key pair. More information can be found at https://openid.net/specs/openid-connect-userinfo-vc-1_0.html. + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraVerifiableCredentialResponse) + System.Threading.Tasks.Task> CreateVerifiableCredentialWithHttpInfoAsync(HydraCreateVerifiableCredentialRequestBody? hydraCreateVerifiableCredentialRequestBody = default(HydraCreateVerifiableCredentialRequestBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol + /// + /// + /// This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteOidcDynamicClientAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol + /// + /// + /// This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteOidcDynamicClientWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// OpenID Connect Discovery + /// + /// + /// A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOidcConfiguration + System.Threading.Tasks.Task DiscoverOidcConfigurationAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// OpenID Connect Discovery + /// + /// + /// A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOidcConfiguration) + System.Threading.Tasks.Task> DiscoverOidcConfigurationWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get OAuth2 Client using OpenID Dynamic Client Registration + /// + /// + /// This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2Client + System.Threading.Tasks.Task GetOidcDynamicClientAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get OAuth2 Client using OpenID Dynamic Client Registration + /// + /// + /// This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2Client) + System.Threading.Tasks.Task> GetOidcDynamicClientWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// OpenID Connect Userinfo + /// + /// + /// This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token's consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOidcUserInfo + System.Threading.Tasks.Task GetOidcUserInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// OpenID Connect Userinfo + /// + /// + /// This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token's consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOidcUserInfo) + System.Threading.Tasks.Task> GetOidcUserInfoWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// OpenID Connect Front- and Back-channel Enabled Logout + /// + /// + /// This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task RevokeOidcSessionAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// OpenID Connect Front- and Back-channel Enabled Logout + /// + /// + /// This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> RevokeOidcSessionWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Set OAuth2 Client using OpenID Dynamic Client Registration + /// + /// + /// This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the public internet directly to be used by third parties. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature is disabled per default. It can be enabled by a system administrator. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2Client + System.Threading.Tasks.Task SetOidcDynamicClientAsync(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Set OAuth2 Client using OpenID Dynamic Client Registration + /// + /// + /// This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the public internet directly to be used by third parties. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature is disabled per default. It can be enabled by a system administrator. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2Client) + System.Threading.Tasks.Task> SetOidcDynamicClientWithHttpInfoAsync(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IOidcApi : IOidcApiSync, IOidcApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class OidcApi : IOidcApi + { + private Ory.Hydra.Client.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public OidcApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public OidcApi(string basePath) + { + this.Configuration = Ory.Hydra.Client.Client.Configuration.MergeConfigurations( + Ory.Hydra.Client.Client.GlobalConfiguration.Instance, + new Ory.Hydra.Client.Client.Configuration { BasePath = basePath } + ); + this.Client = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public OidcApi(Ory.Hydra.Client.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Ory.Hydra.Client.Client.Configuration.MergeConfigurations( + Ory.Hydra.Client.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public OidcApi(Ory.Hydra.Client.Client.ISynchronousClient client, Ory.Hydra.Client.Client.IAsynchronousClient asyncClient, Ory.Hydra.Client.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Ory.Hydra.Client.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Ory.Hydra.Client.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Ory.Hydra.Client.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Register OAuth2 Client using OpenID Dynamic Client Registration This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or `client_secret_post`. The `client_secret` will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe. + /// + /// Thrown when fails to make API call + /// Dynamic Client Registration Request Body + /// Index associated with the operation. + /// HydraOAuth2Client + public HydraOAuth2Client CreateOidcDynamicClient(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = CreateOidcDynamicClientWithHttpInfo(hydraOAuth2Client); + return localVarResponse.Data; + } + + /// + /// Register OAuth2 Client using OpenID Dynamic Client Registration This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or `client_secret_post`. The `client_secret` will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe. + /// + /// Thrown when fails to make API call + /// Dynamic Client Registration Request Body + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2Client + public Ory.Hydra.Client.Client.ApiResponse CreateOidcDynamicClientWithHttpInfo(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0) + { + // verify the required parameter 'hydraOAuth2Client' is set + if (hydraOAuth2Client == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'hydraOAuth2Client' when calling OidcApi->CreateOidcDynamicClient"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = hydraOAuth2Client; + + localVarRequestOptions.Operation = "OidcApi.CreateOidcDynamicClient"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Post("/oauth2/register", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateOidcDynamicClient", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Register OAuth2 Client using OpenID Dynamic Client Registration This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or `client_secret_post`. The `client_secret` will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe. + /// + /// Thrown when fails to make API call + /// Dynamic Client Registration Request Body + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2Client + public async System.Threading.Tasks.Task CreateOidcDynamicClientAsync(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await CreateOidcDynamicClientWithHttpInfoAsync(hydraOAuth2Client, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Register OAuth2 Client using OpenID Dynamic Client Registration This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or `client_secret_post`. The `client_secret` will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe. + /// + /// Thrown when fails to make API call + /// Dynamic Client Registration Request Body + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2Client) + public async System.Threading.Tasks.Task> CreateOidcDynamicClientWithHttpInfoAsync(HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'hydraOAuth2Client' is set + if (hydraOAuth2Client == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'hydraOAuth2Client' when calling OidcApi->CreateOidcDynamicClient"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = hydraOAuth2Client; + + localVarRequestOptions.Operation = "OidcApi.CreateOidcDynamicClient"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/oauth2/register", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateOidcDynamicClient", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Issues a Verifiable Credential This endpoint creates a verifiable credential that attests that the user authenticated with the provided access token owns a certain public/private key pair. More information can be found at https://openid.net/specs/openid-connect-userinfo-vc-1_0.html. + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// HydraVerifiableCredentialResponse + public HydraVerifiableCredentialResponse CreateVerifiableCredential(HydraCreateVerifiableCredentialRequestBody? hydraCreateVerifiableCredentialRequestBody = default(HydraCreateVerifiableCredentialRequestBody?), int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = CreateVerifiableCredentialWithHttpInfo(hydraCreateVerifiableCredentialRequestBody); + return localVarResponse.Data; + } + + /// + /// Issues a Verifiable Credential This endpoint creates a verifiable credential that attests that the user authenticated with the provided access token owns a certain public/private key pair. More information can be found at https://openid.net/specs/openid-connect-userinfo-vc-1_0.html. + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// ApiResponse of HydraVerifiableCredentialResponse + public Ory.Hydra.Client.Client.ApiResponse CreateVerifiableCredentialWithHttpInfo(HydraCreateVerifiableCredentialRequestBody? hydraCreateVerifiableCredentialRequestBody = default(HydraCreateVerifiableCredentialRequestBody?), int operationIndex = 0) + { + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = hydraCreateVerifiableCredentialRequestBody; + + localVarRequestOptions.Operation = "OidcApi.CreateVerifiableCredential"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Post("/credentials", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateVerifiableCredential", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Issues a Verifiable Credential This endpoint creates a verifiable credential that attests that the user authenticated with the provided access token owns a certain public/private key pair. More information can be found at https://openid.net/specs/openid-connect-userinfo-vc-1_0.html. + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraVerifiableCredentialResponse + public async System.Threading.Tasks.Task CreateVerifiableCredentialAsync(HydraCreateVerifiableCredentialRequestBody? hydraCreateVerifiableCredentialRequestBody = default(HydraCreateVerifiableCredentialRequestBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await CreateVerifiableCredentialWithHttpInfoAsync(hydraCreateVerifiableCredentialRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Issues a Verifiable Credential This endpoint creates a verifiable credential that attests that the user authenticated with the provided access token owns a certain public/private key pair. More information can be found at https://openid.net/specs/openid-connect-userinfo-vc-1_0.html. + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraVerifiableCredentialResponse) + public async System.Threading.Tasks.Task> CreateVerifiableCredentialWithHttpInfoAsync(HydraCreateVerifiableCredentialRequestBody? hydraCreateVerifiableCredentialRequestBody = default(HydraCreateVerifiableCredentialRequestBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = hydraCreateVerifiableCredentialRequestBody; + + localVarRequestOptions.Operation = "OidcApi.CreateVerifiableCredential"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/credentials", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateVerifiableCredential", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// + public void DeleteOidcDynamicClient(string id, int operationIndex = 0) + { + DeleteOidcDynamicClientWithHttpInfo(id); + } + + /// + /// Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// ApiResponse of Object(void) + public Ory.Hydra.Client.Client.ApiResponse DeleteOidcDynamicClientWithHttpInfo(string id, int operationIndex = 0) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OidcApi->DeleteOidcDynamicClient"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "OidcApi.DeleteOidcDynamicClient"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (bearer) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/oauth2/register/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteOidcDynamicClient", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteOidcDynamicClientAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteOidcDynamicClientWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteOidcDynamicClientWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OidcApi->DeleteOidcDynamicClient"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "OidcApi.DeleteOidcDynamicClient"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (bearer) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/oauth2/register/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteOidcDynamicClient", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// OpenID Connect Discovery A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// HydraOidcConfiguration + public HydraOidcConfiguration DiscoverOidcConfiguration(int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = DiscoverOidcConfigurationWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// OpenID Connect Discovery A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of HydraOidcConfiguration + public Ory.Hydra.Client.Client.ApiResponse DiscoverOidcConfigurationWithHttpInfo(int operationIndex = 0) + { + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "OidcApi.DiscoverOidcConfiguration"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Get("/.well-known/openid-configuration", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DiscoverOidcConfiguration", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// OpenID Connect Discovery A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOidcConfiguration + public async System.Threading.Tasks.Task DiscoverOidcConfigurationAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await DiscoverOidcConfigurationWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// OpenID Connect Discovery A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOidcConfiguration) + public async System.Threading.Tasks.Task> DiscoverOidcConfigurationWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "OidcApi.DiscoverOidcConfiguration"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/.well-known/openid-configuration", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DiscoverOidcConfiguration", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get OAuth2 Client using OpenID Dynamic Client Registration This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// HydraOAuth2Client + public HydraOAuth2Client GetOidcDynamicClient(string id, int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetOidcDynamicClientWithHttpInfo(id); + return localVarResponse.Data; + } + + /// + /// Get OAuth2 Client using OpenID Dynamic Client Registration This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2Client + public Ory.Hydra.Client.Client.ApiResponse GetOidcDynamicClientWithHttpInfo(string id, int operationIndex = 0) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OidcApi->GetOidcDynamicClient"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "OidcApi.GetOidcDynamicClient"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (bearer) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/oauth2/register/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOidcDynamicClient", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get OAuth2 Client using OpenID Dynamic Client Registration This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2Client + public async System.Threading.Tasks.Task GetOidcDynamicClientAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOidcDynamicClientWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get OAuth2 Client using OpenID Dynamic Client Registration This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2Client) + public async System.Threading.Tasks.Task> GetOidcDynamicClientWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OidcApi->GetOidcDynamicClient"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + + localVarRequestOptions.Operation = "OidcApi.GetOidcDynamicClient"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (bearer) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/oauth2/register/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOidcDynamicClient", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// OpenID Connect Userinfo This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token's consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// HydraOidcUserInfo + public HydraOidcUserInfo GetOidcUserInfo(int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetOidcUserInfoWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// OpenID Connect Userinfo This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token's consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of HydraOidcUserInfo + public Ory.Hydra.Client.Client.ApiResponse GetOidcUserInfoWithHttpInfo(int operationIndex = 0) + { + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "OidcApi.GetOidcUserInfo"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (oauth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/userinfo", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOidcUserInfo", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// OpenID Connect Userinfo This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token's consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOidcUserInfo + public async System.Threading.Tasks.Task GetOidcUserInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOidcUserInfoWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// OpenID Connect Userinfo This endpoint returns the payload of the ID Token, including `session.id_token` values, of the provided OAuth 2.0 Access Token's consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOidcUserInfo) + public async System.Threading.Tasks.Task> GetOidcUserInfoWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "OidcApi.GetOidcUserInfo"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (oauth2) required + // oauth required + if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + if (!string.IsNullOrEmpty(this.Configuration.AccessToken)) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientId) && + !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) && + this.Configuration.OAuthFlow != null) + { + localVarRequestOptions.OAuth = true; + } + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/userinfo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOidcUserInfo", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// OpenID Connect Front- and Back-channel Enabled Logout This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// + public void RevokeOidcSession(int operationIndex = 0) + { + RevokeOidcSessionWithHttpInfo(); + } + + /// + /// OpenID Connect Front- and Back-channel Enabled Logout This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of Object(void) + public Ory.Hydra.Client.Client.ApiResponse RevokeOidcSessionWithHttpInfo(int operationIndex = 0) + { + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "OidcApi.RevokeOidcSession"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Get("/oauth2/sessions/logout", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RevokeOidcSession", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// OpenID Connect Front- and Back-channel Enabled Logout This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task RevokeOidcSessionAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await RevokeOidcSessionWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// OpenID Connect Front- and Back-channel Enabled Logout This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> RevokeOidcSessionWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "OidcApi.RevokeOidcSession"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/oauth2/sessions/logout", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RevokeOidcSession", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Set OAuth2 Client using OpenID Dynamic Client Registration This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the public internet directly to be used by third parties. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature is disabled per default. It can be enabled by a system administrator. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// Index associated with the operation. + /// HydraOAuth2Client + public HydraOAuth2Client SetOidcDynamicClient(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = SetOidcDynamicClientWithHttpInfo(id, hydraOAuth2Client); + return localVarResponse.Data; + } + + /// + /// Set OAuth2 Client using OpenID Dynamic Client Registration This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the public internet directly to be used by third parties. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature is disabled per default. It can be enabled by a system administrator. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// Index associated with the operation. + /// ApiResponse of HydraOAuth2Client + public Ory.Hydra.Client.Client.ApiResponse SetOidcDynamicClientWithHttpInfo(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OidcApi->SetOidcDynamicClient"); + } + + // verify the required parameter 'hydraOAuth2Client' is set + if (hydraOAuth2Client == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'hydraOAuth2Client' when calling OidcApi->SetOidcDynamicClient"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Data = hydraOAuth2Client; + + localVarRequestOptions.Operation = "OidcApi.SetOidcDynamicClient"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (bearer) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/oauth2/register/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SetOidcDynamicClient", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Set OAuth2 Client using OpenID Dynamic Client Registration This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the public internet directly to be used by third parties. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature is disabled per default. It can be enabled by a system administrator. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2Client + public async System.Threading.Tasks.Task SetOidcDynamicClientAsync(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await SetOidcDynamicClientWithHttpInfoAsync(id, hydraOAuth2Client, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Set OAuth2 Client using OpenID Dynamic Client Registration This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the public internet directly to be used by third parties. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature is disabled per default. It can be enabled by a system administrator. If you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOAuth2Client) + public async System.Threading.Tasks.Task> SetOidcDynamicClientWithHttpInfoAsync(string id, HydraOAuth2Client hydraOAuth2Client, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OidcApi->SetOidcDynamicClient"); + } + + // verify the required parameter 'hydraOAuth2Client' is set + if (hydraOAuth2Client == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'hydraOAuth2Client' when calling OidcApi->SetOidcDynamicClient"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Data = hydraOAuth2Client; + + localVarRequestOptions.Operation = "OidcApi.SetOidcDynamicClient"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (bearer) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/oauth2/register/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SetOidcDynamicClient", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/Ory.Hydra.Client/Ory.Hydra.Client.csproj b/Ory.Hydra.Client/Ory.Hydra.Client.csproj new file mode 100644 index 00000000..c499e349 --- /dev/null +++ b/Ory.Hydra.Client/Ory.Hydra.Client.csproj @@ -0,0 +1,36 @@ + + + + false + net8.0 + Ory.Hydra.Client + Ory.Hydra.Client + Library + OpenAPI + OpenAPI + OpenAPI Library + A library generated from a OpenAPI doc + No Copyright + Ory.Hydra.Client + 2.2.0 + bin\$(Configuration)\$(TargetFramework)\Ory.Hydra.Client.xml + https://github.com/GIT_USER_ID/GIT_REPO_ID.git + git + Minor update + annotations + + + + + + + + + + + + + + + + diff --git a/Ory.Hydra.Client/WellknownApi.cs b/Ory.Hydra.Client/WellknownApi.cs new file mode 100644 index 00000000..cf0cf30a --- /dev/null +++ b/Ory.Hydra.Client/WellknownApi.cs @@ -0,0 +1,330 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Client.Auth; +using Ory.Hydra.Client.Model; + +namespace Ory.Hydra.Client.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IWellknownApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Discover Well-Known JSON Web Keys + /// + /// + /// This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// HydraJsonWebKeySet + HydraJsonWebKeySet DiscoverJsonWebKeys(int operationIndex = 0); + + /// + /// Discover Well-Known JSON Web Keys + /// + /// + /// This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of HydraJsonWebKeySet + ApiResponse DiscoverJsonWebKeysWithHttpInfo(int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IWellknownApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Discover Well-Known JSON Web Keys + /// + /// + /// This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraJsonWebKeySet + System.Threading.Tasks.Task DiscoverJsonWebKeysAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Discover Well-Known JSON Web Keys + /// + /// + /// This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraJsonWebKeySet) + System.Threading.Tasks.Task> DiscoverJsonWebKeysWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IWellknownApi : IWellknownApiSync, IWellknownApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class WellknownApi : IWellknownApi + { + private Ory.Hydra.Client.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public WellknownApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public WellknownApi(string basePath) + { + this.Configuration = Ory.Hydra.Client.Client.Configuration.MergeConfigurations( + Ory.Hydra.Client.Client.GlobalConfiguration.Instance, + new Ory.Hydra.Client.Client.Configuration { BasePath = basePath } + ); + this.Client = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public WellknownApi(Ory.Hydra.Client.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Ory.Hydra.Client.Client.Configuration.MergeConfigurations( + Ory.Hydra.Client.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public WellknownApi(Ory.Hydra.Client.Client.ISynchronousClient client, Ory.Hydra.Client.Client.IAsynchronousClient asyncClient, Ory.Hydra.Client.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Ory.Hydra.Client.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Ory.Hydra.Client.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Ory.Hydra.Client.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Discover Well-Known JSON Web Keys This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// HydraJsonWebKeySet + public HydraJsonWebKeySet DiscoverJsonWebKeys(int operationIndex = 0) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = DiscoverJsonWebKeysWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Discover Well-Known JSON Web Keys This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// ApiResponse of HydraJsonWebKeySet + public Ory.Hydra.Client.Client.ApiResponse DiscoverJsonWebKeysWithHttpInfo(int operationIndex = 0) + { + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "WellknownApi.DiscoverJsonWebKeys"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Get("/.well-known/jwks.json", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DiscoverJsonWebKeys", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Discover Well-Known JSON Web Keys This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of HydraJsonWebKeySet + public async System.Threading.Tasks.Task DiscoverJsonWebKeysAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await DiscoverJsonWebKeysWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Discover Well-Known JSON Web Keys This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. + /// + /// Thrown when fails to make API call + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraJsonWebKeySet) + public async System.Threading.Tasks.Task> DiscoverJsonWebKeysWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + localVarRequestOptions.Operation = "WellknownApi.DiscoverJsonWebKeys"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/.well-known/jwks.json", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DiscoverJsonWebKeys", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/Ory.Kratos.Client/Api/CourierApi.cs b/Ory.Kratos.Client/Api/CourierApi.cs index 87ae6f02..e9145b4a 100644 --- a/Ory.Kratos.Client/Api/CourierApi.cs +++ b/Ory.Kratos.Client/Api/CourierApi.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -35,8 +34,9 @@ public interface ICourierApiSync : IApiAccessor /// /// Thrown when fails to make API call /// MessageID is the ID of the message. + /// Index associated with the operation. /// KratosMessage - KratosMessage GetCourierMessage(string id); + KratosMessage GetCourierMessage(string id, int operationIndex = 0); /// /// Get a Message @@ -46,8 +46,9 @@ public interface ICourierApiSync : IApiAccessor /// /// Thrown when fails to make API call /// MessageID is the ID of the message. + /// Index associated with the operation. /// ApiResponse of KratosMessage - ApiResponse GetCourierMessageWithHttpInfo(string id); + ApiResponse GetCourierMessageWithHttpInfo(string id, int operationIndex = 0); /// /// List Messages /// @@ -59,8 +60,9 @@ public interface ICourierApiSync : IApiAccessor /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) /// Status filters out messages based on status. If no value is provided, it doesn't take effect on filter. (optional) /// Recipient filters out messages based on recipient. If no value is provided, it doesn't take effect on filter. (optional) + /// Index associated with the operation. /// List<KratosMessage> - List ListCourierMessages(long? pageSize = default(long?), string pageToken = default(string), KratosCourierMessageStatus? status = default(KratosCourierMessageStatus?), string recipient = default(string)); + List ListCourierMessages(long? pageSize = default(long?), string? pageToken = default(string?), KratosCourierMessageStatus? status = default(KratosCourierMessageStatus?), string? recipient = default(string?), int operationIndex = 0); /// /// List Messages @@ -73,8 +75,9 @@ public interface ICourierApiSync : IApiAccessor /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) /// Status filters out messages based on status. If no value is provided, it doesn't take effect on filter. (optional) /// Recipient filters out messages based on recipient. If no value is provided, it doesn't take effect on filter. (optional) + /// Index associated with the operation. /// ApiResponse of List<KratosMessage> - ApiResponse> ListCourierMessagesWithHttpInfo(long? pageSize = default(long?), string pageToken = default(string), KratosCourierMessageStatus? status = default(KratosCourierMessageStatus?), string recipient = default(string)); + ApiResponse> ListCourierMessagesWithHttpInfo(long? pageSize = default(long?), string? pageToken = default(string?), KratosCourierMessageStatus? status = default(KratosCourierMessageStatus?), string? recipient = default(string?), int operationIndex = 0); #endregion Synchronous Operations } @@ -92,9 +95,10 @@ public interface ICourierApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// MessageID is the ID of the message. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosMessage - System.Threading.Tasks.Task GetCourierMessageAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetCourierMessageAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get a Message @@ -104,9 +108,10 @@ public interface ICourierApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// MessageID is the ID of the message. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosMessage) - System.Threading.Tasks.Task> GetCourierMessageWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetCourierMessageWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Messages /// @@ -118,9 +123,10 @@ public interface ICourierApiAsync : IApiAccessor /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) /// Status filters out messages based on status. If no value is provided, it doesn't take effect on filter. (optional) /// Recipient filters out messages based on recipient. If no value is provided, it doesn't take effect on filter. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<KratosMessage> - System.Threading.Tasks.Task> ListCourierMessagesAsync(long? pageSize = default(long?), string pageToken = default(string), KratosCourierMessageStatus? status = default(KratosCourierMessageStatus?), string recipient = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ListCourierMessagesAsync(long? pageSize = default(long?), string? pageToken = default(string?), KratosCourierMessageStatus? status = default(KratosCourierMessageStatus?), string? recipient = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Messages @@ -133,9 +139,10 @@ public interface ICourierApiAsync : IApiAccessor /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) /// Status filters out messages based on status. If no value is provided, it doesn't take effect on filter. (optional) /// Recipient filters out messages based on recipient. If no value is provided, it doesn't take effect on filter. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<KratosMessage>) - System.Threading.Tasks.Task>> ListCourierMessagesWithHttpInfoAsync(long? pageSize = default(long?), string pageToken = default(string), KratosCourierMessageStatus? status = default(KratosCourierMessageStatus?), string recipient = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> ListCourierMessagesWithHttpInfoAsync(long? pageSize = default(long?), string? pageToken = default(string?), KratosCourierMessageStatus? status = default(KratosCourierMessageStatus?), string? recipient = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -261,8 +268,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// MessageID is the ID of the message. + /// Index associated with the operation. /// KratosMessage - public KratosMessage GetCourierMessage(string id) + public KratosMessage GetCourierMessage(string id, int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = GetCourierMessageWithHttpInfo(id); return localVarResponse.Data; @@ -273,8 +281,9 @@ public KratosMessage GetCourierMessage(string id) /// /// Thrown when fails to make API call /// MessageID is the ID of the message. + /// Index associated with the operation. /// ApiResponse of KratosMessage - public Ory.Kratos.Client.Client.ApiResponse GetCourierMessageWithHttpInfo(string id) + public Ory.Kratos.Client.Client.ApiResponse GetCourierMessageWithHttpInfo(string id, int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -306,6 +315,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetCourierMessageWith localVarRequestOptions.PathParameters.Add("id", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Operation = "CourierApi.GetCourierMessage"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -331,11 +343,12 @@ public Ory.Kratos.Client.Client.ApiResponse GetCourierMessageWith /// /// Thrown when fails to make API call /// MessageID is the ID of the message. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosMessage - public async System.Threading.Tasks.Task GetCourierMessageAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetCourierMessageAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await GetCourierMessageWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await GetCourierMessageWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -344,9 +357,10 @@ public Ory.Kratos.Client.Client.ApiResponse GetCourierMessageWith /// /// Thrown when fails to make API call /// MessageID is the ID of the message. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosMessage) - public async System.Threading.Tasks.Task> GetCourierMessageWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetCourierMessageWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -379,6 +393,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetCourierMessageWith localVarRequestOptions.PathParameters.Add("id", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Operation = "CourierApi.GetCourierMessage"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -408,8 +425,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetCourierMessageWith /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) /// Status filters out messages based on status. If no value is provided, it doesn't take effect on filter. (optional) /// Recipient filters out messages based on recipient. If no value is provided, it doesn't take effect on filter. (optional) + /// Index associated with the operation. /// List<KratosMessage> - public List ListCourierMessages(long? pageSize = default(long?), string pageToken = default(string), KratosCourierMessageStatus? status = default(KratosCourierMessageStatus?), string recipient = default(string)) + public List ListCourierMessages(long? pageSize = default(long?), string? pageToken = default(string?), KratosCourierMessageStatus? status = default(KratosCourierMessageStatus?), string? recipient = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse> localVarResponse = ListCourierMessagesWithHttpInfo(pageSize, pageToken, status, recipient); return localVarResponse.Data; @@ -423,8 +441,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetCourierMessageWith /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) /// Status filters out messages based on status. If no value is provided, it doesn't take effect on filter. (optional) /// Recipient filters out messages based on recipient. If no value is provided, it doesn't take effect on filter. (optional) + /// Index associated with the operation. /// ApiResponse of List<KratosMessage> - public Ory.Kratos.Client.Client.ApiResponse> ListCourierMessagesWithHttpInfo(long? pageSize = default(long?), string pageToken = default(string), KratosCourierMessageStatus? status = default(KratosCourierMessageStatus?), string recipient = default(string)) + public Ory.Kratos.Client.Client.ApiResponse> ListCourierMessagesWithHttpInfo(long? pageSize = default(long?), string? pageToken = default(string?), KratosCourierMessageStatus? status = default(KratosCourierMessageStatus?), string? recipient = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -465,6 +484,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetCourierMessageWith localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("", "recipient", recipient)); } + localVarRequestOptions.Operation = "CourierApi.ListCourierMessages"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -493,11 +515,12 @@ public Ory.Kratos.Client.Client.ApiResponse GetCourierMessageWith /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) /// Status filters out messages based on status. If no value is provided, it doesn't take effect on filter. (optional) /// Recipient filters out messages based on recipient. If no value is provided, it doesn't take effect on filter. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<KratosMessage> - public async System.Threading.Tasks.Task> ListCourierMessagesAsync(long? pageSize = default(long?), string pageToken = default(string), KratosCourierMessageStatus? status = default(KratosCourierMessageStatus?), string recipient = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ListCourierMessagesAsync(long? pageSize = default(long?), string? pageToken = default(string?), KratosCourierMessageStatus? status = default(KratosCourierMessageStatus?), string? recipient = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse> localVarResponse = await ListCourierMessagesWithHttpInfoAsync(pageSize, pageToken, status, recipient, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse> localVarResponse = await ListCourierMessagesWithHttpInfoAsync(pageSize, pageToken, status, recipient, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -509,9 +532,10 @@ public Ory.Kratos.Client.Client.ApiResponse GetCourierMessageWith /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) /// Status filters out messages based on status. If no value is provided, it doesn't take effect on filter. (optional) /// Recipient filters out messages based on recipient. If no value is provided, it doesn't take effect on filter. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<KratosMessage>) - public async System.Threading.Tasks.Task>> ListCourierMessagesWithHttpInfoAsync(long? pageSize = default(long?), string pageToken = default(string), KratosCourierMessageStatus? status = default(KratosCourierMessageStatus?), string recipient = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> ListCourierMessagesWithHttpInfoAsync(long? pageSize = default(long?), string? pageToken = default(string?), KratosCourierMessageStatus? status = default(KratosCourierMessageStatus?), string? recipient = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -553,6 +577,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetCourierMessageWith localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("", "recipient", recipient)); } + localVarRequestOptions.Operation = "CourierApi.ListCourierMessages"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { diff --git a/Ory.Kratos.Client/Api/FrontendApi.cs b/Ory.Kratos.Client/Api/FrontendApi.cs index ea7e3056..e933aef7 100644 --- a/Ory.Kratos.Client/Api/FrontendApi.cs +++ b/Ory.Kratos.Client/Api/FrontendApi.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -40,8 +39,9 @@ public interface IFrontendApiSync : IApiAccessor /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) /// An optional Hydra login challenge. If present, Kratos will cooperate with Ory Hydra to act as an OAuth2 identity provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/login?login_challenge=abcde`). (optional) /// An optional organization ID that should be used for logging this user in. This parameter is only effective in the Ory Network. (optional) + /// Index associated with the operation. /// KratosLoginFlow - KratosLoginFlow CreateBrowserLoginFlow(bool? refresh = default(bool?), string aal = default(string), string returnTo = default(string), string cookie = default(string), string loginChallenge = default(string), string organization = default(string)); + KratosLoginFlow CreateBrowserLoginFlow(bool? refresh = default(bool?), string? aal = default(string?), string? returnTo = default(string?), string? cookie = default(string?), string? loginChallenge = default(string?), string? organization = default(string?), int operationIndex = 0); /// /// Create Login Flow for Browsers @@ -56,8 +56,9 @@ public interface IFrontendApiSync : IApiAccessor /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) /// An optional Hydra login challenge. If present, Kratos will cooperate with Ory Hydra to act as an OAuth2 identity provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/login?login_challenge=abcde`). (optional) /// An optional organization ID that should be used for logging this user in. This parameter is only effective in the Ory Network. (optional) + /// Index associated with the operation. /// ApiResponse of KratosLoginFlow - ApiResponse CreateBrowserLoginFlowWithHttpInfo(bool? refresh = default(bool?), string aal = default(string), string returnTo = default(string), string cookie = default(string), string loginChallenge = default(string), string organization = default(string)); + ApiResponse CreateBrowserLoginFlowWithHttpInfo(bool? refresh = default(bool?), string? aal = default(string?), string? returnTo = default(string?), string? cookie = default(string?), string? loginChallenge = default(string?), string? organization = default(string?), int operationIndex = 0); /// /// Create a Logout URL for Browsers /// @@ -67,8 +68,9 @@ public interface IFrontendApiSync : IApiAccessor /// Thrown when fails to make API call /// HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request. (optional) /// Return to URL The URL to which the browser should be redirected to after the logout has been performed. (optional) + /// Index associated with the operation. /// KratosLogoutFlow - KratosLogoutFlow CreateBrowserLogoutFlow(string cookie = default(string), string returnTo = default(string)); + KratosLogoutFlow CreateBrowserLogoutFlow(string? cookie = default(string?), string? returnTo = default(string?), int operationIndex = 0); /// /// Create a Logout URL for Browsers @@ -79,8 +81,9 @@ public interface IFrontendApiSync : IApiAccessor /// Thrown when fails to make API call /// HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request. (optional) /// Return to URL The URL to which the browser should be redirected to after the logout has been performed. (optional) + /// Index associated with the operation. /// ApiResponse of KratosLogoutFlow - ApiResponse CreateBrowserLogoutFlowWithHttpInfo(string cookie = default(string), string returnTo = default(string)); + ApiResponse CreateBrowserLogoutFlowWithHttpInfo(string? cookie = default(string?), string? returnTo = default(string?), int operationIndex = 0); /// /// Create Recovery Flow for Browsers /// @@ -89,8 +92,9 @@ public interface IFrontendApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The URL to return the browser to after the flow was completed. (optional) + /// Index associated with the operation. /// KratosRecoveryFlow - KratosRecoveryFlow CreateBrowserRecoveryFlow(string returnTo = default(string)); + KratosRecoveryFlow CreateBrowserRecoveryFlow(string? returnTo = default(string?), int operationIndex = 0); /// /// Create Recovery Flow for Browsers @@ -100,8 +104,9 @@ public interface IFrontendApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The URL to return the browser to after the flow was completed. (optional) + /// Index associated with the operation. /// ApiResponse of KratosRecoveryFlow - ApiResponse CreateBrowserRecoveryFlowWithHttpInfo(string returnTo = default(string)); + ApiResponse CreateBrowserRecoveryFlowWithHttpInfo(string? returnTo = default(string?), int operationIndex = 0); /// /// Create Registration Flow for Browsers /// @@ -113,8 +118,9 @@ public interface IFrontendApiSync : IApiAccessor /// Ory OAuth 2.0 Login Challenge. If set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/registration?login_challenge=abcde`). This feature is compatible with Ory Hydra when not running on the Ory Network. (optional) /// The URL to return the browser to after the verification flow was completed. After the registration flow is completed, the user will be sent a verification email. Upon completing the verification flow, this URL will be used to override the default `selfservice.flows.verification.after.default_redirect_to` value. (optional) /// (optional) + /// Index associated with the operation. /// KratosRegistrationFlow - KratosRegistrationFlow CreateBrowserRegistrationFlow(string returnTo = default(string), string loginChallenge = default(string), string afterVerificationReturnTo = default(string), string organization = default(string)); + KratosRegistrationFlow CreateBrowserRegistrationFlow(string? returnTo = default(string?), string? loginChallenge = default(string?), string? afterVerificationReturnTo = default(string?), string? organization = default(string?), int operationIndex = 0); /// /// Create Registration Flow for Browsers @@ -127,8 +133,9 @@ public interface IFrontendApiSync : IApiAccessor /// Ory OAuth 2.0 Login Challenge. If set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/registration?login_challenge=abcde`). This feature is compatible with Ory Hydra when not running on the Ory Network. (optional) /// The URL to return the browser to after the verification flow was completed. After the registration flow is completed, the user will be sent a verification email. Upon completing the verification flow, this URL will be used to override the default `selfservice.flows.verification.after.default_redirect_to` value. (optional) /// (optional) + /// Index associated with the operation. /// ApiResponse of KratosRegistrationFlow - ApiResponse CreateBrowserRegistrationFlowWithHttpInfo(string returnTo = default(string), string loginChallenge = default(string), string afterVerificationReturnTo = default(string), string organization = default(string)); + ApiResponse CreateBrowserRegistrationFlowWithHttpInfo(string? returnTo = default(string?), string? loginChallenge = default(string?), string? afterVerificationReturnTo = default(string?), string? organization = default(string?), int operationIndex = 0); /// /// Create Settings Flow for Browsers /// @@ -138,8 +145,9 @@ public interface IFrontendApiSync : IApiAccessor /// Thrown when fails to make API call /// The URL to return the browser to after the flow was completed. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// KratosSettingsFlow - KratosSettingsFlow CreateBrowserSettingsFlow(string returnTo = default(string), string cookie = default(string)); + KratosSettingsFlow CreateBrowserSettingsFlow(string? returnTo = default(string?), string? cookie = default(string?), int operationIndex = 0); /// /// Create Settings Flow for Browsers @@ -150,8 +158,9 @@ public interface IFrontendApiSync : IApiAccessor /// Thrown when fails to make API call /// The URL to return the browser to after the flow was completed. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// ApiResponse of KratosSettingsFlow - ApiResponse CreateBrowserSettingsFlowWithHttpInfo(string returnTo = default(string), string cookie = default(string)); + ApiResponse CreateBrowserSettingsFlowWithHttpInfo(string? returnTo = default(string?), string? cookie = default(string?), int operationIndex = 0); /// /// Create Verification Flow for Browser Clients /// @@ -160,8 +169,9 @@ public interface IFrontendApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The URL to return the browser to after the flow was completed. (optional) + /// Index associated with the operation. /// KratosVerificationFlow - KratosVerificationFlow CreateBrowserVerificationFlow(string returnTo = default(string)); + KratosVerificationFlow CreateBrowserVerificationFlow(string? returnTo = default(string?), int operationIndex = 0); /// /// Create Verification Flow for Browser Clients @@ -171,8 +181,9 @@ public interface IFrontendApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The URL to return the browser to after the flow was completed. (optional) + /// Index associated with the operation. /// ApiResponse of KratosVerificationFlow - ApiResponse CreateBrowserVerificationFlowWithHttpInfo(string returnTo = default(string)); + ApiResponse CreateBrowserVerificationFlowWithHttpInfo(string? returnTo = default(string?), int operationIndex = 0); /// /// Create Login Flow for Native Apps /// @@ -186,8 +197,9 @@ public interface IFrontendApiSync : IApiAccessor /// EnableSessionTokenExchangeCode requests the login flow to include a code that can be used to retrieve the session token after the login flow has been completed. (optional) /// The URL to return the browser to after the flow was completed. (optional) /// Via should contain the identity's credential the code should be sent to. Only relevant in aal2 flows. (optional) + /// Index associated with the operation. /// KratosLoginFlow - KratosLoginFlow CreateNativeLoginFlow(bool? refresh = default(bool?), string aal = default(string), string xSessionToken = default(string), bool? returnSessionTokenExchangeCode = default(bool?), string returnTo = default(string), string via = default(string)); + KratosLoginFlow CreateNativeLoginFlow(bool? refresh = default(bool?), string? aal = default(string?), string? xSessionToken = default(string?), bool? returnSessionTokenExchangeCode = default(bool?), string? returnTo = default(string?), string? via = default(string?), int operationIndex = 0); /// /// Create Login Flow for Native Apps @@ -202,8 +214,9 @@ public interface IFrontendApiSync : IApiAccessor /// EnableSessionTokenExchangeCode requests the login flow to include a code that can be used to retrieve the session token after the login flow has been completed. (optional) /// The URL to return the browser to after the flow was completed. (optional) /// Via should contain the identity's credential the code should be sent to. Only relevant in aal2 flows. (optional) + /// Index associated with the operation. /// ApiResponse of KratosLoginFlow - ApiResponse CreateNativeLoginFlowWithHttpInfo(bool? refresh = default(bool?), string aal = default(string), string xSessionToken = default(string), bool? returnSessionTokenExchangeCode = default(bool?), string returnTo = default(string), string via = default(string)); + ApiResponse CreateNativeLoginFlowWithHttpInfo(bool? refresh = default(bool?), string? aal = default(string?), string? xSessionToken = default(string?), bool? returnSessionTokenExchangeCode = default(bool?), string? returnTo = default(string?), string? via = default(string?), int operationIndex = 0); /// /// Create Recovery Flow for Native Apps /// @@ -211,8 +224,9 @@ public interface IFrontendApiSync : IApiAccessor /// This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error. On an existing recovery flow, use the `getRecoveryFlow` API endpoint. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery). /// /// Thrown when fails to make API call + /// Index associated with the operation. /// KratosRecoveryFlow - KratosRecoveryFlow CreateNativeRecoveryFlow(); + KratosRecoveryFlow CreateNativeRecoveryFlow(int operationIndex = 0); /// /// Create Recovery Flow for Native Apps @@ -221,8 +235,9 @@ public interface IFrontendApiSync : IApiAccessor /// This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error. On an existing recovery flow, use the `getRecoveryFlow` API endpoint. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery). /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of KratosRecoveryFlow - ApiResponse CreateNativeRecoveryFlowWithHttpInfo(); + ApiResponse CreateNativeRecoveryFlowWithHttpInfo(int operationIndex = 0); /// /// Create Registration Flow for Native Apps /// @@ -232,8 +247,9 @@ public interface IFrontendApiSync : IApiAccessor /// Thrown when fails to make API call /// EnableSessionTokenExchangeCode requests the login flow to include a code that can be used to retrieve the session token after the login flow has been completed. (optional) /// The URL to return the browser to after the flow was completed. (optional) + /// Index associated with the operation. /// KratosRegistrationFlow - KratosRegistrationFlow CreateNativeRegistrationFlow(bool? returnSessionTokenExchangeCode = default(bool?), string returnTo = default(string)); + KratosRegistrationFlow CreateNativeRegistrationFlow(bool? returnSessionTokenExchangeCode = default(bool?), string? returnTo = default(string?), int operationIndex = 0); /// /// Create Registration Flow for Native Apps @@ -244,8 +260,9 @@ public interface IFrontendApiSync : IApiAccessor /// Thrown when fails to make API call /// EnableSessionTokenExchangeCode requests the login flow to include a code that can be used to retrieve the session token after the login flow has been completed. (optional) /// The URL to return the browser to after the flow was completed. (optional) + /// Index associated with the operation. /// ApiResponse of KratosRegistrationFlow - ApiResponse CreateNativeRegistrationFlowWithHttpInfo(bool? returnSessionTokenExchangeCode = default(bool?), string returnTo = default(string)); + ApiResponse CreateNativeRegistrationFlowWithHttpInfo(bool? returnSessionTokenExchangeCode = default(bool?), string? returnTo = default(string?), int operationIndex = 0); /// /// Create Settings Flow for Native Apps /// @@ -254,8 +271,9 @@ public interface IFrontendApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The Session Token of the Identity performing the settings flow. (optional) + /// Index associated with the operation. /// KratosSettingsFlow - KratosSettingsFlow CreateNativeSettingsFlow(string xSessionToken = default(string)); + KratosSettingsFlow CreateNativeSettingsFlow(string? xSessionToken = default(string?), int operationIndex = 0); /// /// Create Settings Flow for Native Apps @@ -265,8 +283,9 @@ public interface IFrontendApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The Session Token of the Identity performing the settings flow. (optional) + /// Index associated with the operation. /// ApiResponse of KratosSettingsFlow - ApiResponse CreateNativeSettingsFlowWithHttpInfo(string xSessionToken = default(string)); + ApiResponse CreateNativeSettingsFlowWithHttpInfo(string? xSessionToken = default(string?), int operationIndex = 0); /// /// Create Verification Flow for Native Apps /// @@ -274,8 +293,9 @@ public interface IFrontendApiSync : IApiAccessor /// This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call `/self-service/verification/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation). /// /// Thrown when fails to make API call + /// Index associated with the operation. /// KratosVerificationFlow - KratosVerificationFlow CreateNativeVerificationFlow(); + KratosVerificationFlow CreateNativeVerificationFlow(int operationIndex = 0); /// /// Create Verification Flow for Native Apps @@ -284,8 +304,9 @@ public interface IFrontendApiSync : IApiAccessor /// This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call `/self-service/verification/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation). /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of KratosVerificationFlow - ApiResponse CreateNativeVerificationFlowWithHttpInfo(); + ApiResponse CreateNativeVerificationFlowWithHttpInfo(int operationIndex = 0); /// /// Disable my other sessions /// @@ -295,8 +316,9 @@ public interface IFrontendApiSync : IApiAccessor /// Thrown when fails to make API call /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) + /// Index associated with the operation. /// KratosDeleteMySessionsCount - KratosDeleteMySessionsCount DisableMyOtherSessions(string xSessionToken = default(string), string cookie = default(string)); + KratosDeleteMySessionsCount DisableMyOtherSessions(string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0); /// /// Disable my other sessions @@ -307,8 +329,9 @@ public interface IFrontendApiSync : IApiAccessor /// Thrown when fails to make API call /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) + /// Index associated with the operation. /// ApiResponse of KratosDeleteMySessionsCount - ApiResponse DisableMyOtherSessionsWithHttpInfo(string xSessionToken = default(string), string cookie = default(string)); + ApiResponse DisableMyOtherSessionsWithHttpInfo(string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0); /// /// Disable one of my sessions /// @@ -319,8 +342,9 @@ public interface IFrontendApiSync : IApiAccessor /// ID is the session's ID. /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) + /// Index associated with the operation. /// - void DisableMySession(string id, string xSessionToken = default(string), string cookie = default(string)); + void DisableMySession(string id, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0); /// /// Disable one of my sessions @@ -332,16 +356,18 @@ public interface IFrontendApiSync : IApiAccessor /// ID is the session's ID. /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DisableMySessionWithHttpInfo(string id, string xSessionToken = default(string), string cookie = default(string)); + ApiResponse DisableMySessionWithHttpInfo(string id, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0); /// /// Exchange Session Token /// /// Thrown when fails to make API call /// The part of the code return when initializing the flow. /// The part of the code returned by the return_to URL. + /// Index associated with the operation. /// KratosSuccessfulNativeLogin - KratosSuccessfulNativeLogin ExchangeSessionToken(string initCode, string returnToCode); + KratosSuccessfulNativeLogin ExchangeSessionToken(string initCode, string returnToCode, int operationIndex = 0); /// /// Exchange Session Token @@ -352,8 +378,9 @@ public interface IFrontendApiSync : IApiAccessor /// Thrown when fails to make API call /// The part of the code return when initializing the flow. /// The part of the code returned by the return_to URL. + /// Index associated with the operation. /// ApiResponse of KratosSuccessfulNativeLogin - ApiResponse ExchangeSessionTokenWithHttpInfo(string initCode, string returnToCode); + ApiResponse ExchangeSessionTokenWithHttpInfo(string initCode, string returnToCode, int operationIndex = 0); /// /// Get User-Flow Errors /// @@ -362,8 +389,9 @@ public interface IFrontendApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Error is the error's ID + /// Index associated with the operation. /// KratosFlowError - KratosFlowError GetFlowError(string id); + KratosFlowError GetFlowError(string id, int operationIndex = 0); /// /// Get User-Flow Errors @@ -373,8 +401,9 @@ public interface IFrontendApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Error is the error's ID + /// Index associated with the operation. /// ApiResponse of KratosFlowError - ApiResponse GetFlowErrorWithHttpInfo(string id); + ApiResponse GetFlowErrorWithHttpInfo(string id, int operationIndex = 0); /// /// Get Login Flow /// @@ -384,8 +413,9 @@ public interface IFrontendApiSync : IApiAccessor /// Thrown when fails to make API call /// The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// KratosLoginFlow - KratosLoginFlow GetLoginFlow(string id, string cookie = default(string)); + KratosLoginFlow GetLoginFlow(string id, string? cookie = default(string?), int operationIndex = 0); /// /// Get Login Flow @@ -396,8 +426,9 @@ public interface IFrontendApiSync : IApiAccessor /// Thrown when fails to make API call /// The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// ApiResponse of KratosLoginFlow - ApiResponse GetLoginFlowWithHttpInfo(string id, string cookie = default(string)); + ApiResponse GetLoginFlowWithHttpInfo(string id, string? cookie = default(string?), int operationIndex = 0); /// /// Get Recovery Flow /// @@ -407,8 +438,9 @@ public interface IFrontendApiSync : IApiAccessor /// Thrown when fails to make API call /// The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// KratosRecoveryFlow - KratosRecoveryFlow GetRecoveryFlow(string id, string cookie = default(string)); + KratosRecoveryFlow GetRecoveryFlow(string id, string? cookie = default(string?), int operationIndex = 0); /// /// Get Recovery Flow @@ -419,8 +451,9 @@ public interface IFrontendApiSync : IApiAccessor /// Thrown when fails to make API call /// The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// ApiResponse of KratosRecoveryFlow - ApiResponse GetRecoveryFlowWithHttpInfo(string id, string cookie = default(string)); + ApiResponse GetRecoveryFlowWithHttpInfo(string id, string? cookie = default(string?), int operationIndex = 0); /// /// Get Registration Flow /// @@ -430,8 +463,9 @@ public interface IFrontendApiSync : IApiAccessor /// Thrown when fails to make API call /// The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// KratosRegistrationFlow - KratosRegistrationFlow GetRegistrationFlow(string id, string cookie = default(string)); + KratosRegistrationFlow GetRegistrationFlow(string id, string? cookie = default(string?), int operationIndex = 0); /// /// Get Registration Flow @@ -442,8 +476,9 @@ public interface IFrontendApiSync : IApiAccessor /// Thrown when fails to make API call /// The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// ApiResponse of KratosRegistrationFlow - ApiResponse GetRegistrationFlowWithHttpInfo(string id, string cookie = default(string)); + ApiResponse GetRegistrationFlowWithHttpInfo(string id, string? cookie = default(string?), int operationIndex = 0); /// /// Get Settings Flow /// @@ -454,8 +489,9 @@ public interface IFrontendApiSync : IApiAccessor /// ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). /// The Session Token When using the SDK in an app without a browser, please include the session token here. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// KratosSettingsFlow - KratosSettingsFlow GetSettingsFlow(string id, string xSessionToken = default(string), string cookie = default(string)); + KratosSettingsFlow GetSettingsFlow(string id, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0); /// /// Get Settings Flow @@ -467,8 +503,9 @@ public interface IFrontendApiSync : IApiAccessor /// ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). /// The Session Token When using the SDK in an app without a browser, please include the session token here. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// ApiResponse of KratosSettingsFlow - ApiResponse GetSettingsFlowWithHttpInfo(string id, string xSessionToken = default(string), string cookie = default(string)); + ApiResponse GetSettingsFlowWithHttpInfo(string id, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0); /// /// Get Verification Flow /// @@ -478,8 +515,9 @@ public interface IFrontendApiSync : IApiAccessor /// Thrown when fails to make API call /// The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). /// HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. (optional) + /// Index associated with the operation. /// KratosVerificationFlow - KratosVerificationFlow GetVerificationFlow(string id, string cookie = default(string)); + KratosVerificationFlow GetVerificationFlow(string id, string? cookie = default(string?), int operationIndex = 0); /// /// Get Verification Flow @@ -490,8 +528,9 @@ public interface IFrontendApiSync : IApiAccessor /// Thrown when fails to make API call /// The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). /// HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. (optional) + /// Index associated with the operation. /// ApiResponse of KratosVerificationFlow - ApiResponse GetVerificationFlowWithHttpInfo(string id, string cookie = default(string)); + ApiResponse GetVerificationFlowWithHttpInfo(string id, string? cookie = default(string?), int operationIndex = 0); /// /// Get WebAuthn JavaScript /// @@ -499,8 +538,9 @@ public interface IFrontendApiSync : IApiAccessor /// This endpoint provides JavaScript which is needed in order to perform WebAuthn login and registration. If you are building a JavaScript Browser App (e.g. in ReactJS or AngularJS) you will need to load this file: ```html <script src=\"https://public-kratos.example.org/.well-known/ory/webauthn.js\" type=\"script\" async /> ``` More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration). /// /// Thrown when fails to make API call + /// Index associated with the operation. /// string - string GetWebAuthnJavaScript(); + string GetWebAuthnJavaScript(int operationIndex = 0); /// /// Get WebAuthn JavaScript @@ -509,8 +549,9 @@ public interface IFrontendApiSync : IApiAccessor /// This endpoint provides JavaScript which is needed in order to perform WebAuthn login and registration. If you are building a JavaScript Browser App (e.g. in ReactJS or AngularJS) you will need to load this file: ```html <script src=\"https://public-kratos.example.org/.well-known/ory/webauthn.js\" type=\"script\" async /> ``` More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration). /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of string - ApiResponse GetWebAuthnJavaScriptWithHttpInfo(); + ApiResponse GetWebAuthnJavaScriptWithHttpInfo(int operationIndex = 0); /// /// Get My Active Sessions /// @@ -524,8 +565,9 @@ public interface IFrontendApiSync : IApiAccessor /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) + /// Index associated with the operation. /// List<KratosSession> - List ListMySessions(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), string xSessionToken = default(string), string cookie = default(string)); + List ListMySessions(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0); /// /// Get My Active Sessions @@ -540,8 +582,9 @@ public interface IFrontendApiSync : IApiAccessor /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) + /// Index associated with the operation. /// ApiResponse of List<KratosSession> - ApiResponse> ListMySessionsWithHttpInfo(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), string xSessionToken = default(string), string cookie = default(string)); + ApiResponse> ListMySessionsWithHttpInfo(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0); /// /// Perform Logout for Native Apps /// @@ -550,8 +593,9 @@ public interface IFrontendApiSync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// - void PerformNativeLogout(KratosPerformNativeLogoutBody kratosPerformNativeLogoutBody); + void PerformNativeLogout(KratosPerformNativeLogoutBody kratosPerformNativeLogoutBody, int operationIndex = 0); /// /// Perform Logout for Native Apps @@ -561,8 +605,9 @@ public interface IFrontendApiSync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse PerformNativeLogoutWithHttpInfo(KratosPerformNativeLogoutBody kratosPerformNativeLogoutBody); + ApiResponse PerformNativeLogoutWithHttpInfo(KratosPerformNativeLogoutBody kratosPerformNativeLogoutBody, int operationIndex = 0); /// /// Check Who the Current HTTP Session Belongs To /// @@ -573,8 +618,9 @@ public interface IFrontendApiSync : IApiAccessor /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) /// Returns the session additionally as a token (such as a JWT) The value of this parameter has to be a valid, configured Ory Session token template. For more information head over to [the documentation](http://ory.sh/docs/identities/session-to-jwt-cors). (optional) + /// Index associated with the operation. /// KratosSession - KratosSession ToSession(string xSessionToken = default(string), string cookie = default(string), string tokenizeAs = default(string)); + KratosSession ToSession(string? xSessionToken = default(string?), string? cookie = default(string?), string? tokenizeAs = default(string?), int operationIndex = 0); /// /// Check Who the Current HTTP Session Belongs To @@ -586,8 +632,9 @@ public interface IFrontendApiSync : IApiAccessor /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) /// Returns the session additionally as a token (such as a JWT) The value of this parameter has to be a valid, configured Ory Session token template. For more information head over to [the documentation](http://ory.sh/docs/identities/session-to-jwt-cors). (optional) + /// Index associated with the operation. /// ApiResponse of KratosSession - ApiResponse ToSessionWithHttpInfo(string xSessionToken = default(string), string cookie = default(string), string tokenizeAs = default(string)); + ApiResponse ToSessionWithHttpInfo(string? xSessionToken = default(string?), string? cookie = default(string?), string? tokenizeAs = default(string?), int operationIndex = 0); /// /// Submit a Login Flow /// @@ -599,8 +646,9 @@ public interface IFrontendApiSync : IApiAccessor /// /// The Session Token of the Identity performing the settings flow. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// KratosSuccessfulNativeLogin - KratosSuccessfulNativeLogin UpdateLoginFlow(string flow, KratosUpdateLoginFlowBody kratosUpdateLoginFlowBody, string xSessionToken = default(string), string cookie = default(string)); + KratosSuccessfulNativeLogin UpdateLoginFlow(string flow, KratosUpdateLoginFlowBody kratosUpdateLoginFlowBody, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0); /// /// Submit a Login Flow @@ -613,8 +661,9 @@ public interface IFrontendApiSync : IApiAccessor /// /// The Session Token of the Identity performing the settings flow. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// ApiResponse of KratosSuccessfulNativeLogin - ApiResponse UpdateLoginFlowWithHttpInfo(string flow, KratosUpdateLoginFlowBody kratosUpdateLoginFlowBody, string xSessionToken = default(string), string cookie = default(string)); + ApiResponse UpdateLoginFlowWithHttpInfo(string flow, KratosUpdateLoginFlowBody kratosUpdateLoginFlowBody, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0); /// /// Update Logout Flow /// @@ -625,8 +674,9 @@ public interface IFrontendApiSync : IApiAccessor /// A Valid Logout Token If you do not have a logout token because you only have a session cookie, call `/self-service/logout/browser` to generate a URL for this endpoint. (optional) /// The URL to return to after the logout was completed. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// - void UpdateLogoutFlow(string token = default(string), string returnTo = default(string), string cookie = default(string)); + void UpdateLogoutFlow(string? token = default(string?), string? returnTo = default(string?), string? cookie = default(string?), int operationIndex = 0); /// /// Update Logout Flow @@ -638,8 +688,9 @@ public interface IFrontendApiSync : IApiAccessor /// A Valid Logout Token If you do not have a logout token because you only have a session cookie, call `/self-service/logout/browser` to generate a URL for this endpoint. (optional) /// The URL to return to after the logout was completed. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdateLogoutFlowWithHttpInfo(string token = default(string), string returnTo = default(string), string cookie = default(string)); + ApiResponse UpdateLogoutFlowWithHttpInfo(string? token = default(string?), string? returnTo = default(string?), string? cookie = default(string?), int operationIndex = 0); /// /// Update Recovery Flow /// @@ -651,8 +702,9 @@ public interface IFrontendApiSync : IApiAccessor /// /// Recovery Token The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// KratosRecoveryFlow - KratosRecoveryFlow UpdateRecoveryFlow(string flow, KratosUpdateRecoveryFlowBody kratosUpdateRecoveryFlowBody, string token = default(string), string cookie = default(string)); + KratosRecoveryFlow UpdateRecoveryFlow(string flow, KratosUpdateRecoveryFlowBody kratosUpdateRecoveryFlowBody, string? token = default(string?), string? cookie = default(string?), int operationIndex = 0); /// /// Update Recovery Flow @@ -665,8 +717,9 @@ public interface IFrontendApiSync : IApiAccessor /// /// Recovery Token The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// ApiResponse of KratosRecoveryFlow - ApiResponse UpdateRecoveryFlowWithHttpInfo(string flow, KratosUpdateRecoveryFlowBody kratosUpdateRecoveryFlowBody, string token = default(string), string cookie = default(string)); + ApiResponse UpdateRecoveryFlowWithHttpInfo(string flow, KratosUpdateRecoveryFlowBody kratosUpdateRecoveryFlowBody, string? token = default(string?), string? cookie = default(string?), int operationIndex = 0); /// /// Update Registration Flow /// @@ -677,8 +730,9 @@ public interface IFrontendApiSync : IApiAccessor /// The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). /// /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// KratosSuccessfulNativeRegistration - KratosSuccessfulNativeRegistration UpdateRegistrationFlow(string flow, KratosUpdateRegistrationFlowBody kratosUpdateRegistrationFlowBody, string cookie = default(string)); + KratosSuccessfulNativeRegistration UpdateRegistrationFlow(string flow, KratosUpdateRegistrationFlowBody kratosUpdateRegistrationFlowBody, string? cookie = default(string?), int operationIndex = 0); /// /// Update Registration Flow @@ -690,8 +744,9 @@ public interface IFrontendApiSync : IApiAccessor /// The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). /// /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// ApiResponse of KratosSuccessfulNativeRegistration - ApiResponse UpdateRegistrationFlowWithHttpInfo(string flow, KratosUpdateRegistrationFlowBody kratosUpdateRegistrationFlowBody, string cookie = default(string)); + ApiResponse UpdateRegistrationFlowWithHttpInfo(string flow, KratosUpdateRegistrationFlowBody kratosUpdateRegistrationFlowBody, string? cookie = default(string?), int operationIndex = 0); /// /// Complete Settings Flow /// @@ -703,8 +758,9 @@ public interface IFrontendApiSync : IApiAccessor /// /// The Session Token of the Identity performing the settings flow. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// KratosSettingsFlow - KratosSettingsFlow UpdateSettingsFlow(string flow, KratosUpdateSettingsFlowBody kratosUpdateSettingsFlowBody, string xSessionToken = default(string), string cookie = default(string)); + KratosSettingsFlow UpdateSettingsFlow(string flow, KratosUpdateSettingsFlowBody kratosUpdateSettingsFlowBody, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0); /// /// Complete Settings Flow @@ -717,8 +773,9 @@ public interface IFrontendApiSync : IApiAccessor /// /// The Session Token of the Identity performing the settings flow. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// ApiResponse of KratosSettingsFlow - ApiResponse UpdateSettingsFlowWithHttpInfo(string flow, KratosUpdateSettingsFlowBody kratosUpdateSettingsFlowBody, string xSessionToken = default(string), string cookie = default(string)); + ApiResponse UpdateSettingsFlowWithHttpInfo(string flow, KratosUpdateSettingsFlowBody kratosUpdateSettingsFlowBody, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0); /// /// Complete Verification Flow /// @@ -730,8 +787,9 @@ public interface IFrontendApiSync : IApiAccessor /// /// Verification Token The verification token which completes the verification request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// KratosVerificationFlow - KratosVerificationFlow UpdateVerificationFlow(string flow, KratosUpdateVerificationFlowBody kratosUpdateVerificationFlowBody, string token = default(string), string cookie = default(string)); + KratosVerificationFlow UpdateVerificationFlow(string flow, KratosUpdateVerificationFlowBody kratosUpdateVerificationFlowBody, string? token = default(string?), string? cookie = default(string?), int operationIndex = 0); /// /// Complete Verification Flow @@ -744,8 +802,9 @@ public interface IFrontendApiSync : IApiAccessor /// /// Verification Token The verification token which completes the verification request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// ApiResponse of KratosVerificationFlow - ApiResponse UpdateVerificationFlowWithHttpInfo(string flow, KratosUpdateVerificationFlowBody kratosUpdateVerificationFlowBody, string token = default(string), string cookie = default(string)); + ApiResponse UpdateVerificationFlowWithHttpInfo(string flow, KratosUpdateVerificationFlowBody kratosUpdateVerificationFlowBody, string? token = default(string?), string? cookie = default(string?), int operationIndex = 0); #endregion Synchronous Operations } @@ -768,9 +827,10 @@ public interface IFrontendApiAsync : IApiAccessor /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) /// An optional Hydra login challenge. If present, Kratos will cooperate with Ory Hydra to act as an OAuth2 identity provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/login?login_challenge=abcde`). (optional) /// An optional organization ID that should be used for logging this user in. This parameter is only effective in the Ory Network. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosLoginFlow - System.Threading.Tasks.Task CreateBrowserLoginFlowAsync(bool? refresh = default(bool?), string aal = default(string), string returnTo = default(string), string cookie = default(string), string loginChallenge = default(string), string organization = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateBrowserLoginFlowAsync(bool? refresh = default(bool?), string? aal = default(string?), string? returnTo = default(string?), string? cookie = default(string?), string? loginChallenge = default(string?), string? organization = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create Login Flow for Browsers @@ -785,9 +845,10 @@ public interface IFrontendApiAsync : IApiAccessor /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) /// An optional Hydra login challenge. If present, Kratos will cooperate with Ory Hydra to act as an OAuth2 identity provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/login?login_challenge=abcde`). (optional) /// An optional organization ID that should be used for logging this user in. This parameter is only effective in the Ory Network. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosLoginFlow) - System.Threading.Tasks.Task> CreateBrowserLoginFlowWithHttpInfoAsync(bool? refresh = default(bool?), string aal = default(string), string returnTo = default(string), string cookie = default(string), string loginChallenge = default(string), string organization = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateBrowserLoginFlowWithHttpInfoAsync(bool? refresh = default(bool?), string? aal = default(string?), string? returnTo = default(string?), string? cookie = default(string?), string? loginChallenge = default(string?), string? organization = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create a Logout URL for Browsers /// @@ -797,9 +858,10 @@ public interface IFrontendApiAsync : IApiAccessor /// Thrown when fails to make API call /// HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request. (optional) /// Return to URL The URL to which the browser should be redirected to after the logout has been performed. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosLogoutFlow - System.Threading.Tasks.Task CreateBrowserLogoutFlowAsync(string cookie = default(string), string returnTo = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateBrowserLogoutFlowAsync(string? cookie = default(string?), string? returnTo = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create a Logout URL for Browsers @@ -810,9 +872,10 @@ public interface IFrontendApiAsync : IApiAccessor /// Thrown when fails to make API call /// HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request. (optional) /// Return to URL The URL to which the browser should be redirected to after the logout has been performed. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosLogoutFlow) - System.Threading.Tasks.Task> CreateBrowserLogoutFlowWithHttpInfoAsync(string cookie = default(string), string returnTo = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateBrowserLogoutFlowWithHttpInfoAsync(string? cookie = default(string?), string? returnTo = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create Recovery Flow for Browsers /// @@ -821,9 +884,10 @@ public interface IFrontendApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The URL to return the browser to after the flow was completed. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosRecoveryFlow - System.Threading.Tasks.Task CreateBrowserRecoveryFlowAsync(string returnTo = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateBrowserRecoveryFlowAsync(string? returnTo = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create Recovery Flow for Browsers @@ -833,9 +897,10 @@ public interface IFrontendApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The URL to return the browser to after the flow was completed. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosRecoveryFlow) - System.Threading.Tasks.Task> CreateBrowserRecoveryFlowWithHttpInfoAsync(string returnTo = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateBrowserRecoveryFlowWithHttpInfoAsync(string? returnTo = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create Registration Flow for Browsers /// @@ -847,9 +912,10 @@ public interface IFrontendApiAsync : IApiAccessor /// Ory OAuth 2.0 Login Challenge. If set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/registration?login_challenge=abcde`). This feature is compatible with Ory Hydra when not running on the Ory Network. (optional) /// The URL to return the browser to after the verification flow was completed. After the registration flow is completed, the user will be sent a verification email. Upon completing the verification flow, this URL will be used to override the default `selfservice.flows.verification.after.default_redirect_to` value. (optional) /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosRegistrationFlow - System.Threading.Tasks.Task CreateBrowserRegistrationFlowAsync(string returnTo = default(string), string loginChallenge = default(string), string afterVerificationReturnTo = default(string), string organization = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateBrowserRegistrationFlowAsync(string? returnTo = default(string?), string? loginChallenge = default(string?), string? afterVerificationReturnTo = default(string?), string? organization = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create Registration Flow for Browsers @@ -862,9 +928,10 @@ public interface IFrontendApiAsync : IApiAccessor /// Ory OAuth 2.0 Login Challenge. If set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/registration?login_challenge=abcde`). This feature is compatible with Ory Hydra when not running on the Ory Network. (optional) /// The URL to return the browser to after the verification flow was completed. After the registration flow is completed, the user will be sent a verification email. Upon completing the verification flow, this URL will be used to override the default `selfservice.flows.verification.after.default_redirect_to` value. (optional) /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosRegistrationFlow) - System.Threading.Tasks.Task> CreateBrowserRegistrationFlowWithHttpInfoAsync(string returnTo = default(string), string loginChallenge = default(string), string afterVerificationReturnTo = default(string), string organization = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateBrowserRegistrationFlowWithHttpInfoAsync(string? returnTo = default(string?), string? loginChallenge = default(string?), string? afterVerificationReturnTo = default(string?), string? organization = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create Settings Flow for Browsers /// @@ -874,9 +941,10 @@ public interface IFrontendApiAsync : IApiAccessor /// Thrown when fails to make API call /// The URL to return the browser to after the flow was completed. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosSettingsFlow - System.Threading.Tasks.Task CreateBrowserSettingsFlowAsync(string returnTo = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateBrowserSettingsFlowAsync(string? returnTo = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create Settings Flow for Browsers @@ -887,9 +955,10 @@ public interface IFrontendApiAsync : IApiAccessor /// Thrown when fails to make API call /// The URL to return the browser to after the flow was completed. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosSettingsFlow) - System.Threading.Tasks.Task> CreateBrowserSettingsFlowWithHttpInfoAsync(string returnTo = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateBrowserSettingsFlowWithHttpInfoAsync(string? returnTo = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create Verification Flow for Browser Clients /// @@ -898,9 +967,10 @@ public interface IFrontendApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The URL to return the browser to after the flow was completed. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosVerificationFlow - System.Threading.Tasks.Task CreateBrowserVerificationFlowAsync(string returnTo = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateBrowserVerificationFlowAsync(string? returnTo = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create Verification Flow for Browser Clients @@ -910,9 +980,10 @@ public interface IFrontendApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The URL to return the browser to after the flow was completed. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosVerificationFlow) - System.Threading.Tasks.Task> CreateBrowserVerificationFlowWithHttpInfoAsync(string returnTo = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateBrowserVerificationFlowWithHttpInfoAsync(string? returnTo = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create Login Flow for Native Apps /// @@ -926,9 +997,10 @@ public interface IFrontendApiAsync : IApiAccessor /// EnableSessionTokenExchangeCode requests the login flow to include a code that can be used to retrieve the session token after the login flow has been completed. (optional) /// The URL to return the browser to after the flow was completed. (optional) /// Via should contain the identity's credential the code should be sent to. Only relevant in aal2 flows. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosLoginFlow - System.Threading.Tasks.Task CreateNativeLoginFlowAsync(bool? refresh = default(bool?), string aal = default(string), string xSessionToken = default(string), bool? returnSessionTokenExchangeCode = default(bool?), string returnTo = default(string), string via = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateNativeLoginFlowAsync(bool? refresh = default(bool?), string? aal = default(string?), string? xSessionToken = default(string?), bool? returnSessionTokenExchangeCode = default(bool?), string? returnTo = default(string?), string? via = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create Login Flow for Native Apps @@ -943,9 +1015,10 @@ public interface IFrontendApiAsync : IApiAccessor /// EnableSessionTokenExchangeCode requests the login flow to include a code that can be used to retrieve the session token after the login flow has been completed. (optional) /// The URL to return the browser to after the flow was completed. (optional) /// Via should contain the identity's credential the code should be sent to. Only relevant in aal2 flows. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosLoginFlow) - System.Threading.Tasks.Task> CreateNativeLoginFlowWithHttpInfoAsync(bool? refresh = default(bool?), string aal = default(string), string xSessionToken = default(string), bool? returnSessionTokenExchangeCode = default(bool?), string returnTo = default(string), string via = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateNativeLoginFlowWithHttpInfoAsync(bool? refresh = default(bool?), string? aal = default(string?), string? xSessionToken = default(string?), bool? returnSessionTokenExchangeCode = default(bool?), string? returnTo = default(string?), string? via = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create Recovery Flow for Native Apps /// @@ -953,9 +1026,10 @@ public interface IFrontendApiAsync : IApiAccessor /// This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error. On an existing recovery flow, use the `getRecoveryFlow` API endpoint. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery). /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosRecoveryFlow - System.Threading.Tasks.Task CreateNativeRecoveryFlowAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateNativeRecoveryFlowAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create Recovery Flow for Native Apps @@ -964,9 +1038,10 @@ public interface IFrontendApiAsync : IApiAccessor /// This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error. On an existing recovery flow, use the `getRecoveryFlow` API endpoint. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery). /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosRecoveryFlow) - System.Threading.Tasks.Task> CreateNativeRecoveryFlowWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateNativeRecoveryFlowWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create Registration Flow for Native Apps /// @@ -976,9 +1051,10 @@ public interface IFrontendApiAsync : IApiAccessor /// Thrown when fails to make API call /// EnableSessionTokenExchangeCode requests the login flow to include a code that can be used to retrieve the session token after the login flow has been completed. (optional) /// The URL to return the browser to after the flow was completed. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosRegistrationFlow - System.Threading.Tasks.Task CreateNativeRegistrationFlowAsync(bool? returnSessionTokenExchangeCode = default(bool?), string returnTo = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateNativeRegistrationFlowAsync(bool? returnSessionTokenExchangeCode = default(bool?), string? returnTo = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create Registration Flow for Native Apps @@ -989,9 +1065,10 @@ public interface IFrontendApiAsync : IApiAccessor /// Thrown when fails to make API call /// EnableSessionTokenExchangeCode requests the login flow to include a code that can be used to retrieve the session token after the login flow has been completed. (optional) /// The URL to return the browser to after the flow was completed. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosRegistrationFlow) - System.Threading.Tasks.Task> CreateNativeRegistrationFlowWithHttpInfoAsync(bool? returnSessionTokenExchangeCode = default(bool?), string returnTo = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateNativeRegistrationFlowWithHttpInfoAsync(bool? returnSessionTokenExchangeCode = default(bool?), string? returnTo = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create Settings Flow for Native Apps /// @@ -1000,9 +1077,10 @@ public interface IFrontendApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The Session Token of the Identity performing the settings flow. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosSettingsFlow - System.Threading.Tasks.Task CreateNativeSettingsFlowAsync(string xSessionToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateNativeSettingsFlowAsync(string? xSessionToken = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create Settings Flow for Native Apps @@ -1012,9 +1090,10 @@ public interface IFrontendApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The Session Token of the Identity performing the settings flow. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosSettingsFlow) - System.Threading.Tasks.Task> CreateNativeSettingsFlowWithHttpInfoAsync(string xSessionToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateNativeSettingsFlowWithHttpInfoAsync(string? xSessionToken = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create Verification Flow for Native Apps /// @@ -1022,9 +1101,10 @@ public interface IFrontendApiAsync : IApiAccessor /// This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call `/self-service/verification/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation). /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosVerificationFlow - System.Threading.Tasks.Task CreateNativeVerificationFlowAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateNativeVerificationFlowAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create Verification Flow for Native Apps @@ -1033,9 +1113,10 @@ public interface IFrontendApiAsync : IApiAccessor /// This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call `/self-service/verification/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation). /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosVerificationFlow) - System.Threading.Tasks.Task> CreateNativeVerificationFlowWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateNativeVerificationFlowWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Disable my other sessions /// @@ -1045,9 +1126,10 @@ public interface IFrontendApiAsync : IApiAccessor /// Thrown when fails to make API call /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosDeleteMySessionsCount - System.Threading.Tasks.Task DisableMyOtherSessionsAsync(string xSessionToken = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DisableMyOtherSessionsAsync(string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Disable my other sessions @@ -1058,9 +1140,10 @@ public interface IFrontendApiAsync : IApiAccessor /// Thrown when fails to make API call /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosDeleteMySessionsCount) - System.Threading.Tasks.Task> DisableMyOtherSessionsWithHttpInfoAsync(string xSessionToken = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DisableMyOtherSessionsWithHttpInfoAsync(string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Disable one of my sessions /// @@ -1071,9 +1154,10 @@ public interface IFrontendApiAsync : IApiAccessor /// ID is the session's ID. /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DisableMySessionAsync(string id, string xSessionToken = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DisableMySessionAsync(string id, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Disable one of my sessions @@ -1085,9 +1169,10 @@ public interface IFrontendApiAsync : IApiAccessor /// ID is the session's ID. /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DisableMySessionWithHttpInfoAsync(string id, string xSessionToken = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DisableMySessionWithHttpInfoAsync(string id, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Exchange Session Token /// @@ -1097,9 +1182,10 @@ public interface IFrontendApiAsync : IApiAccessor /// Thrown when fails to make API call /// The part of the code return when initializing the flow. /// The part of the code returned by the return_to URL. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosSuccessfulNativeLogin - System.Threading.Tasks.Task ExchangeSessionTokenAsync(string initCode, string returnToCode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task ExchangeSessionTokenAsync(string initCode, string returnToCode, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Exchange Session Token @@ -1110,9 +1196,10 @@ public interface IFrontendApiAsync : IApiAccessor /// Thrown when fails to make API call /// The part of the code return when initializing the flow. /// The part of the code returned by the return_to URL. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosSuccessfulNativeLogin) - System.Threading.Tasks.Task> ExchangeSessionTokenWithHttpInfoAsync(string initCode, string returnToCode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ExchangeSessionTokenWithHttpInfoAsync(string initCode, string returnToCode, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get User-Flow Errors /// @@ -1121,9 +1208,10 @@ public interface IFrontendApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Error is the error's ID + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosFlowError - System.Threading.Tasks.Task GetFlowErrorAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetFlowErrorAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get User-Flow Errors @@ -1133,9 +1221,10 @@ public interface IFrontendApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Error is the error's ID + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosFlowError) - System.Threading.Tasks.Task> GetFlowErrorWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetFlowErrorWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Login Flow /// @@ -1145,9 +1234,10 @@ public interface IFrontendApiAsync : IApiAccessor /// Thrown when fails to make API call /// The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosLoginFlow - System.Threading.Tasks.Task GetLoginFlowAsync(string id, string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetLoginFlowAsync(string id, string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Login Flow @@ -1158,9 +1248,10 @@ public interface IFrontendApiAsync : IApiAccessor /// Thrown when fails to make API call /// The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosLoginFlow) - System.Threading.Tasks.Task> GetLoginFlowWithHttpInfoAsync(string id, string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetLoginFlowWithHttpInfoAsync(string id, string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Recovery Flow /// @@ -1170,9 +1261,10 @@ public interface IFrontendApiAsync : IApiAccessor /// Thrown when fails to make API call /// The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosRecoveryFlow - System.Threading.Tasks.Task GetRecoveryFlowAsync(string id, string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetRecoveryFlowAsync(string id, string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Recovery Flow @@ -1183,9 +1275,10 @@ public interface IFrontendApiAsync : IApiAccessor /// Thrown when fails to make API call /// The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosRecoveryFlow) - System.Threading.Tasks.Task> GetRecoveryFlowWithHttpInfoAsync(string id, string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetRecoveryFlowWithHttpInfoAsync(string id, string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Registration Flow /// @@ -1195,9 +1288,10 @@ public interface IFrontendApiAsync : IApiAccessor /// Thrown when fails to make API call /// The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosRegistrationFlow - System.Threading.Tasks.Task GetRegistrationFlowAsync(string id, string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetRegistrationFlowAsync(string id, string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Registration Flow @@ -1208,9 +1302,10 @@ public interface IFrontendApiAsync : IApiAccessor /// Thrown when fails to make API call /// The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosRegistrationFlow) - System.Threading.Tasks.Task> GetRegistrationFlowWithHttpInfoAsync(string id, string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetRegistrationFlowWithHttpInfoAsync(string id, string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Settings Flow /// @@ -1221,9 +1316,10 @@ public interface IFrontendApiAsync : IApiAccessor /// ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). /// The Session Token When using the SDK in an app without a browser, please include the session token here. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosSettingsFlow - System.Threading.Tasks.Task GetSettingsFlowAsync(string id, string xSessionToken = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetSettingsFlowAsync(string id, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Settings Flow @@ -1235,9 +1331,10 @@ public interface IFrontendApiAsync : IApiAccessor /// ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). /// The Session Token When using the SDK in an app without a browser, please include the session token here. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosSettingsFlow) - System.Threading.Tasks.Task> GetSettingsFlowWithHttpInfoAsync(string id, string xSessionToken = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetSettingsFlowWithHttpInfoAsync(string id, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Verification Flow /// @@ -1247,9 +1344,10 @@ public interface IFrontendApiAsync : IApiAccessor /// Thrown when fails to make API call /// The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). /// HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosVerificationFlow - System.Threading.Tasks.Task GetVerificationFlowAsync(string id, string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetVerificationFlowAsync(string id, string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Verification Flow @@ -1260,9 +1358,10 @@ public interface IFrontendApiAsync : IApiAccessor /// Thrown when fails to make API call /// The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). /// HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosVerificationFlow) - System.Threading.Tasks.Task> GetVerificationFlowWithHttpInfoAsync(string id, string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetVerificationFlowWithHttpInfoAsync(string id, string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get WebAuthn JavaScript /// @@ -1270,9 +1369,10 @@ public interface IFrontendApiAsync : IApiAccessor /// This endpoint provides JavaScript which is needed in order to perform WebAuthn login and registration. If you are building a JavaScript Browser App (e.g. in ReactJS or AngularJS) you will need to load this file: ```html <script src=\"https://public-kratos.example.org/.well-known/ory/webauthn.js\" type=\"script\" async /> ``` More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration). /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task GetWebAuthnJavaScriptAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetWebAuthnJavaScriptAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get WebAuthn JavaScript @@ -1281,9 +1381,10 @@ public interface IFrontendApiAsync : IApiAccessor /// This endpoint provides JavaScript which is needed in order to perform WebAuthn login and registration. If you are building a JavaScript Browser App (e.g. in ReactJS or AngularJS) you will need to load this file: ```html <script src=\"https://public-kratos.example.org/.well-known/ory/webauthn.js\" type=\"script\" async /> ``` More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration). /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> GetWebAuthnJavaScriptWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetWebAuthnJavaScriptWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get My Active Sessions /// @@ -1297,9 +1398,10 @@ public interface IFrontendApiAsync : IApiAccessor /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<KratosSession> - System.Threading.Tasks.Task> ListMySessionsAsync(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), string xSessionToken = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ListMySessionsAsync(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get My Active Sessions @@ -1314,9 +1416,10 @@ public interface IFrontendApiAsync : IApiAccessor /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<KratosSession>) - System.Threading.Tasks.Task>> ListMySessionsWithHttpInfoAsync(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), string xSessionToken = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> ListMySessionsWithHttpInfoAsync(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Perform Logout for Native Apps /// @@ -1325,9 +1428,10 @@ public interface IFrontendApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task PerformNativeLogoutAsync(KratosPerformNativeLogoutBody kratosPerformNativeLogoutBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task PerformNativeLogoutAsync(KratosPerformNativeLogoutBody kratosPerformNativeLogoutBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Perform Logout for Native Apps @@ -1337,9 +1441,10 @@ public interface IFrontendApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> PerformNativeLogoutWithHttpInfoAsync(KratosPerformNativeLogoutBody kratosPerformNativeLogoutBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> PerformNativeLogoutWithHttpInfoAsync(KratosPerformNativeLogoutBody kratosPerformNativeLogoutBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Check Who the Current HTTP Session Belongs To /// @@ -1350,9 +1455,10 @@ public interface IFrontendApiAsync : IApiAccessor /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) /// Returns the session additionally as a token (such as a JWT) The value of this parameter has to be a valid, configured Ory Session token template. For more information head over to [the documentation](http://ory.sh/docs/identities/session-to-jwt-cors). (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosSession - System.Threading.Tasks.Task ToSessionAsync(string xSessionToken = default(string), string cookie = default(string), string tokenizeAs = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task ToSessionAsync(string? xSessionToken = default(string?), string? cookie = default(string?), string? tokenizeAs = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Check Who the Current HTTP Session Belongs To @@ -1364,9 +1470,10 @@ public interface IFrontendApiAsync : IApiAccessor /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) /// Returns the session additionally as a token (such as a JWT) The value of this parameter has to be a valid, configured Ory Session token template. For more information head over to [the documentation](http://ory.sh/docs/identities/session-to-jwt-cors). (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosSession) - System.Threading.Tasks.Task> ToSessionWithHttpInfoAsync(string xSessionToken = default(string), string cookie = default(string), string tokenizeAs = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ToSessionWithHttpInfoAsync(string? xSessionToken = default(string?), string? cookie = default(string?), string? tokenizeAs = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Submit a Login Flow /// @@ -1378,9 +1485,10 @@ public interface IFrontendApiAsync : IApiAccessor /// /// The Session Token of the Identity performing the settings flow. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosSuccessfulNativeLogin - System.Threading.Tasks.Task UpdateLoginFlowAsync(string flow, KratosUpdateLoginFlowBody kratosUpdateLoginFlowBody, string xSessionToken = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdateLoginFlowAsync(string flow, KratosUpdateLoginFlowBody kratosUpdateLoginFlowBody, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Submit a Login Flow @@ -1393,9 +1501,10 @@ public interface IFrontendApiAsync : IApiAccessor /// /// The Session Token of the Identity performing the settings flow. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosSuccessfulNativeLogin) - System.Threading.Tasks.Task> UpdateLoginFlowWithHttpInfoAsync(string flow, KratosUpdateLoginFlowBody kratosUpdateLoginFlowBody, string xSessionToken = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdateLoginFlowWithHttpInfoAsync(string flow, KratosUpdateLoginFlowBody kratosUpdateLoginFlowBody, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update Logout Flow /// @@ -1406,9 +1515,10 @@ public interface IFrontendApiAsync : IApiAccessor /// A Valid Logout Token If you do not have a logout token because you only have a session cookie, call `/self-service/logout/browser` to generate a URL for this endpoint. (optional) /// The URL to return to after the logout was completed. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdateLogoutFlowAsync(string token = default(string), string returnTo = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdateLogoutFlowAsync(string? token = default(string?), string? returnTo = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update Logout Flow @@ -1420,9 +1530,10 @@ public interface IFrontendApiAsync : IApiAccessor /// A Valid Logout Token If you do not have a logout token because you only have a session cookie, call `/self-service/logout/browser` to generate a URL for this endpoint. (optional) /// The URL to return to after the logout was completed. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdateLogoutFlowWithHttpInfoAsync(string token = default(string), string returnTo = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdateLogoutFlowWithHttpInfoAsync(string? token = default(string?), string? returnTo = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update Recovery Flow /// @@ -1434,9 +1545,10 @@ public interface IFrontendApiAsync : IApiAccessor /// /// Recovery Token The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosRecoveryFlow - System.Threading.Tasks.Task UpdateRecoveryFlowAsync(string flow, KratosUpdateRecoveryFlowBody kratosUpdateRecoveryFlowBody, string token = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdateRecoveryFlowAsync(string flow, KratosUpdateRecoveryFlowBody kratosUpdateRecoveryFlowBody, string? token = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update Recovery Flow @@ -1449,9 +1561,10 @@ public interface IFrontendApiAsync : IApiAccessor /// /// Recovery Token The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosRecoveryFlow) - System.Threading.Tasks.Task> UpdateRecoveryFlowWithHttpInfoAsync(string flow, KratosUpdateRecoveryFlowBody kratosUpdateRecoveryFlowBody, string token = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdateRecoveryFlowWithHttpInfoAsync(string flow, KratosUpdateRecoveryFlowBody kratosUpdateRecoveryFlowBody, string? token = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update Registration Flow /// @@ -1462,9 +1575,10 @@ public interface IFrontendApiAsync : IApiAccessor /// The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). /// /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosSuccessfulNativeRegistration - System.Threading.Tasks.Task UpdateRegistrationFlowAsync(string flow, KratosUpdateRegistrationFlowBody kratosUpdateRegistrationFlowBody, string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdateRegistrationFlowAsync(string flow, KratosUpdateRegistrationFlowBody kratosUpdateRegistrationFlowBody, string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update Registration Flow @@ -1476,9 +1590,10 @@ public interface IFrontendApiAsync : IApiAccessor /// The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). /// /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosSuccessfulNativeRegistration) - System.Threading.Tasks.Task> UpdateRegistrationFlowWithHttpInfoAsync(string flow, KratosUpdateRegistrationFlowBody kratosUpdateRegistrationFlowBody, string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdateRegistrationFlowWithHttpInfoAsync(string flow, KratosUpdateRegistrationFlowBody kratosUpdateRegistrationFlowBody, string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Complete Settings Flow /// @@ -1490,9 +1605,10 @@ public interface IFrontendApiAsync : IApiAccessor /// /// The Session Token of the Identity performing the settings flow. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosSettingsFlow - System.Threading.Tasks.Task UpdateSettingsFlowAsync(string flow, KratosUpdateSettingsFlowBody kratosUpdateSettingsFlowBody, string xSessionToken = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdateSettingsFlowAsync(string flow, KratosUpdateSettingsFlowBody kratosUpdateSettingsFlowBody, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Complete Settings Flow @@ -1505,9 +1621,10 @@ public interface IFrontendApiAsync : IApiAccessor /// /// The Session Token of the Identity performing the settings flow. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosSettingsFlow) - System.Threading.Tasks.Task> UpdateSettingsFlowWithHttpInfoAsync(string flow, KratosUpdateSettingsFlowBody kratosUpdateSettingsFlowBody, string xSessionToken = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdateSettingsFlowWithHttpInfoAsync(string flow, KratosUpdateSettingsFlowBody kratosUpdateSettingsFlowBody, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Complete Verification Flow /// @@ -1519,9 +1636,10 @@ public interface IFrontendApiAsync : IApiAccessor /// /// Verification Token The verification token which completes the verification request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosVerificationFlow - System.Threading.Tasks.Task UpdateVerificationFlowAsync(string flow, KratosUpdateVerificationFlowBody kratosUpdateVerificationFlowBody, string token = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdateVerificationFlowAsync(string flow, KratosUpdateVerificationFlowBody kratosUpdateVerificationFlowBody, string? token = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Complete Verification Flow @@ -1534,9 +1652,10 @@ public interface IFrontendApiAsync : IApiAccessor /// /// Verification Token The verification token which completes the verification request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosVerificationFlow) - System.Threading.Tasks.Task> UpdateVerificationFlowWithHttpInfoAsync(string flow, KratosUpdateVerificationFlowBody kratosUpdateVerificationFlowBody, string token = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdateVerificationFlowWithHttpInfoAsync(string flow, KratosUpdateVerificationFlowBody kratosUpdateVerificationFlowBody, string? token = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -1667,8 +1786,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) /// An optional Hydra login challenge. If present, Kratos will cooperate with Ory Hydra to act as an OAuth2 identity provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/login?login_challenge=abcde`). (optional) /// An optional organization ID that should be used for logging this user in. This parameter is only effective in the Ory Network. (optional) + /// Index associated with the operation. /// KratosLoginFlow - public KratosLoginFlow CreateBrowserLoginFlow(bool? refresh = default(bool?), string aal = default(string), string returnTo = default(string), string cookie = default(string), string loginChallenge = default(string), string organization = default(string)) + public KratosLoginFlow CreateBrowserLoginFlow(bool? refresh = default(bool?), string? aal = default(string?), string? returnTo = default(string?), string? cookie = default(string?), string? loginChallenge = default(string?), string? organization = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = CreateBrowserLoginFlowWithHttpInfo(refresh, aal, returnTo, cookie, loginChallenge, organization); return localVarResponse.Data; @@ -1684,8 +1804,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) /// An optional Hydra login challenge. If present, Kratos will cooperate with Ory Hydra to act as an OAuth2 identity provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/login?login_challenge=abcde`). (optional) /// An optional organization ID that should be used for logging this user in. This parameter is only effective in the Ory Network. (optional) + /// Index associated with the operation. /// ApiResponse of KratosLoginFlow - public Ory.Kratos.Client.Client.ApiResponse CreateBrowserLoginFlowWithHttpInfo(bool? refresh = default(bool?), string aal = default(string), string returnTo = default(string), string cookie = default(string), string loginChallenge = default(string), string organization = default(string)) + public Ory.Kratos.Client.Client.ApiResponse CreateBrowserLoginFlowWithHttpInfo(bool? refresh = default(bool?), string? aal = default(string?), string? returnTo = default(string?), string? cookie = default(string?), string? loginChallenge = default(string?), string? organization = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -1734,6 +1855,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.CreateBrowserLoginFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/self-service/login/browser", localVarRequestOptions, this.Configuration); @@ -1759,11 +1883,12 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) /// An optional Hydra login challenge. If present, Kratos will cooperate with Ory Hydra to act as an OAuth2 identity provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/login?login_challenge=abcde`). (optional) /// An optional organization ID that should be used for logging this user in. This parameter is only effective in the Ory Network. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosLoginFlow - public async System.Threading.Tasks.Task CreateBrowserLoginFlowAsync(bool? refresh = default(bool?), string aal = default(string), string returnTo = default(string), string cookie = default(string), string loginChallenge = default(string), string organization = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateBrowserLoginFlowAsync(bool? refresh = default(bool?), string? aal = default(string?), string? returnTo = default(string?), string? cookie = default(string?), string? loginChallenge = default(string?), string? organization = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateBrowserLoginFlowWithHttpInfoAsync(refresh, aal, returnTo, cookie, loginChallenge, organization, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateBrowserLoginFlowWithHttpInfoAsync(refresh, aal, returnTo, cookie, loginChallenge, organization, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1777,9 +1902,10 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) /// An optional Hydra login challenge. If present, Kratos will cooperate with Ory Hydra to act as an OAuth2 identity provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/login?login_challenge=abcde`). (optional) /// An optional organization ID that should be used for logging this user in. This parameter is only effective in the Ory Network. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosLoginFlow) - public async System.Threading.Tasks.Task> CreateBrowserLoginFlowWithHttpInfoAsync(bool? refresh = default(bool?), string aal = default(string), string returnTo = default(string), string cookie = default(string), string loginChallenge = default(string), string organization = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateBrowserLoginFlowWithHttpInfoAsync(bool? refresh = default(bool?), string? aal = default(string?), string? returnTo = default(string?), string? cookie = default(string?), string? loginChallenge = default(string?), string? organization = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -1829,6 +1955,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.CreateBrowserLoginFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/self-service/login/browser", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1851,8 +1980,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request. (optional) /// Return to URL The URL to which the browser should be redirected to after the logout has been performed. (optional) + /// Index associated with the operation. /// KratosLogoutFlow - public KratosLogoutFlow CreateBrowserLogoutFlow(string cookie = default(string), string returnTo = default(string)) + public KratosLogoutFlow CreateBrowserLogoutFlow(string? cookie = default(string?), string? returnTo = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = CreateBrowserLogoutFlowWithHttpInfo(cookie, returnTo); return localVarResponse.Data; @@ -1864,8 +1994,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request. (optional) /// Return to URL The URL to which the browser should be redirected to after the logout has been performed. (optional) + /// Index associated with the operation. /// ApiResponse of KratosLogoutFlow - public Ory.Kratos.Client.Client.ApiResponse CreateBrowserLogoutFlowWithHttpInfo(string cookie = default(string), string returnTo = default(string)) + public Ory.Kratos.Client.Client.ApiResponse CreateBrowserLogoutFlowWithHttpInfo(string? cookie = default(string?), string? returnTo = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -1898,6 +2029,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.CreateBrowserLogoutFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/self-service/logout/browser", localVarRequestOptions, this.Configuration); @@ -1919,11 +2053,12 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request. (optional) /// Return to URL The URL to which the browser should be redirected to after the logout has been performed. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosLogoutFlow - public async System.Threading.Tasks.Task CreateBrowserLogoutFlowAsync(string cookie = default(string), string returnTo = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateBrowserLogoutFlowAsync(string? cookie = default(string?), string? returnTo = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateBrowserLogoutFlowWithHttpInfoAsync(cookie, returnTo, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateBrowserLogoutFlowWithHttpInfoAsync(cookie, returnTo, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1933,9 +2068,10 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request. (optional) /// Return to URL The URL to which the browser should be redirected to after the logout has been performed. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosLogoutFlow) - public async System.Threading.Tasks.Task> CreateBrowserLogoutFlowWithHttpInfoAsync(string cookie = default(string), string returnTo = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateBrowserLogoutFlowWithHttpInfoAsync(string? cookie = default(string?), string? returnTo = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -1969,6 +2105,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.CreateBrowserLogoutFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/self-service/logout/browser", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -1990,8 +2129,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// The URL to return the browser to after the flow was completed. (optional) + /// Index associated with the operation. /// KratosRecoveryFlow - public KratosRecoveryFlow CreateBrowserRecoveryFlow(string returnTo = default(string)) + public KratosRecoveryFlow CreateBrowserRecoveryFlow(string? returnTo = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = CreateBrowserRecoveryFlowWithHttpInfo(returnTo); return localVarResponse.Data; @@ -2002,8 +2142,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// The URL to return the browser to after the flow was completed. (optional) + /// Index associated with the operation. /// ApiResponse of KratosRecoveryFlow - public Ory.Kratos.Client.Client.ApiResponse CreateBrowserRecoveryFlowWithHttpInfo(string returnTo = default(string)) + public Ory.Kratos.Client.Client.ApiResponse CreateBrowserRecoveryFlowWithHttpInfo(string? returnTo = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -2032,6 +2173,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("", "return_to", returnTo)); } + localVarRequestOptions.Operation = "FrontendApi.CreateBrowserRecoveryFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/self-service/recovery/browser", localVarRequestOptions, this.Configuration); @@ -2052,11 +2196,12 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// The URL to return the browser to after the flow was completed. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosRecoveryFlow - public async System.Threading.Tasks.Task CreateBrowserRecoveryFlowAsync(string returnTo = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateBrowserRecoveryFlowAsync(string? returnTo = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateBrowserRecoveryFlowWithHttpInfoAsync(returnTo, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateBrowserRecoveryFlowWithHttpInfoAsync(returnTo, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2065,9 +2210,10 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// The URL to return the browser to after the flow was completed. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosRecoveryFlow) - public async System.Threading.Tasks.Task> CreateBrowserRecoveryFlowWithHttpInfoAsync(string returnTo = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateBrowserRecoveryFlowWithHttpInfoAsync(string? returnTo = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -2097,6 +2243,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("", "return_to", returnTo)); } + localVarRequestOptions.Operation = "FrontendApi.CreateBrowserRecoveryFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/self-service/recovery/browser", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2121,8 +2270,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// Ory OAuth 2.0 Login Challenge. If set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/registration?login_challenge=abcde`). This feature is compatible with Ory Hydra when not running on the Ory Network. (optional) /// The URL to return the browser to after the verification flow was completed. After the registration flow is completed, the user will be sent a verification email. Upon completing the verification flow, this URL will be used to override the default `selfservice.flows.verification.after.default_redirect_to` value. (optional) /// (optional) + /// Index associated with the operation. /// KratosRegistrationFlow - public KratosRegistrationFlow CreateBrowserRegistrationFlow(string returnTo = default(string), string loginChallenge = default(string), string afterVerificationReturnTo = default(string), string organization = default(string)) + public KratosRegistrationFlow CreateBrowserRegistrationFlow(string? returnTo = default(string?), string? loginChallenge = default(string?), string? afterVerificationReturnTo = default(string?), string? organization = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = CreateBrowserRegistrationFlowWithHttpInfo(returnTo, loginChallenge, afterVerificationReturnTo, organization); return localVarResponse.Data; @@ -2136,8 +2286,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// Ory OAuth 2.0 Login Challenge. If set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/registration?login_challenge=abcde`). This feature is compatible with Ory Hydra when not running on the Ory Network. (optional) /// The URL to return the browser to after the verification flow was completed. After the registration flow is completed, the user will be sent a verification email. Upon completing the verification flow, this URL will be used to override the default `selfservice.flows.verification.after.default_redirect_to` value. (optional) /// (optional) + /// Index associated with the operation. /// ApiResponse of KratosRegistrationFlow - public Ory.Kratos.Client.Client.ApiResponse CreateBrowserRegistrationFlowWithHttpInfo(string returnTo = default(string), string loginChallenge = default(string), string afterVerificationReturnTo = default(string), string organization = default(string)) + public Ory.Kratos.Client.Client.ApiResponse CreateBrowserRegistrationFlowWithHttpInfo(string? returnTo = default(string?), string? loginChallenge = default(string?), string? afterVerificationReturnTo = default(string?), string? organization = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -2178,6 +2329,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("", "organization", organization)); } + localVarRequestOptions.Operation = "FrontendApi.CreateBrowserRegistrationFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/self-service/registration/browser", localVarRequestOptions, this.Configuration); @@ -2201,11 +2355,12 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// Ory OAuth 2.0 Login Challenge. If set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/registration?login_challenge=abcde`). This feature is compatible with Ory Hydra when not running on the Ory Network. (optional) /// The URL to return the browser to after the verification flow was completed. After the registration flow is completed, the user will be sent a verification email. Upon completing the verification flow, this URL will be used to override the default `selfservice.flows.verification.after.default_redirect_to` value. (optional) /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosRegistrationFlow - public async System.Threading.Tasks.Task CreateBrowserRegistrationFlowAsync(string returnTo = default(string), string loginChallenge = default(string), string afterVerificationReturnTo = default(string), string organization = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateBrowserRegistrationFlowAsync(string? returnTo = default(string?), string? loginChallenge = default(string?), string? afterVerificationReturnTo = default(string?), string? organization = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateBrowserRegistrationFlowWithHttpInfoAsync(returnTo, loginChallenge, afterVerificationReturnTo, organization, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateBrowserRegistrationFlowWithHttpInfoAsync(returnTo, loginChallenge, afterVerificationReturnTo, organization, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2217,9 +2372,10 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// Ory OAuth 2.0 Login Challenge. If set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider. The value for this parameter comes from `login_challenge` URL Query parameter sent to your application (e.g. `/registration?login_challenge=abcde`). This feature is compatible with Ory Hydra when not running on the Ory Network. (optional) /// The URL to return the browser to after the verification flow was completed. After the registration flow is completed, the user will be sent a verification email. Upon completing the verification flow, this URL will be used to override the default `selfservice.flows.verification.after.default_redirect_to` value. (optional) /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosRegistrationFlow) - public async System.Threading.Tasks.Task> CreateBrowserRegistrationFlowWithHttpInfoAsync(string returnTo = default(string), string loginChallenge = default(string), string afterVerificationReturnTo = default(string), string organization = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateBrowserRegistrationFlowWithHttpInfoAsync(string? returnTo = default(string?), string? loginChallenge = default(string?), string? afterVerificationReturnTo = default(string?), string? organization = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -2261,6 +2417,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("", "organization", organization)); } + localVarRequestOptions.Operation = "FrontendApi.CreateBrowserRegistrationFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/self-service/registration/browser", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2283,8 +2442,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// The URL to return the browser to after the flow was completed. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// KratosSettingsFlow - public KratosSettingsFlow CreateBrowserSettingsFlow(string returnTo = default(string), string cookie = default(string)) + public KratosSettingsFlow CreateBrowserSettingsFlow(string? returnTo = default(string?), string? cookie = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = CreateBrowserSettingsFlowWithHttpInfo(returnTo, cookie); return localVarResponse.Data; @@ -2296,8 +2456,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// The URL to return the browser to after the flow was completed. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// ApiResponse of KratosSettingsFlow - public Ory.Kratos.Client.Client.ApiResponse CreateBrowserSettingsFlowWithHttpInfo(string returnTo = default(string), string cookie = default(string)) + public Ory.Kratos.Client.Client.ApiResponse CreateBrowserSettingsFlowWithHttpInfo(string? returnTo = default(string?), string? cookie = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -2330,6 +2491,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.CreateBrowserSettingsFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/self-service/settings/browser", localVarRequestOptions, this.Configuration); @@ -2351,11 +2515,12 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// The URL to return the browser to after the flow was completed. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosSettingsFlow - public async System.Threading.Tasks.Task CreateBrowserSettingsFlowAsync(string returnTo = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateBrowserSettingsFlowAsync(string? returnTo = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateBrowserSettingsFlowWithHttpInfoAsync(returnTo, cookie, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateBrowserSettingsFlowWithHttpInfoAsync(returnTo, cookie, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2365,9 +2530,10 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// The URL to return the browser to after the flow was completed. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosSettingsFlow) - public async System.Threading.Tasks.Task> CreateBrowserSettingsFlowWithHttpInfoAsync(string returnTo = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateBrowserSettingsFlowWithHttpInfoAsync(string? returnTo = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -2401,6 +2567,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("Cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.CreateBrowserSettingsFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/self-service/settings/browser", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2422,8 +2591,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// The URL to return the browser to after the flow was completed. (optional) + /// Index associated with the operation. /// KratosVerificationFlow - public KratosVerificationFlow CreateBrowserVerificationFlow(string returnTo = default(string)) + public KratosVerificationFlow CreateBrowserVerificationFlow(string? returnTo = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = CreateBrowserVerificationFlowWithHttpInfo(returnTo); return localVarResponse.Data; @@ -2434,8 +2604,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// The URL to return the browser to after the flow was completed. (optional) + /// Index associated with the operation. /// ApiResponse of KratosVerificationFlow - public Ory.Kratos.Client.Client.ApiResponse CreateBrowserVerificationFlowWithHttpInfo(string returnTo = default(string)) + public Ory.Kratos.Client.Client.ApiResponse CreateBrowserVerificationFlowWithHttpInfo(string? returnTo = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -2464,6 +2635,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("", "return_to", returnTo)); } + localVarRequestOptions.Operation = "FrontendApi.CreateBrowserVerificationFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/self-service/verification/browser", localVarRequestOptions, this.Configuration); @@ -2484,11 +2658,12 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// The URL to return the browser to after the flow was completed. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosVerificationFlow - public async System.Threading.Tasks.Task CreateBrowserVerificationFlowAsync(string returnTo = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateBrowserVerificationFlowAsync(string? returnTo = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateBrowserVerificationFlowWithHttpInfoAsync(returnTo, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateBrowserVerificationFlowWithHttpInfoAsync(returnTo, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2497,9 +2672,10 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// The URL to return the browser to after the flow was completed. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosVerificationFlow) - public async System.Threading.Tasks.Task> CreateBrowserVerificationFlowWithHttpInfoAsync(string returnTo = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateBrowserVerificationFlowWithHttpInfoAsync(string? returnTo = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -2529,6 +2705,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("", "return_to", returnTo)); } + localVarRequestOptions.Operation = "FrontendApi.CreateBrowserVerificationFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/self-service/verification/browser", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2555,8 +2734,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// EnableSessionTokenExchangeCode requests the login flow to include a code that can be used to retrieve the session token after the login flow has been completed. (optional) /// The URL to return the browser to after the flow was completed. (optional) /// Via should contain the identity's credential the code should be sent to. Only relevant in aal2 flows. (optional) + /// Index associated with the operation. /// KratosLoginFlow - public KratosLoginFlow CreateNativeLoginFlow(bool? refresh = default(bool?), string aal = default(string), string xSessionToken = default(string), bool? returnSessionTokenExchangeCode = default(bool?), string returnTo = default(string), string via = default(string)) + public KratosLoginFlow CreateNativeLoginFlow(bool? refresh = default(bool?), string? aal = default(string?), string? xSessionToken = default(string?), bool? returnSessionTokenExchangeCode = default(bool?), string? returnTo = default(string?), string? via = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = CreateNativeLoginFlowWithHttpInfo(refresh, aal, xSessionToken, returnSessionTokenExchangeCode, returnTo, via); return localVarResponse.Data; @@ -2572,8 +2752,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// EnableSessionTokenExchangeCode requests the login flow to include a code that can be used to retrieve the session token after the login flow has been completed. (optional) /// The URL to return the browser to after the flow was completed. (optional) /// Via should contain the identity's credential the code should be sent to. Only relevant in aal2 flows. (optional) + /// Index associated with the operation. /// ApiResponse of KratosLoginFlow - public Ory.Kratos.Client.Client.ApiResponse CreateNativeLoginFlowWithHttpInfo(bool? refresh = default(bool?), string aal = default(string), string xSessionToken = default(string), bool? returnSessionTokenExchangeCode = default(bool?), string returnTo = default(string), string via = default(string)) + public Ory.Kratos.Client.Client.ApiResponse CreateNativeLoginFlowWithHttpInfo(bool? refresh = default(bool?), string? aal = default(string?), string? xSessionToken = default(string?), bool? returnSessionTokenExchangeCode = default(bool?), string? returnTo = default(string?), string? via = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -2622,6 +2803,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("X-Session-Token", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(xSessionToken)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.CreateNativeLoginFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/self-service/login/api", localVarRequestOptions, this.Configuration); @@ -2647,11 +2831,12 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// EnableSessionTokenExchangeCode requests the login flow to include a code that can be used to retrieve the session token after the login flow has been completed. (optional) /// The URL to return the browser to after the flow was completed. (optional) /// Via should contain the identity's credential the code should be sent to. Only relevant in aal2 flows. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosLoginFlow - public async System.Threading.Tasks.Task CreateNativeLoginFlowAsync(bool? refresh = default(bool?), string aal = default(string), string xSessionToken = default(string), bool? returnSessionTokenExchangeCode = default(bool?), string returnTo = default(string), string via = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateNativeLoginFlowAsync(bool? refresh = default(bool?), string? aal = default(string?), string? xSessionToken = default(string?), bool? returnSessionTokenExchangeCode = default(bool?), string? returnTo = default(string?), string? via = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateNativeLoginFlowWithHttpInfoAsync(refresh, aal, xSessionToken, returnSessionTokenExchangeCode, returnTo, via, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateNativeLoginFlowWithHttpInfoAsync(refresh, aal, xSessionToken, returnSessionTokenExchangeCode, returnTo, via, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2665,9 +2850,10 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// EnableSessionTokenExchangeCode requests the login flow to include a code that can be used to retrieve the session token after the login flow has been completed. (optional) /// The URL to return the browser to after the flow was completed. (optional) /// Via should contain the identity's credential the code should be sent to. Only relevant in aal2 flows. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosLoginFlow) - public async System.Threading.Tasks.Task> CreateNativeLoginFlowWithHttpInfoAsync(bool? refresh = default(bool?), string aal = default(string), string xSessionToken = default(string), bool? returnSessionTokenExchangeCode = default(bool?), string returnTo = default(string), string via = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateNativeLoginFlowWithHttpInfoAsync(bool? refresh = default(bool?), string? aal = default(string?), string? xSessionToken = default(string?), bool? returnSessionTokenExchangeCode = default(bool?), string? returnTo = default(string?), string? via = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -2717,6 +2903,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.HeaderParameters.Add("X-Session-Token", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(xSessionToken)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.CreateNativeLoginFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/self-service/login/api", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2737,8 +2926,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// Create Recovery Flow for Native Apps This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error. On an existing recovery flow, use the `getRecoveryFlow` API endpoint. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery). /// /// Thrown when fails to make API call + /// Index associated with the operation. /// KratosRecoveryFlow - public KratosRecoveryFlow CreateNativeRecoveryFlow() + public KratosRecoveryFlow CreateNativeRecoveryFlow(int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = CreateNativeRecoveryFlowWithHttpInfo(); return localVarResponse.Data; @@ -2748,8 +2938,9 @@ public KratosRecoveryFlow CreateNativeRecoveryFlow() /// Create Recovery Flow for Native Apps This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error. On an existing recovery flow, use the `getRecoveryFlow` API endpoint. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery). /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of KratosRecoveryFlow - public Ory.Kratos.Client.Client.ApiResponse CreateNativeRecoveryFlowWithHttpInfo() + public Ory.Kratos.Client.Client.ApiResponse CreateNativeRecoveryFlowWithHttpInfo(int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -2774,6 +2965,9 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNativeReco } + localVarRequestOptions.Operation = "FrontendApi.CreateNativeRecoveryFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/self-service/recovery/api", localVarRequestOptions, this.Configuration); @@ -2793,11 +2987,12 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNativeReco /// Create Recovery Flow for Native Apps This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error. On an existing recovery flow, use the `getRecoveryFlow` API endpoint. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery). /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosRecoveryFlow - public async System.Threading.Tasks.Task CreateNativeRecoveryFlowAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateNativeRecoveryFlowAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateNativeRecoveryFlowWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateNativeRecoveryFlowWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2805,9 +3000,10 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNativeReco /// Create Recovery Flow for Native Apps This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on. If a valid provided session cookie or session token is provided, a 400 Bad Request error. On an existing recovery flow, use the `getRecoveryFlow` API endpoint. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery). /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosRecoveryFlow) - public async System.Threading.Tasks.Task> CreateNativeRecoveryFlowWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateNativeRecoveryFlowWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -2833,6 +3029,9 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNativeReco } + localVarRequestOptions.Operation = "FrontendApi.CreateNativeRecoveryFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/self-service/recovery/api", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2855,8 +3054,9 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNativeReco /// Thrown when fails to make API call /// EnableSessionTokenExchangeCode requests the login flow to include a code that can be used to retrieve the session token after the login flow has been completed. (optional) /// The URL to return the browser to after the flow was completed. (optional) + /// Index associated with the operation. /// KratosRegistrationFlow - public KratosRegistrationFlow CreateNativeRegistrationFlow(bool? returnSessionTokenExchangeCode = default(bool?), string returnTo = default(string)) + public KratosRegistrationFlow CreateNativeRegistrationFlow(bool? returnSessionTokenExchangeCode = default(bool?), string? returnTo = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = CreateNativeRegistrationFlowWithHttpInfo(returnSessionTokenExchangeCode, returnTo); return localVarResponse.Data; @@ -2868,8 +3068,9 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNativeReco /// Thrown when fails to make API call /// EnableSessionTokenExchangeCode requests the login flow to include a code that can be used to retrieve the session token after the login flow has been completed. (optional) /// The URL to return the browser to after the flow was completed. (optional) + /// Index associated with the operation. /// ApiResponse of KratosRegistrationFlow - public Ory.Kratos.Client.Client.ApiResponse CreateNativeRegistrationFlowWithHttpInfo(bool? returnSessionTokenExchangeCode = default(bool?), string returnTo = default(string)) + public Ory.Kratos.Client.Client.ApiResponse CreateNativeRegistrationFlowWithHttpInfo(bool? returnSessionTokenExchangeCode = default(bool?), string? returnTo = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -2902,6 +3103,9 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNativeReco localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("", "return_to", returnTo)); } + localVarRequestOptions.Operation = "FrontendApi.CreateNativeRegistrationFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/self-service/registration/api", localVarRequestOptions, this.Configuration); @@ -2923,11 +3127,12 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNativeReco /// Thrown when fails to make API call /// EnableSessionTokenExchangeCode requests the login flow to include a code that can be used to retrieve the session token after the login flow has been completed. (optional) /// The URL to return the browser to after the flow was completed. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosRegistrationFlow - public async System.Threading.Tasks.Task CreateNativeRegistrationFlowAsync(bool? returnSessionTokenExchangeCode = default(bool?), string returnTo = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateNativeRegistrationFlowAsync(bool? returnSessionTokenExchangeCode = default(bool?), string? returnTo = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateNativeRegistrationFlowWithHttpInfoAsync(returnSessionTokenExchangeCode, returnTo, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateNativeRegistrationFlowWithHttpInfoAsync(returnSessionTokenExchangeCode, returnTo, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2937,9 +3142,10 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNativeReco /// Thrown when fails to make API call /// EnableSessionTokenExchangeCode requests the login flow to include a code that can be used to retrieve the session token after the login flow has been completed. (optional) /// The URL to return the browser to after the flow was completed. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosRegistrationFlow) - public async System.Threading.Tasks.Task> CreateNativeRegistrationFlowWithHttpInfoAsync(bool? returnSessionTokenExchangeCode = default(bool?), string returnTo = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateNativeRegistrationFlowWithHttpInfoAsync(bool? returnSessionTokenExchangeCode = default(bool?), string? returnTo = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -2973,6 +3179,9 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNativeReco localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("", "return_to", returnTo)); } + localVarRequestOptions.Operation = "FrontendApi.CreateNativeRegistrationFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/self-service/registration/api", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2994,8 +3203,9 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNativeReco /// /// Thrown when fails to make API call /// The Session Token of the Identity performing the settings flow. (optional) + /// Index associated with the operation. /// KratosSettingsFlow - public KratosSettingsFlow CreateNativeSettingsFlow(string xSessionToken = default(string)) + public KratosSettingsFlow CreateNativeSettingsFlow(string? xSessionToken = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = CreateNativeSettingsFlowWithHttpInfo(xSessionToken); return localVarResponse.Data; @@ -3006,8 +3216,9 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNativeReco /// /// Thrown when fails to make API call /// The Session Token of the Identity performing the settings flow. (optional) + /// Index associated with the operation. /// ApiResponse of KratosSettingsFlow - public Ory.Kratos.Client.Client.ApiResponse CreateNativeSettingsFlowWithHttpInfo(string xSessionToken = default(string)) + public Ory.Kratos.Client.Client.ApiResponse CreateNativeSettingsFlowWithHttpInfo(string? xSessionToken = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -3036,6 +3247,9 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNativeReco localVarRequestOptions.HeaderParameters.Add("X-Session-Token", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(xSessionToken)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.CreateNativeSettingsFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/self-service/settings/api", localVarRequestOptions, this.Configuration); @@ -3056,11 +3270,12 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNativeReco /// /// Thrown when fails to make API call /// The Session Token of the Identity performing the settings flow. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosSettingsFlow - public async System.Threading.Tasks.Task CreateNativeSettingsFlowAsync(string xSessionToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateNativeSettingsFlowAsync(string? xSessionToken = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateNativeSettingsFlowWithHttpInfoAsync(xSessionToken, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateNativeSettingsFlowWithHttpInfoAsync(xSessionToken, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -3069,9 +3284,10 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNativeReco /// /// Thrown when fails to make API call /// The Session Token of the Identity performing the settings flow. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosSettingsFlow) - public async System.Threading.Tasks.Task> CreateNativeSettingsFlowWithHttpInfoAsync(string xSessionToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateNativeSettingsFlowWithHttpInfoAsync(string? xSessionToken = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -3101,6 +3317,9 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNativeReco localVarRequestOptions.HeaderParameters.Add("X-Session-Token", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(xSessionToken)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.CreateNativeSettingsFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/self-service/settings/api", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -3121,8 +3340,9 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNativeReco /// Create Verification Flow for Native Apps This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call `/self-service/verification/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation). /// /// Thrown when fails to make API call + /// Index associated with the operation. /// KratosVerificationFlow - public KratosVerificationFlow CreateNativeVerificationFlow() + public KratosVerificationFlow CreateNativeVerificationFlow(int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = CreateNativeVerificationFlowWithHttpInfo(); return localVarResponse.Data; @@ -3132,8 +3352,9 @@ public KratosVerificationFlow CreateNativeVerificationFlow() /// Create Verification Flow for Native Apps This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call `/self-service/verification/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation). /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of KratosVerificationFlow - public Ory.Kratos.Client.Client.ApiResponse CreateNativeVerificationFlowWithHttpInfo() + public Ory.Kratos.Client.Client.ApiResponse CreateNativeVerificationFlowWithHttpInfo(int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -3158,6 +3379,9 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNative } + localVarRequestOptions.Operation = "FrontendApi.CreateNativeVerificationFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/self-service/verification/api", localVarRequestOptions, this.Configuration); @@ -3177,11 +3401,12 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNative /// Create Verification Flow for Native Apps This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call `/self-service/verification/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation). /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosVerificationFlow - public async System.Threading.Tasks.Task CreateNativeVerificationFlowAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateNativeVerificationFlowAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateNativeVerificationFlowWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateNativeVerificationFlowWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -3189,9 +3414,10 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNative /// Create Verification Flow for Native Apps This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call `/self-service/verification/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation). /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosVerificationFlow) - public async System.Threading.Tasks.Task> CreateNativeVerificationFlowWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateNativeVerificationFlowWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -3217,6 +3443,9 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNative } + localVarRequestOptions.Operation = "FrontendApi.CreateNativeVerificationFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/self-service/verification/api", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -3239,8 +3468,9 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNative /// Thrown when fails to make API call /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) + /// Index associated with the operation. /// KratosDeleteMySessionsCount - public KratosDeleteMySessionsCount DisableMyOtherSessions(string xSessionToken = default(string), string cookie = default(string)) + public KratosDeleteMySessionsCount DisableMyOtherSessions(string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = DisableMyOtherSessionsWithHttpInfo(xSessionToken, cookie); return localVarResponse.Data; @@ -3252,8 +3482,9 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNative /// Thrown when fails to make API call /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) + /// Index associated with the operation. /// ApiResponse of KratosDeleteMySessionsCount - public Ory.Kratos.Client.Client.ApiResponse DisableMyOtherSessionsWithHttpInfo(string xSessionToken = default(string), string cookie = default(string)) + public Ory.Kratos.Client.Client.ApiResponse DisableMyOtherSessionsWithHttpInfo(string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -3286,6 +3517,9 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNative localVarRequestOptions.HeaderParameters.Add("Cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.DisableMyOtherSessions"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Delete("/sessions", localVarRequestOptions, this.Configuration); @@ -3307,11 +3541,12 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNative /// Thrown when fails to make API call /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosDeleteMySessionsCount - public async System.Threading.Tasks.Task DisableMyOtherSessionsAsync(string xSessionToken = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DisableMyOtherSessionsAsync(string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await DisableMyOtherSessionsWithHttpInfoAsync(xSessionToken, cookie, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await DisableMyOtherSessionsWithHttpInfoAsync(xSessionToken, cookie, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -3321,9 +3556,10 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNative /// Thrown when fails to make API call /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosDeleteMySessionsCount) - public async System.Threading.Tasks.Task> DisableMyOtherSessionsWithHttpInfoAsync(string xSessionToken = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DisableMyOtherSessionsWithHttpInfoAsync(string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -3357,6 +3593,9 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNative localVarRequestOptions.HeaderParameters.Add("Cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.DisableMyOtherSessions"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/sessions", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -3380,8 +3619,9 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNative /// ID is the session's ID. /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) + /// Index associated with the operation. /// - public void DisableMySession(string id, string xSessionToken = default(string), string cookie = default(string)) + public void DisableMySession(string id, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0) { DisableMySessionWithHttpInfo(id, xSessionToken, cookie); } @@ -3393,8 +3633,9 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNative /// ID is the session's ID. /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Ory.Kratos.Client.Client.ApiResponse DisableMySessionWithHttpInfo(string id, string xSessionToken = default(string), string cookie = default(string)) + public Ory.Kratos.Client.Client.ApiResponse DisableMySessionWithHttpInfo(string id, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -3434,6 +3675,9 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNative localVarRequestOptions.HeaderParameters.Add("Cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.DisableMySession"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Delete("/sessions/{id}", localVarRequestOptions, this.Configuration); @@ -3456,11 +3700,12 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNative /// ID is the session's ID. /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DisableMySessionAsync(string id, string xSessionToken = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DisableMySessionAsync(string id, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DisableMySessionWithHttpInfoAsync(id, xSessionToken, cookie, cancellationToken).ConfigureAwait(false); + await DisableMySessionWithHttpInfoAsync(id, xSessionToken, cookie, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -3470,9 +3715,10 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNative /// ID is the session's ID. /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DisableMySessionWithHttpInfoAsync(string id, string xSessionToken = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DisableMySessionWithHttpInfoAsync(string id, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -3513,6 +3759,9 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNative localVarRequestOptions.HeaderParameters.Add("Cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.DisableMySession"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/sessions/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -3535,8 +3784,9 @@ public Ory.Kratos.Client.Client.ApiResponse CreateNative /// Thrown when fails to make API call /// The part of the code return when initializing the flow. /// The part of the code returned by the return_to URL. + /// Index associated with the operation. /// KratosSuccessfulNativeLogin - public KratosSuccessfulNativeLogin ExchangeSessionToken(string initCode, string returnToCode) + public KratosSuccessfulNativeLogin ExchangeSessionToken(string initCode, string returnToCode, int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = ExchangeSessionTokenWithHttpInfo(initCode, returnToCode); return localVarResponse.Data; @@ -3548,8 +3798,9 @@ public KratosSuccessfulNativeLogin ExchangeSessionToken(string initCode, string /// Thrown when fails to make API call /// The part of the code return when initializing the flow. /// The part of the code returned by the return_to URL. + /// Index associated with the operation. /// ApiResponse of KratosSuccessfulNativeLogin - public Ory.Kratos.Client.Client.ApiResponse ExchangeSessionTokenWithHttpInfo(string initCode, string returnToCode) + public Ory.Kratos.Client.Client.ApiResponse ExchangeSessionTokenWithHttpInfo(string initCode, string returnToCode, int operationIndex = 0) { // verify the required parameter 'initCode' is set if (initCode == null) @@ -3588,6 +3839,9 @@ public Ory.Kratos.Client.Client.ApiResponse Exchang localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("", "init_code", initCode)); localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("", "return_to_code", returnToCode)); + localVarRequestOptions.Operation = "FrontendApi.ExchangeSessionToken"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/sessions/token-exchange", localVarRequestOptions, this.Configuration); @@ -3609,11 +3863,12 @@ public Ory.Kratos.Client.Client.ApiResponse Exchang /// Thrown when fails to make API call /// The part of the code return when initializing the flow. /// The part of the code returned by the return_to URL. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosSuccessfulNativeLogin - public async System.Threading.Tasks.Task ExchangeSessionTokenAsync(string initCode, string returnToCode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task ExchangeSessionTokenAsync(string initCode, string returnToCode, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await ExchangeSessionTokenWithHttpInfoAsync(initCode, returnToCode, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await ExchangeSessionTokenWithHttpInfoAsync(initCode, returnToCode, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -3623,9 +3878,10 @@ public Ory.Kratos.Client.Client.ApiResponse Exchang /// Thrown when fails to make API call /// The part of the code return when initializing the flow. /// The part of the code returned by the return_to URL. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosSuccessfulNativeLogin) - public async System.Threading.Tasks.Task> ExchangeSessionTokenWithHttpInfoAsync(string initCode, string returnToCode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ExchangeSessionTokenWithHttpInfoAsync(string initCode, string returnToCode, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'initCode' is set if (initCode == null) @@ -3665,6 +3921,9 @@ public Ory.Kratos.Client.Client.ApiResponse Exchang localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("", "init_code", initCode)); localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("", "return_to_code", returnToCode)); + localVarRequestOptions.Operation = "FrontendApi.ExchangeSessionToken"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/sessions/token-exchange", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -3686,8 +3945,9 @@ public Ory.Kratos.Client.Client.ApiResponse Exchang /// /// Thrown when fails to make API call /// Error is the error's ID + /// Index associated with the operation. /// KratosFlowError - public KratosFlowError GetFlowError(string id) + public KratosFlowError GetFlowError(string id, int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = GetFlowErrorWithHttpInfo(id); return localVarResponse.Data; @@ -3698,8 +3958,9 @@ public KratosFlowError GetFlowError(string id) /// /// Thrown when fails to make API call /// Error is the error's ID + /// Index associated with the operation. /// ApiResponse of KratosFlowError - public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHttpInfo(string id) + public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHttpInfo(string id, int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -3731,6 +3992,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("", "id", id)); + localVarRequestOptions.Operation = "FrontendApi.GetFlowError"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/self-service/errors", localVarRequestOptions, this.Configuration); @@ -3751,11 +4015,12 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt /// /// Thrown when fails to make API call /// Error is the error's ID + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosFlowError - public async System.Threading.Tasks.Task GetFlowErrorAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetFlowErrorAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await GetFlowErrorWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await GetFlowErrorWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -3764,9 +4029,10 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt /// /// Thrown when fails to make API call /// Error is the error's ID + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosFlowError) - public async System.Threading.Tasks.Task> GetFlowErrorWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetFlowErrorWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -3799,6 +4065,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("", "id", id)); + localVarRequestOptions.Operation = "FrontendApi.GetFlowError"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/self-service/errors", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -3821,8 +4090,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt /// Thrown when fails to make API call /// The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// KratosLoginFlow - public KratosLoginFlow GetLoginFlow(string id, string cookie = default(string)) + public KratosLoginFlow GetLoginFlow(string id, string? cookie = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = GetLoginFlowWithHttpInfo(id, cookie); return localVarResponse.Data; @@ -3834,8 +4104,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt /// Thrown when fails to make API call /// The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// ApiResponse of KratosLoginFlow - public Ory.Kratos.Client.Client.ApiResponse GetLoginFlowWithHttpInfo(string id, string cookie = default(string)) + public Ory.Kratos.Client.Client.ApiResponse GetLoginFlowWithHttpInfo(string id, string? cookie = default(string?), int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -3871,6 +4142,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt localVarRequestOptions.HeaderParameters.Add("Cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.GetLoginFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/self-service/login/flows", localVarRequestOptions, this.Configuration); @@ -3892,11 +4166,12 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt /// Thrown when fails to make API call /// The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosLoginFlow - public async System.Threading.Tasks.Task GetLoginFlowAsync(string id, string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetLoginFlowAsync(string id, string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await GetLoginFlowWithHttpInfoAsync(id, cookie, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await GetLoginFlowWithHttpInfoAsync(id, cookie, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -3906,9 +4181,10 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt /// Thrown when fails to make API call /// The Login Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/login?flow=abcde`). /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosLoginFlow) - public async System.Threading.Tasks.Task> GetLoginFlowWithHttpInfoAsync(string id, string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetLoginFlowWithHttpInfoAsync(string id, string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -3945,6 +4221,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt localVarRequestOptions.HeaderParameters.Add("Cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.GetLoginFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/self-service/login/flows", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -3967,8 +4246,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt /// Thrown when fails to make API call /// The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// KratosRecoveryFlow - public KratosRecoveryFlow GetRecoveryFlow(string id, string cookie = default(string)) + public KratosRecoveryFlow GetRecoveryFlow(string id, string? cookie = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = GetRecoveryFlowWithHttpInfo(id, cookie); return localVarResponse.Data; @@ -3980,8 +4260,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt /// Thrown when fails to make API call /// The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// ApiResponse of KratosRecoveryFlow - public Ory.Kratos.Client.Client.ApiResponse GetRecoveryFlowWithHttpInfo(string id, string cookie = default(string)) + public Ory.Kratos.Client.Client.ApiResponse GetRecoveryFlowWithHttpInfo(string id, string? cookie = default(string?), int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -4017,6 +4298,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt localVarRequestOptions.HeaderParameters.Add("Cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.GetRecoveryFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/self-service/recovery/flows", localVarRequestOptions, this.Configuration); @@ -4038,11 +4322,12 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt /// Thrown when fails to make API call /// The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosRecoveryFlow - public async System.Threading.Tasks.Task GetRecoveryFlowAsync(string id, string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetRecoveryFlowAsync(string id, string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await GetRecoveryFlowWithHttpInfoAsync(id, cookie, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await GetRecoveryFlowWithHttpInfoAsync(id, cookie, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -4052,9 +4337,10 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt /// Thrown when fails to make API call /// The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/recovery?flow=abcde`). /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosRecoveryFlow) - public async System.Threading.Tasks.Task> GetRecoveryFlowWithHttpInfoAsync(string id, string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetRecoveryFlowWithHttpInfoAsync(string id, string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -4091,6 +4377,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt localVarRequestOptions.HeaderParameters.Add("Cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.GetRecoveryFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/self-service/recovery/flows", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -4113,8 +4402,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt /// Thrown when fails to make API call /// The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// KratosRegistrationFlow - public KratosRegistrationFlow GetRegistrationFlow(string id, string cookie = default(string)) + public KratosRegistrationFlow GetRegistrationFlow(string id, string? cookie = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = GetRegistrationFlowWithHttpInfo(id, cookie); return localVarResponse.Data; @@ -4126,8 +4416,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt /// Thrown when fails to make API call /// The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// ApiResponse of KratosRegistrationFlow - public Ory.Kratos.Client.Client.ApiResponse GetRegistrationFlowWithHttpInfo(string id, string cookie = default(string)) + public Ory.Kratos.Client.Client.ApiResponse GetRegistrationFlowWithHttpInfo(string id, string? cookie = default(string?), int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -4163,6 +4454,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt localVarRequestOptions.HeaderParameters.Add("Cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.GetRegistrationFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/self-service/registration/flows", localVarRequestOptions, this.Configuration); @@ -4184,11 +4478,12 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt /// Thrown when fails to make API call /// The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosRegistrationFlow - public async System.Threading.Tasks.Task GetRegistrationFlowAsync(string id, string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetRegistrationFlowAsync(string id, string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await GetRegistrationFlowWithHttpInfoAsync(id, cookie, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await GetRegistrationFlowWithHttpInfoAsync(id, cookie, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -4198,9 +4493,10 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt /// Thrown when fails to make API call /// The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosRegistrationFlow) - public async System.Threading.Tasks.Task> GetRegistrationFlowWithHttpInfoAsync(string id, string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetRegistrationFlowWithHttpInfoAsync(string id, string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -4237,6 +4533,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt localVarRequestOptions.HeaderParameters.Add("Cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.GetRegistrationFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/self-service/registration/flows", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -4260,8 +4559,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt /// ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). /// The Session Token When using the SDK in an app without a browser, please include the session token here. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// KratosSettingsFlow - public KratosSettingsFlow GetSettingsFlow(string id, string xSessionToken = default(string), string cookie = default(string)) + public KratosSettingsFlow GetSettingsFlow(string id, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = GetSettingsFlowWithHttpInfo(id, xSessionToken, cookie); return localVarResponse.Data; @@ -4274,8 +4574,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt /// ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). /// The Session Token When using the SDK in an app without a browser, please include the session token here. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// ApiResponse of KratosSettingsFlow - public Ory.Kratos.Client.Client.ApiResponse GetSettingsFlowWithHttpInfo(string id, string xSessionToken = default(string), string cookie = default(string)) + public Ory.Kratos.Client.Client.ApiResponse GetSettingsFlowWithHttpInfo(string id, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -4315,6 +4616,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt localVarRequestOptions.HeaderParameters.Add("Cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.GetSettingsFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/self-service/settings/flows", localVarRequestOptions, this.Configuration); @@ -4337,11 +4641,12 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt /// ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). /// The Session Token When using the SDK in an app without a browser, please include the session token here. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosSettingsFlow - public async System.Threading.Tasks.Task GetSettingsFlowAsync(string id, string xSessionToken = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetSettingsFlowAsync(string id, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await GetSettingsFlowWithHttpInfoAsync(id, xSessionToken, cookie, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await GetSettingsFlowWithHttpInfoAsync(id, xSessionToken, cookie, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -4352,9 +4657,10 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt /// ID is the Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/settings?flow=abcde`). /// The Session Token When using the SDK in an app without a browser, please include the session token here. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosSettingsFlow) - public async System.Threading.Tasks.Task> GetSettingsFlowWithHttpInfoAsync(string id, string xSessionToken = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetSettingsFlowWithHttpInfoAsync(string id, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -4395,6 +4701,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt localVarRequestOptions.HeaderParameters.Add("Cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.GetSettingsFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/self-service/settings/flows", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -4417,8 +4726,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt /// Thrown when fails to make API call /// The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). /// HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. (optional) + /// Index associated with the operation. /// KratosVerificationFlow - public KratosVerificationFlow GetVerificationFlow(string id, string cookie = default(string)) + public KratosVerificationFlow GetVerificationFlow(string id, string? cookie = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = GetVerificationFlowWithHttpInfo(id, cookie); return localVarResponse.Data; @@ -4430,8 +4740,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt /// Thrown when fails to make API call /// The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). /// HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. (optional) + /// Index associated with the operation. /// ApiResponse of KratosVerificationFlow - public Ory.Kratos.Client.Client.ApiResponse GetVerificationFlowWithHttpInfo(string id, string cookie = default(string)) + public Ory.Kratos.Client.Client.ApiResponse GetVerificationFlowWithHttpInfo(string id, string? cookie = default(string?), int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -4467,6 +4778,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt localVarRequestOptions.HeaderParameters.Add("cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.GetVerificationFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/self-service/verification/flows", localVarRequestOptions, this.Configuration); @@ -4488,11 +4802,12 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt /// Thrown when fails to make API call /// The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). /// HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosVerificationFlow - public async System.Threading.Tasks.Task GetVerificationFlowAsync(string id, string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetVerificationFlowAsync(string id, string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await GetVerificationFlowWithHttpInfoAsync(id, cookie, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await GetVerificationFlowWithHttpInfoAsync(id, cookie, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -4502,9 +4817,10 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt /// Thrown when fails to make API call /// The Flow ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/verification?flow=abcde`). /// HTTP Cookies When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosVerificationFlow) - public async System.Threading.Tasks.Task> GetVerificationFlowWithHttpInfoAsync(string id, string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetVerificationFlowWithHttpInfoAsync(string id, string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -4541,6 +4857,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt localVarRequestOptions.HeaderParameters.Add("cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.GetVerificationFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/self-service/verification/flows", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -4561,8 +4880,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetFlowErrorWithHtt /// Get WebAuthn JavaScript This endpoint provides JavaScript which is needed in order to perform WebAuthn login and registration. If you are building a JavaScript Browser App (e.g. in ReactJS or AngularJS) you will need to load this file: ```html <script src=\"https://public-kratos.example.org/.well-known/ory/webauthn.js\" type=\"script\" async /> ``` More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration). /// /// Thrown when fails to make API call + /// Index associated with the operation. /// string - public string GetWebAuthnJavaScript() + public string GetWebAuthnJavaScript(int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = GetWebAuthnJavaScriptWithHttpInfo(); return localVarResponse.Data; @@ -4572,8 +4892,9 @@ public string GetWebAuthnJavaScript() /// Get WebAuthn JavaScript This endpoint provides JavaScript which is needed in order to perform WebAuthn login and registration. If you are building a JavaScript Browser App (e.g. in ReactJS or AngularJS) you will need to load this file: ```html <script src=\"https://public-kratos.example.org/.well-known/ory/webauthn.js\" type=\"script\" async /> ``` More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration). /// /// Thrown when fails to make API call + /// Index associated with the operation. /// ApiResponse of string - public Ory.Kratos.Client.Client.ApiResponse GetWebAuthnJavaScriptWithHttpInfo() + public Ory.Kratos.Client.Client.ApiResponse GetWebAuthnJavaScriptWithHttpInfo(int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -4598,6 +4919,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetWebAuthnJavaScriptWithHtt } + localVarRequestOptions.Operation = "FrontendApi.GetWebAuthnJavaScript"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/.well-known/ory/webauthn.js", localVarRequestOptions, this.Configuration); @@ -4617,11 +4941,12 @@ public Ory.Kratos.Client.Client.ApiResponse GetWebAuthnJavaScriptWithHtt /// Get WebAuthn JavaScript This endpoint provides JavaScript which is needed in order to perform WebAuthn login and registration. If you are building a JavaScript Browser App (e.g. in ReactJS or AngularJS) you will need to load this file: ```html <script src=\"https://public-kratos.example.org/.well-known/ory/webauthn.js\" type=\"script\" async /> ``` More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration). /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task GetWebAuthnJavaScriptAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetWebAuthnJavaScriptAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await GetWebAuthnJavaScriptWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await GetWebAuthnJavaScriptWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -4629,9 +4954,10 @@ public Ory.Kratos.Client.Client.ApiResponse GetWebAuthnJavaScriptWithHtt /// Get WebAuthn JavaScript This endpoint provides JavaScript which is needed in order to perform WebAuthn login and registration. If you are building a JavaScript Browser App (e.g. in ReactJS or AngularJS) you will need to load this file: ```html <script src=\"https://public-kratos.example.org/.well-known/ory/webauthn.js\" type=\"script\" async /> ``` More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration). /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> GetWebAuthnJavaScriptWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetWebAuthnJavaScriptWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -4657,6 +4983,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetWebAuthnJavaScriptWithHtt } + localVarRequestOptions.Operation = "FrontendApi.GetWebAuthnJavaScript"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/.well-known/ory/webauthn.js", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -4683,8 +5012,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetWebAuthnJavaScriptWithHtt /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) + /// Index associated with the operation. /// List<KratosSession> - public List ListMySessions(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), string xSessionToken = default(string), string cookie = default(string)) + public List ListMySessions(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse> localVarResponse = ListMySessionsWithHttpInfo(perPage, page, pageSize, pageToken, xSessionToken, cookie); return localVarResponse.Data; @@ -4700,8 +5030,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetWebAuthnJavaScriptWithHtt /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) + /// Index associated with the operation. /// ApiResponse of List<KratosSession> - public Ory.Kratos.Client.Client.ApiResponse> ListMySessionsWithHttpInfo(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), string xSessionToken = default(string), string cookie = default(string)) + public Ory.Kratos.Client.Client.ApiResponse> ListMySessionsWithHttpInfo(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -4750,6 +5081,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetWebAuthnJavaScriptWithHtt localVarRequestOptions.HeaderParameters.Add("Cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.ListMySessions"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get>("/sessions", localVarRequestOptions, this.Configuration); @@ -4775,11 +5109,12 @@ public Ory.Kratos.Client.Client.ApiResponse GetWebAuthnJavaScriptWithHtt /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<KratosSession> - public async System.Threading.Tasks.Task> ListMySessionsAsync(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), string xSessionToken = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ListMySessionsAsync(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse> localVarResponse = await ListMySessionsWithHttpInfoAsync(perPage, page, pageSize, pageToken, xSessionToken, cookie, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse> localVarResponse = await ListMySessionsWithHttpInfoAsync(perPage, page, pageSize, pageToken, xSessionToken, cookie, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -4793,9 +5128,10 @@ public Ory.Kratos.Client.Client.ApiResponse GetWebAuthnJavaScriptWithHtt /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<KratosSession>) - public async System.Threading.Tasks.Task>> ListMySessionsWithHttpInfoAsync(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), string xSessionToken = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> ListMySessionsWithHttpInfoAsync(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -4845,6 +5181,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetWebAuthnJavaScriptWithHtt localVarRequestOptions.HeaderParameters.Add("Cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.ListMySessions"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync>("/sessions", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -4866,8 +5205,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetWebAuthnJavaScriptWithHtt /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// - public void PerformNativeLogout(KratosPerformNativeLogoutBody kratosPerformNativeLogoutBody) + public void PerformNativeLogout(KratosPerformNativeLogoutBody kratosPerformNativeLogoutBody, int operationIndex = 0) { PerformNativeLogoutWithHttpInfo(kratosPerformNativeLogoutBody); } @@ -4877,8 +5217,9 @@ public void PerformNativeLogout(KratosPerformNativeLogoutBody kratosPerformNativ /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// ApiResponse of Object(void) - public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpInfo(KratosPerformNativeLogoutBody kratosPerformNativeLogoutBody) + public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpInfo(KratosPerformNativeLogoutBody kratosPerformNativeLogoutBody, int operationIndex = 0) { // verify the required parameter 'kratosPerformNativeLogoutBody' is set if (kratosPerformNativeLogoutBody == null) @@ -4911,6 +5252,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI localVarRequestOptions.Data = kratosPerformNativeLogoutBody; + localVarRequestOptions.Operation = "FrontendApi.PerformNativeLogout"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Delete("/self-service/logout/api", localVarRequestOptions, this.Configuration); @@ -4931,11 +5275,12 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task PerformNativeLogoutAsync(KratosPerformNativeLogoutBody kratosPerformNativeLogoutBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task PerformNativeLogoutAsync(KratosPerformNativeLogoutBody kratosPerformNativeLogoutBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await PerformNativeLogoutWithHttpInfoAsync(kratosPerformNativeLogoutBody, cancellationToken).ConfigureAwait(false); + await PerformNativeLogoutWithHttpInfoAsync(kratosPerformNativeLogoutBody, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -4943,9 +5288,10 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// /// Thrown when fails to make API call /// + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> PerformNativeLogoutWithHttpInfoAsync(KratosPerformNativeLogoutBody kratosPerformNativeLogoutBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> PerformNativeLogoutWithHttpInfoAsync(KratosPerformNativeLogoutBody kratosPerformNativeLogoutBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'kratosPerformNativeLogoutBody' is set if (kratosPerformNativeLogoutBody == null) @@ -4979,6 +5325,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI localVarRequestOptions.Data = kratosPerformNativeLogoutBody; + localVarRequestOptions.Operation = "FrontendApi.PerformNativeLogout"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.DeleteAsync("/self-service/logout/api", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -5002,8 +5351,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) /// Returns the session additionally as a token (such as a JWT) The value of this parameter has to be a valid, configured Ory Session token template. For more information head over to [the documentation](http://ory.sh/docs/identities/session-to-jwt-cors). (optional) + /// Index associated with the operation. /// KratosSession - public KratosSession ToSession(string xSessionToken = default(string), string cookie = default(string), string tokenizeAs = default(string)) + public KratosSession ToSession(string? xSessionToken = default(string?), string? cookie = default(string?), string? tokenizeAs = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = ToSessionWithHttpInfo(xSessionToken, cookie, tokenizeAs); return localVarResponse.Data; @@ -5016,8 +5366,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) /// Returns the session additionally as a token (such as a JWT) The value of this parameter has to be a valid, configured Ory Session token template. For more information head over to [the documentation](http://ory.sh/docs/identities/session-to-jwt-cors). (optional) + /// Index associated with the operation. /// ApiResponse of KratosSession - public Ory.Kratos.Client.Client.ApiResponse ToSessionWithHttpInfo(string xSessionToken = default(string), string cookie = default(string), string tokenizeAs = default(string)) + public Ory.Kratos.Client.Client.ApiResponse ToSessionWithHttpInfo(string? xSessionToken = default(string?), string? cookie = default(string?), string? tokenizeAs = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -5054,6 +5405,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI localVarRequestOptions.HeaderParameters.Add("Cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.ToSession"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/sessions/whoami", localVarRequestOptions, this.Configuration); @@ -5076,11 +5430,12 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) /// Returns the session additionally as a token (such as a JWT) The value of this parameter has to be a valid, configured Ory Session token template. For more information head over to [the documentation](http://ory.sh/docs/identities/session-to-jwt-cors). (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosSession - public async System.Threading.Tasks.Task ToSessionAsync(string xSessionToken = default(string), string cookie = default(string), string tokenizeAs = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task ToSessionAsync(string? xSessionToken = default(string?), string? cookie = default(string?), string? tokenizeAs = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await ToSessionWithHttpInfoAsync(xSessionToken, cookie, tokenizeAs, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await ToSessionWithHttpInfoAsync(xSessionToken, cookie, tokenizeAs, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -5091,9 +5446,10 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`. (optional) /// 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) /// Returns the session additionally as a token (such as a JWT) The value of this parameter has to be a valid, configured Ory Session token template. For more information head over to [the documentation](http://ory.sh/docs/identities/session-to-jwt-cors). (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosSession) - public async System.Threading.Tasks.Task> ToSessionWithHttpInfoAsync(string xSessionToken = default(string), string cookie = default(string), string tokenizeAs = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ToSessionWithHttpInfoAsync(string? xSessionToken = default(string?), string? cookie = default(string?), string? tokenizeAs = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -5131,6 +5487,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI localVarRequestOptions.HeaderParameters.Add("Cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.ToSession"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/sessions/whoami", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -5155,8 +5514,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// /// The Session Token of the Identity performing the settings flow. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// KratosSuccessfulNativeLogin - public KratosSuccessfulNativeLogin UpdateLoginFlow(string flow, KratosUpdateLoginFlowBody kratosUpdateLoginFlowBody, string xSessionToken = default(string), string cookie = default(string)) + public KratosSuccessfulNativeLogin UpdateLoginFlow(string flow, KratosUpdateLoginFlowBody kratosUpdateLoginFlowBody, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = UpdateLoginFlowWithHttpInfo(flow, kratosUpdateLoginFlowBody, xSessionToken, cookie); return localVarResponse.Data; @@ -5170,8 +5530,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// /// The Session Token of the Identity performing the settings flow. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// ApiResponse of KratosSuccessfulNativeLogin - public Ory.Kratos.Client.Client.ApiResponse UpdateLoginFlowWithHttpInfo(string flow, KratosUpdateLoginFlowBody kratosUpdateLoginFlowBody, string xSessionToken = default(string), string cookie = default(string)) + public Ory.Kratos.Client.Client.ApiResponse UpdateLoginFlowWithHttpInfo(string flow, KratosUpdateLoginFlowBody kratosUpdateLoginFlowBody, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0) { // verify the required parameter 'flow' is set if (flow == null) @@ -5220,6 +5581,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI } localVarRequestOptions.Data = kratosUpdateLoginFlowBody; + localVarRequestOptions.Operation = "FrontendApi.UpdateLoginFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/self-service/login", localVarRequestOptions, this.Configuration); @@ -5243,11 +5607,12 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// /// The Session Token of the Identity performing the settings flow. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosSuccessfulNativeLogin - public async System.Threading.Tasks.Task UpdateLoginFlowAsync(string flow, KratosUpdateLoginFlowBody kratosUpdateLoginFlowBody, string xSessionToken = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdateLoginFlowAsync(string flow, KratosUpdateLoginFlowBody kratosUpdateLoginFlowBody, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await UpdateLoginFlowWithHttpInfoAsync(flow, kratosUpdateLoginFlowBody, xSessionToken, cookie, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await UpdateLoginFlowWithHttpInfoAsync(flow, kratosUpdateLoginFlowBody, xSessionToken, cookie, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -5259,9 +5624,10 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// /// The Session Token of the Identity performing the settings flow. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosSuccessfulNativeLogin) - public async System.Threading.Tasks.Task> UpdateLoginFlowWithHttpInfoAsync(string flow, KratosUpdateLoginFlowBody kratosUpdateLoginFlowBody, string xSessionToken = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdateLoginFlowWithHttpInfoAsync(string flow, KratosUpdateLoginFlowBody kratosUpdateLoginFlowBody, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'flow' is set if (flow == null) @@ -5311,6 +5677,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI } localVarRequestOptions.Data = kratosUpdateLoginFlowBody; + localVarRequestOptions.Operation = "FrontendApi.UpdateLoginFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/self-service/login", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -5334,8 +5703,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// A Valid Logout Token If you do not have a logout token because you only have a session cookie, call `/self-service/logout/browser` to generate a URL for this endpoint. (optional) /// The URL to return to after the logout was completed. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// - public void UpdateLogoutFlow(string token = default(string), string returnTo = default(string), string cookie = default(string)) + public void UpdateLogoutFlow(string? token = default(string?), string? returnTo = default(string?), string? cookie = default(string?), int operationIndex = 0) { UpdateLogoutFlowWithHttpInfo(token, returnTo, cookie); } @@ -5347,8 +5717,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// A Valid Logout Token If you do not have a logout token because you only have a session cookie, call `/self-service/logout/browser` to generate a URL for this endpoint. (optional) /// The URL to return to after the logout was completed. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// ApiResponse of Object(void) - public Ory.Kratos.Client.Client.ApiResponse UpdateLogoutFlowWithHttpInfo(string token = default(string), string returnTo = default(string), string cookie = default(string)) + public Ory.Kratos.Client.Client.ApiResponse UpdateLogoutFlowWithHttpInfo(string? token = default(string?), string? returnTo = default(string?), string? cookie = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -5385,6 +5756,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI localVarRequestOptions.HeaderParameters.Add("Cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.UpdateLogoutFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/self-service/logout", localVarRequestOptions, this.Configuration); @@ -5407,11 +5781,12 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// A Valid Logout Token If you do not have a logout token because you only have a session cookie, call `/self-service/logout/browser` to generate a URL for this endpoint. (optional) /// The URL to return to after the logout was completed. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdateLogoutFlowAsync(string token = default(string), string returnTo = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdateLogoutFlowAsync(string? token = default(string?), string? returnTo = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdateLogoutFlowWithHttpInfoAsync(token, returnTo, cookie, cancellationToken).ConfigureAwait(false); + await UpdateLogoutFlowWithHttpInfoAsync(token, returnTo, cookie, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -5421,9 +5796,10 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// A Valid Logout Token If you do not have a logout token because you only have a session cookie, call `/self-service/logout/browser` to generate a URL for this endpoint. (optional) /// The URL to return to after the logout was completed. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdateLogoutFlowWithHttpInfoAsync(string token = default(string), string returnTo = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdateLogoutFlowWithHttpInfoAsync(string? token = default(string?), string? returnTo = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -5461,6 +5837,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI localVarRequestOptions.HeaderParameters.Add("Cookie", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(cookie)); // header parameter } + localVarRequestOptions.Operation = "FrontendApi.UpdateLogoutFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/self-service/logout", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -5485,8 +5864,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// /// Recovery Token The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// KratosRecoveryFlow - public KratosRecoveryFlow UpdateRecoveryFlow(string flow, KratosUpdateRecoveryFlowBody kratosUpdateRecoveryFlowBody, string token = default(string), string cookie = default(string)) + public KratosRecoveryFlow UpdateRecoveryFlow(string flow, KratosUpdateRecoveryFlowBody kratosUpdateRecoveryFlowBody, string? token = default(string?), string? cookie = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = UpdateRecoveryFlowWithHttpInfo(flow, kratosUpdateRecoveryFlowBody, token, cookie); return localVarResponse.Data; @@ -5500,8 +5880,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// /// Recovery Token The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// ApiResponse of KratosRecoveryFlow - public Ory.Kratos.Client.Client.ApiResponse UpdateRecoveryFlowWithHttpInfo(string flow, KratosUpdateRecoveryFlowBody kratosUpdateRecoveryFlowBody, string token = default(string), string cookie = default(string)) + public Ory.Kratos.Client.Client.ApiResponse UpdateRecoveryFlowWithHttpInfo(string flow, KratosUpdateRecoveryFlowBody kratosUpdateRecoveryFlowBody, string? token = default(string?), string? cookie = default(string?), int operationIndex = 0) { // verify the required parameter 'flow' is set if (flow == null) @@ -5550,6 +5931,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI } localVarRequestOptions.Data = kratosUpdateRecoveryFlowBody; + localVarRequestOptions.Operation = "FrontendApi.UpdateRecoveryFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/self-service/recovery", localVarRequestOptions, this.Configuration); @@ -5573,11 +5957,12 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// /// Recovery Token The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosRecoveryFlow - public async System.Threading.Tasks.Task UpdateRecoveryFlowAsync(string flow, KratosUpdateRecoveryFlowBody kratosUpdateRecoveryFlowBody, string token = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdateRecoveryFlowAsync(string flow, KratosUpdateRecoveryFlowBody kratosUpdateRecoveryFlowBody, string? token = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await UpdateRecoveryFlowWithHttpInfoAsync(flow, kratosUpdateRecoveryFlowBody, token, cookie, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await UpdateRecoveryFlowWithHttpInfoAsync(flow, kratosUpdateRecoveryFlowBody, token, cookie, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -5589,9 +5974,10 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// /// Recovery Token The recovery token which completes the recovery request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosRecoveryFlow) - public async System.Threading.Tasks.Task> UpdateRecoveryFlowWithHttpInfoAsync(string flow, KratosUpdateRecoveryFlowBody kratosUpdateRecoveryFlowBody, string token = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdateRecoveryFlowWithHttpInfoAsync(string flow, KratosUpdateRecoveryFlowBody kratosUpdateRecoveryFlowBody, string? token = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'flow' is set if (flow == null) @@ -5641,6 +6027,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI } localVarRequestOptions.Data = kratosUpdateRecoveryFlowBody; + localVarRequestOptions.Operation = "FrontendApi.UpdateRecoveryFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/self-service/recovery", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -5664,8 +6053,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). /// /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// KratosSuccessfulNativeRegistration - public KratosSuccessfulNativeRegistration UpdateRegistrationFlow(string flow, KratosUpdateRegistrationFlowBody kratosUpdateRegistrationFlowBody, string cookie = default(string)) + public KratosSuccessfulNativeRegistration UpdateRegistrationFlow(string flow, KratosUpdateRegistrationFlowBody kratosUpdateRegistrationFlowBody, string? cookie = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = UpdateRegistrationFlowWithHttpInfo(flow, kratosUpdateRegistrationFlowBody, cookie); return localVarResponse.Data; @@ -5678,8 +6068,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). /// /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// ApiResponse of KratosSuccessfulNativeRegistration - public Ory.Kratos.Client.Client.ApiResponse UpdateRegistrationFlowWithHttpInfo(string flow, KratosUpdateRegistrationFlowBody kratosUpdateRegistrationFlowBody, string cookie = default(string)) + public Ory.Kratos.Client.Client.ApiResponse UpdateRegistrationFlowWithHttpInfo(string flow, KratosUpdateRegistrationFlowBody kratosUpdateRegistrationFlowBody, string? cookie = default(string?), int operationIndex = 0) { // verify the required parameter 'flow' is set if (flow == null) @@ -5724,6 +6115,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI } localVarRequestOptions.Data = kratosUpdateRegistrationFlowBody; + localVarRequestOptions.Operation = "FrontendApi.UpdateRegistrationFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/self-service/registration", localVarRequestOptions, this.Configuration); @@ -5746,11 +6140,12 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). /// /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosSuccessfulNativeRegistration - public async System.Threading.Tasks.Task UpdateRegistrationFlowAsync(string flow, KratosUpdateRegistrationFlowBody kratosUpdateRegistrationFlowBody, string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdateRegistrationFlowAsync(string flow, KratosUpdateRegistrationFlowBody kratosUpdateRegistrationFlowBody, string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await UpdateRegistrationFlowWithHttpInfoAsync(flow, kratosUpdateRegistrationFlowBody, cookie, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await UpdateRegistrationFlowWithHttpInfoAsync(flow, kratosUpdateRegistrationFlowBody, cookie, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -5761,9 +6156,10 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// The Registration Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application (e.g. `/registration?flow=abcde`). /// /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosSuccessfulNativeRegistration) - public async System.Threading.Tasks.Task> UpdateRegistrationFlowWithHttpInfoAsync(string flow, KratosUpdateRegistrationFlowBody kratosUpdateRegistrationFlowBody, string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdateRegistrationFlowWithHttpInfoAsync(string flow, KratosUpdateRegistrationFlowBody kratosUpdateRegistrationFlowBody, string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'flow' is set if (flow == null) @@ -5809,6 +6205,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI } localVarRequestOptions.Data = kratosUpdateRegistrationFlowBody; + localVarRequestOptions.Operation = "FrontendApi.UpdateRegistrationFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/self-service/registration", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -5833,8 +6232,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// /// The Session Token of the Identity performing the settings flow. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// KratosSettingsFlow - public KratosSettingsFlow UpdateSettingsFlow(string flow, KratosUpdateSettingsFlowBody kratosUpdateSettingsFlowBody, string xSessionToken = default(string), string cookie = default(string)) + public KratosSettingsFlow UpdateSettingsFlow(string flow, KratosUpdateSettingsFlowBody kratosUpdateSettingsFlowBody, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = UpdateSettingsFlowWithHttpInfo(flow, kratosUpdateSettingsFlowBody, xSessionToken, cookie); return localVarResponse.Data; @@ -5848,8 +6248,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// /// The Session Token of the Identity performing the settings flow. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// ApiResponse of KratosSettingsFlow - public Ory.Kratos.Client.Client.ApiResponse UpdateSettingsFlowWithHttpInfo(string flow, KratosUpdateSettingsFlowBody kratosUpdateSettingsFlowBody, string xSessionToken = default(string), string cookie = default(string)) + public Ory.Kratos.Client.Client.ApiResponse UpdateSettingsFlowWithHttpInfo(string flow, KratosUpdateSettingsFlowBody kratosUpdateSettingsFlowBody, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0) { // verify the required parameter 'flow' is set if (flow == null) @@ -5898,6 +6299,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI } localVarRequestOptions.Data = kratosUpdateSettingsFlowBody; + localVarRequestOptions.Operation = "FrontendApi.UpdateSettingsFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/self-service/settings", localVarRequestOptions, this.Configuration); @@ -5921,11 +6325,12 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// /// The Session Token of the Identity performing the settings flow. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosSettingsFlow - public async System.Threading.Tasks.Task UpdateSettingsFlowAsync(string flow, KratosUpdateSettingsFlowBody kratosUpdateSettingsFlowBody, string xSessionToken = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdateSettingsFlowAsync(string flow, KratosUpdateSettingsFlowBody kratosUpdateSettingsFlowBody, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await UpdateSettingsFlowWithHttpInfoAsync(flow, kratosUpdateSettingsFlowBody, xSessionToken, cookie, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await UpdateSettingsFlowWithHttpInfoAsync(flow, kratosUpdateSettingsFlowBody, xSessionToken, cookie, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -5937,9 +6342,10 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// /// The Session Token of the Identity performing the settings flow. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosSettingsFlow) - public async System.Threading.Tasks.Task> UpdateSettingsFlowWithHttpInfoAsync(string flow, KratosUpdateSettingsFlowBody kratosUpdateSettingsFlowBody, string xSessionToken = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdateSettingsFlowWithHttpInfoAsync(string flow, KratosUpdateSettingsFlowBody kratosUpdateSettingsFlowBody, string? xSessionToken = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'flow' is set if (flow == null) @@ -5989,6 +6395,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI } localVarRequestOptions.Data = kratosUpdateSettingsFlowBody; + localVarRequestOptions.Operation = "FrontendApi.UpdateSettingsFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/self-service/settings", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -6013,8 +6422,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// /// Verification Token The verification token which completes the verification request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// KratosVerificationFlow - public KratosVerificationFlow UpdateVerificationFlow(string flow, KratosUpdateVerificationFlowBody kratosUpdateVerificationFlowBody, string token = default(string), string cookie = default(string)) + public KratosVerificationFlow UpdateVerificationFlow(string flow, KratosUpdateVerificationFlowBody kratosUpdateVerificationFlowBody, string? token = default(string?), string? cookie = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = UpdateVerificationFlowWithHttpInfo(flow, kratosUpdateVerificationFlowBody, token, cookie); return localVarResponse.Data; @@ -6028,8 +6438,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// /// Verification Token The verification token which completes the verification request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// ApiResponse of KratosVerificationFlow - public Ory.Kratos.Client.Client.ApiResponse UpdateVerificationFlowWithHttpInfo(string flow, KratosUpdateVerificationFlowBody kratosUpdateVerificationFlowBody, string token = default(string), string cookie = default(string)) + public Ory.Kratos.Client.Client.ApiResponse UpdateVerificationFlowWithHttpInfo(string flow, KratosUpdateVerificationFlowBody kratosUpdateVerificationFlowBody, string? token = default(string?), string? cookie = default(string?), int operationIndex = 0) { // verify the required parameter 'flow' is set if (flow == null) @@ -6078,6 +6489,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI } localVarRequestOptions.Data = kratosUpdateVerificationFlowBody; + localVarRequestOptions.Operation = "FrontendApi.UpdateVerificationFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Post("/self-service/verification", localVarRequestOptions, this.Configuration); @@ -6101,11 +6515,12 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// /// Verification Token The verification token which completes the verification request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosVerificationFlow - public async System.Threading.Tasks.Task UpdateVerificationFlowAsync(string flow, KratosUpdateVerificationFlowBody kratosUpdateVerificationFlowBody, string token = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdateVerificationFlowAsync(string flow, KratosUpdateVerificationFlowBody kratosUpdateVerificationFlowBody, string? token = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await UpdateVerificationFlowWithHttpInfoAsync(flow, kratosUpdateVerificationFlowBody, token, cookie, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await UpdateVerificationFlowWithHttpInfoAsync(flow, kratosUpdateVerificationFlowBody, token, cookie, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -6117,9 +6532,10 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI /// /// Verification Token The verification token which completes the verification request. If the token is invalid (e.g. expired) an error will be shown to the end-user. This parameter is usually set in a link and not used by any direct API call. (optional) /// HTTP Cookies When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosVerificationFlow) - public async System.Threading.Tasks.Task> UpdateVerificationFlowWithHttpInfoAsync(string flow, KratosUpdateVerificationFlowBody kratosUpdateVerificationFlowBody, string token = default(string), string cookie = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdateVerificationFlowWithHttpInfoAsync(string flow, KratosUpdateVerificationFlowBody kratosUpdateVerificationFlowBody, string? token = default(string?), string? cookie = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'flow' is set if (flow == null) @@ -6169,6 +6585,9 @@ public Ory.Kratos.Client.Client.ApiResponse PerformNativeLogoutWithHttpI } localVarRequestOptions.Data = kratosUpdateVerificationFlowBody; + localVarRequestOptions.Operation = "FrontendApi.UpdateVerificationFlow"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync("/self-service/verification", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); diff --git a/Ory.Kratos.Client/Api/IdentityApi.cs b/Ory.Kratos.Client/Api/IdentityApi.cs index be643fd7..37dd47e1 100644 --- a/Ory.Kratos.Client/Api/IdentityApi.cs +++ b/Ory.Kratos.Client/Api/IdentityApi.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -35,8 +34,9 @@ public interface IIdentityApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// KratosBatchPatchIdentitiesResponse - KratosBatchPatchIdentitiesResponse BatchPatchIdentities(KratosPatchIdentitiesBody kratosPatchIdentitiesBody = default(KratosPatchIdentitiesBody)); + KratosBatchPatchIdentitiesResponse BatchPatchIdentities(KratosPatchIdentitiesBody? kratosPatchIdentitiesBody = default(KratosPatchIdentitiesBody?), int operationIndex = 0); /// /// Create and deletes multiple identities @@ -46,8 +46,9 @@ public interface IIdentityApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// ApiResponse of KratosBatchPatchIdentitiesResponse - ApiResponse BatchPatchIdentitiesWithHttpInfo(KratosPatchIdentitiesBody kratosPatchIdentitiesBody = default(KratosPatchIdentitiesBody)); + ApiResponse BatchPatchIdentitiesWithHttpInfo(KratosPatchIdentitiesBody? kratosPatchIdentitiesBody = default(KratosPatchIdentitiesBody?), int operationIndex = 0); /// /// Create an Identity /// @@ -56,8 +57,9 @@ public interface IIdentityApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// KratosIdentity - KratosIdentity CreateIdentity(KratosCreateIdentityBody kratosCreateIdentityBody = default(KratosCreateIdentityBody)); + KratosIdentity CreateIdentity(KratosCreateIdentityBody? kratosCreateIdentityBody = default(KratosCreateIdentityBody?), int operationIndex = 0); /// /// Create an Identity @@ -67,8 +69,9 @@ public interface IIdentityApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// ApiResponse of KratosIdentity - ApiResponse CreateIdentityWithHttpInfo(KratosCreateIdentityBody kratosCreateIdentityBody = default(KratosCreateIdentityBody)); + ApiResponse CreateIdentityWithHttpInfo(KratosCreateIdentityBody? kratosCreateIdentityBody = default(KratosCreateIdentityBody?), int operationIndex = 0); /// /// Create a Recovery Code /// @@ -77,8 +80,9 @@ public interface IIdentityApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// KratosRecoveryCodeForIdentity - KratosRecoveryCodeForIdentity CreateRecoveryCodeForIdentity(KratosCreateRecoveryCodeForIdentityBody kratosCreateRecoveryCodeForIdentityBody = default(KratosCreateRecoveryCodeForIdentityBody)); + KratosRecoveryCodeForIdentity CreateRecoveryCodeForIdentity(KratosCreateRecoveryCodeForIdentityBody? kratosCreateRecoveryCodeForIdentityBody = default(KratosCreateRecoveryCodeForIdentityBody?), int operationIndex = 0); /// /// Create a Recovery Code @@ -88,8 +92,9 @@ public interface IIdentityApiSync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// ApiResponse of KratosRecoveryCodeForIdentity - ApiResponse CreateRecoveryCodeForIdentityWithHttpInfo(KratosCreateRecoveryCodeForIdentityBody kratosCreateRecoveryCodeForIdentityBody = default(KratosCreateRecoveryCodeForIdentityBody)); + ApiResponse CreateRecoveryCodeForIdentityWithHttpInfo(KratosCreateRecoveryCodeForIdentityBody? kratosCreateRecoveryCodeForIdentityBody = default(KratosCreateRecoveryCodeForIdentityBody?), int operationIndex = 0); /// /// Create a Recovery Link /// @@ -99,8 +104,9 @@ public interface IIdentityApiSync : IApiAccessor /// Thrown when fails to make API call /// (optional) /// (optional) + /// Index associated with the operation. /// KratosRecoveryLinkForIdentity - KratosRecoveryLinkForIdentity CreateRecoveryLinkForIdentity(string returnTo = default(string), KratosCreateRecoveryLinkForIdentityBody kratosCreateRecoveryLinkForIdentityBody = default(KratosCreateRecoveryLinkForIdentityBody)); + KratosRecoveryLinkForIdentity CreateRecoveryLinkForIdentity(string? returnTo = default(string?), KratosCreateRecoveryLinkForIdentityBody? kratosCreateRecoveryLinkForIdentityBody = default(KratosCreateRecoveryLinkForIdentityBody?), int operationIndex = 0); /// /// Create a Recovery Link @@ -111,8 +117,9 @@ public interface IIdentityApiSync : IApiAccessor /// Thrown when fails to make API call /// (optional) /// (optional) + /// Index associated with the operation. /// ApiResponse of KratosRecoveryLinkForIdentity - ApiResponse CreateRecoveryLinkForIdentityWithHttpInfo(string returnTo = default(string), KratosCreateRecoveryLinkForIdentityBody kratosCreateRecoveryLinkForIdentityBody = default(KratosCreateRecoveryLinkForIdentityBody)); + ApiResponse CreateRecoveryLinkForIdentityWithHttpInfo(string? returnTo = default(string?), KratosCreateRecoveryLinkForIdentityBody? kratosCreateRecoveryLinkForIdentityBody = default(KratosCreateRecoveryLinkForIdentityBody?), int operationIndex = 0); /// /// Delete an Identity /// @@ -121,8 +128,9 @@ public interface IIdentityApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID is the identity's ID. + /// Index associated with the operation. /// - void DeleteIdentity(string id); + void DeleteIdentity(string id, int operationIndex = 0); /// /// Delete an Identity @@ -132,8 +140,9 @@ public interface IIdentityApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID is the identity's ID. + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeleteIdentityWithHttpInfo(string id); + ApiResponse DeleteIdentityWithHttpInfo(string id, int operationIndex = 0); /// /// Delete a credential for a specific identity /// @@ -143,8 +152,9 @@ public interface IIdentityApiSync : IApiAccessor /// Thrown when fails to make API call /// ID is the identity's ID. /// Type is the type of credentials to be deleted. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode + /// Index associated with the operation. /// - void DeleteIdentityCredentials(string id, string type); + void DeleteIdentityCredentials(string id, string type, int operationIndex = 0); /// /// Delete a credential for a specific identity @@ -155,8 +165,9 @@ public interface IIdentityApiSync : IApiAccessor /// Thrown when fails to make API call /// ID is the identity's ID. /// Type is the type of credentials to be deleted. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeleteIdentityCredentialsWithHttpInfo(string id, string type); + ApiResponse DeleteIdentityCredentialsWithHttpInfo(string id, string type, int operationIndex = 0); /// /// Delete & Invalidate an Identity's Sessions /// @@ -165,8 +176,9 @@ public interface IIdentityApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID is the identity's ID. + /// Index associated with the operation. /// - void DeleteIdentitySessions(string id); + void DeleteIdentitySessions(string id, int operationIndex = 0); /// /// Delete & Invalidate an Identity's Sessions @@ -176,8 +188,9 @@ public interface IIdentityApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID is the identity's ID. + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeleteIdentitySessionsWithHttpInfo(string id); + ApiResponse DeleteIdentitySessionsWithHttpInfo(string id, int operationIndex = 0); /// /// Deactivate a Session /// @@ -186,8 +199,9 @@ public interface IIdentityApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID is the session's ID. + /// Index associated with the operation. /// - void DisableSession(string id); + void DisableSession(string id, int operationIndex = 0); /// /// Deactivate a Session @@ -197,8 +211,9 @@ public interface IIdentityApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID is the session's ID. + /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DisableSessionWithHttpInfo(string id); + ApiResponse DisableSessionWithHttpInfo(string id, int operationIndex = 0); /// /// Extend a Session /// @@ -207,8 +222,9 @@ public interface IIdentityApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID is the session's ID. + /// Index associated with the operation. /// KratosSession - KratosSession ExtendSession(string id); + KratosSession ExtendSession(string id, int operationIndex = 0); /// /// Extend a Session @@ -218,8 +234,9 @@ public interface IIdentityApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID is the session's ID. + /// Index associated with the operation. /// ApiResponse of KratosSession - ApiResponse ExtendSessionWithHttpInfo(string id); + ApiResponse ExtendSessionWithHttpInfo(string id, int operationIndex = 0); /// /// Get an Identity /// @@ -229,8 +246,9 @@ public interface IIdentityApiSync : IApiAccessor /// Thrown when fails to make API call /// ID must be set to the ID of identity you want to get /// Include Credentials in Response Include any credential, for example `password` or `oidc`, in the response. When set to `oidc`, This will return the initial OAuth 2.0 Access Token, OAuth 2.0 Refresh Token and the OpenID Connect ID Token if available. (optional) + /// Index associated with the operation. /// KratosIdentity - KratosIdentity GetIdentity(string id, List includeCredential = default(List)); + KratosIdentity GetIdentity(string id, List? includeCredential = default(List?), int operationIndex = 0); /// /// Get an Identity @@ -241,8 +259,9 @@ public interface IIdentityApiSync : IApiAccessor /// Thrown when fails to make API call /// ID must be set to the ID of identity you want to get /// Include Credentials in Response Include any credential, for example `password` or `oidc`, in the response. When set to `oidc`, This will return the initial OAuth 2.0 Access Token, OAuth 2.0 Refresh Token and the OpenID Connect ID Token if available. (optional) + /// Index associated with the operation. /// ApiResponse of KratosIdentity - ApiResponse GetIdentityWithHttpInfo(string id, List includeCredential = default(List)); + ApiResponse GetIdentityWithHttpInfo(string id, List? includeCredential = default(List?), int operationIndex = 0); /// /// Get Identity JSON Schema /// @@ -251,8 +270,9 @@ public interface IIdentityApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID must be set to the ID of schema you want to get + /// Index associated with the operation. /// Object - Object GetIdentitySchema(string id); + Object GetIdentitySchema(string id, int operationIndex = 0); /// /// Get Identity JSON Schema @@ -262,8 +282,9 @@ public interface IIdentityApiSync : IApiAccessor /// /// Thrown when fails to make API call /// ID must be set to the ID of schema you want to get + /// Index associated with the operation. /// ApiResponse of Object - ApiResponse GetIdentitySchemaWithHttpInfo(string id); + ApiResponse GetIdentitySchemaWithHttpInfo(string id, int operationIndex = 0); /// /// Get Session /// @@ -273,8 +294,9 @@ public interface IIdentityApiSync : IApiAccessor /// Thrown when fails to make API call /// ID is the session's ID. /// ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. Example - ?expand=Identity&expand=Devices If no value is provided, the expandable properties are skipped. (optional) + /// Index associated with the operation. /// KratosSession - KratosSession GetSession(string id, List expand = default(List)); + KratosSession GetSession(string id, List? expand = default(List?), int operationIndex = 0); /// /// Get Session @@ -285,8 +307,9 @@ public interface IIdentityApiSync : IApiAccessor /// Thrown when fails to make API call /// ID is the session's ID. /// ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. Example - ?expand=Identity&expand=Devices If no value is provided, the expandable properties are skipped. (optional) + /// Index associated with the operation. /// ApiResponse of KratosSession - ApiResponse GetSessionWithHttpInfo(string id, List expand = default(List)); + ApiResponse GetSessionWithHttpInfo(string id, List? expand = default(List?), int operationIndex = 0); /// /// List Identities /// @@ -302,8 +325,9 @@ public interface IIdentityApiSync : IApiAccessor /// List of ids used to filter identities. If this list is empty, then no filter will be applied. (optional) /// CredentialsIdentifier is the identifier (username, email) of the credentials to look up using exact match. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used. (optional) /// This is an EXPERIMENTAL parameter that WILL CHANGE. Do NOT rely on consistent, deterministic behavior. THIS PARAMETER WILL BE REMOVED IN AN UPCOMING RELEASE WITHOUT ANY MIGRATION PATH. CredentialsIdentifierSimilar is the (partial) identifier (username, email) of the credentials to look up using similarity search. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used. (optional) + /// Index associated with the operation. /// List<KratosIdentity> - List ListIdentities(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), string consistency = default(string), List ids = default(List), string credentialsIdentifier = default(string), string previewCredentialsIdentifierSimilar = default(string)); + List ListIdentities(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), string? consistency = default(string?), List? ids = default(List?), string? credentialsIdentifier = default(string?), string? previewCredentialsIdentifierSimilar = default(string?), int operationIndex = 0); /// /// List Identities @@ -320,8 +344,9 @@ public interface IIdentityApiSync : IApiAccessor /// List of ids used to filter identities. If this list is empty, then no filter will be applied. (optional) /// CredentialsIdentifier is the identifier (username, email) of the credentials to look up using exact match. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used. (optional) /// This is an EXPERIMENTAL parameter that WILL CHANGE. Do NOT rely on consistent, deterministic behavior. THIS PARAMETER WILL BE REMOVED IN AN UPCOMING RELEASE WITHOUT ANY MIGRATION PATH. CredentialsIdentifierSimilar is the (partial) identifier (username, email) of the credentials to look up using similarity search. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used. (optional) + /// Index associated with the operation. /// ApiResponse of List<KratosIdentity> - ApiResponse> ListIdentitiesWithHttpInfo(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), string consistency = default(string), List ids = default(List), string credentialsIdentifier = default(string), string previewCredentialsIdentifierSimilar = default(string)); + ApiResponse> ListIdentitiesWithHttpInfo(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), string? consistency = default(string?), List? ids = default(List?), string? credentialsIdentifier = default(string?), string? previewCredentialsIdentifierSimilar = default(string?), int operationIndex = 0); /// /// Get all Identity Schemas /// @@ -333,8 +358,9 @@ public interface IIdentityApiSync : IApiAccessor /// Deprecated Pagination Page DEPRECATED: Please use `page_token` instead. This parameter will be removed in the future. This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. The first page can be retrieved by omitting this parameter. Following page pointers will be returned in the `Link` header. (optional) /// Page Size This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") + /// Index associated with the operation. /// List<KratosIdentitySchemaContainer> - List ListIdentitySchemas(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string)); + List ListIdentitySchemas(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), int operationIndex = 0); /// /// Get all Identity Schemas @@ -347,8 +373,9 @@ public interface IIdentityApiSync : IApiAccessor /// Deprecated Pagination Page DEPRECATED: Please use `page_token` instead. This parameter will be removed in the future. This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. The first page can be retrieved by omitting this parameter. Following page pointers will be returned in the `Link` header. (optional) /// Page Size This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") + /// Index associated with the operation. /// ApiResponse of List<KratosIdentitySchemaContainer> - ApiResponse> ListIdentitySchemasWithHttpInfo(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string)); + ApiResponse> ListIdentitySchemasWithHttpInfo(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), int operationIndex = 0); /// /// List an Identity's Sessions /// @@ -362,8 +389,9 @@ public interface IIdentityApiSync : IApiAccessor /// Page Size This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned. (optional) + /// Index associated with the operation. /// List<KratosSession> - List ListIdentitySessions(string id, long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), bool? active = default(bool?)); + List ListIdentitySessions(string id, long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), bool? active = default(bool?), int operationIndex = 0); /// /// List an Identity's Sessions @@ -378,8 +406,9 @@ public interface IIdentityApiSync : IApiAccessor /// Page Size This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned. (optional) + /// Index associated with the operation. /// ApiResponse of List<KratosSession> - ApiResponse> ListIdentitySessionsWithHttpInfo(string id, long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), bool? active = default(bool?)); + ApiResponse> ListIdentitySessionsWithHttpInfo(string id, long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), bool? active = default(bool?), int operationIndex = 0); /// /// List All Sessions /// @@ -391,8 +420,9 @@ public interface IIdentityApiSync : IApiAccessor /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) /// Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned. (optional) /// ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. If no value is provided, the expandable properties are skipped. (optional) + /// Index associated with the operation. /// List<KratosSession> - List ListSessions(long? pageSize = default(long?), string pageToken = default(string), bool? active = default(bool?), List expand = default(List)); + List ListSessions(long? pageSize = default(long?), string? pageToken = default(string?), bool? active = default(bool?), List? expand = default(List?), int operationIndex = 0); /// /// List All Sessions @@ -405,8 +435,9 @@ public interface IIdentityApiSync : IApiAccessor /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) /// Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned. (optional) /// ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. If no value is provided, the expandable properties are skipped. (optional) + /// Index associated with the operation. /// ApiResponse of List<KratosSession> - ApiResponse> ListSessionsWithHttpInfo(long? pageSize = default(long?), string pageToken = default(string), bool? active = default(bool?), List expand = default(List)); + ApiResponse> ListSessionsWithHttpInfo(long? pageSize = default(long?), string? pageToken = default(string?), bool? active = default(bool?), List? expand = default(List?), int operationIndex = 0); /// /// Patch an Identity /// @@ -416,8 +447,9 @@ public interface IIdentityApiSync : IApiAccessor /// Thrown when fails to make API call /// ID must be set to the ID of identity you want to update /// (optional) + /// Index associated with the operation. /// KratosIdentity - KratosIdentity PatchIdentity(string id, List kratosJsonPatch = default(List)); + KratosIdentity PatchIdentity(string id, List? kratosJsonPatch = default(List?), int operationIndex = 0); /// /// Patch an Identity @@ -428,8 +460,9 @@ public interface IIdentityApiSync : IApiAccessor /// Thrown when fails to make API call /// ID must be set to the ID of identity you want to update /// (optional) + /// Index associated with the operation. /// ApiResponse of KratosIdentity - ApiResponse PatchIdentityWithHttpInfo(string id, List kratosJsonPatch = default(List)); + ApiResponse PatchIdentityWithHttpInfo(string id, List? kratosJsonPatch = default(List?), int operationIndex = 0); /// /// Update an Identity /// @@ -439,8 +472,9 @@ public interface IIdentityApiSync : IApiAccessor /// Thrown when fails to make API call /// ID must be set to the ID of identity you want to update /// (optional) + /// Index associated with the operation. /// KratosIdentity - KratosIdentity UpdateIdentity(string id, KratosUpdateIdentityBody kratosUpdateIdentityBody = default(KratosUpdateIdentityBody)); + KratosIdentity UpdateIdentity(string id, KratosUpdateIdentityBody? kratosUpdateIdentityBody = default(KratosUpdateIdentityBody?), int operationIndex = 0); /// /// Update an Identity @@ -451,8 +485,9 @@ public interface IIdentityApiSync : IApiAccessor /// Thrown when fails to make API call /// ID must be set to the ID of identity you want to update /// (optional) + /// Index associated with the operation. /// ApiResponse of KratosIdentity - ApiResponse UpdateIdentityWithHttpInfo(string id, KratosUpdateIdentityBody kratosUpdateIdentityBody = default(KratosUpdateIdentityBody)); + ApiResponse UpdateIdentityWithHttpInfo(string id, KratosUpdateIdentityBody? kratosUpdateIdentityBody = default(KratosUpdateIdentityBody?), int operationIndex = 0); #endregion Synchronous Operations } @@ -470,9 +505,10 @@ public interface IIdentityApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosBatchPatchIdentitiesResponse - System.Threading.Tasks.Task BatchPatchIdentitiesAsync(KratosPatchIdentitiesBody kratosPatchIdentitiesBody = default(KratosPatchIdentitiesBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task BatchPatchIdentitiesAsync(KratosPatchIdentitiesBody? kratosPatchIdentitiesBody = default(KratosPatchIdentitiesBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create and deletes multiple identities @@ -482,9 +518,10 @@ public interface IIdentityApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosBatchPatchIdentitiesResponse) - System.Threading.Tasks.Task> BatchPatchIdentitiesWithHttpInfoAsync(KratosPatchIdentitiesBody kratosPatchIdentitiesBody = default(KratosPatchIdentitiesBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> BatchPatchIdentitiesWithHttpInfoAsync(KratosPatchIdentitiesBody? kratosPatchIdentitiesBody = default(KratosPatchIdentitiesBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create an Identity /// @@ -493,9 +530,10 @@ public interface IIdentityApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosIdentity - System.Threading.Tasks.Task CreateIdentityAsync(KratosCreateIdentityBody kratosCreateIdentityBody = default(KratosCreateIdentityBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateIdentityAsync(KratosCreateIdentityBody? kratosCreateIdentityBody = default(KratosCreateIdentityBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create an Identity @@ -505,9 +543,10 @@ public interface IIdentityApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosIdentity) - System.Threading.Tasks.Task> CreateIdentityWithHttpInfoAsync(KratosCreateIdentityBody kratosCreateIdentityBody = default(KratosCreateIdentityBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateIdentityWithHttpInfoAsync(KratosCreateIdentityBody? kratosCreateIdentityBody = default(KratosCreateIdentityBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create a Recovery Code /// @@ -516,9 +555,10 @@ public interface IIdentityApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosRecoveryCodeForIdentity - System.Threading.Tasks.Task CreateRecoveryCodeForIdentityAsync(KratosCreateRecoveryCodeForIdentityBody kratosCreateRecoveryCodeForIdentityBody = default(KratosCreateRecoveryCodeForIdentityBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateRecoveryCodeForIdentityAsync(KratosCreateRecoveryCodeForIdentityBody? kratosCreateRecoveryCodeForIdentityBody = default(KratosCreateRecoveryCodeForIdentityBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create a Recovery Code @@ -528,9 +568,10 @@ public interface IIdentityApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosRecoveryCodeForIdentity) - System.Threading.Tasks.Task> CreateRecoveryCodeForIdentityWithHttpInfoAsync(KratosCreateRecoveryCodeForIdentityBody kratosCreateRecoveryCodeForIdentityBody = default(KratosCreateRecoveryCodeForIdentityBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateRecoveryCodeForIdentityWithHttpInfoAsync(KratosCreateRecoveryCodeForIdentityBody? kratosCreateRecoveryCodeForIdentityBody = default(KratosCreateRecoveryCodeForIdentityBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create a Recovery Link /// @@ -540,9 +581,10 @@ public interface IIdentityApiAsync : IApiAccessor /// Thrown when fails to make API call /// (optional) /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosRecoveryLinkForIdentity - System.Threading.Tasks.Task CreateRecoveryLinkForIdentityAsync(string returnTo = default(string), KratosCreateRecoveryLinkForIdentityBody kratosCreateRecoveryLinkForIdentityBody = default(KratosCreateRecoveryLinkForIdentityBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateRecoveryLinkForIdentityAsync(string? returnTo = default(string?), KratosCreateRecoveryLinkForIdentityBody? kratosCreateRecoveryLinkForIdentityBody = default(KratosCreateRecoveryLinkForIdentityBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create a Recovery Link @@ -553,9 +595,10 @@ public interface IIdentityApiAsync : IApiAccessor /// Thrown when fails to make API call /// (optional) /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosRecoveryLinkForIdentity) - System.Threading.Tasks.Task> CreateRecoveryLinkForIdentityWithHttpInfoAsync(string returnTo = default(string), KratosCreateRecoveryLinkForIdentityBody kratosCreateRecoveryLinkForIdentityBody = default(KratosCreateRecoveryLinkForIdentityBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateRecoveryLinkForIdentityWithHttpInfoAsync(string? returnTo = default(string?), KratosCreateRecoveryLinkForIdentityBody? kratosCreateRecoveryLinkForIdentityBody = default(KratosCreateRecoveryLinkForIdentityBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete an Identity /// @@ -564,9 +607,10 @@ public interface IIdentityApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID is the identity's ID. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeleteIdentityAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteIdentityAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete an Identity @@ -576,9 +620,10 @@ public interface IIdentityApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID is the identity's ID. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteIdentityWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteIdentityWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete a credential for a specific identity /// @@ -588,9 +633,10 @@ public interface IIdentityApiAsync : IApiAccessor /// Thrown when fails to make API call /// ID is the identity's ID. /// Type is the type of credentials to be deleted. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeleteIdentityCredentialsAsync(string id, string type, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteIdentityCredentialsAsync(string id, string type, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete a credential for a specific identity @@ -601,9 +647,10 @@ public interface IIdentityApiAsync : IApiAccessor /// Thrown when fails to make API call /// ID is the identity's ID. /// Type is the type of credentials to be deleted. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteIdentityCredentialsWithHttpInfoAsync(string id, string type, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteIdentityCredentialsWithHttpInfoAsync(string id, string type, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete & Invalidate an Identity's Sessions /// @@ -612,9 +659,10 @@ public interface IIdentityApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID is the identity's ID. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeleteIdentitySessionsAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteIdentitySessionsAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete & Invalidate an Identity's Sessions @@ -624,9 +672,10 @@ public interface IIdentityApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID is the identity's ID. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteIdentitySessionsWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteIdentitySessionsWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deactivate a Session /// @@ -635,9 +684,10 @@ public interface IIdentityApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID is the session's ID. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DisableSessionAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DisableSessionAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deactivate a Session @@ -647,9 +697,10 @@ public interface IIdentityApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID is the session's ID. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DisableSessionWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DisableSessionWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Extend a Session /// @@ -658,9 +709,10 @@ public interface IIdentityApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID is the session's ID. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosSession - System.Threading.Tasks.Task ExtendSessionAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task ExtendSessionAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Extend a Session @@ -670,9 +722,10 @@ public interface IIdentityApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID is the session's ID. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosSession) - System.Threading.Tasks.Task> ExtendSessionWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ExtendSessionWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get an Identity /// @@ -682,9 +735,10 @@ public interface IIdentityApiAsync : IApiAccessor /// Thrown when fails to make API call /// ID must be set to the ID of identity you want to get /// Include Credentials in Response Include any credential, for example `password` or `oidc`, in the response. When set to `oidc`, This will return the initial OAuth 2.0 Access Token, OAuth 2.0 Refresh Token and the OpenID Connect ID Token if available. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosIdentity - System.Threading.Tasks.Task GetIdentityAsync(string id, List includeCredential = default(List), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetIdentityAsync(string id, List? includeCredential = default(List?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get an Identity @@ -695,9 +749,10 @@ public interface IIdentityApiAsync : IApiAccessor /// Thrown when fails to make API call /// ID must be set to the ID of identity you want to get /// Include Credentials in Response Include any credential, for example `password` or `oidc`, in the response. When set to `oidc`, This will return the initial OAuth 2.0 Access Token, OAuth 2.0 Refresh Token and the OpenID Connect ID Token if available. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosIdentity) - System.Threading.Tasks.Task> GetIdentityWithHttpInfoAsync(string id, List includeCredential = default(List), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetIdentityWithHttpInfoAsync(string id, List? includeCredential = default(List?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Identity JSON Schema /// @@ -706,9 +761,10 @@ public interface IIdentityApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID must be set to the ID of schema you want to get + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Object - System.Threading.Tasks.Task GetIdentitySchemaAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetIdentitySchemaAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Identity JSON Schema @@ -718,9 +774,10 @@ public interface IIdentityApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// ID must be set to the ID of schema you want to get + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Object) - System.Threading.Tasks.Task> GetIdentitySchemaWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetIdentitySchemaWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Session /// @@ -730,9 +787,10 @@ public interface IIdentityApiAsync : IApiAccessor /// Thrown when fails to make API call /// ID is the session's ID. /// ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. Example - ?expand=Identity&expand=Devices If no value is provided, the expandable properties are skipped. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosSession - System.Threading.Tasks.Task GetSessionAsync(string id, List expand = default(List), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetSessionAsync(string id, List? expand = default(List?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Session @@ -743,9 +801,10 @@ public interface IIdentityApiAsync : IApiAccessor /// Thrown when fails to make API call /// ID is the session's ID. /// ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. Example - ?expand=Identity&expand=Devices If no value is provided, the expandable properties are skipped. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosSession) - System.Threading.Tasks.Task> GetSessionWithHttpInfoAsync(string id, List expand = default(List), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetSessionWithHttpInfoAsync(string id, List? expand = default(List?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Identities /// @@ -761,9 +820,10 @@ public interface IIdentityApiAsync : IApiAccessor /// List of ids used to filter identities. If this list is empty, then no filter will be applied. (optional) /// CredentialsIdentifier is the identifier (username, email) of the credentials to look up using exact match. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used. (optional) /// This is an EXPERIMENTAL parameter that WILL CHANGE. Do NOT rely on consistent, deterministic behavior. THIS PARAMETER WILL BE REMOVED IN AN UPCOMING RELEASE WITHOUT ANY MIGRATION PATH. CredentialsIdentifierSimilar is the (partial) identifier (username, email) of the credentials to look up using similarity search. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<KratosIdentity> - System.Threading.Tasks.Task> ListIdentitiesAsync(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), string consistency = default(string), List ids = default(List), string credentialsIdentifier = default(string), string previewCredentialsIdentifierSimilar = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ListIdentitiesAsync(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), string? consistency = default(string?), List? ids = default(List?), string? credentialsIdentifier = default(string?), string? previewCredentialsIdentifierSimilar = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List Identities @@ -780,9 +840,10 @@ public interface IIdentityApiAsync : IApiAccessor /// List of ids used to filter identities. If this list is empty, then no filter will be applied. (optional) /// CredentialsIdentifier is the identifier (username, email) of the credentials to look up using exact match. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used. (optional) /// This is an EXPERIMENTAL parameter that WILL CHANGE. Do NOT rely on consistent, deterministic behavior. THIS PARAMETER WILL BE REMOVED IN AN UPCOMING RELEASE WITHOUT ANY MIGRATION PATH. CredentialsIdentifierSimilar is the (partial) identifier (username, email) of the credentials to look up using similarity search. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<KratosIdentity>) - System.Threading.Tasks.Task>> ListIdentitiesWithHttpInfoAsync(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), string consistency = default(string), List ids = default(List), string credentialsIdentifier = default(string), string previewCredentialsIdentifierSimilar = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> ListIdentitiesWithHttpInfoAsync(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), string? consistency = default(string?), List? ids = default(List?), string? credentialsIdentifier = default(string?), string? previewCredentialsIdentifierSimilar = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get all Identity Schemas /// @@ -794,9 +855,10 @@ public interface IIdentityApiAsync : IApiAccessor /// Deprecated Pagination Page DEPRECATED: Please use `page_token` instead. This parameter will be removed in the future. This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. The first page can be retrieved by omitting this parameter. Following page pointers will be returned in the `Link` header. (optional) /// Page Size This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<KratosIdentitySchemaContainer> - System.Threading.Tasks.Task> ListIdentitySchemasAsync(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ListIdentitySchemasAsync(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get all Identity Schemas @@ -809,9 +871,10 @@ public interface IIdentityApiAsync : IApiAccessor /// Deprecated Pagination Page DEPRECATED: Please use `page_token` instead. This parameter will be removed in the future. This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. The first page can be retrieved by omitting this parameter. Following page pointers will be returned in the `Link` header. (optional) /// Page Size This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<KratosIdentitySchemaContainer>) - System.Threading.Tasks.Task>> ListIdentitySchemasWithHttpInfoAsync(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> ListIdentitySchemasWithHttpInfoAsync(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List an Identity's Sessions /// @@ -825,9 +888,10 @@ public interface IIdentityApiAsync : IApiAccessor /// Page Size This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<KratosSession> - System.Threading.Tasks.Task> ListIdentitySessionsAsync(string id, long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), bool? active = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ListIdentitySessionsAsync(string id, long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), bool? active = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List an Identity's Sessions @@ -842,9 +906,10 @@ public interface IIdentityApiAsync : IApiAccessor /// Page Size This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<KratosSession>) - System.Threading.Tasks.Task>> ListIdentitySessionsWithHttpInfoAsync(string id, long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), bool? active = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> ListIdentitySessionsWithHttpInfoAsync(string id, long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), bool? active = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List All Sessions /// @@ -856,9 +921,10 @@ public interface IIdentityApiAsync : IApiAccessor /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) /// Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned. (optional) /// ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. If no value is provided, the expandable properties are skipped. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<KratosSession> - System.Threading.Tasks.Task> ListSessionsAsync(long? pageSize = default(long?), string pageToken = default(string), bool? active = default(bool?), List expand = default(List), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ListSessionsAsync(long? pageSize = default(long?), string? pageToken = default(string?), bool? active = default(bool?), List? expand = default(List?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List All Sessions @@ -871,9 +937,10 @@ public interface IIdentityApiAsync : IApiAccessor /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) /// Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned. (optional) /// ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. If no value is provided, the expandable properties are skipped. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<KratosSession>) - System.Threading.Tasks.Task>> ListSessionsWithHttpInfoAsync(long? pageSize = default(long?), string pageToken = default(string), bool? active = default(bool?), List expand = default(List), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> ListSessionsWithHttpInfoAsync(long? pageSize = default(long?), string? pageToken = default(string?), bool? active = default(bool?), List? expand = default(List?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Patch an Identity /// @@ -883,9 +950,10 @@ public interface IIdentityApiAsync : IApiAccessor /// Thrown when fails to make API call /// ID must be set to the ID of identity you want to update /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosIdentity - System.Threading.Tasks.Task PatchIdentityAsync(string id, List kratosJsonPatch = default(List), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task PatchIdentityAsync(string id, List? kratosJsonPatch = default(List?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Patch an Identity @@ -896,9 +964,10 @@ public interface IIdentityApiAsync : IApiAccessor /// Thrown when fails to make API call /// ID must be set to the ID of identity you want to update /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosIdentity) - System.Threading.Tasks.Task> PatchIdentityWithHttpInfoAsync(string id, List kratosJsonPatch = default(List), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> PatchIdentityWithHttpInfoAsync(string id, List? kratosJsonPatch = default(List?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update an Identity /// @@ -908,9 +977,10 @@ public interface IIdentityApiAsync : IApiAccessor /// Thrown when fails to make API call /// ID must be set to the ID of identity you want to update /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosIdentity - System.Threading.Tasks.Task UpdateIdentityAsync(string id, KratosUpdateIdentityBody kratosUpdateIdentityBody = default(KratosUpdateIdentityBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdateIdentityAsync(string id, KratosUpdateIdentityBody? kratosUpdateIdentityBody = default(KratosUpdateIdentityBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update an Identity @@ -921,9 +991,10 @@ public interface IIdentityApiAsync : IApiAccessor /// Thrown when fails to make API call /// ID must be set to the ID of identity you want to update /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosIdentity) - System.Threading.Tasks.Task> UpdateIdentityWithHttpInfoAsync(string id, KratosUpdateIdentityBody kratosUpdateIdentityBody = default(KratosUpdateIdentityBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdateIdentityWithHttpInfoAsync(string id, KratosUpdateIdentityBody? kratosUpdateIdentityBody = default(KratosUpdateIdentityBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -1049,8 +1120,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// KratosBatchPatchIdentitiesResponse - public KratosBatchPatchIdentitiesResponse BatchPatchIdentities(KratosPatchIdentitiesBody kratosPatchIdentitiesBody = default(KratosPatchIdentitiesBody)) + public KratosBatchPatchIdentitiesResponse BatchPatchIdentities(KratosPatchIdentitiesBody? kratosPatchIdentitiesBody = default(KratosPatchIdentitiesBody?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = BatchPatchIdentitiesWithHttpInfo(kratosPatchIdentitiesBody); return localVarResponse.Data; @@ -1061,8 +1133,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// ApiResponse of KratosBatchPatchIdentitiesResponse - public Ory.Kratos.Client.Client.ApiResponse BatchPatchIdentitiesWithHttpInfo(KratosPatchIdentitiesBody kratosPatchIdentitiesBody = default(KratosPatchIdentitiesBody)) + public Ory.Kratos.Client.Client.ApiResponse BatchPatchIdentitiesWithHttpInfo(KratosPatchIdentitiesBody? kratosPatchIdentitiesBody = default(KratosPatchIdentitiesBody?), int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -1089,6 +1162,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.Data = kratosPatchIdentitiesBody; + localVarRequestOptions.Operation = "IdentityApi.BatchPatchIdentities"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -1114,11 +1190,12 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosBatchPatchIdentitiesResponse - public async System.Threading.Tasks.Task BatchPatchIdentitiesAsync(KratosPatchIdentitiesBody kratosPatchIdentitiesBody = default(KratosPatchIdentitiesBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task BatchPatchIdentitiesAsync(KratosPatchIdentitiesBody? kratosPatchIdentitiesBody = default(KratosPatchIdentitiesBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await BatchPatchIdentitiesWithHttpInfoAsync(kratosPatchIdentitiesBody, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await BatchPatchIdentitiesWithHttpInfoAsync(kratosPatchIdentitiesBody, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1127,9 +1204,10 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosBatchPatchIdentitiesResponse) - public async System.Threading.Tasks.Task> BatchPatchIdentitiesWithHttpInfoAsync(KratosPatchIdentitiesBody kratosPatchIdentitiesBody = default(KratosPatchIdentitiesBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> BatchPatchIdentitiesWithHttpInfoAsync(KratosPatchIdentitiesBody? kratosPatchIdentitiesBody = default(KratosPatchIdentitiesBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -1157,6 +1235,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.Data = kratosPatchIdentitiesBody; + localVarRequestOptions.Operation = "IdentityApi.BatchPatchIdentities"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -1183,8 +1264,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// KratosIdentity - public KratosIdentity CreateIdentity(KratosCreateIdentityBody kratosCreateIdentityBody = default(KratosCreateIdentityBody)) + public KratosIdentity CreateIdentity(KratosCreateIdentityBody? kratosCreateIdentityBody = default(KratosCreateIdentityBody?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = CreateIdentityWithHttpInfo(kratosCreateIdentityBody); return localVarResponse.Data; @@ -1195,8 +1277,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// ApiResponse of KratosIdentity - public Ory.Kratos.Client.Client.ApiResponse CreateIdentityWithHttpInfo(KratosCreateIdentityBody kratosCreateIdentityBody = default(KratosCreateIdentityBody)) + public Ory.Kratos.Client.Client.ApiResponse CreateIdentityWithHttpInfo(KratosCreateIdentityBody? kratosCreateIdentityBody = default(KratosCreateIdentityBody?), int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -1223,6 +1306,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.Data = kratosCreateIdentityBody; + localVarRequestOptions.Operation = "IdentityApi.CreateIdentity"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -1248,11 +1334,12 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosIdentity - public async System.Threading.Tasks.Task CreateIdentityAsync(KratosCreateIdentityBody kratosCreateIdentityBody = default(KratosCreateIdentityBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateIdentityAsync(KratosCreateIdentityBody? kratosCreateIdentityBody = default(KratosCreateIdentityBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateIdentityWithHttpInfoAsync(kratosCreateIdentityBody, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateIdentityWithHttpInfoAsync(kratosCreateIdentityBody, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1261,9 +1348,10 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosIdentity) - public async System.Threading.Tasks.Task> CreateIdentityWithHttpInfoAsync(KratosCreateIdentityBody kratosCreateIdentityBody = default(KratosCreateIdentityBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateIdentityWithHttpInfoAsync(KratosCreateIdentityBody? kratosCreateIdentityBody = default(KratosCreateIdentityBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -1291,6 +1379,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.Data = kratosCreateIdentityBody; + localVarRequestOptions.Operation = "IdentityApi.CreateIdentity"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -1317,8 +1408,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// KratosRecoveryCodeForIdentity - public KratosRecoveryCodeForIdentity CreateRecoveryCodeForIdentity(KratosCreateRecoveryCodeForIdentityBody kratosCreateRecoveryCodeForIdentityBody = default(KratosCreateRecoveryCodeForIdentityBody)) + public KratosRecoveryCodeForIdentity CreateRecoveryCodeForIdentity(KratosCreateRecoveryCodeForIdentityBody? kratosCreateRecoveryCodeForIdentityBody = default(KratosCreateRecoveryCodeForIdentityBody?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = CreateRecoveryCodeForIdentityWithHttpInfo(kratosCreateRecoveryCodeForIdentityBody); return localVarResponse.Data; @@ -1329,8 +1421,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// ApiResponse of KratosRecoveryCodeForIdentity - public Ory.Kratos.Client.Client.ApiResponse CreateRecoveryCodeForIdentityWithHttpInfo(KratosCreateRecoveryCodeForIdentityBody kratosCreateRecoveryCodeForIdentityBody = default(KratosCreateRecoveryCodeForIdentityBody)) + public Ory.Kratos.Client.Client.ApiResponse CreateRecoveryCodeForIdentityWithHttpInfo(KratosCreateRecoveryCodeForIdentityBody? kratosCreateRecoveryCodeForIdentityBody = default(KratosCreateRecoveryCodeForIdentityBody?), int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -1357,6 +1450,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.Data = kratosCreateRecoveryCodeForIdentityBody; + localVarRequestOptions.Operation = "IdentityApi.CreateRecoveryCodeForIdentity"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -1382,11 +1478,12 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosRecoveryCodeForIdentity - public async System.Threading.Tasks.Task CreateRecoveryCodeForIdentityAsync(KratosCreateRecoveryCodeForIdentityBody kratosCreateRecoveryCodeForIdentityBody = default(KratosCreateRecoveryCodeForIdentityBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateRecoveryCodeForIdentityAsync(KratosCreateRecoveryCodeForIdentityBody? kratosCreateRecoveryCodeForIdentityBody = default(KratosCreateRecoveryCodeForIdentityBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateRecoveryCodeForIdentityWithHttpInfoAsync(kratosCreateRecoveryCodeForIdentityBody, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateRecoveryCodeForIdentityWithHttpInfoAsync(kratosCreateRecoveryCodeForIdentityBody, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1395,9 +1492,10 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosRecoveryCodeForIdentity) - public async System.Threading.Tasks.Task> CreateRecoveryCodeForIdentityWithHttpInfoAsync(KratosCreateRecoveryCodeForIdentityBody kratosCreateRecoveryCodeForIdentityBody = default(KratosCreateRecoveryCodeForIdentityBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateRecoveryCodeForIdentityWithHttpInfoAsync(KratosCreateRecoveryCodeForIdentityBody? kratosCreateRecoveryCodeForIdentityBody = default(KratosCreateRecoveryCodeForIdentityBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -1425,6 +1523,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory localVarRequestOptions.Data = kratosCreateRecoveryCodeForIdentityBody; + localVarRequestOptions.Operation = "IdentityApi.CreateRecoveryCodeForIdentity"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -1452,8 +1553,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// (optional) /// (optional) + /// Index associated with the operation. /// KratosRecoveryLinkForIdentity - public KratosRecoveryLinkForIdentity CreateRecoveryLinkForIdentity(string returnTo = default(string), KratosCreateRecoveryLinkForIdentityBody kratosCreateRecoveryLinkForIdentityBody = default(KratosCreateRecoveryLinkForIdentityBody)) + public KratosRecoveryLinkForIdentity CreateRecoveryLinkForIdentity(string? returnTo = default(string?), KratosCreateRecoveryLinkForIdentityBody? kratosCreateRecoveryLinkForIdentityBody = default(KratosCreateRecoveryLinkForIdentityBody?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = CreateRecoveryLinkForIdentityWithHttpInfo(returnTo, kratosCreateRecoveryLinkForIdentityBody); return localVarResponse.Data; @@ -1465,8 +1567,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// (optional) /// (optional) + /// Index associated with the operation. /// ApiResponse of KratosRecoveryLinkForIdentity - public Ory.Kratos.Client.Client.ApiResponse CreateRecoveryLinkForIdentityWithHttpInfo(string returnTo = default(string), KratosCreateRecoveryLinkForIdentityBody kratosCreateRecoveryLinkForIdentityBody = default(KratosCreateRecoveryLinkForIdentityBody)) + public Ory.Kratos.Client.Client.ApiResponse CreateRecoveryLinkForIdentityWithHttpInfo(string? returnTo = default(string?), KratosCreateRecoveryLinkForIdentityBody? kratosCreateRecoveryLinkForIdentityBody = default(KratosCreateRecoveryLinkForIdentityBody?), int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -1497,6 +1600,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory } localVarRequestOptions.Data = kratosCreateRecoveryLinkForIdentityBody; + localVarRequestOptions.Operation = "IdentityApi.CreateRecoveryLinkForIdentity"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -1523,11 +1629,12 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// (optional) /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosRecoveryLinkForIdentity - public async System.Threading.Tasks.Task CreateRecoveryLinkForIdentityAsync(string returnTo = default(string), KratosCreateRecoveryLinkForIdentityBody kratosCreateRecoveryLinkForIdentityBody = default(KratosCreateRecoveryLinkForIdentityBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateRecoveryLinkForIdentityAsync(string? returnTo = default(string?), KratosCreateRecoveryLinkForIdentityBody? kratosCreateRecoveryLinkForIdentityBody = default(KratosCreateRecoveryLinkForIdentityBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateRecoveryLinkForIdentityWithHttpInfoAsync(returnTo, kratosCreateRecoveryLinkForIdentityBody, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await CreateRecoveryLinkForIdentityWithHttpInfoAsync(returnTo, kratosCreateRecoveryLinkForIdentityBody, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1537,9 +1644,10 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// (optional) /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosRecoveryLinkForIdentity) - public async System.Threading.Tasks.Task> CreateRecoveryLinkForIdentityWithHttpInfoAsync(string returnTo = default(string), KratosCreateRecoveryLinkForIdentityBody kratosCreateRecoveryLinkForIdentityBody = default(KratosCreateRecoveryLinkForIdentityBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateRecoveryLinkForIdentityWithHttpInfoAsync(string? returnTo = default(string?), KratosCreateRecoveryLinkForIdentityBody? kratosCreateRecoveryLinkForIdentityBody = default(KratosCreateRecoveryLinkForIdentityBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -1571,6 +1679,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory } localVarRequestOptions.Data = kratosCreateRecoveryLinkForIdentityBody; + localVarRequestOptions.Operation = "IdentityApi.CreateRecoveryLinkForIdentity"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -1597,8 +1708,9 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// ID is the identity's ID. + /// Index associated with the operation. /// - public void DeleteIdentity(string id) + public void DeleteIdentity(string id, int operationIndex = 0) { DeleteIdentityWithHttpInfo(id); } @@ -1608,8 +1720,9 @@ public void DeleteIdentity(string id) /// /// Thrown when fails to make API call /// ID is the identity's ID. + /// Index associated with the operation. /// ApiResponse of Object(void) - public Ory.Kratos.Client.Client.ApiResponse DeleteIdentityWithHttpInfo(string id) + public Ory.Kratos.Client.Client.ApiResponse DeleteIdentityWithHttpInfo(string id, int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -1641,6 +1754,9 @@ public Ory.Kratos.Client.Client.ApiResponse DeleteIdentityWithHttpInfo(s localVarRequestOptions.PathParameters.Add("id", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Operation = "IdentityApi.DeleteIdentity"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -1666,11 +1782,12 @@ public Ory.Kratos.Client.Client.ApiResponse DeleteIdentityWithHttpInfo(s /// /// Thrown when fails to make API call /// ID is the identity's ID. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeleteIdentityAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteIdentityAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteIdentityWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); + await DeleteIdentityWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1678,9 +1795,10 @@ public Ory.Kratos.Client.Client.ApiResponse DeleteIdentityWithHttpInfo(s /// /// Thrown when fails to make API call /// ID is the identity's ID. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteIdentityWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteIdentityWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -1713,6 +1831,9 @@ public Ory.Kratos.Client.Client.ApiResponse DeleteIdentityWithHttpInfo(s localVarRequestOptions.PathParameters.Add("id", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Operation = "IdentityApi.DeleteIdentity"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -1740,8 +1861,9 @@ public Ory.Kratos.Client.Client.ApiResponse DeleteIdentityWithHttpInfo(s /// Thrown when fails to make API call /// ID is the identity's ID. /// Type is the type of credentials to be deleted. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode + /// Index associated with the operation. /// - public void DeleteIdentityCredentials(string id, string type) + public void DeleteIdentityCredentials(string id, string type, int operationIndex = 0) { DeleteIdentityCredentialsWithHttpInfo(id, type); } @@ -1752,8 +1874,9 @@ public void DeleteIdentityCredentials(string id, string type) /// Thrown when fails to make API call /// ID is the identity's ID. /// Type is the type of credentials to be deleted. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode + /// Index associated with the operation. /// ApiResponse of Object(void) - public Ory.Kratos.Client.Client.ApiResponse DeleteIdentityCredentialsWithHttpInfo(string id, string type) + public Ory.Kratos.Client.Client.ApiResponse DeleteIdentityCredentialsWithHttpInfo(string id, string type, int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -1792,6 +1915,9 @@ public Ory.Kratos.Client.Client.ApiResponse DeleteIdentityCredentialsWit localVarRequestOptions.PathParameters.Add("id", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(id)); // path parameter localVarRequestOptions.PathParameters.Add("type", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(type)); // path parameter + localVarRequestOptions.Operation = "IdentityApi.DeleteIdentityCredentials"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -1818,11 +1944,12 @@ public Ory.Kratos.Client.Client.ApiResponse DeleteIdentityCredentialsWit /// Thrown when fails to make API call /// ID is the identity's ID. /// Type is the type of credentials to be deleted. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeleteIdentityCredentialsAsync(string id, string type, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteIdentityCredentialsAsync(string id, string type, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteIdentityCredentialsWithHttpInfoAsync(id, type, cancellationToken).ConfigureAwait(false); + await DeleteIdentityCredentialsWithHttpInfoAsync(id, type, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1831,9 +1958,10 @@ public Ory.Kratos.Client.Client.ApiResponse DeleteIdentityCredentialsWit /// Thrown when fails to make API call /// ID is the identity's ID. /// Type is the type of credentials to be deleted. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteIdentityCredentialsWithHttpInfoAsync(string id, string type, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteIdentityCredentialsWithHttpInfoAsync(string id, string type, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -1873,6 +2001,9 @@ public Ory.Kratos.Client.Client.ApiResponse DeleteIdentityCredentialsWit localVarRequestOptions.PathParameters.Add("id", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(id)); // path parameter localVarRequestOptions.PathParameters.Add("type", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(type)); // path parameter + localVarRequestOptions.Operation = "IdentityApi.DeleteIdentityCredentials"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -1899,8 +2030,9 @@ public Ory.Kratos.Client.Client.ApiResponse DeleteIdentityCredentialsWit /// /// Thrown when fails to make API call /// ID is the identity's ID. + /// Index associated with the operation. /// - public void DeleteIdentitySessions(string id) + public void DeleteIdentitySessions(string id, int operationIndex = 0) { DeleteIdentitySessionsWithHttpInfo(id); } @@ -1910,8 +2042,9 @@ public void DeleteIdentitySessions(string id) /// /// Thrown when fails to make API call /// ID is the identity's ID. + /// Index associated with the operation. /// ApiResponse of Object(void) - public Ory.Kratos.Client.Client.ApiResponse DeleteIdentitySessionsWithHttpInfo(string id) + public Ory.Kratos.Client.Client.ApiResponse DeleteIdentitySessionsWithHttpInfo(string id, int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -1943,6 +2076,9 @@ public Ory.Kratos.Client.Client.ApiResponse DeleteIdentitySessionsWithHt localVarRequestOptions.PathParameters.Add("id", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Operation = "IdentityApi.DeleteIdentitySessions"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -1968,11 +2104,12 @@ public Ory.Kratos.Client.Client.ApiResponse DeleteIdentitySessionsWithHt /// /// Thrown when fails to make API call /// ID is the identity's ID. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeleteIdentitySessionsAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeleteIdentitySessionsAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DeleteIdentitySessionsWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); + await DeleteIdentitySessionsWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -1980,9 +2117,10 @@ public Ory.Kratos.Client.Client.ApiResponse DeleteIdentitySessionsWithHt /// /// Thrown when fails to make API call /// ID is the identity's ID. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteIdentitySessionsWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeleteIdentitySessionsWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -2015,6 +2153,9 @@ public Ory.Kratos.Client.Client.ApiResponse DeleteIdentitySessionsWithHt localVarRequestOptions.PathParameters.Add("id", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Operation = "IdentityApi.DeleteIdentitySessions"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -2041,8 +2182,9 @@ public Ory.Kratos.Client.Client.ApiResponse DeleteIdentitySessionsWithHt /// /// Thrown when fails to make API call /// ID is the session's ID. + /// Index associated with the operation. /// - public void DisableSession(string id) + public void DisableSession(string id, int operationIndex = 0) { DisableSessionWithHttpInfo(id); } @@ -2052,8 +2194,9 @@ public void DisableSession(string id) /// /// Thrown when fails to make API call /// ID is the session's ID. + /// Index associated with the operation. /// ApiResponse of Object(void) - public Ory.Kratos.Client.Client.ApiResponse DisableSessionWithHttpInfo(string id) + public Ory.Kratos.Client.Client.ApiResponse DisableSessionWithHttpInfo(string id, int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -2085,6 +2228,9 @@ public Ory.Kratos.Client.Client.ApiResponse DisableSessionWithHttpInfo(s localVarRequestOptions.PathParameters.Add("id", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Operation = "IdentityApi.DisableSession"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -2110,11 +2256,12 @@ public Ory.Kratos.Client.Client.ApiResponse DisableSessionWithHttpInfo(s /// /// Thrown when fails to make API call /// ID is the session's ID. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DisableSessionAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DisableSessionAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await DisableSessionWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); + await DisableSessionWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -2122,9 +2269,10 @@ public Ory.Kratos.Client.Client.ApiResponse DisableSessionWithHttpInfo(s /// /// Thrown when fails to make API call /// ID is the session's ID. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DisableSessionWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DisableSessionWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -2157,6 +2305,9 @@ public Ory.Kratos.Client.Client.ApiResponse DisableSessionWithHttpInfo(s localVarRequestOptions.PathParameters.Add("id", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Operation = "IdentityApi.DisableSession"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -2183,8 +2334,9 @@ public Ory.Kratos.Client.Client.ApiResponse DisableSessionWithHttpInfo(s /// /// Thrown when fails to make API call /// ID is the session's ID. + /// Index associated with the operation. /// KratosSession - public KratosSession ExtendSession(string id) + public KratosSession ExtendSession(string id, int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = ExtendSessionWithHttpInfo(id); return localVarResponse.Data; @@ -2195,8 +2347,9 @@ public KratosSession ExtendSession(string id) /// /// Thrown when fails to make API call /// ID is the session's ID. + /// Index associated with the operation. /// ApiResponse of KratosSession - public Ory.Kratos.Client.Client.ApiResponse ExtendSessionWithHttpInfo(string id) + public Ory.Kratos.Client.Client.ApiResponse ExtendSessionWithHttpInfo(string id, int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -2228,6 +2381,9 @@ public Ory.Kratos.Client.Client.ApiResponse ExtendSessionWithHttp localVarRequestOptions.PathParameters.Add("id", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Operation = "IdentityApi.ExtendSession"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -2253,11 +2409,12 @@ public Ory.Kratos.Client.Client.ApiResponse ExtendSessionWithHttp /// /// Thrown when fails to make API call /// ID is the session's ID. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosSession - public async System.Threading.Tasks.Task ExtendSessionAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task ExtendSessionAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await ExtendSessionWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await ExtendSessionWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2266,9 +2423,10 @@ public Ory.Kratos.Client.Client.ApiResponse ExtendSessionWithHttp /// /// Thrown when fails to make API call /// ID is the session's ID. + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosSession) - public async System.Threading.Tasks.Task> ExtendSessionWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ExtendSessionWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -2301,6 +2459,9 @@ public Ory.Kratos.Client.Client.ApiResponse ExtendSessionWithHttp localVarRequestOptions.PathParameters.Add("id", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Operation = "IdentityApi.ExtendSession"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -2328,8 +2489,9 @@ public Ory.Kratos.Client.Client.ApiResponse ExtendSessionWithHttp /// Thrown when fails to make API call /// ID must be set to the ID of identity you want to get /// Include Credentials in Response Include any credential, for example `password` or `oidc`, in the response. When set to `oidc`, This will return the initial OAuth 2.0 Access Token, OAuth 2.0 Refresh Token and the OpenID Connect ID Token if available. (optional) + /// Index associated with the operation. /// KratosIdentity - public KratosIdentity GetIdentity(string id, List includeCredential = default(List)) + public KratosIdentity GetIdentity(string id, List? includeCredential = default(List?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = GetIdentityWithHttpInfo(id, includeCredential); return localVarResponse.Data; @@ -2341,8 +2503,9 @@ public Ory.Kratos.Client.Client.ApiResponse ExtendSessionWithHttp /// Thrown when fails to make API call /// ID must be set to the ID of identity you want to get /// Include Credentials in Response Include any credential, for example `password` or `oidc`, in the response. When set to `oidc`, This will return the initial OAuth 2.0 Access Token, OAuth 2.0 Refresh Token and the OpenID Connect ID Token if available. (optional) + /// Index associated with the operation. /// ApiResponse of KratosIdentity - public Ory.Kratos.Client.Client.ApiResponse GetIdentityWithHttpInfo(string id, List includeCredential = default(List)) + public Ory.Kratos.Client.Client.ApiResponse GetIdentityWithHttpInfo(string id, List? includeCredential = default(List?), int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -2378,6 +2541,9 @@ public Ory.Kratos.Client.Client.ApiResponse ExtendSessionWithHttp localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("multi", "include_credential", includeCredential)); } + localVarRequestOptions.Operation = "IdentityApi.GetIdentity"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -2404,11 +2570,12 @@ public Ory.Kratos.Client.Client.ApiResponse ExtendSessionWithHttp /// Thrown when fails to make API call /// ID must be set to the ID of identity you want to get /// Include Credentials in Response Include any credential, for example `password` or `oidc`, in the response. When set to `oidc`, This will return the initial OAuth 2.0 Access Token, OAuth 2.0 Refresh Token and the OpenID Connect ID Token if available. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosIdentity - public async System.Threading.Tasks.Task GetIdentityAsync(string id, List includeCredential = default(List), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetIdentityAsync(string id, List? includeCredential = default(List?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await GetIdentityWithHttpInfoAsync(id, includeCredential, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await GetIdentityWithHttpInfoAsync(id, includeCredential, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2418,9 +2585,10 @@ public Ory.Kratos.Client.Client.ApiResponse ExtendSessionWithHttp /// Thrown when fails to make API call /// ID must be set to the ID of identity you want to get /// Include Credentials in Response Include any credential, for example `password` or `oidc`, in the response. When set to `oidc`, This will return the initial OAuth 2.0 Access Token, OAuth 2.0 Refresh Token and the OpenID Connect ID Token if available. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosIdentity) - public async System.Threading.Tasks.Task> GetIdentityWithHttpInfoAsync(string id, List includeCredential = default(List), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetIdentityWithHttpInfoAsync(string id, List? includeCredential = default(List?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -2457,6 +2625,9 @@ public Ory.Kratos.Client.Client.ApiResponse ExtendSessionWithHttp localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("multi", "include_credential", includeCredential)); } + localVarRequestOptions.Operation = "IdentityApi.GetIdentity"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -2483,8 +2654,9 @@ public Ory.Kratos.Client.Client.ApiResponse ExtendSessionWithHttp /// /// Thrown when fails to make API call /// ID must be set to the ID of schema you want to get + /// Index associated with the operation. /// Object - public Object GetIdentitySchema(string id) + public Object GetIdentitySchema(string id, int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = GetIdentitySchemaWithHttpInfo(id); return localVarResponse.Data; @@ -2495,8 +2667,9 @@ public Object GetIdentitySchema(string id) /// /// Thrown when fails to make API call /// ID must be set to the ID of schema you want to get + /// Index associated with the operation. /// ApiResponse of Object - public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInfo(string id) + public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInfo(string id, int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -2528,6 +2701,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf localVarRequestOptions.PathParameters.Add("id", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Operation = "IdentityApi.GetIdentitySchema"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get("/schemas/{id}", localVarRequestOptions, this.Configuration); @@ -2548,11 +2724,12 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// /// Thrown when fails to make API call /// ID must be set to the ID of schema you want to get + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of Object - public async System.Threading.Tasks.Task GetIdentitySchemaAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetIdentitySchemaAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await GetIdentitySchemaWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await GetIdentitySchemaWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2561,9 +2738,10 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// /// Thrown when fails to make API call /// ID must be set to the ID of schema you want to get + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (Object) - public async System.Threading.Tasks.Task> GetIdentitySchemaWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetIdentitySchemaWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -2596,6 +2774,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf localVarRequestOptions.PathParameters.Add("id", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Operation = "IdentityApi.GetIdentitySchema"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync("/schemas/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -2618,8 +2799,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// Thrown when fails to make API call /// ID is the session's ID. /// ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. Example - ?expand=Identity&expand=Devices If no value is provided, the expandable properties are skipped. (optional) + /// Index associated with the operation. /// KratosSession - public KratosSession GetSession(string id, List expand = default(List)) + public KratosSession GetSession(string id, List? expand = default(List?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = GetSessionWithHttpInfo(id, expand); return localVarResponse.Data; @@ -2631,8 +2813,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// Thrown when fails to make API call /// ID is the session's ID. /// ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. Example - ?expand=Identity&expand=Devices If no value is provided, the expandable properties are skipped. (optional) + /// Index associated with the operation. /// ApiResponse of KratosSession - public Ory.Kratos.Client.Client.ApiResponse GetSessionWithHttpInfo(string id, List expand = default(List)) + public Ory.Kratos.Client.Client.ApiResponse GetSessionWithHttpInfo(string id, List? expand = default(List?), int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -2668,6 +2851,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("multi", "expand", expand)); } + localVarRequestOptions.Operation = "IdentityApi.GetSession"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -2694,11 +2880,12 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// Thrown when fails to make API call /// ID is the session's ID. /// ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. Example - ?expand=Identity&expand=Devices If no value is provided, the expandable properties are skipped. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosSession - public async System.Threading.Tasks.Task GetSessionAsync(string id, List expand = default(List), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetSessionAsync(string id, List? expand = default(List?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await GetSessionWithHttpInfoAsync(id, expand, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await GetSessionWithHttpInfoAsync(id, expand, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2708,9 +2895,10 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// Thrown when fails to make API call /// ID is the session's ID. /// ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. Example - ?expand=Identity&expand=Devices If no value is provided, the expandable properties are skipped. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosSession) - public async System.Threading.Tasks.Task> GetSessionWithHttpInfoAsync(string id, List expand = default(List), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetSessionWithHttpInfoAsync(string id, List? expand = default(List?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -2747,6 +2935,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("multi", "expand", expand)); } + localVarRequestOptions.Operation = "IdentityApi.GetSession"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -2780,8 +2971,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// List of ids used to filter identities. If this list is empty, then no filter will be applied. (optional) /// CredentialsIdentifier is the identifier (username, email) of the credentials to look up using exact match. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used. (optional) /// This is an EXPERIMENTAL parameter that WILL CHANGE. Do NOT rely on consistent, deterministic behavior. THIS PARAMETER WILL BE REMOVED IN AN UPCOMING RELEASE WITHOUT ANY MIGRATION PATH. CredentialsIdentifierSimilar is the (partial) identifier (username, email) of the credentials to look up using similarity search. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used. (optional) + /// Index associated with the operation. /// List<KratosIdentity> - public List ListIdentities(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), string consistency = default(string), List ids = default(List), string credentialsIdentifier = default(string), string previewCredentialsIdentifierSimilar = default(string)) + public List ListIdentities(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), string? consistency = default(string?), List? ids = default(List?), string? credentialsIdentifier = default(string?), string? previewCredentialsIdentifierSimilar = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse> localVarResponse = ListIdentitiesWithHttpInfo(perPage, page, pageSize, pageToken, consistency, ids, credentialsIdentifier, previewCredentialsIdentifierSimilar); return localVarResponse.Data; @@ -2799,8 +2991,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// List of ids used to filter identities. If this list is empty, then no filter will be applied. (optional) /// CredentialsIdentifier is the identifier (username, email) of the credentials to look up using exact match. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used. (optional) /// This is an EXPERIMENTAL parameter that WILL CHANGE. Do NOT rely on consistent, deterministic behavior. THIS PARAMETER WILL BE REMOVED IN AN UPCOMING RELEASE WITHOUT ANY MIGRATION PATH. CredentialsIdentifierSimilar is the (partial) identifier (username, email) of the credentials to look up using similarity search. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used. (optional) + /// Index associated with the operation. /// ApiResponse of List<KratosIdentity> - public Ory.Kratos.Client.Client.ApiResponse> ListIdentitiesWithHttpInfo(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), string consistency = default(string), List ids = default(List), string credentialsIdentifier = default(string), string previewCredentialsIdentifierSimilar = default(string)) + public Ory.Kratos.Client.Client.ApiResponse> ListIdentitiesWithHttpInfo(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), string? consistency = default(string?), List? ids = default(List?), string? credentialsIdentifier = default(string?), string? previewCredentialsIdentifierSimilar = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -2857,6 +3050,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("", "preview_credentials_identifier_similar", previewCredentialsIdentifierSimilar)); } + localVarRequestOptions.Operation = "IdentityApi.ListIdentities"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -2889,11 +3085,12 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// List of ids used to filter identities. If this list is empty, then no filter will be applied. (optional) /// CredentialsIdentifier is the identifier (username, email) of the credentials to look up using exact match. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used. (optional) /// This is an EXPERIMENTAL parameter that WILL CHANGE. Do NOT rely on consistent, deterministic behavior. THIS PARAMETER WILL BE REMOVED IN AN UPCOMING RELEASE WITHOUT ANY MIGRATION PATH. CredentialsIdentifierSimilar is the (partial) identifier (username, email) of the credentials to look up using similarity search. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<KratosIdentity> - public async System.Threading.Tasks.Task> ListIdentitiesAsync(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), string consistency = default(string), List ids = default(List), string credentialsIdentifier = default(string), string previewCredentialsIdentifierSimilar = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ListIdentitiesAsync(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), string? consistency = default(string?), List? ids = default(List?), string? credentialsIdentifier = default(string?), string? previewCredentialsIdentifierSimilar = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse> localVarResponse = await ListIdentitiesWithHttpInfoAsync(perPage, page, pageSize, pageToken, consistency, ids, credentialsIdentifier, previewCredentialsIdentifierSimilar, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse> localVarResponse = await ListIdentitiesWithHttpInfoAsync(perPage, page, pageSize, pageToken, consistency, ids, credentialsIdentifier, previewCredentialsIdentifierSimilar, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -2909,9 +3106,10 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// List of ids used to filter identities. If this list is empty, then no filter will be applied. (optional) /// CredentialsIdentifier is the identifier (username, email) of the credentials to look up using exact match. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used. (optional) /// This is an EXPERIMENTAL parameter that WILL CHANGE. Do NOT rely on consistent, deterministic behavior. THIS PARAMETER WILL BE REMOVED IN AN UPCOMING RELEASE WITHOUT ANY MIGRATION PATH. CredentialsIdentifierSimilar is the (partial) identifier (username, email) of the credentials to look up using similarity search. Only one of CredentialsIdentifier and CredentialsIdentifierSimilar can be used. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<KratosIdentity>) - public async System.Threading.Tasks.Task>> ListIdentitiesWithHttpInfoAsync(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), string consistency = default(string), List ids = default(List), string credentialsIdentifier = default(string), string previewCredentialsIdentifierSimilar = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> ListIdentitiesWithHttpInfoAsync(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), string? consistency = default(string?), List? ids = default(List?), string? credentialsIdentifier = default(string?), string? previewCredentialsIdentifierSimilar = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -2969,6 +3167,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("", "preview_credentials_identifier_similar", previewCredentialsIdentifierSimilar)); } + localVarRequestOptions.Operation = "IdentityApi.ListIdentities"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -2998,8 +3199,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// Deprecated Pagination Page DEPRECATED: Please use `page_token` instead. This parameter will be removed in the future. This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. The first page can be retrieved by omitting this parameter. Following page pointers will be returned in the `Link` header. (optional) /// Page Size This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") + /// Index associated with the operation. /// List<KratosIdentitySchemaContainer> - public List ListIdentitySchemas(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string)) + public List ListIdentitySchemas(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse> localVarResponse = ListIdentitySchemasWithHttpInfo(perPage, page, pageSize, pageToken); return localVarResponse.Data; @@ -3013,8 +3215,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// Deprecated Pagination Page DEPRECATED: Please use `page_token` instead. This parameter will be removed in the future. This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. The first page can be retrieved by omitting this parameter. Following page pointers will be returned in the `Link` header. (optional) /// Page Size This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") + /// Index associated with the operation. /// ApiResponse of List<KratosIdentitySchemaContainer> - public Ory.Kratos.Client.Client.ApiResponse> ListIdentitySchemasWithHttpInfo(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string)) + public Ory.Kratos.Client.Client.ApiResponse> ListIdentitySchemasWithHttpInfo(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -3055,6 +3258,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("", "page_token", pageToken)); } + localVarRequestOptions.Operation = "IdentityApi.ListIdentitySchemas"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = this.Client.Get>("/schemas", localVarRequestOptions, this.Configuration); @@ -3078,11 +3284,12 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// Deprecated Pagination Page DEPRECATED: Please use `page_token` instead. This parameter will be removed in the future. This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. The first page can be retrieved by omitting this parameter. Following page pointers will be returned in the `Link` header. (optional) /// Page Size This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<KratosIdentitySchemaContainer> - public async System.Threading.Tasks.Task> ListIdentitySchemasAsync(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ListIdentitySchemasAsync(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse> localVarResponse = await ListIdentitySchemasWithHttpInfoAsync(perPage, page, pageSize, pageToken, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse> localVarResponse = await ListIdentitySchemasWithHttpInfoAsync(perPage, page, pageSize, pageToken, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -3094,9 +3301,10 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// Deprecated Pagination Page DEPRECATED: Please use `page_token` instead. This parameter will be removed in the future. This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. The first page can be retrieved by omitting this parameter. Following page pointers will be returned in the `Link` header. (optional) /// Page Size This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<KratosIdentitySchemaContainer>) - public async System.Threading.Tasks.Task>> ListIdentitySchemasWithHttpInfoAsync(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> ListIdentitySchemasWithHttpInfoAsync(long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -3138,6 +3346,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("", "page_token", pageToken)); } + localVarRequestOptions.Operation = "IdentityApi.ListIdentitySchemas"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync>("/schemas", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); @@ -3164,8 +3375,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// Page Size This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned. (optional) + /// Index associated with the operation. /// List<KratosSession> - public List ListIdentitySessions(string id, long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), bool? active = default(bool?)) + public List ListIdentitySessions(string id, long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), bool? active = default(bool?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse> localVarResponse = ListIdentitySessionsWithHttpInfo(id, perPage, page, pageSize, pageToken, active); return localVarResponse.Data; @@ -3181,8 +3393,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// Page Size This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned. (optional) + /// Index associated with the operation. /// ApiResponse of List<KratosSession> - public Ory.Kratos.Client.Client.ApiResponse> ListIdentitySessionsWithHttpInfo(string id, long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), bool? active = default(bool?)) + public Ory.Kratos.Client.Client.ApiResponse> ListIdentitySessionsWithHttpInfo(string id, long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), bool? active = default(bool?), int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -3234,6 +3447,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("", "active", active)); } + localVarRequestOptions.Operation = "IdentityApi.ListIdentitySessions"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -3264,11 +3480,12 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// Page Size This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<KratosSession> - public async System.Threading.Tasks.Task> ListIdentitySessionsAsync(string id, long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), bool? active = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ListIdentitySessionsAsync(string id, long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), bool? active = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse> localVarResponse = await ListIdentitySessionsWithHttpInfoAsync(id, perPage, page, pageSize, pageToken, active, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse> localVarResponse = await ListIdentitySessionsWithHttpInfoAsync(id, perPage, page, pageSize, pageToken, active, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -3282,9 +3499,10 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// Page Size This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to 250) /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional, default to "1") /// Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<KratosSession>) - public async System.Threading.Tasks.Task>> ListIdentitySessionsWithHttpInfoAsync(string id, long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string pageToken = default(string), bool? active = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> ListIdentitySessionsWithHttpInfoAsync(string id, long? perPage = default(long?), long? page = default(long?), long? pageSize = default(long?), string? pageToken = default(string?), bool? active = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -3337,6 +3555,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("", "active", active)); } + localVarRequestOptions.Operation = "IdentityApi.ListIdentitySessions"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -3366,8 +3587,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) /// Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned. (optional) /// ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. If no value is provided, the expandable properties are skipped. (optional) + /// Index associated with the operation. /// List<KratosSession> - public List ListSessions(long? pageSize = default(long?), string pageToken = default(string), bool? active = default(bool?), List expand = default(List)) + public List ListSessions(long? pageSize = default(long?), string? pageToken = default(string?), bool? active = default(bool?), List? expand = default(List?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse> localVarResponse = ListSessionsWithHttpInfo(pageSize, pageToken, active, expand); return localVarResponse.Data; @@ -3381,8 +3603,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) /// Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned. (optional) /// ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. If no value is provided, the expandable properties are skipped. (optional) + /// Index associated with the operation. /// ApiResponse of List<KratosSession> - public Ory.Kratos.Client.Client.ApiResponse> ListSessionsWithHttpInfo(long? pageSize = default(long?), string pageToken = default(string), bool? active = default(bool?), List expand = default(List)) + public Ory.Kratos.Client.Client.ApiResponse> ListSessionsWithHttpInfo(long? pageSize = default(long?), string? pageToken = default(string?), bool? active = default(bool?), List? expand = default(List?), int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -3423,6 +3646,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("multi", "expand", expand)); } + localVarRequestOptions.Operation = "IdentityApi.ListSessions"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -3451,11 +3677,12 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) /// Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned. (optional) /// ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. If no value is provided, the expandable properties are skipped. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of List<KratosSession> - public async System.Threading.Tasks.Task> ListSessionsAsync(long? pageSize = default(long?), string pageToken = default(string), bool? active = default(bool?), List expand = default(List), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ListSessionsAsync(long? pageSize = default(long?), string? pageToken = default(string?), bool? active = default(bool?), List? expand = default(List?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse> localVarResponse = await ListSessionsWithHttpInfoAsync(pageSize, pageToken, active, expand, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse> localVarResponse = await ListSessionsWithHttpInfoAsync(pageSize, pageToken, active, expand, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -3467,9 +3694,10 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (optional) /// Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned. (optional) /// ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. If no value is provided, the expandable properties are skipped. (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<KratosSession>) - public async System.Threading.Tasks.Task>> ListSessionsWithHttpInfoAsync(long? pageSize = default(long?), string pageToken = default(string), bool? active = default(bool?), List expand = default(List), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> ListSessionsWithHttpInfoAsync(long? pageSize = default(long?), string? pageToken = default(string?), bool? active = default(bool?), List? expand = default(List?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -3511,6 +3739,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf localVarRequestOptions.QueryParameters.Add(Ory.Kratos.Client.Client.ClientUtils.ParameterToMultiMap("multi", "expand", expand)); } + localVarRequestOptions.Operation = "IdentityApi.ListSessions"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -3538,8 +3769,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// Thrown when fails to make API call /// ID must be set to the ID of identity you want to update /// (optional) + /// Index associated with the operation. /// KratosIdentity - public KratosIdentity PatchIdentity(string id, List kratosJsonPatch = default(List)) + public KratosIdentity PatchIdentity(string id, List? kratosJsonPatch = default(List?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = PatchIdentityWithHttpInfo(id, kratosJsonPatch); return localVarResponse.Data; @@ -3551,8 +3783,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// Thrown when fails to make API call /// ID must be set to the ID of identity you want to update /// (optional) + /// Index associated with the operation. /// ApiResponse of KratosIdentity - public Ory.Kratos.Client.Client.ApiResponse PatchIdentityWithHttpInfo(string id, List kratosJsonPatch = default(List)) + public Ory.Kratos.Client.Client.ApiResponse PatchIdentityWithHttpInfo(string id, List? kratosJsonPatch = default(List?), int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -3586,6 +3819,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf localVarRequestOptions.PathParameters.Add("id", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(id)); // path parameter localVarRequestOptions.Data = kratosJsonPatch; + localVarRequestOptions.Operation = "IdentityApi.PatchIdentity"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -3612,11 +3848,12 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// Thrown when fails to make API call /// ID must be set to the ID of identity you want to update /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosIdentity - public async System.Threading.Tasks.Task PatchIdentityAsync(string id, List kratosJsonPatch = default(List), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task PatchIdentityAsync(string id, List? kratosJsonPatch = default(List?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await PatchIdentityWithHttpInfoAsync(id, kratosJsonPatch, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await PatchIdentityWithHttpInfoAsync(id, kratosJsonPatch, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -3626,9 +3863,10 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// Thrown when fails to make API call /// ID must be set to the ID of identity you want to update /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosIdentity) - public async System.Threading.Tasks.Task> PatchIdentityWithHttpInfoAsync(string id, List kratosJsonPatch = default(List), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> PatchIdentityWithHttpInfoAsync(string id, List? kratosJsonPatch = default(List?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -3663,6 +3901,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf localVarRequestOptions.PathParameters.Add("id", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(id)); // path parameter localVarRequestOptions.Data = kratosJsonPatch; + localVarRequestOptions.Operation = "IdentityApi.PatchIdentity"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -3690,8 +3931,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// Thrown when fails to make API call /// ID must be set to the ID of identity you want to update /// (optional) + /// Index associated with the operation. /// KratosIdentity - public KratosIdentity UpdateIdentity(string id, KratosUpdateIdentityBody kratosUpdateIdentityBody = default(KratosUpdateIdentityBody)) + public KratosIdentity UpdateIdentity(string id, KratosUpdateIdentityBody? kratosUpdateIdentityBody = default(KratosUpdateIdentityBody?), int operationIndex = 0) { Ory.Kratos.Client.Client.ApiResponse localVarResponse = UpdateIdentityWithHttpInfo(id, kratosUpdateIdentityBody); return localVarResponse.Data; @@ -3703,8 +3945,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// Thrown when fails to make API call /// ID must be set to the ID of identity you want to update /// (optional) + /// Index associated with the operation. /// ApiResponse of KratosIdentity - public Ory.Kratos.Client.Client.ApiResponse UpdateIdentityWithHttpInfo(string id, KratosUpdateIdentityBody kratosUpdateIdentityBody = default(KratosUpdateIdentityBody)) + public Ory.Kratos.Client.Client.ApiResponse UpdateIdentityWithHttpInfo(string id, KratosUpdateIdentityBody? kratosUpdateIdentityBody = default(KratosUpdateIdentityBody?), int operationIndex = 0) { // verify the required parameter 'id' is set if (id == null) @@ -3738,6 +3981,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf localVarRequestOptions.PathParameters.Add("id", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(id)); // path parameter localVarRequestOptions.Data = kratosUpdateIdentityBody; + localVarRequestOptions.Operation = "IdentityApi.UpdateIdentity"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { @@ -3764,11 +4010,12 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// Thrown when fails to make API call /// ID must be set to the ID of identity you want to update /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of KratosIdentity - public async System.Threading.Tasks.Task UpdateIdentityAsync(string id, KratosUpdateIdentityBody kratosUpdateIdentityBody = default(KratosUpdateIdentityBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdateIdentityAsync(string id, KratosUpdateIdentityBody? kratosUpdateIdentityBody = default(KratosUpdateIdentityBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await UpdateIdentityWithHttpInfoAsync(id, kratosUpdateIdentityBody, cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await UpdateIdentityWithHttpInfoAsync(id, kratosUpdateIdentityBody, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -3778,9 +4025,10 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf /// Thrown when fails to make API call /// ID must be set to the ID of identity you want to update /// (optional) + /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (KratosIdentity) - public async System.Threading.Tasks.Task> UpdateIdentityWithHttpInfoAsync(string id, KratosUpdateIdentityBody kratosUpdateIdentityBody = default(KratosUpdateIdentityBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdateIdentityWithHttpInfoAsync(string id, KratosUpdateIdentityBody? kratosUpdateIdentityBody = default(KratosUpdateIdentityBody?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'id' is set if (id == null) @@ -3815,6 +4063,9 @@ public Ory.Kratos.Client.Client.ApiResponse GetIdentitySchemaWithHttpInf localVarRequestOptions.PathParameters.Add("id", Ory.Kratos.Client.Client.ClientUtils.ParameterToString(id)); // path parameter localVarRequestOptions.Data = kratosUpdateIdentityBody; + localVarRequestOptions.Operation = "IdentityApi.UpdateIdentity"; + localVarRequestOptions.OperationIndex = operationIndex; + // authentication (oryAccessToken) required if (!string.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization"))) { diff --git a/Ory.Kratos.Client/Api/MetadataApi.cs b/Ory.Kratos.Client/Api/MetadataApi.cs index fa81cc04..a9f8db50 100644 --- a/Ory.Kratos.Client/Api/MetadataApi.cs +++ b/Ory.Kratos.Client/Api/MetadataApi.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -34,8 +33,9 @@ public interface IMetadataApiSync : IApiAccessor /// This endpoint returns the version of Ory Kratos. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call - /// KratosInlineResponse2001 - KratosInlineResponse2001 GetVersion(); + /// Index associated with the operation. + /// KratosGetVersion200Response + KratosGetVersion200Response GetVersion(int operationIndex = 0); /// /// Return Running Software Version. @@ -44,8 +44,9 @@ public interface IMetadataApiSync : IApiAccessor /// This endpoint returns the version of Ory Kratos. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call - /// ApiResponse of KratosInlineResponse2001 - ApiResponse GetVersionWithHttpInfo(); + /// Index associated with the operation. + /// ApiResponse of KratosGetVersion200Response + ApiResponse GetVersionWithHttpInfo(int operationIndex = 0); /// /// Check HTTP Server Status /// @@ -53,8 +54,9 @@ public interface IMetadataApiSync : IApiAccessor /// This endpoint returns a HTTP 200 status code when Ory Kratos is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call - /// KratosInlineResponse200 - KratosInlineResponse200 IsAlive(); + /// Index associated with the operation. + /// KratosIsAlive200Response + KratosIsAlive200Response IsAlive(int operationIndex = 0); /// /// Check HTTP Server Status @@ -63,8 +65,9 @@ public interface IMetadataApiSync : IApiAccessor /// This endpoint returns a HTTP 200 status code when Ory Kratos is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call - /// ApiResponse of KratosInlineResponse200 - ApiResponse IsAliveWithHttpInfo(); + /// Index associated with the operation. + /// ApiResponse of KratosIsAlive200Response + ApiResponse IsAliveWithHttpInfo(int operationIndex = 0); /// /// Check HTTP Server and Database Status /// @@ -72,8 +75,9 @@ public interface IMetadataApiSync : IApiAccessor /// This endpoint returns a HTTP 200 status code when Ory Kratos is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Kratos, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call - /// KratosInlineResponse200 - KratosInlineResponse200 IsReady(); + /// Index associated with the operation. + /// KratosIsAlive200Response + KratosIsAlive200Response IsReady(int operationIndex = 0); /// /// Check HTTP Server and Database Status @@ -82,8 +86,9 @@ public interface IMetadataApiSync : IApiAccessor /// This endpoint returns a HTTP 200 status code when Ory Kratos is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Kratos, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call - /// ApiResponse of KratosInlineResponse200 - ApiResponse IsReadyWithHttpInfo(); + /// Index associated with the operation. + /// ApiResponse of KratosIsAlive200Response + ApiResponse IsReadyWithHttpInfo(int operationIndex = 0); #endregion Synchronous Operations } @@ -100,9 +105,10 @@ public interface IMetadataApiAsync : IApiAccessor /// This endpoint returns the version of Ory Kratos. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of KratosInlineResponse2001 - System.Threading.Tasks.Task GetVersionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of KratosGetVersion200Response + System.Threading.Tasks.Task GetVersionAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Return Running Software Version. @@ -111,9 +117,10 @@ public interface IMetadataApiAsync : IApiAccessor /// This endpoint returns the version of Ory Kratos. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (KratosInlineResponse2001) - System.Threading.Tasks.Task> GetVersionWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (KratosGetVersion200Response) + System.Threading.Tasks.Task> GetVersionWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Check HTTP Server Status /// @@ -121,9 +128,10 @@ public interface IMetadataApiAsync : IApiAccessor /// This endpoint returns a HTTP 200 status code when Ory Kratos is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of KratosInlineResponse200 - System.Threading.Tasks.Task IsAliveAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of KratosIsAlive200Response + System.Threading.Tasks.Task IsAliveAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Check HTTP Server Status @@ -132,9 +140,10 @@ public interface IMetadataApiAsync : IApiAccessor /// This endpoint returns a HTTP 200 status code when Ory Kratos is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (KratosInlineResponse200) - System.Threading.Tasks.Task> IsAliveWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (KratosIsAlive200Response) + System.Threading.Tasks.Task> IsAliveWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Check HTTP Server and Database Status /// @@ -142,9 +151,10 @@ public interface IMetadataApiAsync : IApiAccessor /// This endpoint returns a HTTP 200 status code when Ory Kratos is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Kratos, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of KratosInlineResponse200 - System.Threading.Tasks.Task IsReadyAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of KratosIsAlive200Response + System.Threading.Tasks.Task IsReadyAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Check HTTP Server and Database Status @@ -153,9 +163,10 @@ public interface IMetadataApiAsync : IApiAccessor /// This endpoint returns a HTTP 200 status code when Ory Kratos is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Kratos, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (KratosInlineResponse200) - System.Threading.Tasks.Task> IsReadyWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (KratosIsAlive200Response) + System.Threading.Tasks.Task> IsReadyWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -280,10 +291,11 @@ public Ory.Kratos.Client.Client.ExceptionFactory ExceptionFactory /// Return Running Software Version. This endpoint returns the version of Ory Kratos. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call - /// KratosInlineResponse2001 - public KratosInlineResponse2001 GetVersion() + /// Index associated with the operation. + /// KratosGetVersion200Response + public KratosGetVersion200Response GetVersion(int operationIndex = 0) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = GetVersionWithHttpInfo(); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = GetVersionWithHttpInfo(); return localVarResponse.Data; } @@ -291,8 +303,9 @@ public KratosInlineResponse2001 GetVersion() /// Return Running Software Version. This endpoint returns the version of Ory Kratos. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call - /// ApiResponse of KratosInlineResponse2001 - public Ory.Kratos.Client.Client.ApiResponse GetVersionWithHttpInfo() + /// Index associated with the operation. + /// ApiResponse of KratosGetVersion200Response + public Ory.Kratos.Client.Client.ApiResponse GetVersionWithHttpInfo(int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -317,9 +330,12 @@ public Ory.Kratos.Client.Client.ApiResponse GetVersion } + localVarRequestOptions.Operation = "MetadataApi.GetVersion"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request - var localVarResponse = this.Client.Get("/version", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/version", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetVersion", localVarResponse); @@ -336,11 +352,12 @@ public Ory.Kratos.Client.Client.ApiResponse GetVersion /// Return Running Software Version. This endpoint returns the version of Ory Kratos. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of KratosInlineResponse2001 - public async System.Threading.Tasks.Task GetVersionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of KratosGetVersion200Response + public async System.Threading.Tasks.Task GetVersionAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await GetVersionWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await GetVersionWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -348,9 +365,10 @@ public Ory.Kratos.Client.Client.ApiResponse GetVersion /// Return Running Software Version. This endpoint returns the version of Ory Kratos. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (KratosInlineResponse2001) - public async System.Threading.Tasks.Task> GetVersionWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (KratosGetVersion200Response) + public async System.Threading.Tasks.Task> GetVersionWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -376,9 +394,12 @@ public Ory.Kratos.Client.Client.ApiResponse GetVersion } + localVarRequestOptions.Operation = "MetadataApi.GetVersion"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/version", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.GetAsync("/version", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -396,10 +417,11 @@ public Ory.Kratos.Client.Client.ApiResponse GetVersion /// Check HTTP Server Status This endpoint returns a HTTP 200 status code when Ory Kratos is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call - /// KratosInlineResponse200 - public KratosInlineResponse200 IsAlive() + /// Index associated with the operation. + /// KratosIsAlive200Response + public KratosIsAlive200Response IsAlive(int operationIndex = 0) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = IsAliveWithHttpInfo(); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = IsAliveWithHttpInfo(); return localVarResponse.Data; } @@ -407,8 +429,9 @@ public KratosInlineResponse200 IsAlive() /// Check HTTP Server Status This endpoint returns a HTTP 200 status code when Ory Kratos is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call - /// ApiResponse of KratosInlineResponse200 - public Ory.Kratos.Client.Client.ApiResponse IsAliveWithHttpInfo() + /// Index associated with the operation. + /// ApiResponse of KratosIsAlive200Response + public Ory.Kratos.Client.Client.ApiResponse IsAliveWithHttpInfo(int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -434,9 +457,12 @@ public Ory.Kratos.Client.Client.ApiResponse IsAliveWith } + localVarRequestOptions.Operation = "MetadataApi.IsAlive"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request - var localVarResponse = this.Client.Get("/health/alive", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/health/alive", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("IsAlive", localVarResponse); @@ -453,11 +479,12 @@ public Ory.Kratos.Client.Client.ApiResponse IsAliveWith /// Check HTTP Server Status This endpoint returns a HTTP 200 status code when Ory Kratos is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of KratosInlineResponse200 - public async System.Threading.Tasks.Task IsAliveAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of KratosIsAlive200Response + public async System.Threading.Tasks.Task IsAliveAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await IsAliveWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await IsAliveWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -465,9 +492,10 @@ public Ory.Kratos.Client.Client.ApiResponse IsAliveWith /// Check HTTP Server Status This endpoint returns a HTTP 200 status code when Ory Kratos is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (KratosInlineResponse200) - public async System.Threading.Tasks.Task> IsAliveWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (KratosIsAlive200Response) + public async System.Threading.Tasks.Task> IsAliveWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -494,9 +522,12 @@ public Ory.Kratos.Client.Client.ApiResponse IsAliveWith } + localVarRequestOptions.Operation = "MetadataApi.IsAlive"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/health/alive", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.GetAsync("/health/alive", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -514,10 +545,11 @@ public Ory.Kratos.Client.Client.ApiResponse IsAliveWith /// Check HTTP Server and Database Status This endpoint returns a HTTP 200 status code when Ory Kratos is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Kratos, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call - /// KratosInlineResponse200 - public KratosInlineResponse200 IsReady() + /// Index associated with the operation. + /// KratosIsAlive200Response + public KratosIsAlive200Response IsReady(int operationIndex = 0) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = IsReadyWithHttpInfo(); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = IsReadyWithHttpInfo(); return localVarResponse.Data; } @@ -525,8 +557,9 @@ public KratosInlineResponse200 IsReady() /// Check HTTP Server and Database Status This endpoint returns a HTTP 200 status code when Ory Kratos is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Kratos, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call - /// ApiResponse of KratosInlineResponse200 - public Ory.Kratos.Client.Client.ApiResponse IsReadyWithHttpInfo() + /// Index associated with the operation. + /// ApiResponse of KratosIsAlive200Response + public Ory.Kratos.Client.Client.ApiResponse IsReadyWithHttpInfo(int operationIndex = 0) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -552,9 +585,12 @@ public Ory.Kratos.Client.Client.ApiResponse IsReadyWith } + localVarRequestOptions.Operation = "MetadataApi.IsReady"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request - var localVarResponse = this.Client.Get("/health/ready", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/health/ready", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("IsReady", localVarResponse); @@ -571,11 +607,12 @@ public Ory.Kratos.Client.Client.ApiResponse IsReadyWith /// Check HTTP Server and Database Status This endpoint returns a HTTP 200 status code when Ory Kratos is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Kratos, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of KratosInlineResponse200 - public async System.Threading.Tasks.Task IsReadyAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of KratosIsAlive200Response + public async System.Threading.Tasks.Task IsReadyAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Ory.Kratos.Client.Client.ApiResponse localVarResponse = await IsReadyWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Ory.Kratos.Client.Client.ApiResponse localVarResponse = await IsReadyWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -583,9 +620,10 @@ public Ory.Kratos.Client.Client.ApiResponse IsReadyWith /// Check HTTP Server and Database Status This endpoint returns a HTTP 200 status code when Ory Kratos is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Kratos, the health status will never refer to the cluster state, only to a single instance. /// /// Thrown when fails to make API call + /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (KratosInlineResponse200) - public async System.Threading.Tasks.Task> IsReadyWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (KratosIsAlive200Response) + public async System.Threading.Tasks.Task> IsReadyWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Kratos.Client.Client.RequestOptions localVarRequestOptions = new Ory.Kratos.Client.Client.RequestOptions(); @@ -612,9 +650,12 @@ public Ory.Kratos.Client.Client.ApiResponse IsReadyWith } + localVarRequestOptions.Operation = "MetadataApi.IsReady"; + localVarRequestOptions.OperationIndex = operationIndex; + // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/health/ready", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.GetAsync("/health/ready", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { diff --git a/Ory.Kratos.Client/Client/ApiClient.cs b/Ory.Kratos.Client/Client/ApiClient.cs index a43491c1..75ae5249 100644 --- a/Ory.Kratos.Client/Client/ApiClient.cs +++ b/Ory.Kratos.Client/Client/ApiClient.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,9 +25,8 @@ using System.Web; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; -using ErrorEventArgs = Newtonsoft.Json.Serialization.ErrorEventArgs; using RestSharp; -using RestSharp.Deserializers; +using RestSharp.Serializers; using RestSharpMethod = RestSharp.Method; using Polly; @@ -37,10 +35,9 @@ namespace Ory.Kratos.Client.Client /// /// Allows RestSharp to Serialize/Deserialize JSON using our custom logic, but only when ContentType is JSON. /// - internal class CustomJsonCodec : RestSharp.Serializers.ISerializer, RestSharp.Deserializers.IDeserializer + internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer { private readonly IReadableConfiguration _configuration; - private static readonly string _contentType = "application/json"; private readonly JsonSerializerSettings _serializerSettings = new JsonSerializerSettings { // OpenAPI generated types generally hide default constructors. @@ -83,7 +80,9 @@ public string Serialize(object obj) } } - public T Deserialize(IRestResponse response) + public string Serialize(Parameter bodyParameter) => Serialize(bodyParameter.Value); + + public T Deserialize(RestResponse response) { var result = (T)Deserialize(response, typeof(T)); return result; @@ -95,7 +94,7 @@ public T Deserialize(IRestResponse response) /// The HTTP response. /// Object type. /// Object representation of the JSON string. - internal object Deserialize(IRestResponse response, Type type) + internal object Deserialize(RestResponse response, Type type) { if (type == typeof(byte[])) // return byte array { @@ -148,15 +147,18 @@ internal object Deserialize(IRestResponse response, Type type) } } - public string RootElement { get; set; } - public string Namespace { get; set; } - public string DateFormat { get; set; } + public ISerializer Serializer => this; + public IDeserializer Deserializer => this; - public string ContentType - { - get { return _contentType; } - set { throw new InvalidOperationException("Not allowed to set content type."); } - } + public string[] AcceptedContentTypes => RestSharp.ContentType.JsonAccept; + + public SupportsContentType SupportsContentType => contentType => + contentType.Value.EndsWith("json", StringComparison.InvariantCultureIgnoreCase) || + contentType.Value.EndsWith("javascript", StringComparison.InvariantCultureIgnoreCase); + + public ContentType ContentType { get; set; } = RestSharp.ContentType.Json; + + public DataFormat DataFormat => DataFormat.Json; } /// /// Provides a default implementation of an Api client (both synchronous and asynchronous implementations), @@ -187,14 +189,14 @@ public partial class ApiClient : ISynchronousClient, IAsynchronousClient /// Allows for extending request processing for generated code. /// /// The RestSharp request object - partial void InterceptRequest(IRestRequest request); + partial void InterceptRequest(RestRequest request); /// /// Allows for extending response processing for generated code. /// /// The RestSharp request object /// The RestSharp response object - partial void InterceptResponse(IRestRequest request, IRestResponse response); + partial void InterceptResponse(RestRequest request, RestResponse response); /// /// Initializes a new instance of the , defaulting to the global configurations' base url. @@ -229,25 +231,25 @@ private RestSharpMethod Method(HttpMethod method) switch (method) { case HttpMethod.Get: - other = RestSharpMethod.GET; + other = RestSharpMethod.Get; break; case HttpMethod.Post: - other = RestSharpMethod.POST; + other = RestSharpMethod.Post; break; case HttpMethod.Put: - other = RestSharpMethod.PUT; + other = RestSharpMethod.Put; break; case HttpMethod.Delete: - other = RestSharpMethod.DELETE; + other = RestSharpMethod.Delete; break; case HttpMethod.Head: - other = RestSharpMethod.HEAD; + other = RestSharpMethod.Head; break; case HttpMethod.Options: - other = RestSharpMethod.OPTIONS; + other = RestSharpMethod.Options; break; case HttpMethod.Patch: - other = RestSharpMethod.PATCH; + other = RestSharpMethod.Patch; break; default: throw new ArgumentOutOfRangeException("method", method, null); @@ -278,11 +280,7 @@ private RestRequest NewRequest( if (options == null) throw new ArgumentNullException("options"); if (configuration == null) throw new ArgumentNullException("configuration"); - RestRequest request = new RestRequest(Method(method)) - { - Resource = path, - JsonSerializer = new CustomJsonCodec(SerializerSettings, configuration) - }; + RestRequest request = new RestRequest(path, Method(method)); if (options.PathParameters != null) { @@ -377,25 +375,17 @@ private RestRequest NewRequest( var bytes = ClientUtils.ReadAsBytes(file); var fileStream = file as FileStream; if (fileStream != null) - request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name))); + request.AddFile(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name)); else - request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided")); + request.AddFile(fileParam.Key, bytes, "no_file_name_provided"); } } } - if (options.Cookies != null && options.Cookies.Count > 0) - { - foreach (var cookie in options.Cookies) - { - request.AddCookie(cookie.Name, cookie.Value); - } - } - return request; } - private ApiResponse ToApiResponse(IRestResponse response) + private ApiResponse ToApiResponse(RestResponse response) { T result = response.Data; string rawContent = response.Content; @@ -414,9 +404,17 @@ private ApiResponse ToApiResponse(IRestResponse response) } } + if (response.ContentHeaders != null) + { + foreach (var responseHeader in response.ContentHeaders) + { + transformed.Headers.Add(responseHeader.Name, ClientUtils.ParameterToString(responseHeader.Value)); + } + } + if (response.Cookies != null) { - foreach (var responseCookies in response.Cookies) + foreach (var responseCookies in response.Cookies.Cast()) { transformed.Cookies.Add( new Cookie( @@ -431,235 +429,198 @@ private ApiResponse ToApiResponse(IRestResponse response) return transformed; } - private ApiResponse Exec(RestRequest req, IReadableConfiguration configuration) + private ApiResponse Exec(RestRequest request, RequestOptions options, IReadableConfiguration configuration) { - RestClient client = new RestClient(_baseUrl); + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; - client.ClearHandlers(); - var existingDeserializer = req.JsonSerializer as IDeserializer; - if (existingDeserializer != null) - { - client.AddHandler("application/json", () => existingDeserializer); - client.AddHandler("text/json", () => existingDeserializer); - client.AddHandler("text/x-json", () => existingDeserializer); - client.AddHandler("text/javascript", () => existingDeserializer); - client.AddHandler("*+json", () => existingDeserializer); - } - else - { - var customDeserializer = new CustomJsonCodec(SerializerSettings, configuration); - client.AddHandler("application/json", () => customDeserializer); - client.AddHandler("text/json", () => customDeserializer); - client.AddHandler("text/x-json", () => customDeserializer); - client.AddHandler("text/javascript", () => customDeserializer); - client.AddHandler("*+json", () => customDeserializer); - } - - var xmlDeserializer = new XmlDeserializer(); - client.AddHandler("application/xml", () => xmlDeserializer); - client.AddHandler("text/xml", () => xmlDeserializer); - client.AddHandler("*+xml", () => xmlDeserializer); - client.AddHandler("*", () => xmlDeserializer); + var cookies = new CookieContainer(); - client.Timeout = configuration.Timeout; - - if (configuration.Proxy != null) + if (options.Cookies != null && options.Cookies.Count > 0) { - client.Proxy = configuration.Proxy; + foreach (var cookie in options.Cookies) + { + cookies.Add(new Cookie(cookie.Name, cookie.Value)); + } } - if (configuration.UserAgent != null) + var clientOptions = new RestClientOptions(baseUrl) { - client.UserAgent = configuration.UserAgent; - } + ClientCertificates = configuration.ClientCertificates, + CookieContainer = cookies, + MaxTimeout = configuration.Timeout, + Proxy = configuration.Proxy, + UserAgent = configuration.UserAgent, + UseDefaultCredentials = configuration.UseDefaultCredentials, + RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback + }; - if (configuration.ClientCertificates != null) + using (RestClient client = new RestClient(clientOptions, + configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)))) { - client.ClientCertificates = configuration.ClientCertificates; - } - - InterceptRequest(req); + InterceptRequest(request); - IRestResponse response; - if (RetryConfiguration.RetryPolicy != null) - { - var policy = RetryConfiguration.RetryPolicy; - var policyResult = policy.ExecuteAndCapture(() => client.Execute(req)); - response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse + RestResponse response; + if (RetryConfiguration.RetryPolicy != null) { - Request = req, - ErrorException = policyResult.FinalException - }; - } - else - { - response = client.Execute(req); - } + var policy = RetryConfiguration.RetryPolicy; + var policyResult = policy.ExecuteAndCapture(() => client.Execute(request)); + response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse(request) + { + ErrorException = policyResult.FinalException + }; + } + else + { + response = client.Execute(request); + } - // if the response type is oneOf/anyOf, call FromJSON to deserialize the data - if (typeof(Ory.Kratos.Client.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) - { - try + // if the response type is oneOf/anyOf, call FromJSON to deserialize the data + if (typeof(Ory.Kratos.Client.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) { - response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); + try + { + response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); + } + catch (Exception ex) + { + throw ex.InnerException != null ? ex.InnerException : ex; + } } - catch (Exception ex) + else if (typeof(T).Name == "Stream") // for binary response { - throw ex.InnerException != null ? ex.InnerException : ex; + response.Data = (T)(object)new MemoryStream(response.RawBytes); + } + else if (typeof(T).Name == "Byte[]") // for byte response + { + response.Data = (T)(object)response.RawBytes; + } + else if (typeof(T).Name == "String") // for string response + { + response.Data = (T)(object)response.Content; } - } - else if (typeof(T).Name == "Stream") // for binary response - { - response.Data = (T)(object)new MemoryStream(response.RawBytes); - } - InterceptResponse(req, response); + InterceptResponse(request, response); - var result = ToApiResponse(response); - if (response.ErrorMessage != null) - { - result.ErrorText = response.ErrorMessage; - } + var result = ToApiResponse(response); + if (response.ErrorMessage != null) + { + result.ErrorText = response.ErrorMessage; + } - if (response.Cookies != null && response.Cookies.Count > 0) - { - if (result.Cookies == null) result.Cookies = new List(); - foreach (var restResponseCookie in response.Cookies) + if (response.Cookies != null && response.Cookies.Count > 0) { - var cookie = new Cookie( - restResponseCookie.Name, - restResponseCookie.Value, - restResponseCookie.Path, - restResponseCookie.Domain - ) + if (result.Cookies == null) result.Cookies = new List(); + foreach (var restResponseCookie in response.Cookies.Cast()) { - Comment = restResponseCookie.Comment, - CommentUri = restResponseCookie.CommentUri, - Discard = restResponseCookie.Discard, - Expired = restResponseCookie.Expired, - Expires = restResponseCookie.Expires, - HttpOnly = restResponseCookie.HttpOnly, - Port = restResponseCookie.Port, - Secure = restResponseCookie.Secure, - Version = restResponseCookie.Version - }; - - result.Cookies.Add(cookie); + var cookie = new Cookie( + restResponseCookie.Name, + restResponseCookie.Value, + restResponseCookie.Path, + restResponseCookie.Domain + ) + { + Comment = restResponseCookie.Comment, + CommentUri = restResponseCookie.CommentUri, + Discard = restResponseCookie.Discard, + Expired = restResponseCookie.Expired, + Expires = restResponseCookie.Expires, + HttpOnly = restResponseCookie.HttpOnly, + Port = restResponseCookie.Port, + Secure = restResponseCookie.Secure, + Version = restResponseCookie.Version + }; + + result.Cookies.Add(cookie); + } } + return result; } - return result; } - private async Task> ExecAsync(RestRequest req, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + private async Task> ExecAsync(RestRequest request, RequestOptions options, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - RestClient client = new RestClient(_baseUrl); + var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; - client.ClearHandlers(); - var existingDeserializer = req.JsonSerializer as IDeserializer; - if (existingDeserializer != null) + var clientOptions = new RestClientOptions(baseUrl) { - client.AddHandler("application/json", () => existingDeserializer); - client.AddHandler("text/json", () => existingDeserializer); - client.AddHandler("text/x-json", () => existingDeserializer); - client.AddHandler("text/javascript", () => existingDeserializer); - client.AddHandler("*+json", () => existingDeserializer); - } - else - { - var customDeserializer = new CustomJsonCodec(SerializerSettings, configuration); - client.AddHandler("application/json", () => customDeserializer); - client.AddHandler("text/json", () => customDeserializer); - client.AddHandler("text/x-json", () => customDeserializer); - client.AddHandler("text/javascript", () => customDeserializer); - client.AddHandler("*+json", () => customDeserializer); - } - - var xmlDeserializer = new XmlDeserializer(); - client.AddHandler("application/xml", () => xmlDeserializer); - client.AddHandler("text/xml", () => xmlDeserializer); - client.AddHandler("*+xml", () => xmlDeserializer); - client.AddHandler("*", () => xmlDeserializer); - - client.Timeout = configuration.Timeout; - - if (configuration.Proxy != null) - { - client.Proxy = configuration.Proxy; - } - - if (configuration.UserAgent != null) - { - client.UserAgent = configuration.UserAgent; - } + ClientCertificates = configuration.ClientCertificates, + MaxTimeout = configuration.Timeout, + Proxy = configuration.Proxy, + UserAgent = configuration.UserAgent, + UseDefaultCredentials = configuration.UseDefaultCredentials, + RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback + }; - if (configuration.ClientCertificates != null) + using (RestClient client = new RestClient(clientOptions, + configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)))) { - client.ClientCertificates = configuration.ClientCertificates; - } - - InterceptRequest(req); + InterceptRequest(request); - IRestResponse response; - if (RetryConfiguration.AsyncRetryPolicy != null) - { - var policy = RetryConfiguration.AsyncRetryPolicy; - var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(req, ct), cancellationToken).ConfigureAwait(false); - response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse + RestResponse response; + if (RetryConfiguration.AsyncRetryPolicy != null) { - Request = req, - ErrorException = policyResult.FinalException - }; - } - else - { - response = await client.ExecuteAsync(req, cancellationToken).ConfigureAwait(false); - } + var policy = RetryConfiguration.AsyncRetryPolicy; + var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(request, ct), cancellationToken).ConfigureAwait(false); + response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse(request) + { + ErrorException = policyResult.FinalException + }; + } + else + { + response = await client.ExecuteAsync(request, cancellationToken).ConfigureAwait(false); + } - // if the response type is oneOf/anyOf, call FromJSON to deserialize the data - if (typeof(Ory.Kratos.Client.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) - { - response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); - } - else if (typeof(T).Name == "Stream") // for binary response - { - response.Data = (T)(object)new MemoryStream(response.RawBytes); - } + // if the response type is oneOf/anyOf, call FromJSON to deserialize the data + if (typeof(Ory.Kratos.Client.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) + { + response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); + } + else if (typeof(T).Name == "Stream") // for binary response + { + response.Data = (T)(object)new MemoryStream(response.RawBytes); + } + else if (typeof(T).Name == "Byte[]") // for byte response + { + response.Data = (T)(object)response.RawBytes; + } - InterceptResponse(req, response); + InterceptResponse(request, response); - var result = ToApiResponse(response); - if (response.ErrorMessage != null) - { - result.ErrorText = response.ErrorMessage; - } + var result = ToApiResponse(response); + if (response.ErrorMessage != null) + { + result.ErrorText = response.ErrorMessage; + } - if (response.Cookies != null && response.Cookies.Count > 0) - { - if (result.Cookies == null) result.Cookies = new List(); - foreach (var restResponseCookie in response.Cookies) + if (response.Cookies != null && response.Cookies.Count > 0) { - var cookie = new Cookie( - restResponseCookie.Name, - restResponseCookie.Value, - restResponseCookie.Path, - restResponseCookie.Domain - ) + if (result.Cookies == null) result.Cookies = new List(); + foreach (var restResponseCookie in response.Cookies.Cast()) { - Comment = restResponseCookie.Comment, - CommentUri = restResponseCookie.CommentUri, - Discard = restResponseCookie.Discard, - Expired = restResponseCookie.Expired, - Expires = restResponseCookie.Expires, - HttpOnly = restResponseCookie.HttpOnly, - Port = restResponseCookie.Port, - Secure = restResponseCookie.Secure, - Version = restResponseCookie.Version - }; - - result.Cookies.Add(cookie); + var cookie = new Cookie( + restResponseCookie.Name, + restResponseCookie.Value, + restResponseCookie.Path, + restResponseCookie.Domain + ) + { + Comment = restResponseCookie.Comment, + CommentUri = restResponseCookie.CommentUri, + Discard = restResponseCookie.Discard, + Expired = restResponseCookie.Expired, + Expires = restResponseCookie.Expires, + HttpOnly = restResponseCookie.HttpOnly, + Port = restResponseCookie.Port, + Secure = restResponseCookie.Secure, + Version = restResponseCookie.Version + }; + + result.Cookies.Add(cookie); + } } + return result; } - return result; } #region IAsynchronousClient @@ -675,7 +636,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), options, config, cancellationToken); } /// @@ -690,7 +651,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), options, config, cancellationToken); } /// @@ -705,7 +666,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), options, config, cancellationToken); } /// @@ -720,7 +681,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), options, config, cancellationToken); } /// @@ -735,7 +696,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), options, config, cancellationToken); } /// @@ -750,7 +711,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), options, config, cancellationToken); } /// @@ -765,7 +726,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), config, cancellationToken); + return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), options, config, cancellationToken); } #endregion IAsynchronousClient @@ -781,7 +742,7 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura public ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Get, path, options, config), config); + return Exec(NewRequest(HttpMethod.Get, path, options, config), options, config); } /// @@ -795,7 +756,7 @@ public ApiResponse Get(string path, RequestOptions options, IReadableConfi public ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Post, path, options, config), config); + return Exec(NewRequest(HttpMethod.Post, path, options, config), options, config); } /// @@ -809,7 +770,7 @@ public ApiResponse Post(string path, RequestOptions options, IReadableConf public ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Put, path, options, config), config); + return Exec(NewRequest(HttpMethod.Put, path, options, config), options, config); } /// @@ -823,7 +784,7 @@ public ApiResponse Put(string path, RequestOptions options, IReadableConfi public ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Delete, path, options, config), config); + return Exec(NewRequest(HttpMethod.Delete, path, options, config), options, config); } /// @@ -837,7 +798,7 @@ public ApiResponse Delete(string path, RequestOptions options, IReadableCo public ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Head, path, options, config), config); + return Exec(NewRequest(HttpMethod.Head, path, options, config), options, config); } /// @@ -851,7 +812,7 @@ public ApiResponse Head(string path, RequestOptions options, IReadableConf public ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Options, path, options, config), config); + return Exec(NewRequest(HttpMethod.Options, path, options, config), options, config); } /// @@ -865,7 +826,7 @@ public ApiResponse Options(string path, RequestOptions options, IReadableC public ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Patch, path, options, config), config); + return Exec(NewRequest(HttpMethod.Patch, path, options, config), options, config); } #endregion ISynchronousClient } diff --git a/Ory.Kratos.Client/Client/ApiException.cs b/Ory.Kratos.Client/Client/ApiException.cs index 5e32908f..6156e205 100644 --- a/Ory.Kratos.Client/Client/ApiException.cs +++ b/Ory.Kratos.Client/Client/ApiException.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Ory.Kratos.Client/Client/ApiResponse.cs b/Ory.Kratos.Client/Client/ApiResponse.cs index 5b5c0680..853cfe3e 100644 --- a/Ory.Kratos.Client/Client/ApiResponse.cs +++ b/Ory.Kratos.Client/Client/ApiResponse.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Ory.Kratos.Client/Client/ClientUtils.cs b/Ory.Kratos.Client/Client/ClientUtils.cs index ac5c5fdf..b35e97db 100644 --- a/Ory.Kratos.Client/Client/ClientUtils.cs +++ b/Ory.Kratos.Client/Client/ClientUtils.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -11,9 +10,11 @@ using System; using System.Collections; +using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; @@ -101,45 +102,26 @@ public static string ParameterToString(object obj, IReadableConfiguration config return dateTimeOffset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); if (obj is bool boolean) return boolean ? "true" : "false"; - if (obj is ICollection collection) - return string.Join(",", collection.Cast()); + if (obj is ICollection collection) { + List entries = new List(); + foreach (var entry in collection) + entries.Add(ParameterToString(entry, configuration)); + return string.Join(",", entries); + } + if (obj is Enum && HasEnumMemberAttrValue(obj)) + return GetEnumMemberAttrValue(obj); return Convert.ToString(obj, CultureInfo.InvariantCulture); } /// - /// URL encode a string - /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 + /// Serializes the given object when not null. Otherwise return null. /// - /// string to be URL encoded - /// Byte array - public static string UrlEncode(string input) + /// The object to serialize. + /// Serialized string. + public static string Serialize(object obj) { - const int maxLength = 32766; - - if (input == null) - { - throw new ArgumentNullException("input"); - } - - if (input.Length <= maxLength) - { - return Uri.EscapeDataString(input); - } - - StringBuilder sb = new StringBuilder(input.Length * 2); - int index = 0; - - while (index < input.Length) - { - int length = Math.Min(input.Length - index, maxLength); - string subString = input.Substring(index, length); - - sb.Append(Uri.EscapeDataString(subString)); - index += subString.Length; - } - - return sb.ToString(); + return obj != null ? Newtonsoft.Json.JsonConvert.SerializeObject(obj) : null; } /// @@ -226,5 +208,40 @@ public static bool IsJsonMime(string mime) return JsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json"); } + + /// + /// Is the Enum decorated with EnumMember Attribute + /// + /// + /// true if found + private static bool HasEnumMemberAttrValue(object enumVal) + { + if (enumVal == null) + throw new ArgumentNullException(nameof(enumVal)); + var enumType = enumVal.GetType(); + var memInfo = enumType.GetMember(enumVal.ToString() ?? throw new InvalidOperationException()); + var attr = memInfo.FirstOrDefault()?.GetCustomAttributes(false).OfType().FirstOrDefault(); + if (attr != null) return true; + return false; + } + + /// + /// Get the EnumMember value + /// + /// + /// EnumMember value as string otherwise null + private static string GetEnumMemberAttrValue(object enumVal) + { + if (enumVal == null) + throw new ArgumentNullException(nameof(enumVal)); + var enumType = enumVal.GetType(); + var memInfo = enumType.GetMember(enumVal.ToString() ?? throw new InvalidOperationException()); + var attr = memInfo.FirstOrDefault()?.GetCustomAttributes(false).OfType().FirstOrDefault(); + if (attr != null) + { + return attr.Value; + } + return null; + } } } diff --git a/Ory.Kratos.Client/Client/Configuration.cs b/Ory.Kratos.Client/Client/Configuration.cs index beaf37a0..f3931409 100644 --- a/Ory.Kratos.Client/Client/Configuration.cs +++ b/Ory.Kratos.Client/Client/Configuration.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -18,6 +17,8 @@ using System.Reflection; using System.Security.Cryptography.X509Certificates; using System.Text; +using System.Net.Http; +using System.Net.Security; namespace Ory.Kratos.Client.Client { @@ -75,6 +76,8 @@ public class Configuration : IReadableConfiguration /// private string _basePath; + private bool _useDefaultCredentials = false; + /// /// Gets or sets the API key based on the authentication name. /// This is the key and value comprising the "secret" for accessing an API. @@ -96,6 +99,13 @@ public class Configuration : IReadableConfiguration /// /// The servers private IList> _servers; + + /// + /// Gets or sets the operation servers defined in the OpenAPI spec. + /// + /// The operation servers + private IReadOnlyDictionary>> _operationServers; + #endregion Private Members #region Constructors @@ -107,7 +117,7 @@ public class Configuration : IReadableConfiguration public Configuration() { Proxy = null; - UserAgent = "OpenAPI-Generator/1.1.0/csharp"; + UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/1.1.0/csharp"); BasePath = "http://localhost"; DefaultHeaders = new ConcurrentDictionary(); ApiKey = new ConcurrentDictionary(); @@ -121,6 +131,9 @@ public Configuration() } } }; + OperationServers = new Dictionary>>() + { + }; // Setting Timeout has side effects (forces ApiClient creation). Timeout = 100000; @@ -170,11 +183,21 @@ public Configuration( /// /// Gets or sets the base path for API access. /// - public virtual string BasePath { + public virtual string BasePath + { get { return _basePath; } set { _basePath = value; } } + /// + /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false. + /// + public virtual bool UseDefaultCredentials + { + get { return _useDefaultCredentials; } + set { _useDefaultCredentials = value; } + } + /// /// Gets or sets the default header. /// @@ -380,6 +403,23 @@ public virtual IList> Servers } } + /// + /// Gets or sets the operation servers. + /// + /// The operation servers. + public virtual IReadOnlyDictionary>> OperationServers + { + get { return _operationServers; } + set + { + if (value == null) + { + throw new InvalidOperationException("Operation servers may not be null."); + } + _operationServers = value; + } + } + /// /// Returns URL based on server settings without providing values /// for the variables @@ -388,7 +428,7 @@ public virtual IList> Servers /// The server URL. public string GetServerUrl(int index) { - return GetServerUrl(index, null); + return GetServerUrl(Servers, index, null); } /// @@ -399,9 +439,49 @@ public string GetServerUrl(int index) /// The server URL. public string GetServerUrl(int index, Dictionary inputVariables) { - if (index < 0 || index >= Servers.Count) + return GetServerUrl(Servers, index, inputVariables); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index) + { + return GetOperationServerUrl(operation, index, null); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index, Dictionary inputVariables) + { + if (operation != null && OperationServers.TryGetValue(operation, out var operationServer)) + { + return GetServerUrl(operationServer, index, inputVariables); + } + + return null; + } + + /// + /// Returns URL based on server settings. + /// + /// Dictionary of server settings. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The server URL. + private string GetServerUrl(IList> servers, int index, Dictionary inputVariables) + { + if (index < 0 || index >= servers.Count) { - throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {Servers.Count}."); + throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {servers.Count}."); } if (inputVariables == null) @@ -409,35 +489,43 @@ public string GetServerUrl(int index, Dictionary inputVariables) inputVariables = new Dictionary(); } - IReadOnlyDictionary server = Servers[index]; + IReadOnlyDictionary server = servers[index]; string url = (string)server["url"]; - // go through variable and assign a value - foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + if (server.ContainsKey("variables")) { + // go through each variable and assign a value + foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + { - IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); + IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); - if (inputVariables.ContainsKey(variable.Key)) - { - if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + if (inputVariables.ContainsKey(variable.Key)) { - url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + { + url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + } + else + { + throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + } } else { - throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + // use default value + url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); } } - else - { - // use default value - url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); - } } return url; } + + /// + /// Gets and Sets the RemoteCertificateValidationCallback + /// + public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; } #endregion Properties @@ -451,7 +539,7 @@ public static string ToDebugReport() string report = "C# SDK (Ory.Kratos.Client) Debug Report:\n"; report += " OS: " + System.Environment.OSVersion + "\n"; report += " .NET Framework Version: " + System.Environment.Version + "\n"; - report += " Version of the API: v1.1.0\n"; + report += " Version of the API: \n"; report += " SDK Package Version: 1.1.0\n"; return report; @@ -512,7 +600,10 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration Password = second.Password ?? first.Password, AccessToken = second.AccessToken ?? first.AccessToken, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, - DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat + DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, + ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, + UseDefaultCredentials = second.UseDefaultCredentials, + RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback, }; return config; } diff --git a/Ory.Kratos.Client/Client/ExceptionFactory.cs b/Ory.Kratos.Client/Client/ExceptionFactory.cs index 90343593..7bdbbf4e 100644 --- a/Ory.Kratos.Client/Client/ExceptionFactory.cs +++ b/Ory.Kratos.Client/Client/ExceptionFactory.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Ory.Kratos.Client/Client/GlobalConfiguration.cs b/Ory.Kratos.Client/Client/GlobalConfiguration.cs index 9d94c1eb..ec9754e3 100644 --- a/Ory.Kratos.Client/Client/GlobalConfiguration.cs +++ b/Ory.Kratos.Client/Client/GlobalConfiguration.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Ory.Kratos.Client/Client/HttpMethod.cs b/Ory.Kratos.Client/Client/HttpMethod.cs index 32e19d30..cb507e7b 100644 --- a/Ory.Kratos.Client/Client/HttpMethod.cs +++ b/Ory.Kratos.Client/Client/HttpMethod.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Ory.Kratos.Client/Client/IApiAccessor.cs b/Ory.Kratos.Client/Client/IApiAccessor.cs index e71c8f9d..dece0eb9 100644 --- a/Ory.Kratos.Client/Client/IApiAccessor.cs +++ b/Ory.Kratos.Client/Client/IApiAccessor.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Ory.Kratos.Client/Client/IAsynchronousClient.cs b/Ory.Kratos.Client/Client/IAsynchronousClient.cs index 2acc3b9e..631c0159 100644 --- a/Ory.Kratos.Client/Client/IAsynchronousClient.cs +++ b/Ory.Kratos.Client/Client/IAsynchronousClient.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Ory.Kratos.Client/Client/IReadableConfiguration.cs b/Ory.Kratos.Client/Client/IReadableConfiguration.cs index 2d143bed..c8608544 100644 --- a/Ory.Kratos.Client/Client/IReadableConfiguration.cs +++ b/Ory.Kratos.Client/Client/IReadableConfiguration.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -12,6 +11,7 @@ using System; using System.Collections.Generic; using System.Net; +using System.Net.Security; using System.Security.Cryptography.X509Certificates; namespace Ory.Kratos.Client.Client @@ -100,6 +100,17 @@ public interface IReadableConfiguration /// Password. string Password { get; } + /// + /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false. + /// + bool UseDefaultCredentials { get; } + + /// + /// Get the servers associated with the operation. + /// + /// Operation servers. + IReadOnlyDictionary>> OperationServers { get; } + /// /// Gets the API key with prefix. /// @@ -107,10 +118,24 @@ public interface IReadableConfiguration /// API key with prefix. string GetApiKeyWithPrefix(string apiKeyIdentifier); + /// + /// Gets the Operation server url at the provided index. + /// + /// Operation server name. + /// Index of the operation server settings. + /// + string GetOperationServerUrl(string operation, int index); + /// /// Gets certificate collection to be sent with requests. /// /// X509 Certificate collection. X509CertificateCollection ClientCertificates { get; } + + /// + /// Callback function for handling the validation of remote certificates. Useful for certificate pinning and + /// overriding certificate errors in the scope of a request. + /// + RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; } } } diff --git a/Ory.Kratos.Client/Client/ISynchronousClient.cs b/Ory.Kratos.Client/Client/ISynchronousClient.cs index d402837f..9aa46477 100644 --- a/Ory.Kratos.Client/Client/ISynchronousClient.cs +++ b/Ory.Kratos.Client/Client/ISynchronousClient.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Ory.Kratos.Client/Client/Multimap.cs b/Ory.Kratos.Client/Client/Multimap.cs index 0f0414cc..2e6f0d85 100644 --- a/Ory.Kratos.Client/Client/Multimap.cs +++ b/Ory.Kratos.Client/Client/Multimap.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Ory.Kratos.Client/Client/OpenAPIDateConverter.cs b/Ory.Kratos.Client/Client/OpenAPIDateConverter.cs index 8fc01b9e..2667f2c8 100644 --- a/Ory.Kratos.Client/Client/OpenAPIDateConverter.cs +++ b/Ory.Kratos.Client/Client/OpenAPIDateConverter.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Ory.Kratos.Client/Client/RequestOptions.cs b/Ory.Kratos.Client/Client/RequestOptions.cs index 7aada6d9..9a763672 100644 --- a/Ory.Kratos.Client/Client/RequestOptions.cs +++ b/Ory.Kratos.Client/Client/RequestOptions.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -34,7 +33,7 @@ public class RequestOptions public Multimap QueryParameters { get; set; } /// - /// Header parameters to be applied to to the request. + /// Header parameters to be applied to the request. /// Keys may have 1 or more values associated. /// public Multimap HeaderParameters { get; set; } @@ -54,6 +53,16 @@ public class RequestOptions /// public List Cookies { get; set; } + /// + /// Operation associated with the request path. + /// + public string Operation { get; set; } + + /// + /// Index associated with the operation. + /// + public int OperationIndex { get; set; } + /// /// Any data associated with a request body. /// diff --git a/Ory.Kratos.Client/Client/RetryConfiguration.cs b/Ory.Kratos.Client/Client/RetryConfiguration.cs index 05d7b9ee..426b65ce 100644 --- a/Ory.Kratos.Client/Client/RetryConfiguration.cs +++ b/Ory.Kratos.Client/Client/RetryConfiguration.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -22,11 +21,11 @@ public static class RetryConfiguration /// /// Retry policy /// - public static Policy RetryPolicy { get; set; } + public static Policy RetryPolicy { get; set; } /// /// Async retry policy /// - public static AsyncPolicy AsyncRetryPolicy { get; set; } + public static AsyncPolicy AsyncRetryPolicy { get; set; } } } diff --git a/Ory.Kratos.Client/Model/AbstractOpenAPISchema.cs b/Ory.Kratos.Client/Model/AbstractOpenAPISchema.cs index 9a4b10fa..af47c156 100644 --- a/Ory.Kratos.Client/Model/AbstractOpenAPISchema.cs +++ b/Ory.Kratos.Client/Model/AbstractOpenAPISchema.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Ory.Kratos.Client/Model/KratosAuthenticatorAssuranceLevel.cs b/Ory.Kratos.Client/Model/KratosAuthenticatorAssuranceLevel.cs index 052b81a7..6ccedbc5 100644 --- a/Ory.Kratos.Client/Model/KratosAuthenticatorAssuranceLevel.cs +++ b/Ory.Kratos.Client/Model/KratosAuthenticatorAssuranceLevel.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -56,7 +55,6 @@ public enum KratosAuthenticatorAssuranceLevel /// [EnumMember(Value = "aal3")] Aal3 = 4 - } } diff --git a/Ory.Kratos.Client/Model/KratosBatchPatchIdentitiesResponse.cs b/Ory.Kratos.Client/Model/KratosBatchPatchIdentitiesResponse.cs index bb706b6a..e77ab5ae 100644 --- a/Ory.Kratos.Client/Model/KratosBatchPatchIdentitiesResponse.cs +++ b/Ory.Kratos.Client/Model/KratosBatchPatchIdentitiesResponse.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// Patch identities response /// [DataContract(Name = "batchPatchIdentitiesResponse")] - public partial class KratosBatchPatchIdentitiesResponse : IEquatable, IValidatableObject + public partial class KratosBatchPatchIdentitiesResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -39,7 +38,6 @@ public partial class KratosBatchPatchIdentitiesResponse : IEquatable identities = default(List)) { this.Identities = identities; - this.AdditionalProperties = new Dictionary(); } /// @@ -49,12 +47,6 @@ public partial class KratosBatchPatchIdentitiesResponse : IEquatable Identities { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -64,7 +56,6 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class KratosBatchPatchIdentitiesResponse {\n"); sb.Append(" Identities: ").Append(Identities).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -78,64 +69,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosBatchPatchIdentitiesResponse); - } - - /// - /// Returns true if KratosBatchPatchIdentitiesResponse instances are equal - /// - /// Instance of KratosBatchPatchIdentitiesResponse to be compared - /// Boolean - public bool Equals(KratosBatchPatchIdentitiesResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Identities == input.Identities || - this.Identities != null && - input.Identities != null && - this.Identities.SequenceEqual(input.Identities) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Identities != null) - { - hashCode = (hashCode * 59) + this.Identities.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosConsistencyRequestParameters.cs b/Ory.Kratos.Client/Model/KratosConsistencyRequestParameters.cs index a30b6c69..84c2466e 100644 --- a/Ory.Kratos.Client/Model/KratosConsistencyRequestParameters.cs +++ b/Ory.Kratos.Client/Model/KratosConsistencyRequestParameters.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// Control API consistency guarantees /// [DataContract(Name = "consistencyRequestParameters")] - public partial class KratosConsistencyRequestParameters : IEquatable, IValidatableObject + public partial class KratosConsistencyRequestParameters : IValidatableObject { /// /// Read Consistency Level (preview) The read consistency level determines the consistency guarantee for reads: strong (slow): The read is guaranteed to return the most recent data committed at the start of the read. eventual (very fast): The result will return data that is about 4.8 seconds old. The default consistency guarantee can be changed in the Ory Network Console or using the Ory CLI with `ory patch project - -replace '/previews/default_read_consistency_level=\"strong\"'`. Setting the default consistency level to `eventual` may cause regressions in the future as we add consistency controls to more APIs. Currently, the following APIs will be affected by this setting: `GET /admin/identities` This feature is in preview and only available in Ory Network. ConsistencyLevelUnset ConsistencyLevelUnset is the unset / default consistency level. strong ConsistencyLevelStrong ConsistencyLevelStrong is the strong consistency level. eventual ConsistencyLevelEventual ConsistencyLevelEventual is the eventual consistency level using follower read timestamps. @@ -56,7 +55,6 @@ public enum ConsistencyEnum /// [EnumMember(Value = "eventual")] Eventual = 3 - } @@ -73,15 +71,8 @@ public enum ConsistencyEnum public KratosConsistencyRequestParameters(ConsistencyEnum? consistency = default(ConsistencyEnum?)) { this.Consistency = consistency; - this.AdditionalProperties = new Dictionary(); } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -91,7 +82,6 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class KratosConsistencyRequestParameters {\n"); sb.Append(" Consistency: ").Append(Consistency).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -105,59 +95,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosConsistencyRequestParameters); - } - - /// - /// Returns true if KratosConsistencyRequestParameters instances are equal - /// - /// Instance of KratosConsistencyRequestParameters to be compared - /// Boolean - public bool Equals(KratosConsistencyRequestParameters input) - { - if (input == null) - { - return false; - } - return - ( - this.Consistency == input.Consistency || - this.Consistency.Equals(input.Consistency) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Consistency.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosContinueWith.cs b/Ory.Kratos.Client/Model/KratosContinueWith.cs index 5ab6ee54..6e3c7a0f 100644 --- a/Ory.Kratos.Client/Model/KratosContinueWith.cs +++ b/Ory.Kratos.Client/Model/KratosContinueWith.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -33,14 +32,14 @@ namespace Ory.Kratos.Client.Model /// [JsonConverter(typeof(KratosContinueWithJsonConverter))] [DataContract(Name = "continueWith")] - public partial class KratosContinueWith : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class KratosContinueWith : AbstractOpenAPISchema, IValidatableObject { /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosContinueWithRecoveryUi. - public KratosContinueWith(KratosContinueWithRecoveryUi actualInstance) + /// An instance of KratosContinueWithVerificationUi. + public KratosContinueWith(KratosContinueWithVerificationUi actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -73,10 +72,10 @@ public KratosContinueWith(KratosContinueWithSettingsUi actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosContinueWithVerificationUi. - public KratosContinueWith(KratosContinueWithVerificationUi actualInstance) + /// An instance of KratosContinueWithRecoveryUi. + public KratosContinueWith(KratosContinueWithRecoveryUi actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -121,13 +120,13 @@ public override Object ActualInstance } /// - /// Get the actual instance of `KratosContinueWithRecoveryUi`. If the actual instance is not `KratosContinueWithRecoveryUi`, + /// Get the actual instance of `KratosContinueWithVerificationUi`. If the actual instance is not `KratosContinueWithVerificationUi`, /// the InvalidClassException will be thrown /// - /// An instance of KratosContinueWithRecoveryUi - public KratosContinueWithRecoveryUi GetKratosContinueWithRecoveryUi() + /// An instance of KratosContinueWithVerificationUi + public KratosContinueWithVerificationUi GetKratosContinueWithVerificationUi() { - return (KratosContinueWithRecoveryUi)this.ActualInstance; + return (KratosContinueWithVerificationUi)this.ActualInstance; } /// @@ -151,13 +150,13 @@ public KratosContinueWithSettingsUi GetKratosContinueWithSettingsUi() } /// - /// Get the actual instance of `KratosContinueWithVerificationUi`. If the actual instance is not `KratosContinueWithVerificationUi`, + /// Get the actual instance of `KratosContinueWithRecoveryUi`. If the actual instance is not `KratosContinueWithRecoveryUi`, /// the InvalidClassException will be thrown /// - /// An instance of KratosContinueWithVerificationUi - public KratosContinueWithVerificationUi GetKratosContinueWithVerificationUi() + /// An instance of KratosContinueWithRecoveryUi + public KratosContinueWithRecoveryUi GetKratosContinueWithRecoveryUi() { - return (KratosContinueWithVerificationUi)this.ActualInstance; + return (KratosContinueWithRecoveryUi)this.ActualInstance; } /// @@ -284,50 +283,13 @@ public static KratosContinueWith FromJson(string jsonString) } else if (match > 1) { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + String.Join(",", matchedTypes)); } // deserialization is considered successful at this point if no exception has been thrown. return newKratosContinueWith; } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosContinueWith); - } - - /// - /// Returns true if KratosContinueWith instances are equal - /// - /// Instance of KratosContinueWith to be compared - /// Boolean - public bool Equals(KratosContinueWith input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance @@ -366,11 +328,15 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s /// The object converted from the JSON string public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - if(reader.TokenType != JsonToken.Null) + switch(reader.TokenType) { - return KratosContinueWith.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartObject: + return KratosContinueWith.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return KratosContinueWith.FromJson(JArray.Load(reader).ToString(Formatting.None)); + default: + return null; } - return null; } /// diff --git a/Ory.Kratos.Client/Model/KratosContinueWithRecoveryUi.cs b/Ory.Kratos.Client/Model/KratosContinueWithRecoveryUi.cs index 5138e3c1..27458919 100644 --- a/Ory.Kratos.Client/Model/KratosContinueWithRecoveryUi.cs +++ b/Ory.Kratos.Client/Model/KratosContinueWithRecoveryUi.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// Indicates, that the UI flow could be continued by showing a recovery ui /// [DataContract(Name = "continueWithRecoveryUi")] - public partial class KratosContinueWithRecoveryUi : IEquatable, IValidatableObject + public partial class KratosContinueWithRecoveryUi : IValidatableObject { /// /// Action will always be `show_recovery_ui` show_recovery_ui ContinueWithActionShowRecoveryUIString @@ -44,7 +43,6 @@ public enum ActionEnum /// [EnumMember(Value = "show_recovery_ui")] ShowRecoveryUi = 1 - } @@ -52,16 +50,13 @@ public enum ActionEnum /// Action will always be `show_recovery_ui` show_recovery_ui ContinueWithActionShowRecoveryUIString /// /// Action will always be `show_recovery_ui` show_recovery_ui ContinueWithActionShowRecoveryUIString - [DataMember(Name = "action", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "action", IsRequired = true, EmitDefaultValue = true)] public ActionEnum Action { get; set; } /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosContinueWithRecoveryUi() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosContinueWithRecoveryUi() { } /// /// Initializes a new instance of the class. /// @@ -71,25 +66,19 @@ protected KratosContinueWithRecoveryUi() { this.Action = action; // to ensure "flow" is required (not null) - if (flow == null) { + if (flow == null) + { throw new ArgumentNullException("flow is a required property for KratosContinueWithRecoveryUi and cannot be null"); } this.Flow = flow; - this.AdditionalProperties = new Dictionary(); } /// /// Gets or Sets Flow /// - [DataMember(Name = "flow", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "flow", IsRequired = true, EmitDefaultValue = true)] public KratosContinueWithRecoveryUiFlow Flow { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -100,7 +89,6 @@ public override string ToString() sb.Append("class KratosContinueWithRecoveryUi {\n"); sb.Append(" Action: ").Append(Action).Append("\n"); sb.Append(" Flow: ").Append(Flow).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -114,68 +102,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosContinueWithRecoveryUi); - } - - /// - /// Returns true if KratosContinueWithRecoveryUi instances are equal - /// - /// Instance of KratosContinueWithRecoveryUi to be compared - /// Boolean - public bool Equals(KratosContinueWithRecoveryUi input) - { - if (input == null) - { - return false; - } - return - ( - this.Action == input.Action || - this.Action.Equals(input.Action) - ) && - ( - this.Flow == input.Flow || - (this.Flow != null && - this.Flow.Equals(input.Flow)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Action.GetHashCode(); - if (this.Flow != null) - { - hashCode = (hashCode * 59) + this.Flow.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosContinueWithRecoveryUiFlow.cs b/Ory.Kratos.Client/Model/KratosContinueWithRecoveryUiFlow.cs index 49b17fcc..7968815b 100644 --- a/Ory.Kratos.Client/Model/KratosContinueWithRecoveryUiFlow.cs +++ b/Ory.Kratos.Client/Model/KratosContinueWithRecoveryUiFlow.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// KratosContinueWithRecoveryUiFlow /// [DataContract(Name = "continueWithRecoveryUiFlow")] - public partial class KratosContinueWithRecoveryUiFlow : IEquatable, IValidatableObject + public partial class KratosContinueWithRecoveryUiFlow : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosContinueWithRecoveryUiFlow() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosContinueWithRecoveryUiFlow() { } /// /// Initializes a new instance of the class. /// @@ -48,19 +44,19 @@ protected KratosContinueWithRecoveryUiFlow() public KratosContinueWithRecoveryUiFlow(string id = default(string), string url = default(string)) { // to ensure "id" is required (not null) - if (id == null) { + if (id == null) + { throw new ArgumentNullException("id is a required property for KratosContinueWithRecoveryUiFlow and cannot be null"); } this.Id = id; this.Url = url; - this.AdditionalProperties = new Dictionary(); } /// /// The ID of the recovery flow /// /// The ID of the recovery flow - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] public string Id { get; set; } /// @@ -70,12 +66,6 @@ protected KratosContinueWithRecoveryUiFlow() [DataMember(Name = "url", EmitDefaultValue = false)] public string Url { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -86,7 +76,6 @@ public override string ToString() sb.Append("class KratosContinueWithRecoveryUiFlow {\n"); sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -100,72 +89,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosContinueWithRecoveryUiFlow); - } - - /// - /// Returns true if KratosContinueWithRecoveryUiFlow instances are equal - /// - /// Instance of KratosContinueWithRecoveryUiFlow to be compared - /// Boolean - public bool Equals(KratosContinueWithRecoveryUiFlow input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosContinueWithSetOrySessionToken.cs b/Ory.Kratos.Client/Model/KratosContinueWithSetOrySessionToken.cs index 855298dd..041825e9 100644 --- a/Ory.Kratos.Client/Model/KratosContinueWithSetOrySessionToken.cs +++ b/Ory.Kratos.Client/Model/KratosContinueWithSetOrySessionToken.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// Indicates that a session was issued, and the application should use this token for authenticated requests /// [DataContract(Name = "continueWithSetOrySessionToken")] - public partial class KratosContinueWithSetOrySessionToken : IEquatable, IValidatableObject + public partial class KratosContinueWithSetOrySessionToken : IValidatableObject { /// /// Action will always be `set_ory_session_token` set_ory_session_token ContinueWithActionSetOrySessionTokenString @@ -44,7 +43,6 @@ public enum ActionEnum /// [EnumMember(Value = "set_ory_session_token")] SetOrySessionToken = 1 - } @@ -52,16 +50,13 @@ public enum ActionEnum /// Action will always be `set_ory_session_token` set_ory_session_token ContinueWithActionSetOrySessionTokenString /// /// Action will always be `set_ory_session_token` set_ory_session_token ContinueWithActionSetOrySessionTokenString - [DataMember(Name = "action", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "action", IsRequired = true, EmitDefaultValue = true)] public ActionEnum Action { get; set; } /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosContinueWithSetOrySessionToken() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosContinueWithSetOrySessionToken() { } /// /// Initializes a new instance of the class. /// @@ -71,26 +66,20 @@ protected KratosContinueWithSetOrySessionToken() { this.Action = action; // to ensure "orySessionToken" is required (not null) - if (orySessionToken == null) { + if (orySessionToken == null) + { throw new ArgumentNullException("orySessionToken is a required property for KratosContinueWithSetOrySessionToken and cannot be null"); } this.OrySessionToken = orySessionToken; - this.AdditionalProperties = new Dictionary(); } /// /// Token is the token of the session /// /// Token is the token of the session - [DataMember(Name = "ory_session_token", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "ory_session_token", IsRequired = true, EmitDefaultValue = true)] public string OrySessionToken { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -101,7 +90,6 @@ public override string ToString() sb.Append("class KratosContinueWithSetOrySessionToken {\n"); sb.Append(" Action: ").Append(Action).Append("\n"); sb.Append(" OrySessionToken: ").Append(OrySessionToken).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -115,68 +103,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosContinueWithSetOrySessionToken); - } - - /// - /// Returns true if KratosContinueWithSetOrySessionToken instances are equal - /// - /// Instance of KratosContinueWithSetOrySessionToken to be compared - /// Boolean - public bool Equals(KratosContinueWithSetOrySessionToken input) - { - if (input == null) - { - return false; - } - return - ( - this.Action == input.Action || - this.Action.Equals(input.Action) - ) && - ( - this.OrySessionToken == input.OrySessionToken || - (this.OrySessionToken != null && - this.OrySessionToken.Equals(input.OrySessionToken)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Action.GetHashCode(); - if (this.OrySessionToken != null) - { - hashCode = (hashCode * 59) + this.OrySessionToken.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosContinueWithSettingsUi.cs b/Ory.Kratos.Client/Model/KratosContinueWithSettingsUi.cs index 88585403..9d1ac579 100644 --- a/Ory.Kratos.Client/Model/KratosContinueWithSettingsUi.cs +++ b/Ory.Kratos.Client/Model/KratosContinueWithSettingsUi.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// Indicates, that the UI flow could be continued by showing a settings ui /// [DataContract(Name = "continueWithSettingsUi")] - public partial class KratosContinueWithSettingsUi : IEquatable, IValidatableObject + public partial class KratosContinueWithSettingsUi : IValidatableObject { /// /// Action will always be `show_settings_ui` show_settings_ui ContinueWithActionShowSettingsUIString @@ -44,7 +43,6 @@ public enum ActionEnum /// [EnumMember(Value = "show_settings_ui")] ShowSettingsUi = 1 - } @@ -52,16 +50,13 @@ public enum ActionEnum /// Action will always be `show_settings_ui` show_settings_ui ContinueWithActionShowSettingsUIString /// /// Action will always be `show_settings_ui` show_settings_ui ContinueWithActionShowSettingsUIString - [DataMember(Name = "action", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "action", IsRequired = true, EmitDefaultValue = true)] public ActionEnum Action { get; set; } /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosContinueWithSettingsUi() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosContinueWithSettingsUi() { } /// /// Initializes a new instance of the class. /// @@ -71,25 +66,19 @@ protected KratosContinueWithSettingsUi() { this.Action = action; // to ensure "flow" is required (not null) - if (flow == null) { + if (flow == null) + { throw new ArgumentNullException("flow is a required property for KratosContinueWithSettingsUi and cannot be null"); } this.Flow = flow; - this.AdditionalProperties = new Dictionary(); } /// /// Gets or Sets Flow /// - [DataMember(Name = "flow", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "flow", IsRequired = true, EmitDefaultValue = true)] public KratosContinueWithSettingsUiFlow Flow { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -100,7 +89,6 @@ public override string ToString() sb.Append("class KratosContinueWithSettingsUi {\n"); sb.Append(" Action: ").Append(Action).Append("\n"); sb.Append(" Flow: ").Append(Flow).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -114,68 +102,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosContinueWithSettingsUi); - } - - /// - /// Returns true if KratosContinueWithSettingsUi instances are equal - /// - /// Instance of KratosContinueWithSettingsUi to be compared - /// Boolean - public bool Equals(KratosContinueWithSettingsUi input) - { - if (input == null) - { - return false; - } - return - ( - this.Action == input.Action || - this.Action.Equals(input.Action) - ) && - ( - this.Flow == input.Flow || - (this.Flow != null && - this.Flow.Equals(input.Flow)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Action.GetHashCode(); - if (this.Flow != null) - { - hashCode = (hashCode * 59) + this.Flow.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosContinueWithSettingsUiFlow.cs b/Ory.Kratos.Client/Model/KratosContinueWithSettingsUiFlow.cs index 43576cbc..1a0d004d 100644 --- a/Ory.Kratos.Client/Model/KratosContinueWithSettingsUiFlow.cs +++ b/Ory.Kratos.Client/Model/KratosContinueWithSettingsUiFlow.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// KratosContinueWithSettingsUiFlow /// [DataContract(Name = "continueWithSettingsUiFlow")] - public partial class KratosContinueWithSettingsUiFlow : IEquatable, IValidatableObject + public partial class KratosContinueWithSettingsUiFlow : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosContinueWithSettingsUiFlow() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosContinueWithSettingsUiFlow() { } /// /// Initializes a new instance of the class. /// @@ -47,26 +43,20 @@ protected KratosContinueWithSettingsUiFlow() public KratosContinueWithSettingsUiFlow(string id = default(string)) { // to ensure "id" is required (not null) - if (id == null) { + if (id == null) + { throw new ArgumentNullException("id is a required property for KratosContinueWithSettingsUiFlow and cannot be null"); } this.Id = id; - this.AdditionalProperties = new Dictionary(); } /// /// The ID of the settings flow /// /// The ID of the settings flow - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] public string Id { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -76,7 +66,6 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class KratosContinueWithSettingsUiFlow {\n"); sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -90,63 +79,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosContinueWithSettingsUiFlow); - } - - /// - /// Returns true if KratosContinueWithSettingsUiFlow instances are equal - /// - /// Instance of KratosContinueWithSettingsUiFlow to be compared - /// Boolean - public bool Equals(KratosContinueWithSettingsUiFlow input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosContinueWithVerificationUi.cs b/Ory.Kratos.Client/Model/KratosContinueWithVerificationUi.cs index 3105ad1c..b57b68f7 100644 --- a/Ory.Kratos.Client/Model/KratosContinueWithVerificationUi.cs +++ b/Ory.Kratos.Client/Model/KratosContinueWithVerificationUi.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// Indicates, that the UI flow could be continued by showing a verification ui /// [DataContract(Name = "continueWithVerificationUi")] - public partial class KratosContinueWithVerificationUi : IEquatable, IValidatableObject + public partial class KratosContinueWithVerificationUi : IValidatableObject { /// /// Action will always be `show_verification_ui` show_verification_ui ContinueWithActionShowVerificationUIString @@ -44,7 +43,6 @@ public enum ActionEnum /// [EnumMember(Value = "show_verification_ui")] ShowVerificationUi = 1 - } @@ -52,16 +50,13 @@ public enum ActionEnum /// Action will always be `show_verification_ui` show_verification_ui ContinueWithActionShowVerificationUIString /// /// Action will always be `show_verification_ui` show_verification_ui ContinueWithActionShowVerificationUIString - [DataMember(Name = "action", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "action", IsRequired = true, EmitDefaultValue = true)] public ActionEnum Action { get; set; } /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosContinueWithVerificationUi() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosContinueWithVerificationUi() { } /// /// Initializes a new instance of the class. /// @@ -71,25 +66,19 @@ protected KratosContinueWithVerificationUi() { this.Action = action; // to ensure "flow" is required (not null) - if (flow == null) { + if (flow == null) + { throw new ArgumentNullException("flow is a required property for KratosContinueWithVerificationUi and cannot be null"); } this.Flow = flow; - this.AdditionalProperties = new Dictionary(); } /// /// Gets or Sets Flow /// - [DataMember(Name = "flow", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "flow", IsRequired = true, EmitDefaultValue = true)] public KratosContinueWithVerificationUiFlow Flow { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -100,7 +89,6 @@ public override string ToString() sb.Append("class KratosContinueWithVerificationUi {\n"); sb.Append(" Action: ").Append(Action).Append("\n"); sb.Append(" Flow: ").Append(Flow).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -114,68 +102,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosContinueWithVerificationUi); - } - - /// - /// Returns true if KratosContinueWithVerificationUi instances are equal - /// - /// Instance of KratosContinueWithVerificationUi to be compared - /// Boolean - public bool Equals(KratosContinueWithVerificationUi input) - { - if (input == null) - { - return false; - } - return - ( - this.Action == input.Action || - this.Action.Equals(input.Action) - ) && - ( - this.Flow == input.Flow || - (this.Flow != null && - this.Flow.Equals(input.Flow)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Action.GetHashCode(); - if (this.Flow != null) - { - hashCode = (hashCode * 59) + this.Flow.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosContinueWithVerificationUiFlow.cs b/Ory.Kratos.Client/Model/KratosContinueWithVerificationUiFlow.cs index 95df3afc..3b1e1f01 100644 --- a/Ory.Kratos.Client/Model/KratosContinueWithVerificationUiFlow.cs +++ b/Ory.Kratos.Client/Model/KratosContinueWithVerificationUiFlow.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// KratosContinueWithVerificationUiFlow /// [DataContract(Name = "continueWithVerificationUiFlow")] - public partial class KratosContinueWithVerificationUiFlow : IEquatable, IValidatableObject + public partial class KratosContinueWithVerificationUiFlow : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosContinueWithVerificationUiFlow() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosContinueWithVerificationUiFlow() { } /// /// Initializes a new instance of the class. /// @@ -49,24 +45,25 @@ protected KratosContinueWithVerificationUiFlow() public KratosContinueWithVerificationUiFlow(string id = default(string), string url = default(string), string verifiableAddress = default(string)) { // to ensure "id" is required (not null) - if (id == null) { + if (id == null) + { throw new ArgumentNullException("id is a required property for KratosContinueWithVerificationUiFlow and cannot be null"); } this.Id = id; // to ensure "verifiableAddress" is required (not null) - if (verifiableAddress == null) { + if (verifiableAddress == null) + { throw new ArgumentNullException("verifiableAddress is a required property for KratosContinueWithVerificationUiFlow and cannot be null"); } this.VerifiableAddress = verifiableAddress; this.Url = url; - this.AdditionalProperties = new Dictionary(); } /// /// The ID of the verification flow /// /// The ID of the verification flow - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] public string Id { get; set; } /// @@ -80,15 +77,9 @@ protected KratosContinueWithVerificationUiFlow() /// The address that should be verified in this flow /// /// The address that should be verified in this flow - [DataMember(Name = "verifiable_address", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "verifiable_address", IsRequired = true, EmitDefaultValue = true)] public string VerifiableAddress { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -100,7 +91,6 @@ public override string ToString() sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Url: ").Append(Url).Append("\n"); sb.Append(" VerifiableAddress: ").Append(VerifiableAddress).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -114,81 +104,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosContinueWithVerificationUiFlow); - } - - /// - /// Returns true if KratosContinueWithVerificationUiFlow instances are equal - /// - /// Instance of KratosContinueWithVerificationUiFlow to be compared - /// Boolean - public bool Equals(KratosContinueWithVerificationUiFlow input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ) && - ( - this.VerifiableAddress == input.VerifiableAddress || - (this.VerifiableAddress != null && - this.VerifiableAddress.Equals(input.VerifiableAddress)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - if (this.VerifiableAddress != null) - { - hashCode = (hashCode * 59) + this.VerifiableAddress.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosCourierMessageStatus.cs b/Ory.Kratos.Client/Model/KratosCourierMessageStatus.cs index da18f82d..00610ca8 100644 --- a/Ory.Kratos.Client/Model/KratosCourierMessageStatus.cs +++ b/Ory.Kratos.Client/Model/KratosCourierMessageStatus.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -56,7 +55,6 @@ public enum KratosCourierMessageStatus /// [EnumMember(Value = "abandoned")] Abandoned = 4 - } } diff --git a/Ory.Kratos.Client/Model/KratosCourierMessageType.cs b/Ory.Kratos.Client/Model/KratosCourierMessageType.cs index baa8e749..4a188f8c 100644 --- a/Ory.Kratos.Client/Model/KratosCourierMessageType.cs +++ b/Ory.Kratos.Client/Model/KratosCourierMessageType.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -44,7 +43,6 @@ public enum KratosCourierMessageType /// [EnumMember(Value = "phone")] Phone = 2 - } } diff --git a/Ory.Kratos.Client/Model/KratosCreateIdentityBody.cs b/Ory.Kratos.Client/Model/KratosCreateIdentityBody.cs index 058dffbe..5e818956 100644 --- a/Ory.Kratos.Client/Model/KratosCreateIdentityBody.cs +++ b/Ory.Kratos.Client/Model/KratosCreateIdentityBody.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// Create Identity Body /// [DataContract(Name = "createIdentityBody")] - public partial class KratosCreateIdentityBody : IEquatable, IValidatableObject + public partial class KratosCreateIdentityBody : IValidatableObject { /// /// State is the identity's state. active StateActive inactive StateInactive @@ -50,7 +49,6 @@ public enum StateEnum /// [EnumMember(Value = "inactive")] Inactive = 2 - } @@ -64,10 +62,7 @@ public enum StateEnum /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosCreateIdentityBody() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosCreateIdentityBody() { } /// /// Initializes a new instance of the class. /// @@ -82,12 +77,14 @@ protected KratosCreateIdentityBody() public KratosCreateIdentityBody(KratosIdentityWithCredentials credentials = default(KratosIdentityWithCredentials), Object metadataAdmin = default(Object), Object metadataPublic = default(Object), List recoveryAddresses = default(List), string schemaId = default(string), StateEnum? state = default(StateEnum?), Object traits = default(Object), List verifiableAddresses = default(List)) { // to ensure "schemaId" is required (not null) - if (schemaId == null) { + if (schemaId == null) + { throw new ArgumentNullException("schemaId is a required property for KratosCreateIdentityBody and cannot be null"); } this.SchemaId = schemaId; // to ensure "traits" is required (not null) - if (traits == null) { + if (traits == null) + { throw new ArgumentNullException("traits is a required property for KratosCreateIdentityBody and cannot be null"); } this.Traits = traits; @@ -97,7 +94,6 @@ protected KratosCreateIdentityBody() this.RecoveryAddresses = recoveryAddresses; this.State = state; this.VerifiableAddresses = verifiableAddresses; - this.AdditionalProperties = new Dictionary(); } /// @@ -131,14 +127,14 @@ protected KratosCreateIdentityBody() /// SchemaID is the ID of the JSON Schema to be used for validating the identity's traits. /// /// SchemaID is the ID of the JSON Schema to be used for validating the identity's traits. - [DataMember(Name = "schema_id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "schema_id", IsRequired = true, EmitDefaultValue = true)] public string SchemaId { get; set; } /// /// Traits represent an identity's traits. The identity is able to create, modify, and delete traits in a self-service manner. The input will always be validated against the JSON Schema defined in `schema_url`. /// /// Traits represent an identity's traits. The identity is able to create, modify, and delete traits in a self-service manner. The input will always be validated against the JSON Schema defined in `schema_url`. - [DataMember(Name = "traits", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "traits", IsRequired = true, EmitDefaultValue = true)] public Object Traits { get; set; } /// @@ -148,12 +144,6 @@ protected KratosCreateIdentityBody() [DataMember(Name = "verifiable_addresses", EmitDefaultValue = false)] public List VerifiableAddresses { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -170,7 +160,6 @@ public override string ToString() sb.Append(" State: ").Append(State).Append("\n"); sb.Append(" Traits: ").Append(Traits).Append("\n"); sb.Append(" VerifiableAddresses: ").Append(VerifiableAddresses).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -184,124 +173,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosCreateIdentityBody); - } - - /// - /// Returns true if KratosCreateIdentityBody instances are equal - /// - /// Instance of KratosCreateIdentityBody to be compared - /// Boolean - public bool Equals(KratosCreateIdentityBody input) - { - if (input == null) - { - return false; - } - return - ( - this.Credentials == input.Credentials || - (this.Credentials != null && - this.Credentials.Equals(input.Credentials)) - ) && - ( - this.MetadataAdmin == input.MetadataAdmin || - (this.MetadataAdmin != null && - this.MetadataAdmin.Equals(input.MetadataAdmin)) - ) && - ( - this.MetadataPublic == input.MetadataPublic || - (this.MetadataPublic != null && - this.MetadataPublic.Equals(input.MetadataPublic)) - ) && - ( - this.RecoveryAddresses == input.RecoveryAddresses || - this.RecoveryAddresses != null && - input.RecoveryAddresses != null && - this.RecoveryAddresses.SequenceEqual(input.RecoveryAddresses) - ) && - ( - this.SchemaId == input.SchemaId || - (this.SchemaId != null && - this.SchemaId.Equals(input.SchemaId)) - ) && - ( - this.State == input.State || - this.State.Equals(input.State) - ) && - ( - this.Traits == input.Traits || - (this.Traits != null && - this.Traits.Equals(input.Traits)) - ) && - ( - this.VerifiableAddresses == input.VerifiableAddresses || - this.VerifiableAddresses != null && - input.VerifiableAddresses != null && - this.VerifiableAddresses.SequenceEqual(input.VerifiableAddresses) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Credentials != null) - { - hashCode = (hashCode * 59) + this.Credentials.GetHashCode(); - } - if (this.MetadataAdmin != null) - { - hashCode = (hashCode * 59) + this.MetadataAdmin.GetHashCode(); - } - if (this.MetadataPublic != null) - { - hashCode = (hashCode * 59) + this.MetadataPublic.GetHashCode(); - } - if (this.RecoveryAddresses != null) - { - hashCode = (hashCode * 59) + this.RecoveryAddresses.GetHashCode(); - } - if (this.SchemaId != null) - { - hashCode = (hashCode * 59) + this.SchemaId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.State.GetHashCode(); - if (this.Traits != null) - { - hashCode = (hashCode * 59) + this.Traits.GetHashCode(); - } - if (this.VerifiableAddresses != null) - { - hashCode = (hashCode * 59) + this.VerifiableAddresses.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosCreateRecoveryCodeForIdentityBody.cs b/Ory.Kratos.Client/Model/KratosCreateRecoveryCodeForIdentityBody.cs index 50ce412c..299b1f3d 100644 --- a/Ory.Kratos.Client/Model/KratosCreateRecoveryCodeForIdentityBody.cs +++ b/Ory.Kratos.Client/Model/KratosCreateRecoveryCodeForIdentityBody.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Create Recovery Code for Identity Request Body /// [DataContract(Name = "createRecoveryCodeForIdentityBody")] - public partial class KratosCreateRecoveryCodeForIdentityBody : IEquatable, IValidatableObject + public partial class KratosCreateRecoveryCodeForIdentityBody : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosCreateRecoveryCodeForIdentityBody() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosCreateRecoveryCodeForIdentityBody() { } /// /// Initializes a new instance of the class. /// @@ -48,12 +44,12 @@ protected KratosCreateRecoveryCodeForIdentityBody() public KratosCreateRecoveryCodeForIdentityBody(string expiresIn = default(string), string identityId = default(string)) { // to ensure "identityId" is required (not null) - if (identityId == null) { + if (identityId == null) + { throw new ArgumentNullException("identityId is a required property for KratosCreateRecoveryCodeForIdentityBody and cannot be null"); } this.IdentityId = identityId; this.ExpiresIn = expiresIn; - this.AdditionalProperties = new Dictionary(); } /// @@ -67,15 +63,9 @@ protected KratosCreateRecoveryCodeForIdentityBody() /// Identity to Recover The identity's ID you wish to recover. /// /// Identity to Recover The identity's ID you wish to recover. - [DataMember(Name = "identity_id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "identity_id", IsRequired = true, EmitDefaultValue = true)] public string IdentityId { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -86,7 +76,6 @@ public override string ToString() sb.Append("class KratosCreateRecoveryCodeForIdentityBody {\n"); sb.Append(" ExpiresIn: ").Append(ExpiresIn).Append("\n"); sb.Append(" IdentityId: ").Append(IdentityId).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -100,78 +89,20 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosCreateRecoveryCodeForIdentityBody); - } - - /// - /// Returns true if KratosCreateRecoveryCodeForIdentityBody instances are equal - /// - /// Instance of KratosCreateRecoveryCodeForIdentityBody to be compared - /// Boolean - public bool Equals(KratosCreateRecoveryCodeForIdentityBody input) - { - if (input == null) - { - return false; - } - return - ( - this.ExpiresIn == input.ExpiresIn || - (this.ExpiresIn != null && - this.ExpiresIn.Equals(input.ExpiresIn)) - ) && - ( - this.IdentityId == input.IdentityId || - (this.IdentityId != null && - this.IdentityId.Equals(input.IdentityId)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ExpiresIn != null) - { - hashCode = (hashCode * 59) + this.ExpiresIn.GetHashCode(); - } - if (this.IdentityId != null) - { - hashCode = (hashCode * 59) + this.IdentityId.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - // ExpiresIn (string) pattern - Regex regexExpiresIn = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); - if (false == regexExpiresIn.Match(this.ExpiresIn).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ExpiresIn, must match a pattern of " + regexExpiresIn, new [] { "ExpiresIn" }); + if (this.ExpiresIn != null) { + // ExpiresIn (string) pattern + Regex regexExpiresIn = new Regex(@"^([0-9]+(ns|us|ms|s|m|h))*$", RegexOptions.CultureInvariant); + if (!regexExpiresIn.Match(this.ExpiresIn).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ExpiresIn, must match a pattern of " + regexExpiresIn, new [] { "ExpiresIn" }); + } } yield break; diff --git a/Ory.Kratos.Client/Model/KratosCreateRecoveryLinkForIdentityBody.cs b/Ory.Kratos.Client/Model/KratosCreateRecoveryLinkForIdentityBody.cs index 713f983d..8ddc4490 100644 --- a/Ory.Kratos.Client/Model/KratosCreateRecoveryLinkForIdentityBody.cs +++ b/Ory.Kratos.Client/Model/KratosCreateRecoveryLinkForIdentityBody.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Create Recovery Link for Identity Request Body /// [DataContract(Name = "createRecoveryLinkForIdentityBody")] - public partial class KratosCreateRecoveryLinkForIdentityBody : IEquatable, IValidatableObject + public partial class KratosCreateRecoveryLinkForIdentityBody : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosCreateRecoveryLinkForIdentityBody() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosCreateRecoveryLinkForIdentityBody() { } /// /// Initializes a new instance of the class. /// @@ -48,12 +44,12 @@ protected KratosCreateRecoveryLinkForIdentityBody() public KratosCreateRecoveryLinkForIdentityBody(string expiresIn = default(string), string identityId = default(string)) { // to ensure "identityId" is required (not null) - if (identityId == null) { + if (identityId == null) + { throw new ArgumentNullException("identityId is a required property for KratosCreateRecoveryLinkForIdentityBody and cannot be null"); } this.IdentityId = identityId; this.ExpiresIn = expiresIn; - this.AdditionalProperties = new Dictionary(); } /// @@ -67,15 +63,9 @@ protected KratosCreateRecoveryLinkForIdentityBody() /// Identity to Recover The identity's ID you wish to recover. /// /// Identity to Recover The identity's ID you wish to recover. - [DataMember(Name = "identity_id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "identity_id", IsRequired = true, EmitDefaultValue = true)] public string IdentityId { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -86,7 +76,6 @@ public override string ToString() sb.Append("class KratosCreateRecoveryLinkForIdentityBody {\n"); sb.Append(" ExpiresIn: ").Append(ExpiresIn).Append("\n"); sb.Append(" IdentityId: ").Append(IdentityId).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -100,78 +89,20 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosCreateRecoveryLinkForIdentityBody); - } - - /// - /// Returns true if KratosCreateRecoveryLinkForIdentityBody instances are equal - /// - /// Instance of KratosCreateRecoveryLinkForIdentityBody to be compared - /// Boolean - public bool Equals(KratosCreateRecoveryLinkForIdentityBody input) - { - if (input == null) - { - return false; - } - return - ( - this.ExpiresIn == input.ExpiresIn || - (this.ExpiresIn != null && - this.ExpiresIn.Equals(input.ExpiresIn)) - ) && - ( - this.IdentityId == input.IdentityId || - (this.IdentityId != null && - this.IdentityId.Equals(input.IdentityId)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ExpiresIn != null) - { - hashCode = (hashCode * 59) + this.ExpiresIn.GetHashCode(); - } - if (this.IdentityId != null) - { - hashCode = (hashCode * 59) + this.IdentityId.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - // ExpiresIn (string) pattern - Regex regexExpiresIn = new Regex(@"^[0-9]+(ns|us|ms|s|m|h)$", RegexOptions.CultureInvariant); - if (false == regexExpiresIn.Match(this.ExpiresIn).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ExpiresIn, must match a pattern of " + regexExpiresIn, new [] { "ExpiresIn" }); + if (this.ExpiresIn != null) { + // ExpiresIn (string) pattern + Regex regexExpiresIn = new Regex(@"^[0-9]+(ns|us|ms|s|m|h)$", RegexOptions.CultureInvariant); + if (!regexExpiresIn.Match(this.ExpiresIn).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ExpiresIn, must match a pattern of " + regexExpiresIn, new [] { "ExpiresIn" }); + } } yield break; diff --git a/Ory.Kratos.Client/Model/KratosDeleteMySessionsCount.cs b/Ory.Kratos.Client/Model/KratosDeleteMySessionsCount.cs index dc5da5eb..73f75982 100644 --- a/Ory.Kratos.Client/Model/KratosDeleteMySessionsCount.cs +++ b/Ory.Kratos.Client/Model/KratosDeleteMySessionsCount.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// Deleted Session Count /// [DataContract(Name = "deleteMySessionsCount")] - public partial class KratosDeleteMySessionsCount : IEquatable, IValidatableObject + public partial class KratosDeleteMySessionsCount : IValidatableObject { /// /// Initializes a new instance of the class. @@ -39,7 +38,6 @@ public partial class KratosDeleteMySessionsCount : IEquatable(); } /// @@ -49,12 +47,6 @@ public partial class KratosDeleteMySessionsCount : IEquatable - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -64,7 +56,6 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class KratosDeleteMySessionsCount {\n"); sb.Append(" Count: ").Append(Count).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -78,59 +69,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosDeleteMySessionsCount); - } - - /// - /// Returns true if KratosDeleteMySessionsCount instances are equal - /// - /// Instance of KratosDeleteMySessionsCount to be compared - /// Boolean - public bool Equals(KratosDeleteMySessionsCount input) - { - if (input == null) - { - return false; - } - return - ( - this.Count == input.Count || - this.Count.Equals(input.Count) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Count.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosErrorAuthenticatorAssuranceLevelNotSatisfied.cs b/Ory.Kratos.Client/Model/KratosErrorAuthenticatorAssuranceLevelNotSatisfied.cs index 122b5908..14ab995f 100644 --- a/Ory.Kratos.Client/Model/KratosErrorAuthenticatorAssuranceLevelNotSatisfied.cs +++ b/Ory.Kratos.Client/Model/KratosErrorAuthenticatorAssuranceLevelNotSatisfied.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// KratosErrorAuthenticatorAssuranceLevelNotSatisfied /// [DataContract(Name = "errorAuthenticatorAssuranceLevelNotSatisfied")] - public partial class KratosErrorAuthenticatorAssuranceLevelNotSatisfied : IEquatable, IValidatableObject + public partial class KratosErrorAuthenticatorAssuranceLevelNotSatisfied : IValidatableObject { /// /// Initializes a new instance of the class. @@ -41,7 +40,6 @@ public partial class KratosErrorAuthenticatorAssuranceLevelNotSatisfied : IEquat { this.Error = error; this.RedirectBrowserTo = redirectBrowserTo; - this.AdditionalProperties = new Dictionary(); } /// @@ -57,12 +55,6 @@ public partial class KratosErrorAuthenticatorAssuranceLevelNotSatisfied : IEquat [DataMember(Name = "redirect_browser_to", EmitDefaultValue = false)] public string RedirectBrowserTo { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -73,7 +65,6 @@ public override string ToString() sb.Append("class KratosErrorAuthenticatorAssuranceLevelNotSatisfied {\n"); sb.Append(" Error: ").Append(Error).Append("\n"); sb.Append(" RedirectBrowserTo: ").Append(RedirectBrowserTo).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -87,72 +78,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosErrorAuthenticatorAssuranceLevelNotSatisfied); - } - - /// - /// Returns true if KratosErrorAuthenticatorAssuranceLevelNotSatisfied instances are equal - /// - /// Instance of KratosErrorAuthenticatorAssuranceLevelNotSatisfied to be compared - /// Boolean - public bool Equals(KratosErrorAuthenticatorAssuranceLevelNotSatisfied input) - { - if (input == null) - { - return false; - } - return - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.RedirectBrowserTo == input.RedirectBrowserTo || - (this.RedirectBrowserTo != null && - this.RedirectBrowserTo.Equals(input.RedirectBrowserTo)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.RedirectBrowserTo != null) - { - hashCode = (hashCode * 59) + this.RedirectBrowserTo.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosErrorBrowserLocationChangeRequired.cs b/Ory.Kratos.Client/Model/KratosErrorBrowserLocationChangeRequired.cs index 5ecd6d66..79ddcd6c 100644 --- a/Ory.Kratos.Client/Model/KratosErrorBrowserLocationChangeRequired.cs +++ b/Ory.Kratos.Client/Model/KratosErrorBrowserLocationChangeRequired.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// KratosErrorBrowserLocationChangeRequired /// [DataContract(Name = "errorBrowserLocationChangeRequired")] - public partial class KratosErrorBrowserLocationChangeRequired : IEquatable, IValidatableObject + public partial class KratosErrorBrowserLocationChangeRequired : IValidatableObject { /// /// Initializes a new instance of the class. @@ -41,7 +40,6 @@ public partial class KratosErrorBrowserLocationChangeRequired : IEquatable(); } /// @@ -57,12 +55,6 @@ public partial class KratosErrorBrowserLocationChangeRequired : IEquatable - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -73,7 +65,6 @@ public override string ToString() sb.Append("class KratosErrorBrowserLocationChangeRequired {\n"); sb.Append(" Error: ").Append(Error).Append("\n"); sb.Append(" RedirectBrowserTo: ").Append(RedirectBrowserTo).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -87,72 +78,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosErrorBrowserLocationChangeRequired); - } - - /// - /// Returns true if KratosErrorBrowserLocationChangeRequired instances are equal - /// - /// Instance of KratosErrorBrowserLocationChangeRequired to be compared - /// Boolean - public bool Equals(KratosErrorBrowserLocationChangeRequired input) - { - if (input == null) - { - return false; - } - return - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.RedirectBrowserTo == input.RedirectBrowserTo || - (this.RedirectBrowserTo != null && - this.RedirectBrowserTo.Equals(input.RedirectBrowserTo)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.RedirectBrowserTo != null) - { - hashCode = (hashCode * 59) + this.RedirectBrowserTo.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosErrorFlowReplaced.cs b/Ory.Kratos.Client/Model/KratosErrorFlowReplaced.cs index f09eb75c..642dded9 100644 --- a/Ory.Kratos.Client/Model/KratosErrorFlowReplaced.cs +++ b/Ory.Kratos.Client/Model/KratosErrorFlowReplaced.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// Is sent when a flow is replaced by a different flow of the same class /// [DataContract(Name = "errorFlowReplaced")] - public partial class KratosErrorFlowReplaced : IEquatable, IValidatableObject + public partial class KratosErrorFlowReplaced : IValidatableObject { /// /// Initializes a new instance of the class. @@ -41,7 +40,6 @@ public partial class KratosErrorFlowReplaced : IEquatable(); } /// @@ -57,12 +55,6 @@ public partial class KratosErrorFlowReplaced : IEquatable - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -73,7 +65,6 @@ public override string ToString() sb.Append("class KratosErrorFlowReplaced {\n"); sb.Append(" Error: ").Append(Error).Append("\n"); sb.Append(" UseFlowId: ").Append(UseFlowId).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -87,72 +78,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosErrorFlowReplaced); - } - - /// - /// Returns true if KratosErrorFlowReplaced instances are equal - /// - /// Instance of KratosErrorFlowReplaced to be compared - /// Boolean - public bool Equals(KratosErrorFlowReplaced input) - { - if (input == null) - { - return false; - } - return - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.UseFlowId == input.UseFlowId || - (this.UseFlowId != null && - this.UseFlowId.Equals(input.UseFlowId)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.UseFlowId != null) - { - hashCode = (hashCode * 59) + this.UseFlowId.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosErrorGeneric.cs b/Ory.Kratos.Client/Model/KratosErrorGeneric.cs index ab3c0e80..dab64cc1 100644 --- a/Ory.Kratos.Client/Model/KratosErrorGeneric.cs +++ b/Ory.Kratos.Client/Model/KratosErrorGeneric.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// The standard Ory JSON API error format. /// [DataContract(Name = "errorGeneric")] - public partial class KratosErrorGeneric : IEquatable, IValidatableObject + public partial class KratosErrorGeneric : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosErrorGeneric() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosErrorGeneric() { } /// /// Initializes a new instance of the class. /// @@ -47,25 +43,19 @@ protected KratosErrorGeneric() public KratosErrorGeneric(KratosGenericError error = default(KratosGenericError)) { // to ensure "error" is required (not null) - if (error == null) { + if (error == null) + { throw new ArgumentNullException("error is a required property for KratosErrorGeneric and cannot be null"); } this.Error = error; - this.AdditionalProperties = new Dictionary(); } /// /// Gets or Sets Error /// - [DataMember(Name = "error", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "error", IsRequired = true, EmitDefaultValue = true)] public KratosGenericError Error { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -75,7 +65,6 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class KratosErrorGeneric {\n"); sb.Append(" Error: ").Append(Error).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -89,63 +78,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosErrorGeneric); - } - - /// - /// Returns true if KratosErrorGeneric instances are equal - /// - /// Instance of KratosErrorGeneric to be compared - /// Boolean - public bool Equals(KratosErrorGeneric input) - { - if (input == null) - { - return false; - } - return - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosFlowError.cs b/Ory.Kratos.Client/Model/KratosFlowError.cs index a1fd6ff7..b275eca3 100644 --- a/Ory.Kratos.Client/Model/KratosFlowError.cs +++ b/Ory.Kratos.Client/Model/KratosFlowError.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// KratosFlowError /// [DataContract(Name = "flowError")] - public partial class KratosFlowError : IEquatable, IValidatableObject + public partial class KratosFlowError : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosFlowError() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosFlowError() { } /// /// Initializes a new instance of the class. /// @@ -50,14 +46,14 @@ protected KratosFlowError() public KratosFlowError(DateTime createdAt = default(DateTime), Object error = default(Object), string id = default(string), DateTime updatedAt = default(DateTime)) { // to ensure "id" is required (not null) - if (id == null) { + if (id == null) + { throw new ArgumentNullException("id is a required property for KratosFlowError and cannot be null"); } this.Id = id; this.CreatedAt = createdAt; this.Error = error; this.UpdatedAt = updatedAt; - this.AdditionalProperties = new Dictionary(); } /// @@ -77,7 +73,7 @@ protected KratosFlowError() /// ID of the error container. /// /// ID of the error container. - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] public string Id { get; set; } /// @@ -87,12 +83,6 @@ protected KratosFlowError() [DataMember(Name = "updated_at", EmitDefaultValue = false)] public DateTime UpdatedAt { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -105,7 +95,6 @@ public override string ToString() sb.Append(" Error: ").Append(Error).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -119,90 +108,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosFlowError); - } - - /// - /// Returns true if KratosFlowError instances are equal - /// - /// Instance of KratosFlowError to be compared - /// Boolean - public bool Equals(KratosFlowError input) - { - if (input == null) - { - return false; - } - return - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.UpdatedAt == input.UpdatedAt || - (this.UpdatedAt != null && - this.UpdatedAt.Equals(input.UpdatedAt)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.UpdatedAt != null) - { - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosGenericError.cs b/Ory.Kratos.Client/Model/KratosGenericError.cs index 433ad5f0..b8767e4b 100644 --- a/Ory.Kratos.Client/Model/KratosGenericError.cs +++ b/Ory.Kratos.Client/Model/KratosGenericError.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// KratosGenericError /// [DataContract(Name = "genericError")] - public partial class KratosGenericError : IEquatable, IValidatableObject + public partial class KratosGenericError : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosGenericError() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosGenericError() { } /// /// Initializes a new instance of the class. /// @@ -54,7 +50,8 @@ protected KratosGenericError() public KratosGenericError(long code = default(long), string debug = default(string), Object details = default(Object), string id = default(string), string message = default(string), string reason = default(string), string request = default(string), string status = default(string)) { // to ensure "message" is required (not null) - if (message == null) { + if (message == null) + { throw new ArgumentNullException("message is a required property for KratosGenericError and cannot be null"); } this.Message = message; @@ -65,13 +62,13 @@ protected KratosGenericError() this.Reason = reason; this.Request = request; this.Status = status; - this.AdditionalProperties = new Dictionary(); } /// /// The status code /// /// The status code + /// 404 [DataMember(Name = "code", EmitDefaultValue = false)] public long Code { get; set; } @@ -79,6 +76,7 @@ protected KratosGenericError() /// Debug information This field is often not exposed to protect against leaking sensitive information. /// /// Debug information This field is often not exposed to protect against leaking sensitive information. + /// SQL field "foo" is not a bool. [DataMember(Name = "debug", EmitDefaultValue = false)] public string Debug { get; set; } @@ -100,13 +98,15 @@ protected KratosGenericError() /// Error message The error's message. /// /// Error message The error's message. - [DataMember(Name = "message", IsRequired = true, EmitDefaultValue = false)] + /// The resource could not be found + [DataMember(Name = "message", IsRequired = true, EmitDefaultValue = true)] public string Message { get; set; } /// /// A human-readable reason for the error /// /// A human-readable reason for the error + /// User with ID 1234 does not exist. [DataMember(Name = "reason", EmitDefaultValue = false)] public string Reason { get; set; } @@ -114,6 +114,7 @@ protected KratosGenericError() /// The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. /// /// The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. + /// d7ef54b1-ec15-46e6-bccb-524b82c035e6 [DataMember(Name = "request", EmitDefaultValue = false)] public string Request { get; set; } @@ -121,15 +122,10 @@ protected KratosGenericError() /// The status description /// /// The status description + /// Not Found [DataMember(Name = "status", EmitDefaultValue = false)] public string Status { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -146,7 +142,6 @@ public override string ToString() sb.Append(" Reason: ").Append(Reason).Append("\n"); sb.Append(" Request: ").Append(Request).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -160,122 +155,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosGenericError); - } - - /// - /// Returns true if KratosGenericError instances are equal - /// - /// Instance of KratosGenericError to be compared - /// Boolean - public bool Equals(KratosGenericError input) - { - if (input == null) - { - return false; - } - return - ( - this.Code == input.Code || - this.Code.Equals(input.Code) - ) && - ( - this.Debug == input.Debug || - (this.Debug != null && - this.Debug.Equals(input.Debug)) - ) && - ( - this.Details == input.Details || - (this.Details != null && - this.Details.Equals(input.Details)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.Reason == input.Reason || - (this.Reason != null && - this.Reason.Equals(input.Reason)) - ) && - ( - this.Request == input.Request || - (this.Request != null && - this.Request.Equals(input.Request)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - if (this.Debug != null) - { - hashCode = (hashCode * 59) + this.Debug.GetHashCode(); - } - if (this.Details != null) - { - hashCode = (hashCode * 59) + this.Details.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.Reason != null) - { - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - } - if (this.Request != null) - { - hashCode = (hashCode * 59) + this.Request.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosGetVersion200Response.cs b/Ory.Kratos.Client/Model/KratosGetVersion200Response.cs new file mode 100644 index 00000000..24d1400f --- /dev/null +++ b/Ory.Kratos.Client/Model/KratosGetVersion200Response.cs @@ -0,0 +1,93 @@ +/* + * Ory Identities API + * + * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. + * + * Contact: office@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Kratos.Client.Client.OpenAPIDateConverter; + +namespace Ory.Kratos.Client.Model +{ + /// + /// KratosGetVersion200Response + /// + [DataContract(Name = "getVersion_200_response")] + public partial class KratosGetVersion200Response : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected KratosGetVersion200Response() { } + /// + /// Initializes a new instance of the class. + /// + /// The version of Ory Kratos. (required). + public KratosGetVersion200Response(string varVersion = default(string)) + { + // to ensure "varVersion" is required (not null) + if (varVersion == null) + { + throw new ArgumentNullException("varVersion is a required property for KratosGetVersion200Response and cannot be null"); + } + this.VarVersion = varVersion; + } + + /// + /// The version of Ory Kratos. + /// + /// The version of Ory Kratos. + [DataMember(Name = "version", IsRequired = true, EmitDefaultValue = true)] + public string VarVersion { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class KratosGetVersion200Response {\n"); + sb.Append(" VarVersion: ").Append(VarVersion).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Kratos.Client/Model/KratosHealthNotReadyStatus.cs b/Ory.Kratos.Client/Model/KratosHealthNotReadyStatus.cs index 08c95d1c..aa6e239f 100644 --- a/Ory.Kratos.Client/Model/KratosHealthNotReadyStatus.cs +++ b/Ory.Kratos.Client/Model/KratosHealthNotReadyStatus.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// KratosHealthNotReadyStatus /// [DataContract(Name = "healthNotReadyStatus")] - public partial class KratosHealthNotReadyStatus : IEquatable, IValidatableObject + public partial class KratosHealthNotReadyStatus : IValidatableObject { /// /// Initializes a new instance of the class. @@ -39,7 +38,6 @@ public partial class KratosHealthNotReadyStatus : IEquatable errors = default(Dictionary)) { this.Errors = errors; - this.AdditionalProperties = new Dictionary(); } /// @@ -49,12 +47,6 @@ public partial class KratosHealthNotReadyStatus : IEquatable Errors { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -64,7 +56,6 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class KratosHealthNotReadyStatus {\n"); sb.Append(" Errors: ").Append(Errors).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -78,64 +69,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosHealthNotReadyStatus); - } - - /// - /// Returns true if KratosHealthNotReadyStatus instances are equal - /// - /// Instance of KratosHealthNotReadyStatus to be compared - /// Boolean - public bool Equals(KratosHealthNotReadyStatus input) - { - if (input == null) - { - return false; - } - return - ( - this.Errors == input.Errors || - this.Errors != null && - input.Errors != null && - this.Errors.SequenceEqual(input.Errors) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Errors != null) - { - hashCode = (hashCode * 59) + this.Errors.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosHealthStatus.cs b/Ory.Kratos.Client/Model/KratosHealthStatus.cs index 8f9e8494..33439194 100644 --- a/Ory.Kratos.Client/Model/KratosHealthStatus.cs +++ b/Ory.Kratos.Client/Model/KratosHealthStatus.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// KratosHealthStatus /// [DataContract(Name = "healthStatus")] - public partial class KratosHealthStatus : IEquatable, IValidatableObject + public partial class KratosHealthStatus : IValidatableObject { /// /// Initializes a new instance of the class. @@ -39,7 +38,6 @@ public partial class KratosHealthStatus : IEquatable, IValid public KratosHealthStatus(string status = default(string)) { this.Status = status; - this.AdditionalProperties = new Dictionary(); } /// @@ -49,12 +47,6 @@ public partial class KratosHealthStatus : IEquatable, IValid [DataMember(Name = "status", EmitDefaultValue = false)] public string Status { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -64,7 +56,6 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class KratosHealthStatus {\n"); sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -78,63 +69,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosHealthStatus); - } - - /// - /// Returns true if KratosHealthStatus instances are equal - /// - /// Instance of KratosHealthStatus to be compared - /// Boolean - public bool Equals(KratosHealthStatus input) - { - if (input == null) - { - return false; - } - return - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosIdentity.cs b/Ory.Kratos.Client/Model/KratosIdentity.cs index b425e87b..e433f163 100644 --- a/Ory.Kratos.Client/Model/KratosIdentity.cs +++ b/Ory.Kratos.Client/Model/KratosIdentity.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// An [identity](https://www.ory.sh/docs/kratos/concepts/identity-user-model) represents a (human) user in Ory. /// [DataContract(Name = "identity")] - public partial class KratosIdentity : IEquatable, IValidatableObject + public partial class KratosIdentity : IValidatableObject { /// /// State is the identity's state. This value has currently no effect. active StateActive inactive StateInactive @@ -50,7 +49,6 @@ public enum StateEnum /// [EnumMember(Value = "inactive")] Inactive = 2 - } @@ -64,10 +62,7 @@ public enum StateEnum /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosIdentity() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosIdentity() { } /// /// Initializes a new instance of the class. /// @@ -88,22 +83,26 @@ protected KratosIdentity() public KratosIdentity(DateTime createdAt = default(DateTime), Dictionary credentials = default(Dictionary), string id = default(string), Object metadataAdmin = default(Object), Object metadataPublic = default(Object), string organizationId = default(string), List recoveryAddresses = default(List), string schemaId = default(string), string schemaUrl = default(string), StateEnum? state = default(StateEnum?), DateTime stateChangedAt = default(DateTime), Object traits = default(Object), DateTime updatedAt = default(DateTime), List verifiableAddresses = default(List)) { // to ensure "id" is required (not null) - if (id == null) { + if (id == null) + { throw new ArgumentNullException("id is a required property for KratosIdentity and cannot be null"); } this.Id = id; // to ensure "schemaId" is required (not null) - if (schemaId == null) { + if (schemaId == null) + { throw new ArgumentNullException("schemaId is a required property for KratosIdentity and cannot be null"); } this.SchemaId = schemaId; // to ensure "schemaUrl" is required (not null) - if (schemaUrl == null) { + if (schemaUrl == null) + { throw new ArgumentNullException("schemaUrl is a required property for KratosIdentity and cannot be null"); } this.SchemaUrl = schemaUrl; // to ensure "traits" is required (not null) - if (traits == null) { + if (traits == null) + { throw new ArgumentNullException("traits is a required property for KratosIdentity and cannot be null"); } this.Traits = traits; @@ -117,7 +116,6 @@ protected KratosIdentity() this.StateChangedAt = stateChangedAt; this.UpdatedAt = updatedAt; this.VerifiableAddresses = verifiableAddresses; - this.AdditionalProperties = new Dictionary(); } /// @@ -138,7 +136,7 @@ protected KratosIdentity() /// ID is the identity's unique identifier. The Identity ID can not be changed and can not be chosen. This ensures future compatibility and optimization for distributed stores such as CockroachDB. /// /// ID is the identity's unique identifier. The Identity ID can not be changed and can not be chosen. This ensures future compatibility and optimization for distributed stores such as CockroachDB. - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] public string Id { get; set; } /// @@ -172,14 +170,14 @@ protected KratosIdentity() /// SchemaID is the ID of the JSON Schema to be used for validating the identity's traits. /// /// SchemaID is the ID of the JSON Schema to be used for validating the identity's traits. - [DataMember(Name = "schema_id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "schema_id", IsRequired = true, EmitDefaultValue = true)] public string SchemaId { get; set; } /// /// SchemaURL is the URL of the endpoint where the identity's traits schema can be fetched from. format: url /// /// SchemaURL is the URL of the endpoint where the identity's traits schema can be fetched from. format: url - [DataMember(Name = "schema_url", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "schema_url", IsRequired = true, EmitDefaultValue = true)] public string SchemaUrl { get; set; } /// @@ -209,12 +207,6 @@ protected KratosIdentity() [DataMember(Name = "verifiable_addresses", EmitDefaultValue = false)] public List VerifiableAddresses { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -237,7 +229,6 @@ public override string ToString() sb.Append(" Traits: ").Append(Traits).Append("\n"); sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); sb.Append(" VerifiableAddresses: ").Append(VerifiableAddresses).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -251,179 +242,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosIdentity); - } - - /// - /// Returns true if KratosIdentity instances are equal - /// - /// Instance of KratosIdentity to be compared - /// Boolean - public bool Equals(KratosIdentity input) - { - if (input == null) - { - return false; - } - return - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.Credentials == input.Credentials || - this.Credentials != null && - input.Credentials != null && - this.Credentials.SequenceEqual(input.Credentials) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.MetadataAdmin == input.MetadataAdmin || - (this.MetadataAdmin != null && - this.MetadataAdmin.Equals(input.MetadataAdmin)) - ) && - ( - this.MetadataPublic == input.MetadataPublic || - (this.MetadataPublic != null && - this.MetadataPublic.Equals(input.MetadataPublic)) - ) && - ( - this.OrganizationId == input.OrganizationId || - (this.OrganizationId != null && - this.OrganizationId.Equals(input.OrganizationId)) - ) && - ( - this.RecoveryAddresses == input.RecoveryAddresses || - this.RecoveryAddresses != null && - input.RecoveryAddresses != null && - this.RecoveryAddresses.SequenceEqual(input.RecoveryAddresses) - ) && - ( - this.SchemaId == input.SchemaId || - (this.SchemaId != null && - this.SchemaId.Equals(input.SchemaId)) - ) && - ( - this.SchemaUrl == input.SchemaUrl || - (this.SchemaUrl != null && - this.SchemaUrl.Equals(input.SchemaUrl)) - ) && - ( - this.State == input.State || - this.State.Equals(input.State) - ) && - ( - this.StateChangedAt == input.StateChangedAt || - (this.StateChangedAt != null && - this.StateChangedAt.Equals(input.StateChangedAt)) - ) && - ( - this.Traits == input.Traits || - (this.Traits != null && - this.Traits.Equals(input.Traits)) - ) && - ( - this.UpdatedAt == input.UpdatedAt || - (this.UpdatedAt != null && - this.UpdatedAt.Equals(input.UpdatedAt)) - ) && - ( - this.VerifiableAddresses == input.VerifiableAddresses || - this.VerifiableAddresses != null && - input.VerifiableAddresses != null && - this.VerifiableAddresses.SequenceEqual(input.VerifiableAddresses) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.Credentials != null) - { - hashCode = (hashCode * 59) + this.Credentials.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.MetadataAdmin != null) - { - hashCode = (hashCode * 59) + this.MetadataAdmin.GetHashCode(); - } - if (this.MetadataPublic != null) - { - hashCode = (hashCode * 59) + this.MetadataPublic.GetHashCode(); - } - if (this.OrganizationId != null) - { - hashCode = (hashCode * 59) + this.OrganizationId.GetHashCode(); - } - if (this.RecoveryAddresses != null) - { - hashCode = (hashCode * 59) + this.RecoveryAddresses.GetHashCode(); - } - if (this.SchemaId != null) - { - hashCode = (hashCode * 59) + this.SchemaId.GetHashCode(); - } - if (this.SchemaUrl != null) - { - hashCode = (hashCode * 59) + this.SchemaUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.State.GetHashCode(); - if (this.StateChangedAt != null) - { - hashCode = (hashCode * 59) + this.StateChangedAt.GetHashCode(); - } - if (this.Traits != null) - { - hashCode = (hashCode * 59) + this.Traits.GetHashCode(); - } - if (this.UpdatedAt != null) - { - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - } - if (this.VerifiableAddresses != null) - { - hashCode = (hashCode * 59) + this.VerifiableAddresses.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosIdentityCredentials.cs b/Ory.Kratos.Client/Model/KratosIdentityCredentials.cs index 8073cdcc..57d1d21d 100644 --- a/Ory.Kratos.Client/Model/KratosIdentityCredentials.cs +++ b/Ory.Kratos.Client/Model/KratosIdentityCredentials.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// Credentials represents a specific credential type /// [DataContract(Name = "identityCredentials")] - public partial class KratosIdentityCredentials : IEquatable, IValidatableObject + public partial class KratosIdentityCredentials : IValidatableObject { /// /// Type discriminates between different types of credentials. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode @@ -86,7 +85,6 @@ public enum TypeEnum /// [EnumMember(Value = "code_recovery")] CodeRecovery = 8 - } @@ -104,16 +102,15 @@ public enum TypeEnum /// Identifiers represents a list of unique identifiers this credential type matches.. /// Type discriminates between different types of credentials. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode. /// UpdatedAt is a helper struct field for gobuffalo.pop.. - /// Version refers to the version of the credential. Useful when changing the config schema.. - public KratosIdentityCredentials(Object config = default(Object), DateTime createdAt = default(DateTime), List identifiers = default(List), TypeEnum? type = default(TypeEnum?), DateTime updatedAt = default(DateTime), long version = default(long)) + /// Version refers to the version of the credential. Useful when changing the config schema.. + public KratosIdentityCredentials(Object config = default(Object), DateTime createdAt = default(DateTime), List identifiers = default(List), TypeEnum? type = default(TypeEnum?), DateTime updatedAt = default(DateTime), long varVersion = default(long)) { this.Config = config; this.CreatedAt = createdAt; this.Identifiers = identifiers; this.Type = type; this.UpdatedAt = updatedAt; - this._Version = version; - this.AdditionalProperties = new Dictionary(); + this.VarVersion = varVersion; } /// @@ -148,13 +145,7 @@ public enum TypeEnum /// /// Version refers to the version of the credential. Useful when changing the config schema. [DataMember(Name = "version", EmitDefaultValue = false)] - public long _Version { get; set; } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public long VarVersion { get; set; } /// /// Returns the string presentation of the object @@ -169,8 +160,7 @@ public override string ToString() sb.Append(" Identifiers: ").Append(Identifiers).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - sb.Append(" _Version: ").Append(_Version).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append(" VarVersion: ").Append(VarVersion).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -184,101 +174,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosIdentityCredentials); - } - - /// - /// Returns true if KratosIdentityCredentials instances are equal - /// - /// Instance of KratosIdentityCredentials to be compared - /// Boolean - public bool Equals(KratosIdentityCredentials input) - { - if (input == null) - { - return false; - } - return - ( - this.Config == input.Config || - (this.Config != null && - this.Config.Equals(input.Config)) - ) && - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.Identifiers == input.Identifiers || - this.Identifiers != null && - input.Identifiers != null && - this.Identifiers.SequenceEqual(input.Identifiers) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.UpdatedAt == input.UpdatedAt || - (this.UpdatedAt != null && - this.UpdatedAt.Equals(input.UpdatedAt)) - ) && - ( - this._Version == input._Version || - this._Version.Equals(input._Version) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Config != null) - { - hashCode = (hashCode * 59) + this.Config.GetHashCode(); - } - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.Identifiers != null) - { - hashCode = (hashCode * 59) + this.Identifiers.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.UpdatedAt != null) - { - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - } - hashCode = (hashCode * 59) + this._Version.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosIdentityCredentialsCode.cs b/Ory.Kratos.Client/Model/KratosIdentityCredentialsCode.cs index 51f4ab77..8660d0ab 100644 --- a/Ory.Kratos.Client/Model/KratosIdentityCredentialsCode.cs +++ b/Ory.Kratos.Client/Model/KratosIdentityCredentialsCode.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// CredentialsCode represents a one time login/registration code /// [DataContract(Name = "identityCredentialsCode")] - public partial class KratosIdentityCredentialsCode : IEquatable, IValidatableObject + public partial class KratosIdentityCredentialsCode : IValidatableObject { /// /// Initializes a new instance of the class. @@ -41,7 +40,6 @@ public partial class KratosIdentityCredentialsCode : IEquatable(); } /// @@ -57,12 +55,6 @@ public partial class KratosIdentityCredentialsCode : IEquatable - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -73,7 +65,6 @@ public override string ToString() sb.Append("class KratosIdentityCredentialsCode {\n"); sb.Append(" AddressType: ").Append(AddressType).Append("\n"); sb.Append(" UsedAt: ").Append(UsedAt).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -87,72 +78,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosIdentityCredentialsCode); - } - - /// - /// Returns true if KratosIdentityCredentialsCode instances are equal - /// - /// Instance of KratosIdentityCredentialsCode to be compared - /// Boolean - public bool Equals(KratosIdentityCredentialsCode input) - { - if (input == null) - { - return false; - } - return - ( - this.AddressType == input.AddressType || - (this.AddressType != null && - this.AddressType.Equals(input.AddressType)) - ) && - ( - this.UsedAt == input.UsedAt || - (this.UsedAt != null && - this.UsedAt.Equals(input.UsedAt)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AddressType != null) - { - hashCode = (hashCode * 59) + this.AddressType.GetHashCode(); - } - if (this.UsedAt != null) - { - hashCode = (hashCode * 59) + this.UsedAt.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosIdentityCredentialsOidc.cs b/Ory.Kratos.Client/Model/KratosIdentityCredentialsOidc.cs index 011bc087..cd488b0b 100644 --- a/Ory.Kratos.Client/Model/KratosIdentityCredentialsOidc.cs +++ b/Ory.Kratos.Client/Model/KratosIdentityCredentialsOidc.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// KratosIdentityCredentialsOidc /// [DataContract(Name = "identityCredentialsOidc")] - public partial class KratosIdentityCredentialsOidc : IEquatable, IValidatableObject + public partial class KratosIdentityCredentialsOidc : IValidatableObject { /// /// Initializes a new instance of the class. @@ -39,7 +38,6 @@ public partial class KratosIdentityCredentialsOidc : IEquatable providers = default(List)) { this.Providers = providers; - this.AdditionalProperties = new Dictionary(); } /// @@ -48,12 +46,6 @@ public partial class KratosIdentityCredentialsOidc : IEquatable Providers { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -63,7 +55,6 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class KratosIdentityCredentialsOidc {\n"); sb.Append(" Providers: ").Append(Providers).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -77,64 +68,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosIdentityCredentialsOidc); - } - - /// - /// Returns true if KratosIdentityCredentialsOidc instances are equal - /// - /// Instance of KratosIdentityCredentialsOidc to be compared - /// Boolean - public bool Equals(KratosIdentityCredentialsOidc input) - { - if (input == null) - { - return false; - } - return - ( - this.Providers == input.Providers || - this.Providers != null && - input.Providers != null && - this.Providers.SequenceEqual(input.Providers) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Providers != null) - { - hashCode = (hashCode * 59) + this.Providers.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosIdentityCredentialsOidcProvider.cs b/Ory.Kratos.Client/Model/KratosIdentityCredentialsOidcProvider.cs index df4e3238..88ba37e9 100644 --- a/Ory.Kratos.Client/Model/KratosIdentityCredentialsOidcProvider.cs +++ b/Ory.Kratos.Client/Model/KratosIdentityCredentialsOidcProvider.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// KratosIdentityCredentialsOidcProvider /// [DataContract(Name = "identityCredentialsOidcProvider")] - public partial class KratosIdentityCredentialsOidcProvider : IEquatable, IValidatableObject + public partial class KratosIdentityCredentialsOidcProvider : IValidatableObject { /// /// Initializes a new instance of the class. @@ -49,7 +48,6 @@ public partial class KratosIdentityCredentialsOidcProvider : IEquatable(); } /// @@ -88,12 +86,6 @@ public partial class KratosIdentityCredentialsOidcProvider : IEquatable - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -108,7 +100,6 @@ public override string ToString() sb.Append(" Organization: ").Append(Organization).Append("\n"); sb.Append(" Provider: ").Append(Provider).Append("\n"); sb.Append(" Subject: ").Append(Subject).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -122,108 +113,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosIdentityCredentialsOidcProvider); - } - - /// - /// Returns true if KratosIdentityCredentialsOidcProvider instances are equal - /// - /// Instance of KratosIdentityCredentialsOidcProvider to be compared - /// Boolean - public bool Equals(KratosIdentityCredentialsOidcProvider input) - { - if (input == null) - { - return false; - } - return - ( - this.InitialAccessToken == input.InitialAccessToken || - (this.InitialAccessToken != null && - this.InitialAccessToken.Equals(input.InitialAccessToken)) - ) && - ( - this.InitialIdToken == input.InitialIdToken || - (this.InitialIdToken != null && - this.InitialIdToken.Equals(input.InitialIdToken)) - ) && - ( - this.InitialRefreshToken == input.InitialRefreshToken || - (this.InitialRefreshToken != null && - this.InitialRefreshToken.Equals(input.InitialRefreshToken)) - ) && - ( - this.Organization == input.Organization || - (this.Organization != null && - this.Organization.Equals(input.Organization)) - ) && - ( - this.Provider == input.Provider || - (this.Provider != null && - this.Provider.Equals(input.Provider)) - ) && - ( - this.Subject == input.Subject || - (this.Subject != null && - this.Subject.Equals(input.Subject)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.InitialAccessToken != null) - { - hashCode = (hashCode * 59) + this.InitialAccessToken.GetHashCode(); - } - if (this.InitialIdToken != null) - { - hashCode = (hashCode * 59) + this.InitialIdToken.GetHashCode(); - } - if (this.InitialRefreshToken != null) - { - hashCode = (hashCode * 59) + this.InitialRefreshToken.GetHashCode(); - } - if (this.Organization != null) - { - hashCode = (hashCode * 59) + this.Organization.GetHashCode(); - } - if (this.Provider != null) - { - hashCode = (hashCode * 59) + this.Provider.GetHashCode(); - } - if (this.Subject != null) - { - hashCode = (hashCode * 59) + this.Subject.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosIdentityCredentialsPassword.cs b/Ory.Kratos.Client/Model/KratosIdentityCredentialsPassword.cs index 4905c4d5..b5a08055 100644 --- a/Ory.Kratos.Client/Model/KratosIdentityCredentialsPassword.cs +++ b/Ory.Kratos.Client/Model/KratosIdentityCredentialsPassword.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// KratosIdentityCredentialsPassword /// [DataContract(Name = "identityCredentialsPassword")] - public partial class KratosIdentityCredentialsPassword : IEquatable, IValidatableObject + public partial class KratosIdentityCredentialsPassword : IValidatableObject { /// /// Initializes a new instance of the class. @@ -39,7 +38,6 @@ public partial class KratosIdentityCredentialsPassword : IEquatable(); } /// @@ -49,12 +47,6 @@ public partial class KratosIdentityCredentialsPassword : IEquatable - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -64,7 +56,6 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class KratosIdentityCredentialsPassword {\n"); sb.Append(" HashedPassword: ").Append(HashedPassword).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -78,63 +69,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosIdentityCredentialsPassword); - } - - /// - /// Returns true if KratosIdentityCredentialsPassword instances are equal - /// - /// Instance of KratosIdentityCredentialsPassword to be compared - /// Boolean - public bool Equals(KratosIdentityCredentialsPassword input) - { - if (input == null) - { - return false; - } - return - ( - this.HashedPassword == input.HashedPassword || - (this.HashedPassword != null && - this.HashedPassword.Equals(input.HashedPassword)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.HashedPassword != null) - { - hashCode = (hashCode * 59) + this.HashedPassword.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosIdentityPatch.cs b/Ory.Kratos.Client/Model/KratosIdentityPatch.cs index 1b4a9fdc..e94f06a4 100644 --- a/Ory.Kratos.Client/Model/KratosIdentityPatch.cs +++ b/Ory.Kratos.Client/Model/KratosIdentityPatch.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// Payload for patching an identity /// [DataContract(Name = "identityPatch")] - public partial class KratosIdentityPatch : IEquatable, IValidatableObject + public partial class KratosIdentityPatch : IValidatableObject { /// /// Initializes a new instance of the class. @@ -41,7 +40,6 @@ public partial class KratosIdentityPatch : IEquatable, IVal { this.Create = create; this.PatchId = patchId; - this.AdditionalProperties = new Dictionary(); } /// @@ -57,12 +55,6 @@ public partial class KratosIdentityPatch : IEquatable, IVal [DataMember(Name = "patch_id", EmitDefaultValue = false)] public string PatchId { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -73,7 +65,6 @@ public override string ToString() sb.Append("class KratosIdentityPatch {\n"); sb.Append(" Create: ").Append(Create).Append("\n"); sb.Append(" PatchId: ").Append(PatchId).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -87,72 +78,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosIdentityPatch); - } - - /// - /// Returns true if KratosIdentityPatch instances are equal - /// - /// Instance of KratosIdentityPatch to be compared - /// Boolean - public bool Equals(KratosIdentityPatch input) - { - if (input == null) - { - return false; - } - return - ( - this.Create == input.Create || - (this.Create != null && - this.Create.Equals(input.Create)) - ) && - ( - this.PatchId == input.PatchId || - (this.PatchId != null && - this.PatchId.Equals(input.PatchId)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Create != null) - { - hashCode = (hashCode * 59) + this.Create.GetHashCode(); - } - if (this.PatchId != null) - { - hashCode = (hashCode * 59) + this.PatchId.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosIdentityPatchResponse.cs b/Ory.Kratos.Client/Model/KratosIdentityPatchResponse.cs index dbc0ba76..a9687e46 100644 --- a/Ory.Kratos.Client/Model/KratosIdentityPatchResponse.cs +++ b/Ory.Kratos.Client/Model/KratosIdentityPatchResponse.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// Response for a single identity patch /// [DataContract(Name = "identityPatchResponse")] - public partial class KratosIdentityPatchResponse : IEquatable, IValidatableObject + public partial class KratosIdentityPatchResponse : IValidatableObject { /// /// The action for this specific patch create ActionCreate Create this identity. @@ -44,7 +43,6 @@ public enum ActionEnum /// [EnumMember(Value = "create")] Create = 1 - } @@ -65,7 +63,6 @@ public enum ActionEnum this.Action = action; this.Identity = identity; this.PatchId = patchId; - this.AdditionalProperties = new Dictionary(); } /// @@ -82,12 +79,6 @@ public enum ActionEnum [DataMember(Name = "patch_id", EmitDefaultValue = false)] public string PatchId { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -99,7 +90,6 @@ public override string ToString() sb.Append(" Action: ").Append(Action).Append("\n"); sb.Append(" Identity: ").Append(Identity).Append("\n"); sb.Append(" PatchId: ").Append(PatchId).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -113,77 +103,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosIdentityPatchResponse); - } - - /// - /// Returns true if KratosIdentityPatchResponse instances are equal - /// - /// Instance of KratosIdentityPatchResponse to be compared - /// Boolean - public bool Equals(KratosIdentityPatchResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Action == input.Action || - this.Action.Equals(input.Action) - ) && - ( - this.Identity == input.Identity || - (this.Identity != null && - this.Identity.Equals(input.Identity)) - ) && - ( - this.PatchId == input.PatchId || - (this.PatchId != null && - this.PatchId.Equals(input.PatchId)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Action.GetHashCode(); - if (this.Identity != null) - { - hashCode = (hashCode * 59) + this.Identity.GetHashCode(); - } - if (this.PatchId != null) - { - hashCode = (hashCode * 59) + this.PatchId.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosIdentitySchemaContainer.cs b/Ory.Kratos.Client/Model/KratosIdentitySchemaContainer.cs index 509590e6..328643fb 100644 --- a/Ory.Kratos.Client/Model/KratosIdentitySchemaContainer.cs +++ b/Ory.Kratos.Client/Model/KratosIdentitySchemaContainer.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// An Identity JSON Schema Container /// [DataContract(Name = "identitySchemaContainer")] - public partial class KratosIdentitySchemaContainer : IEquatable, IValidatableObject + public partial class KratosIdentitySchemaContainer : IValidatableObject { /// /// Initializes a new instance of the class. @@ -41,7 +40,6 @@ public partial class KratosIdentitySchemaContainer : IEquatable(); } /// @@ -58,12 +56,6 @@ public partial class KratosIdentitySchemaContainer : IEquatable - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -74,7 +66,6 @@ public override string ToString() sb.Append("class KratosIdentitySchemaContainer {\n"); sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Schema: ").Append(Schema).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -88,72 +79,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosIdentitySchemaContainer); - } - - /// - /// Returns true if KratosIdentitySchemaContainer instances are equal - /// - /// Instance of KratosIdentitySchemaContainer to be compared - /// Boolean - public bool Equals(KratosIdentitySchemaContainer input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Schema == input.Schema || - (this.Schema != null && - this.Schema.Equals(input.Schema)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Schema != null) - { - hashCode = (hashCode * 59) + this.Schema.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosIdentityWithCredentials.cs b/Ory.Kratos.Client/Model/KratosIdentityWithCredentials.cs index 91fa0197..6f1d5562 100644 --- a/Ory.Kratos.Client/Model/KratosIdentityWithCredentials.cs +++ b/Ory.Kratos.Client/Model/KratosIdentityWithCredentials.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// Create Identity and Import Credentials /// [DataContract(Name = "identityWithCredentials")] - public partial class KratosIdentityWithCredentials : IEquatable, IValidatableObject + public partial class KratosIdentityWithCredentials : IValidatableObject { /// /// Initializes a new instance of the class. @@ -41,7 +40,6 @@ public partial class KratosIdentityWithCredentials : IEquatable(); } /// @@ -56,12 +54,6 @@ public partial class KratosIdentityWithCredentials : IEquatable - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -72,7 +64,6 @@ public override string ToString() sb.Append("class KratosIdentityWithCredentials {\n"); sb.Append(" Oidc: ").Append(Oidc).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -86,72 +77,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosIdentityWithCredentials); - } - - /// - /// Returns true if KratosIdentityWithCredentials instances are equal - /// - /// Instance of KratosIdentityWithCredentials to be compared - /// Boolean - public bool Equals(KratosIdentityWithCredentials input) - { - if (input == null) - { - return false; - } - return - ( - this.Oidc == input.Oidc || - (this.Oidc != null && - this.Oidc.Equals(input.Oidc)) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Oidc != null) - { - hashCode = (hashCode * 59) + this.Oidc.GetHashCode(); - } - if (this.Password != null) - { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosIdentityWithCredentialsOidc.cs b/Ory.Kratos.Client/Model/KratosIdentityWithCredentialsOidc.cs index 3dbc545f..41d896e2 100644 --- a/Ory.Kratos.Client/Model/KratosIdentityWithCredentialsOidc.cs +++ b/Ory.Kratos.Client/Model/KratosIdentityWithCredentialsOidc.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// Create Identity and Import Social Sign In Credentials /// [DataContract(Name = "identityWithCredentialsOidc")] - public partial class KratosIdentityWithCredentialsOidc : IEquatable, IValidatableObject + public partial class KratosIdentityWithCredentialsOidc : IValidatableObject { /// /// Initializes a new instance of the class. @@ -39,7 +38,6 @@ public partial class KratosIdentityWithCredentialsOidc : IEquatable(); } /// @@ -48,12 +46,6 @@ public partial class KratosIdentityWithCredentialsOidc : IEquatable - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -63,7 +55,6 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class KratosIdentityWithCredentialsOidc {\n"); sb.Append(" Config: ").Append(Config).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -77,63 +68,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosIdentityWithCredentialsOidc); - } - - /// - /// Returns true if KratosIdentityWithCredentialsOidc instances are equal - /// - /// Instance of KratosIdentityWithCredentialsOidc to be compared - /// Boolean - public bool Equals(KratosIdentityWithCredentialsOidc input) - { - if (input == null) - { - return false; - } - return - ( - this.Config == input.Config || - (this.Config != null && - this.Config.Equals(input.Config)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Config != null) - { - hashCode = (hashCode * 59) + this.Config.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosIdentityWithCredentialsOidcConfig.cs b/Ory.Kratos.Client/Model/KratosIdentityWithCredentialsOidcConfig.cs index 412cfde8..f473387e 100644 --- a/Ory.Kratos.Client/Model/KratosIdentityWithCredentialsOidcConfig.cs +++ b/Ory.Kratos.Client/Model/KratosIdentityWithCredentialsOidcConfig.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// KratosIdentityWithCredentialsOidcConfig /// [DataContract(Name = "identityWithCredentialsOidcConfig")] - public partial class KratosIdentityWithCredentialsOidcConfig : IEquatable, IValidatableObject + public partial class KratosIdentityWithCredentialsOidcConfig : IValidatableObject { /// /// Initializes a new instance of the class. @@ -41,7 +40,6 @@ public partial class KratosIdentityWithCredentialsOidcConfig : IEquatable(); } /// @@ -57,12 +55,6 @@ public partial class KratosIdentityWithCredentialsOidcConfig : IEquatable Providers { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -73,7 +65,6 @@ public override string ToString() sb.Append("class KratosIdentityWithCredentialsOidcConfig {\n"); sb.Append(" Config: ").Append(Config).Append("\n"); sb.Append(" Providers: ").Append(Providers).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -87,73 +78,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosIdentityWithCredentialsOidcConfig); - } - - /// - /// Returns true if KratosIdentityWithCredentialsOidcConfig instances are equal - /// - /// Instance of KratosIdentityWithCredentialsOidcConfig to be compared - /// Boolean - public bool Equals(KratosIdentityWithCredentialsOidcConfig input) - { - if (input == null) - { - return false; - } - return - ( - this.Config == input.Config || - (this.Config != null && - this.Config.Equals(input.Config)) - ) && - ( - this.Providers == input.Providers || - this.Providers != null && - input.Providers != null && - this.Providers.SequenceEqual(input.Providers) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Config != null) - { - hashCode = (hashCode * 59) + this.Config.GetHashCode(); - } - if (this.Providers != null) - { - hashCode = (hashCode * 59) + this.Providers.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosIdentityWithCredentialsOidcConfigProvider.cs b/Ory.Kratos.Client/Model/KratosIdentityWithCredentialsOidcConfigProvider.cs index cfe49f5b..1098f2da 100644 --- a/Ory.Kratos.Client/Model/KratosIdentityWithCredentialsOidcConfigProvider.cs +++ b/Ory.Kratos.Client/Model/KratosIdentityWithCredentialsOidcConfigProvider.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Create Identity and Import Social Sign In Credentials Configuration /// [DataContract(Name = "identityWithCredentialsOidcConfigProvider")] - public partial class KratosIdentityWithCredentialsOidcConfigProvider : IEquatable, IValidatableObject + public partial class KratosIdentityWithCredentialsOidcConfigProvider : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosIdentityWithCredentialsOidcConfigProvider() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosIdentityWithCredentialsOidcConfigProvider() { } /// /// Initializes a new instance of the class. /// @@ -48,38 +44,33 @@ protected KratosIdentityWithCredentialsOidcConfigProvider() public KratosIdentityWithCredentialsOidcConfigProvider(string provider = default(string), string subject = default(string)) { // to ensure "provider" is required (not null) - if (provider == null) { + if (provider == null) + { throw new ArgumentNullException("provider is a required property for KratosIdentityWithCredentialsOidcConfigProvider and cannot be null"); } this.Provider = provider; // to ensure "subject" is required (not null) - if (subject == null) { + if (subject == null) + { throw new ArgumentNullException("subject is a required property for KratosIdentityWithCredentialsOidcConfigProvider and cannot be null"); } this.Subject = subject; - this.AdditionalProperties = new Dictionary(); } /// /// The OpenID Connect provider to link the subject to. Usually something like `google` or `github`. /// /// The OpenID Connect provider to link the subject to. Usually something like `google` or `github`. - [DataMember(Name = "provider", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "provider", IsRequired = true, EmitDefaultValue = true)] public string Provider { get; set; } /// /// The subject (`sub`) of the OpenID Connect connection. Usually the `sub` field of the ID Token. /// /// The subject (`sub`) of the OpenID Connect connection. Usually the `sub` field of the ID Token. - [DataMember(Name = "subject", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "subject", IsRequired = true, EmitDefaultValue = true)] public string Subject { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -90,7 +81,6 @@ public override string ToString() sb.Append("class KratosIdentityWithCredentialsOidcConfigProvider {\n"); sb.Append(" Provider: ").Append(Provider).Append("\n"); sb.Append(" Subject: ").Append(Subject).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -104,72 +94,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosIdentityWithCredentialsOidcConfigProvider); - } - - /// - /// Returns true if KratosIdentityWithCredentialsOidcConfigProvider instances are equal - /// - /// Instance of KratosIdentityWithCredentialsOidcConfigProvider to be compared - /// Boolean - public bool Equals(KratosIdentityWithCredentialsOidcConfigProvider input) - { - if (input == null) - { - return false; - } - return - ( - this.Provider == input.Provider || - (this.Provider != null && - this.Provider.Equals(input.Provider)) - ) && - ( - this.Subject == input.Subject || - (this.Subject != null && - this.Subject.Equals(input.Subject)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Provider != null) - { - hashCode = (hashCode * 59) + this.Provider.GetHashCode(); - } - if (this.Subject != null) - { - hashCode = (hashCode * 59) + this.Subject.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosIdentityWithCredentialsPassword.cs b/Ory.Kratos.Client/Model/KratosIdentityWithCredentialsPassword.cs index b3e9bcc4..66d55652 100644 --- a/Ory.Kratos.Client/Model/KratosIdentityWithCredentialsPassword.cs +++ b/Ory.Kratos.Client/Model/KratosIdentityWithCredentialsPassword.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// Create Identity and Import Password Credentials /// [DataContract(Name = "identityWithCredentialsPassword")] - public partial class KratosIdentityWithCredentialsPassword : IEquatable, IValidatableObject + public partial class KratosIdentityWithCredentialsPassword : IValidatableObject { /// /// Initializes a new instance of the class. @@ -39,7 +38,6 @@ public partial class KratosIdentityWithCredentialsPassword : IEquatable(); } /// @@ -48,12 +46,6 @@ public partial class KratosIdentityWithCredentialsPassword : IEquatable - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -63,7 +55,6 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class KratosIdentityWithCredentialsPassword {\n"); sb.Append(" Config: ").Append(Config).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -77,63 +68,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosIdentityWithCredentialsPassword); - } - - /// - /// Returns true if KratosIdentityWithCredentialsPassword instances are equal - /// - /// Instance of KratosIdentityWithCredentialsPassword to be compared - /// Boolean - public bool Equals(KratosIdentityWithCredentialsPassword input) - { - if (input == null) - { - return false; - } - return - ( - this.Config == input.Config || - (this.Config != null && - this.Config.Equals(input.Config)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Config != null) - { - hashCode = (hashCode * 59) + this.Config.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosIdentityWithCredentialsPasswordConfig.cs b/Ory.Kratos.Client/Model/KratosIdentityWithCredentialsPasswordConfig.cs index 21235898..9c34e860 100644 --- a/Ory.Kratos.Client/Model/KratosIdentityWithCredentialsPasswordConfig.cs +++ b/Ory.Kratos.Client/Model/KratosIdentityWithCredentialsPasswordConfig.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// Create Identity and Import Password Credentials Configuration /// [DataContract(Name = "identityWithCredentialsPasswordConfig")] - public partial class KratosIdentityWithCredentialsPasswordConfig : IEquatable, IValidatableObject + public partial class KratosIdentityWithCredentialsPasswordConfig : IValidatableObject { /// /// Initializes a new instance of the class. @@ -41,7 +40,6 @@ public partial class KratosIdentityWithCredentialsPasswordConfig : IEquatable(); } /// @@ -58,12 +56,6 @@ public partial class KratosIdentityWithCredentialsPasswordConfig : IEquatable - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -74,7 +66,6 @@ public override string ToString() sb.Append("class KratosIdentityWithCredentialsPasswordConfig {\n"); sb.Append(" HashedPassword: ").Append(HashedPassword).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -88,72 +79,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosIdentityWithCredentialsPasswordConfig); - } - - /// - /// Returns true if KratosIdentityWithCredentialsPasswordConfig instances are equal - /// - /// Instance of KratosIdentityWithCredentialsPasswordConfig to be compared - /// Boolean - public bool Equals(KratosIdentityWithCredentialsPasswordConfig input) - { - if (input == null) - { - return false; - } - return - ( - this.HashedPassword == input.HashedPassword || - (this.HashedPassword != null && - this.HashedPassword.Equals(input.HashedPassword)) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.HashedPassword != null) - { - hashCode = (hashCode * 59) + this.HashedPassword.GetHashCode(); - } - if (this.Password != null) - { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosInlineResponse200.cs b/Ory.Kratos.Client/Model/KratosInlineResponse200.cs deleted file mode 100644 index 87cdbe41..00000000 --- a/Ory.Kratos.Client/Model/KratosInlineResponse200.cs +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Ory Identities API - * - * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. - * - * The version of the OpenAPI document: v1.1.0 - * Contact: office@ory.sh - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Ory.Kratos.Client.Client.OpenAPIDateConverter; - -namespace Ory.Kratos.Client.Model -{ - /// - /// KratosInlineResponse200 - /// - [DataContract(Name = "inline_response_200")] - public partial class KratosInlineResponse200 : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected KratosInlineResponse200() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// Always \"ok\". (required). - public KratosInlineResponse200(string status = default(string)) - { - // to ensure "status" is required (not null) - if (status == null) { - throw new ArgumentNullException("status is a required property for KratosInlineResponse200 and cannot be null"); - } - this.Status = status; - this.AdditionalProperties = new Dictionary(); - } - - /// - /// Always \"ok\". - /// - /// Always \"ok\". - [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KratosInlineResponse200 {\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosInlineResponse200); - } - - /// - /// Returns true if KratosInlineResponse200 instances are equal - /// - /// Instance of KratosInlineResponse200 to be compared - /// Boolean - public bool Equals(KratosInlineResponse200 input) - { - if (input == null) - { - return false; - } - return - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Ory.Kratos.Client/Model/KratosInlineResponse2001.cs b/Ory.Kratos.Client/Model/KratosInlineResponse2001.cs deleted file mode 100644 index 878afd6d..00000000 --- a/Ory.Kratos.Client/Model/KratosInlineResponse2001.cs +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Ory Identities API - * - * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. - * - * The version of the OpenAPI document: v1.1.0 - * Contact: office@ory.sh - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Ory.Kratos.Client.Client.OpenAPIDateConverter; - -namespace Ory.Kratos.Client.Model -{ - /// - /// KratosInlineResponse2001 - /// - [DataContract(Name = "inline_response_200_1")] - public partial class KratosInlineResponse2001 : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected KratosInlineResponse2001() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// The version of Ory Kratos. (required). - public KratosInlineResponse2001(string version = default(string)) - { - // to ensure "version" is required (not null) - if (version == null) { - throw new ArgumentNullException("version is a required property for KratosInlineResponse2001 and cannot be null"); - } - this._Version = version; - this.AdditionalProperties = new Dictionary(); - } - - /// - /// The version of Ory Kratos. - /// - /// The version of Ory Kratos. - [DataMember(Name = "version", IsRequired = true, EmitDefaultValue = false)] - public string _Version { get; set; } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KratosInlineResponse2001 {\n"); - sb.Append(" _Version: ").Append(_Version).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosInlineResponse2001); - } - - /// - /// Returns true if KratosInlineResponse2001 instances are equal - /// - /// Instance of KratosInlineResponse2001 to be compared - /// Boolean - public bool Equals(KratosInlineResponse2001 input) - { - if (input == null) - { - return false; - } - return - ( - this._Version == input._Version || - (this._Version != null && - this._Version.Equals(input._Version)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._Version != null) - { - hashCode = (hashCode * 59) + this._Version.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Ory.Kratos.Client/Model/KratosInlineResponse503.cs b/Ory.Kratos.Client/Model/KratosInlineResponse503.cs deleted file mode 100644 index d52b2695..00000000 --- a/Ory.Kratos.Client/Model/KratosInlineResponse503.cs +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Ory Identities API - * - * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. - * - * The version of the OpenAPI document: v1.1.0 - * Contact: office@ory.sh - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Ory.Kratos.Client.Client.OpenAPIDateConverter; - -namespace Ory.Kratos.Client.Model -{ - /// - /// KratosInlineResponse503 - /// - [DataContract(Name = "inline_response_503")] - public partial class KratosInlineResponse503 : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected KratosInlineResponse503() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// Errors contains a list of errors that caused the not ready status. (required). - public KratosInlineResponse503(Dictionary errors = default(Dictionary)) - { - // to ensure "errors" is required (not null) - if (errors == null) { - throw new ArgumentNullException("errors is a required property for KratosInlineResponse503 and cannot be null"); - } - this.Errors = errors; - this.AdditionalProperties = new Dictionary(); - } - - /// - /// Errors contains a list of errors that caused the not ready status. - /// - /// Errors contains a list of errors that caused the not ready status. - [DataMember(Name = "errors", IsRequired = true, EmitDefaultValue = false)] - public Dictionary Errors { get; set; } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KratosInlineResponse503 {\n"); - sb.Append(" Errors: ").Append(Errors).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosInlineResponse503); - } - - /// - /// Returns true if KratosInlineResponse503 instances are equal - /// - /// Instance of KratosInlineResponse503 to be compared - /// Boolean - public bool Equals(KratosInlineResponse503 input) - { - if (input == null) - { - return false; - } - return - ( - this.Errors == input.Errors || - this.Errors != null && - input.Errors != null && - this.Errors.SequenceEqual(input.Errors) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Errors != null) - { - hashCode = (hashCode * 59) + this.Errors.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Ory.Kratos.Client/Model/KratosIsAlive200Response.cs b/Ory.Kratos.Client/Model/KratosIsAlive200Response.cs new file mode 100644 index 00000000..cc764381 --- /dev/null +++ b/Ory.Kratos.Client/Model/KratosIsAlive200Response.cs @@ -0,0 +1,93 @@ +/* + * Ory Identities API + * + * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. + * + * Contact: office@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Kratos.Client.Client.OpenAPIDateConverter; + +namespace Ory.Kratos.Client.Model +{ + /// + /// KratosIsAlive200Response + /// + [DataContract(Name = "isAlive_200_response")] + public partial class KratosIsAlive200Response : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected KratosIsAlive200Response() { } + /// + /// Initializes a new instance of the class. + /// + /// Always \"ok\". (required). + public KratosIsAlive200Response(string status = default(string)) + { + // to ensure "status" is required (not null) + if (status == null) + { + throw new ArgumentNullException("status is a required property for KratosIsAlive200Response and cannot be null"); + } + this.Status = status; + } + + /// + /// Always \"ok\". + /// + /// Always \"ok\". + [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] + public string Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class KratosIsAlive200Response {\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Kratos.Client/Model/KratosIsReady503Response.cs b/Ory.Kratos.Client/Model/KratosIsReady503Response.cs new file mode 100644 index 00000000..595e4854 --- /dev/null +++ b/Ory.Kratos.Client/Model/KratosIsReady503Response.cs @@ -0,0 +1,93 @@ +/* + * Ory Identities API + * + * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. + * + * Contact: office@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Ory.Kratos.Client.Client.OpenAPIDateConverter; + +namespace Ory.Kratos.Client.Model +{ + /// + /// KratosIsReady503Response + /// + [DataContract(Name = "isReady_503_response")] + public partial class KratosIsReady503Response : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected KratosIsReady503Response() { } + /// + /// Initializes a new instance of the class. + /// + /// Errors contains a list of errors that caused the not ready status. (required). + public KratosIsReady503Response(Dictionary errors = default(Dictionary)) + { + // to ensure "errors" is required (not null) + if (errors == null) + { + throw new ArgumentNullException("errors is a required property for KratosIsReady503Response and cannot be null"); + } + this.Errors = errors; + } + + /// + /// Errors contains a list of errors that caused the not ready status. + /// + /// Errors contains a list of errors that caused the not ready status. + [DataMember(Name = "errors", IsRequired = true, EmitDefaultValue = true)] + public Dictionary Errors { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class KratosIsReady503Response {\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Ory.Kratos.Client/Model/KratosJsonPatch.cs b/Ory.Kratos.Client/Model/KratosJsonPatch.cs index 8163de86..019bd293 100644 --- a/Ory.Kratos.Client/Model/KratosJsonPatch.cs +++ b/Ory.Kratos.Client/Model/KratosJsonPatch.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// A JSONPatch document as defined by RFC 6902 /// [DataContract(Name = "jsonPatch")] - public partial class KratosJsonPatch : IEquatable, IValidatableObject + public partial class KratosJsonPatch : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosJsonPatch() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosJsonPatch() { } /// /// Initializes a new instance of the class. /// @@ -50,24 +46,26 @@ protected KratosJsonPatch() public KratosJsonPatch(string from = default(string), string op = default(string), string path = default(string), Object value = default(Object)) { // to ensure "op" is required (not null) - if (op == null) { + if (op == null) + { throw new ArgumentNullException("op is a required property for KratosJsonPatch and cannot be null"); } this.Op = op; // to ensure "path" is required (not null) - if (path == null) { + if (path == null) + { throw new ArgumentNullException("path is a required property for KratosJsonPatch and cannot be null"); } this.Path = path; this.From = from; this.Value = value; - this.AdditionalProperties = new Dictionary(); } /// /// This field is used together with operation \"move\" and uses JSON Pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). /// /// This field is used together with operation \"move\" and uses JSON Pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). + /// /name [DataMember(Name = "from", EmitDefaultValue = false)] public string From { get; set; } @@ -75,29 +73,26 @@ protected KratosJsonPatch() /// The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". /// /// The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". - [DataMember(Name = "op", IsRequired = true, EmitDefaultValue = false)] + /// replace + [DataMember(Name = "op", IsRequired = true, EmitDefaultValue = true)] public string Op { get; set; } /// /// The path to the target path. Uses JSON pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). /// /// The path to the target path. Uses JSON pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). - [DataMember(Name = "path", IsRequired = true, EmitDefaultValue = false)] + /// /name + [DataMember(Name = "path", IsRequired = true, EmitDefaultValue = true)] public string Path { get; set; } /// /// The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). /// /// The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). + /// foobar [DataMember(Name = "value", EmitDefaultValue = true)] public Object Value { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -110,7 +105,6 @@ public override string ToString() sb.Append(" Op: ").Append(Op).Append("\n"); sb.Append(" Path: ").Append(Path).Append("\n"); sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -124,90 +118,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosJsonPatch); - } - - /// - /// Returns true if KratosJsonPatch instances are equal - /// - /// Instance of KratosJsonPatch to be compared - /// Boolean - public bool Equals(KratosJsonPatch input) - { - if (input == null) - { - return false; - } - return - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && - ( - this.Op == input.Op || - (this.Op != null && - this.Op.Equals(input.Op)) - ) && - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.From != null) - { - hashCode = (hashCode * 59) + this.From.GetHashCode(); - } - if (this.Op != null) - { - hashCode = (hashCode * 59) + this.Op.GetHashCode(); - } - if (this.Path != null) - { - hashCode = (hashCode * 59) + this.Path.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosLoginFlow.cs b/Ory.Kratos.Client/Model/KratosLoginFlow.cs index 149361f4..c4044102 100644 --- a/Ory.Kratos.Client/Model/KratosLoginFlow.cs +++ b/Ory.Kratos.Client/Model/KratosLoginFlow.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// This object represents a login flow. A login flow is initiated at the \"Initiate Login API / Browser Flow\" endpoint by a client. Once a login flow is completed successfully, a session cookie or session token will be issued. /// [DataContract(Name = "loginFlow")] - public partial class KratosLoginFlow : IEquatable, IValidatableObject + public partial class KratosLoginFlow : IValidatableObject { /// /// The active login method If set contains the login method used. If the flow is new, it is unset. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode @@ -86,7 +85,6 @@ public enum ActiveEnum /// [EnumMember(Value = "code_recovery")] CodeRecovery = 8 - } @@ -96,14 +94,17 @@ public enum ActiveEnum /// The active login method If set contains the login method used. If the flow is new, it is unset. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode [DataMember(Name = "active", EmitDefaultValue = false)] public ActiveEnum? Active { get; set; } + + /// + /// Gets or Sets RequestedAal + /// + [DataMember(Name = "requested_aal", EmitDefaultValue = false)] + public KratosAuthenticatorAssuranceLevel? RequestedAal { get; set; } /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosLoginFlow() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosLoginFlow() { } /// /// Initializes a new instance of the class. /// @@ -124,32 +125,37 @@ protected KratosLoginFlow() /// The flow type can either be `api` or `browser`. (required). /// ui (required). /// UpdatedAt is a helper struct field for gobuffalo.pop.. - public KratosLoginFlow(ActiveEnum? active = default(ActiveEnum?), DateTime createdAt = default(DateTime), DateTime expiresAt = default(DateTime), string id = default(string), DateTime issuedAt = default(DateTime), string oauth2LoginChallenge = default(string), KratosOAuth2LoginRequest oauth2LoginRequest = default(KratosOAuth2LoginRequest), string organizationId = default(string), bool refresh = default(bool), string requestUrl = default(string), KratosAuthenticatorAssuranceLevel requestedAal = default(KratosAuthenticatorAssuranceLevel), string returnTo = default(string), string sessionTokenExchangeCode = default(string), Object state = default(Object), string type = default(string), KratosUiContainer ui = default(KratosUiContainer), DateTime updatedAt = default(DateTime)) + public KratosLoginFlow(ActiveEnum? active = default(ActiveEnum?), DateTime createdAt = default(DateTime), DateTime expiresAt = default(DateTime), string id = default(string), DateTime issuedAt = default(DateTime), string oauth2LoginChallenge = default(string), KratosOAuth2LoginRequest oauth2LoginRequest = default(KratosOAuth2LoginRequest), string organizationId = default(string), bool refresh = default(bool), string requestUrl = default(string), KratosAuthenticatorAssuranceLevel? requestedAal = default(KratosAuthenticatorAssuranceLevel?), string returnTo = default(string), string sessionTokenExchangeCode = default(string), Object state = default(Object), string type = default(string), KratosUiContainer ui = default(KratosUiContainer), DateTime updatedAt = default(DateTime)) { this.ExpiresAt = expiresAt; // to ensure "id" is required (not null) - if (id == null) { + if (id == null) + { throw new ArgumentNullException("id is a required property for KratosLoginFlow and cannot be null"); } this.Id = id; this.IssuedAt = issuedAt; // to ensure "requestUrl" is required (not null) - if (requestUrl == null) { + if (requestUrl == null) + { throw new ArgumentNullException("requestUrl is a required property for KratosLoginFlow and cannot be null"); } this.RequestUrl = requestUrl; // to ensure "state" is required (not null) - if (state == null) { + if (state == null) + { throw new ArgumentNullException("state is a required property for KratosLoginFlow and cannot be null"); } this.State = state; // to ensure "type" is required (not null) - if (type == null) { + if (type == null) + { throw new ArgumentNullException("type is a required property for KratosLoginFlow and cannot be null"); } this.Type = type; // to ensure "ui" is required (not null) - if (ui == null) { + if (ui == null) + { throw new ArgumentNullException("ui is a required property for KratosLoginFlow and cannot be null"); } this.Ui = ui; @@ -163,7 +169,6 @@ protected KratosLoginFlow() this.ReturnTo = returnTo; this.SessionTokenExchangeCode = sessionTokenExchangeCode; this.UpdatedAt = updatedAt; - this.AdditionalProperties = new Dictionary(); } /// @@ -177,21 +182,21 @@ protected KratosLoginFlow() /// ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to log in, a new flow has to be initiated. /// /// ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to log in, a new flow has to be initiated. - [DataMember(Name = "expires_at", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "expires_at", IsRequired = true, EmitDefaultValue = true)] public DateTime ExpiresAt { get; set; } /// /// ID represents the flow's unique ID. When performing the login flow, this represents the id in the login UI's query parameter: http://<selfservice.flows.login.ui_url>/?flow=<flow_id> /// /// ID represents the flow's unique ID. When performing the login flow, this represents the id in the login UI's query parameter: http://<selfservice.flows.login.ui_url>/?flow=<flow_id> - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] public string Id { get; set; } /// /// IssuedAt is the time (UTC) when the flow started. /// /// IssuedAt is the time (UTC) when the flow started. - [DataMember(Name = "issued_at", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "issued_at", IsRequired = true, EmitDefaultValue = true)] public DateTime IssuedAt { get; set; } /// @@ -224,15 +229,9 @@ protected KratosLoginFlow() /// RequestURL is the initial URL that was requested from Ory Kratos. It can be used to forward information contained in the URL's path or query for example. /// /// RequestURL is the initial URL that was requested from Ory Kratos. It can be used to forward information contained in the URL's path or query for example. - [DataMember(Name = "request_url", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "request_url", IsRequired = true, EmitDefaultValue = true)] public string RequestUrl { get; set; } - /// - /// Gets or Sets RequestedAal - /// - [DataMember(Name = "requested_aal", EmitDefaultValue = false)] - public KratosAuthenticatorAssuranceLevel RequestedAal { get; set; } - /// /// ReturnTo contains the requested return_to URL. /// @@ -258,13 +257,13 @@ protected KratosLoginFlow() /// The flow type can either be `api` or `browser`. /// /// The flow type can either be `api` or `browser`. - [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } /// /// Gets or Sets Ui /// - [DataMember(Name = "ui", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "ui", IsRequired = true, EmitDefaultValue = true)] public KratosUiContainer Ui { get; set; } /// @@ -274,12 +273,6 @@ protected KratosLoginFlow() [DataMember(Name = "updated_at", EmitDefaultValue = false)] public DateTime UpdatedAt { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -305,7 +298,6 @@ public override string ToString() sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Ui: ").Append(Ui).Append("\n"); sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -319,199 +311,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosLoginFlow); - } - - /// - /// Returns true if KratosLoginFlow instances are equal - /// - /// Instance of KratosLoginFlow to be compared - /// Boolean - public bool Equals(KratosLoginFlow input) - { - if (input == null) - { - return false; - } - return - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.IssuedAt == input.IssuedAt || - (this.IssuedAt != null && - this.IssuedAt.Equals(input.IssuedAt)) - ) && - ( - this.Oauth2LoginChallenge == input.Oauth2LoginChallenge || - (this.Oauth2LoginChallenge != null && - this.Oauth2LoginChallenge.Equals(input.Oauth2LoginChallenge)) - ) && - ( - this.Oauth2LoginRequest == input.Oauth2LoginRequest || - (this.Oauth2LoginRequest != null && - this.Oauth2LoginRequest.Equals(input.Oauth2LoginRequest)) - ) && - ( - this.OrganizationId == input.OrganizationId || - (this.OrganizationId != null && - this.OrganizationId.Equals(input.OrganizationId)) - ) && - ( - this.Refresh == input.Refresh || - this.Refresh.Equals(input.Refresh) - ) && - ( - this.RequestUrl == input.RequestUrl || - (this.RequestUrl != null && - this.RequestUrl.Equals(input.RequestUrl)) - ) && - ( - this.RequestedAal == input.RequestedAal || - (this.RequestedAal != null && - this.RequestedAal.Equals(input.RequestedAal)) - ) && - ( - this.ReturnTo == input.ReturnTo || - (this.ReturnTo != null && - this.ReturnTo.Equals(input.ReturnTo)) - ) && - ( - this.SessionTokenExchangeCode == input.SessionTokenExchangeCode || - (this.SessionTokenExchangeCode != null && - this.SessionTokenExchangeCode.Equals(input.SessionTokenExchangeCode)) - ) && - ( - this.State == input.State || - (this.State != null && - this.State.Equals(input.State)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Ui == input.Ui || - (this.Ui != null && - this.Ui.Equals(input.Ui)) - ) && - ( - this.UpdatedAt == input.UpdatedAt || - (this.UpdatedAt != null && - this.UpdatedAt.Equals(input.UpdatedAt)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.IssuedAt != null) - { - hashCode = (hashCode * 59) + this.IssuedAt.GetHashCode(); - } - if (this.Oauth2LoginChallenge != null) - { - hashCode = (hashCode * 59) + this.Oauth2LoginChallenge.GetHashCode(); - } - if (this.Oauth2LoginRequest != null) - { - hashCode = (hashCode * 59) + this.Oauth2LoginRequest.GetHashCode(); - } - if (this.OrganizationId != null) - { - hashCode = (hashCode * 59) + this.OrganizationId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Refresh.GetHashCode(); - if (this.RequestUrl != null) - { - hashCode = (hashCode * 59) + this.RequestUrl.GetHashCode(); - } - if (this.RequestedAal != null) - { - hashCode = (hashCode * 59) + this.RequestedAal.GetHashCode(); - } - if (this.ReturnTo != null) - { - hashCode = (hashCode * 59) + this.ReturnTo.GetHashCode(); - } - if (this.SessionTokenExchangeCode != null) - { - hashCode = (hashCode * 59) + this.SessionTokenExchangeCode.GetHashCode(); - } - if (this.State != null) - { - hashCode = (hashCode * 59) + this.State.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Ui != null) - { - hashCode = (hashCode * 59) + this.Ui.GetHashCode(); - } - if (this.UpdatedAt != null) - { - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosLoginFlowState.cs b/Ory.Kratos.Client/Model/KratosLoginFlowState.cs index 5a850aae..115c041e 100644 --- a/Ory.Kratos.Client/Model/KratosLoginFlowState.cs +++ b/Ory.Kratos.Client/Model/KratosLoginFlowState.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -50,7 +49,6 @@ public enum KratosLoginFlowState /// [EnumMember(Value = "passed_challenge")] PassedChallenge = 3 - } } diff --git a/Ory.Kratos.Client/Model/KratosLogoutFlow.cs b/Ory.Kratos.Client/Model/KratosLogoutFlow.cs index bf4e2a94..66b28c00 100644 --- a/Ory.Kratos.Client/Model/KratosLogoutFlow.cs +++ b/Ory.Kratos.Client/Model/KratosLogoutFlow.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Logout Flow /// [DataContract(Name = "logoutFlow")] - public partial class KratosLogoutFlow : IEquatable, IValidatableObject + public partial class KratosLogoutFlow : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosLogoutFlow() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosLogoutFlow() { } /// /// Initializes a new instance of the class. /// @@ -48,38 +44,33 @@ protected KratosLogoutFlow() public KratosLogoutFlow(string logoutToken = default(string), string logoutUrl = default(string)) { // to ensure "logoutToken" is required (not null) - if (logoutToken == null) { + if (logoutToken == null) + { throw new ArgumentNullException("logoutToken is a required property for KratosLogoutFlow and cannot be null"); } this.LogoutToken = logoutToken; // to ensure "logoutUrl" is required (not null) - if (logoutUrl == null) { + if (logoutUrl == null) + { throw new ArgumentNullException("logoutUrl is a required property for KratosLogoutFlow and cannot be null"); } this.LogoutUrl = logoutUrl; - this.AdditionalProperties = new Dictionary(); } /// /// LogoutToken can be used to perform logout using AJAX. /// /// LogoutToken can be used to perform logout using AJAX. - [DataMember(Name = "logout_token", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "logout_token", IsRequired = true, EmitDefaultValue = true)] public string LogoutToken { get; set; } /// /// LogoutURL can be opened in a browser to sign the user out. format: uri /// /// LogoutURL can be opened in a browser to sign the user out. format: uri - [DataMember(Name = "logout_url", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "logout_url", IsRequired = true, EmitDefaultValue = true)] public string LogoutUrl { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -90,7 +81,6 @@ public override string ToString() sb.Append("class KratosLogoutFlow {\n"); sb.Append(" LogoutToken: ").Append(LogoutToken).Append("\n"); sb.Append(" LogoutUrl: ").Append(LogoutUrl).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -104,72 +94,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosLogoutFlow); - } - - /// - /// Returns true if KratosLogoutFlow instances are equal - /// - /// Instance of KratosLogoutFlow to be compared - /// Boolean - public bool Equals(KratosLogoutFlow input) - { - if (input == null) - { - return false; - } - return - ( - this.LogoutToken == input.LogoutToken || - (this.LogoutToken != null && - this.LogoutToken.Equals(input.LogoutToken)) - ) && - ( - this.LogoutUrl == input.LogoutUrl || - (this.LogoutUrl != null && - this.LogoutUrl.Equals(input.LogoutUrl)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.LogoutToken != null) - { - hashCode = (hashCode * 59) + this.LogoutToken.GetHashCode(); - } - if (this.LogoutUrl != null) - { - hashCode = (hashCode * 59) + this.LogoutUrl.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosMessage.cs b/Ory.Kratos.Client/Model/KratosMessage.cs index ec55809c..c1d453dd 100644 --- a/Ory.Kratos.Client/Model/KratosMessage.cs +++ b/Ory.Kratos.Client/Model/KratosMessage.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,8 +29,14 @@ namespace Ory.Kratos.Client.Model /// KratosMessage /// [DataContract(Name = "message")] - public partial class KratosMessage : IEquatable, IValidatableObject + public partial class KratosMessage : IValidatableObject { + + /// + /// Gets or Sets Status + /// + [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] + public KratosCourierMessageStatus Status { get; set; } /// /// recovery_invalid TypeRecoveryInvalid recovery_valid TypeRecoveryValid recovery_code_invalid TypeRecoveryCodeInvalid recovery_code_valid TypeRecoveryCodeValid verification_invalid TypeVerificationInvalid verification_valid TypeVerificationValid verification_code_invalid TypeVerificationCodeInvalid verification_code_valid TypeVerificationCodeValid stub TypeTestStub login_code_valid TypeLoginCodeValid registration_code_valid TypeRegistrationCodeValid /// @@ -104,7 +109,6 @@ public enum TemplateTypeEnum /// [EnumMember(Value = "registration_code_valid")] RegistrationCodeValid = 11 - } @@ -112,16 +116,19 @@ public enum TemplateTypeEnum /// recovery_invalid TypeRecoveryInvalid recovery_valid TypeRecoveryValid recovery_code_invalid TypeRecoveryCodeInvalid recovery_code_valid TypeRecoveryCodeValid verification_invalid TypeVerificationInvalid verification_valid TypeVerificationValid verification_code_invalid TypeVerificationCodeInvalid verification_code_valid TypeVerificationCodeValid stub TypeTestStub login_code_valid TypeLoginCodeValid registration_code_valid TypeRegistrationCodeValid /// /// recovery_invalid TypeRecoveryInvalid recovery_valid TypeRecoveryValid recovery_code_invalid TypeRecoveryCodeInvalid recovery_code_valid TypeRecoveryCodeValid verification_invalid TypeVerificationInvalid verification_valid TypeVerificationValid verification_code_invalid TypeVerificationCodeInvalid verification_code_valid TypeVerificationCodeValid stub TypeTestStub login_code_valid TypeLoginCodeValid registration_code_valid TypeRegistrationCodeValid - [DataMember(Name = "template_type", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "template_type", IsRequired = true, EmitDefaultValue = true)] public TemplateTypeEnum TemplateType { get; set; } + + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] + public KratosCourierMessageType Type { get; set; } /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosMessage() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosMessage() { } /// /// Initializes a new instance of the class. /// @@ -140,48 +147,43 @@ protected KratosMessage() public KratosMessage(string body = default(string), string channel = default(string), DateTime createdAt = default(DateTime), List dispatches = default(List), string id = default(string), string recipient = default(string), long sendCount = default(long), KratosCourierMessageStatus status = default(KratosCourierMessageStatus), string subject = default(string), TemplateTypeEnum templateType = default(TemplateTypeEnum), KratosCourierMessageType type = default(KratosCourierMessageType), DateTime updatedAt = default(DateTime)) { // to ensure "body" is required (not null) - if (body == null) { + if (body == null) + { throw new ArgumentNullException("body is a required property for KratosMessage and cannot be null"); } this.Body = body; this.CreatedAt = createdAt; // to ensure "id" is required (not null) - if (id == null) { + if (id == null) + { throw new ArgumentNullException("id is a required property for KratosMessage and cannot be null"); } this.Id = id; // to ensure "recipient" is required (not null) - if (recipient == null) { + if (recipient == null) + { throw new ArgumentNullException("recipient is a required property for KratosMessage and cannot be null"); } this.Recipient = recipient; this.SendCount = sendCount; - // to ensure "status" is required (not null) - if (status == null) { - throw new ArgumentNullException("status is a required property for KratosMessage and cannot be null"); - } this.Status = status; // to ensure "subject" is required (not null) - if (subject == null) { + if (subject == null) + { throw new ArgumentNullException("subject is a required property for KratosMessage and cannot be null"); } this.Subject = subject; this.TemplateType = templateType; - // to ensure "type" is required (not null) - if (type == null) { - throw new ArgumentNullException("type is a required property for KratosMessage and cannot be null"); - } this.Type = type; this.UpdatedAt = updatedAt; this.Channel = channel; this.Dispatches = dispatches; - this.AdditionalProperties = new Dictionary(); } /// /// Gets or Sets Body /// - [DataMember(Name = "body", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "body", IsRequired = true, EmitDefaultValue = true)] public string Body { get; set; } /// @@ -194,7 +196,7 @@ protected KratosMessage() /// CreatedAt is a helper struct field for gobuffalo.pop. /// /// CreatedAt is a helper struct field for gobuffalo.pop. - [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = true)] public DateTime CreatedAt { get; set; } /// @@ -207,52 +209,34 @@ protected KratosMessage() /// /// Gets or Sets Id /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] public string Id { get; set; } /// /// Gets or Sets Recipient /// - [DataMember(Name = "recipient", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "recipient", IsRequired = true, EmitDefaultValue = true)] public string Recipient { get; set; } /// /// Gets or Sets SendCount /// - [DataMember(Name = "send_count", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "send_count", IsRequired = true, EmitDefaultValue = true)] public long SendCount { get; set; } - /// - /// Gets or Sets Status - /// - [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = false)] - public KratosCourierMessageStatus Status { get; set; } - /// /// Gets or Sets Subject /// - [DataMember(Name = "subject", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "subject", IsRequired = true, EmitDefaultValue = true)] public string Subject { get; set; } - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = false)] - public KratosCourierMessageType Type { get; set; } - /// /// UpdatedAt is a helper struct field for gobuffalo.pop. /// /// UpdatedAt is a helper struct field for gobuffalo.pop. - [DataMember(Name = "updated_at", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "updated_at", IsRequired = true, EmitDefaultValue = true)] public DateTime UpdatedAt { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -273,7 +257,6 @@ public override string ToString() sb.Append(" TemplateType: ").Append(TemplateType).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -287,155 +270,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosMessage); - } - - /// - /// Returns true if KratosMessage instances are equal - /// - /// Instance of KratosMessage to be compared - /// Boolean - public bool Equals(KratosMessage input) - { - if (input == null) - { - return false; - } - return - ( - this.Body == input.Body || - (this.Body != null && - this.Body.Equals(input.Body)) - ) && - ( - this.Channel == input.Channel || - (this.Channel != null && - this.Channel.Equals(input.Channel)) - ) && - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.Dispatches == input.Dispatches || - this.Dispatches != null && - input.Dispatches != null && - this.Dispatches.SequenceEqual(input.Dispatches) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Recipient == input.Recipient || - (this.Recipient != null && - this.Recipient.Equals(input.Recipient)) - ) && - ( - this.SendCount == input.SendCount || - this.SendCount.Equals(input.SendCount) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.Subject == input.Subject || - (this.Subject != null && - this.Subject.Equals(input.Subject)) - ) && - ( - this.TemplateType == input.TemplateType || - this.TemplateType.Equals(input.TemplateType) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.UpdatedAt == input.UpdatedAt || - (this.UpdatedAt != null && - this.UpdatedAt.Equals(input.UpdatedAt)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Body != null) - { - hashCode = (hashCode * 59) + this.Body.GetHashCode(); - } - if (this.Channel != null) - { - hashCode = (hashCode * 59) + this.Channel.GetHashCode(); - } - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.Dispatches != null) - { - hashCode = (hashCode * 59) + this.Dispatches.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Recipient != null) - { - hashCode = (hashCode * 59) + this.Recipient.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SendCount.GetHashCode(); - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - if (this.Subject != null) - { - hashCode = (hashCode * 59) + this.Subject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TemplateType.GetHashCode(); - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.UpdatedAt != null) - { - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosMessageDispatch.cs b/Ory.Kratos.Client/Model/KratosMessageDispatch.cs index 5a606efe..28e0a062 100644 --- a/Ory.Kratos.Client/Model/KratosMessageDispatch.cs +++ b/Ory.Kratos.Client/Model/KratosMessageDispatch.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// MessageDispatch represents an attempt of sending a courier message It contains the status of the attempt (failed or successful) and the error if any occured /// [DataContract(Name = "messageDispatch")] - public partial class KratosMessageDispatch : IEquatable, IValidatableObject + public partial class KratosMessageDispatch : IValidatableObject { /// /// The status of this dispatch Either \"failed\" or \"success\" failed CourierMessageDispatchStatusFailed success CourierMessageDispatchStatusSuccess @@ -50,7 +49,6 @@ public enum StatusEnum /// [EnumMember(Value = "success")] Success = 2 - } @@ -58,16 +56,13 @@ public enum StatusEnum /// The status of this dispatch Either \"failed\" or \"success\" failed CourierMessageDispatchStatusFailed success CourierMessageDispatchStatusSuccess /// /// The status of this dispatch Either \"failed\" or \"success\" failed CourierMessageDispatchStatusFailed success CourierMessageDispatchStatusSuccess - [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] public StatusEnum Status { get; set; } /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosMessageDispatch() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosMessageDispatch() { } /// /// Initializes a new instance of the class. /// @@ -81,26 +76,27 @@ protected KratosMessageDispatch() { this.CreatedAt = createdAt; // to ensure "id" is required (not null) - if (id == null) { + if (id == null) + { throw new ArgumentNullException("id is a required property for KratosMessageDispatch and cannot be null"); } this.Id = id; // to ensure "messageId" is required (not null) - if (messageId == null) { + if (messageId == null) + { throw new ArgumentNullException("messageId is a required property for KratosMessageDispatch and cannot be null"); } this.MessageId = messageId; this.Status = status; this.UpdatedAt = updatedAt; this.Error = error; - this.AdditionalProperties = new Dictionary(); } /// /// CreatedAt is a helper struct field for gobuffalo.pop. /// /// CreatedAt is a helper struct field for gobuffalo.pop. - [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = true)] public DateTime CreatedAt { get; set; } /// @@ -113,29 +109,23 @@ protected KratosMessageDispatch() /// The ID of this message dispatch /// /// The ID of this message dispatch - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] public string Id { get; set; } /// /// The ID of the message being dispatched /// /// The ID of the message being dispatched - [DataMember(Name = "message_id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "message_id", IsRequired = true, EmitDefaultValue = true)] public string MessageId { get; set; } /// /// UpdatedAt is a helper struct field for gobuffalo.pop. /// /// UpdatedAt is a helper struct field for gobuffalo.pop. - [DataMember(Name = "updated_at", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "updated_at", IsRequired = true, EmitDefaultValue = true)] public DateTime UpdatedAt { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -150,7 +140,6 @@ public override string ToString() sb.Append(" MessageId: ").Append(MessageId).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -164,104 +153,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosMessageDispatch); - } - - /// - /// Returns true if KratosMessageDispatch instances are equal - /// - /// Instance of KratosMessageDispatch to be compared - /// Boolean - public bool Equals(KratosMessageDispatch input) - { - if (input == null) - { - return false; - } - return - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.MessageId == input.MessageId || - (this.MessageId != null && - this.MessageId.Equals(input.MessageId)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.UpdatedAt == input.UpdatedAt || - (this.UpdatedAt != null && - this.UpdatedAt.Equals(input.UpdatedAt)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.MessageId != null) - { - hashCode = (hashCode * 59) + this.MessageId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.UpdatedAt != null) - { - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosNeedsPrivilegedSessionError.cs b/Ory.Kratos.Client/Model/KratosNeedsPrivilegedSessionError.cs index 38354ac0..8005d8aa 100644 --- a/Ory.Kratos.Client/Model/KratosNeedsPrivilegedSessionError.cs +++ b/Ory.Kratos.Client/Model/KratosNeedsPrivilegedSessionError.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// KratosNeedsPrivilegedSessionError /// [DataContract(Name = "needsPrivilegedSessionError")] - public partial class KratosNeedsPrivilegedSessionError : IEquatable, IValidatableObject + public partial class KratosNeedsPrivilegedSessionError : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosNeedsPrivilegedSessionError() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosNeedsPrivilegedSessionError() { } /// /// Initializes a new instance of the class. /// @@ -48,12 +44,12 @@ protected KratosNeedsPrivilegedSessionError() public KratosNeedsPrivilegedSessionError(KratosGenericError error = default(KratosGenericError), string redirectBrowserTo = default(string)) { // to ensure "redirectBrowserTo" is required (not null) - if (redirectBrowserTo == null) { + if (redirectBrowserTo == null) + { throw new ArgumentNullException("redirectBrowserTo is a required property for KratosNeedsPrivilegedSessionError and cannot be null"); } this.RedirectBrowserTo = redirectBrowserTo; this.Error = error; - this.AdditionalProperties = new Dictionary(); } /// @@ -66,15 +62,9 @@ protected KratosNeedsPrivilegedSessionError() /// Points to where to redirect the user to next. /// /// Points to where to redirect the user to next. - [DataMember(Name = "redirect_browser_to", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "redirect_browser_to", IsRequired = true, EmitDefaultValue = true)] public string RedirectBrowserTo { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -85,7 +75,6 @@ public override string ToString() sb.Append("class KratosNeedsPrivilegedSessionError {\n"); sb.Append(" Error: ").Append(Error).Append("\n"); sb.Append(" RedirectBrowserTo: ").Append(RedirectBrowserTo).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -99,72 +88,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosNeedsPrivilegedSessionError); - } - - /// - /// Returns true if KratosNeedsPrivilegedSessionError instances are equal - /// - /// Instance of KratosNeedsPrivilegedSessionError to be compared - /// Boolean - public bool Equals(KratosNeedsPrivilegedSessionError input) - { - if (input == null) - { - return false; - } - return - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.RedirectBrowserTo == input.RedirectBrowserTo || - (this.RedirectBrowserTo != null && - this.RedirectBrowserTo.Equals(input.RedirectBrowserTo)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.RedirectBrowserTo != null) - { - hashCode = (hashCode * 59) + this.RedirectBrowserTo.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosOAuth2Client.cs b/Ory.Kratos.Client/Model/KratosOAuth2Client.cs index d1c640a6..88a03460 100644 --- a/Ory.Kratos.Client/Model/KratosOAuth2Client.cs +++ b/Ory.Kratos.Client/Model/KratosOAuth2Client.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// KratosOAuth2Client /// [DataContract(Name = "OAuth2Client")] - public partial class KratosOAuth2Client : IEquatable, IValidatableObject + public partial class KratosOAuth2Client : IValidatableObject { /// /// Initializes a new instance of the class. @@ -133,7 +132,6 @@ public partial class KratosOAuth2Client : IEquatable, IValid this.TosUri = tosUri; this.UpdatedAt = updatedAt; this.UserinfoSignedResponseAlg = userinfoSignedResponseAlg; - this.AdditionalProperties = new Dictionary(); } /// @@ -463,12 +461,6 @@ public partial class KratosOAuth2Client : IEquatable, IValid [DataMember(Name = "userinfo_signed_response_alg", EmitDefaultValue = false)] public string UserinfoSignedResponseAlg { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -525,7 +517,6 @@ public override string ToString() sb.Append(" TosUri: ").Append(TosUri).Append("\n"); sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); sb.Append(" UserinfoSignedResponseAlg: ").Append(UserinfoSignedResponseAlg).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -539,474 +530,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosOAuth2Client); - } - - /// - /// Returns true if KratosOAuth2Client instances are equal - /// - /// Instance of KratosOAuth2Client to be compared - /// Boolean - public bool Equals(KratosOAuth2Client input) - { - if (input == null) - { - return false; - } - return - ( - this.AccessTokenStrategy == input.AccessTokenStrategy || - (this.AccessTokenStrategy != null && - this.AccessTokenStrategy.Equals(input.AccessTokenStrategy)) - ) && - ( - this.AllowedCorsOrigins == input.AllowedCorsOrigins || - this.AllowedCorsOrigins != null && - input.AllowedCorsOrigins != null && - this.AllowedCorsOrigins.SequenceEqual(input.AllowedCorsOrigins) - ) && - ( - this.Audience == input.Audience || - this.Audience != null && - input.Audience != null && - this.Audience.SequenceEqual(input.Audience) - ) && - ( - this.AuthorizationCodeGrantAccessTokenLifespan == input.AuthorizationCodeGrantAccessTokenLifespan || - (this.AuthorizationCodeGrantAccessTokenLifespan != null && - this.AuthorizationCodeGrantAccessTokenLifespan.Equals(input.AuthorizationCodeGrantAccessTokenLifespan)) - ) && - ( - this.AuthorizationCodeGrantIdTokenLifespan == input.AuthorizationCodeGrantIdTokenLifespan || - (this.AuthorizationCodeGrantIdTokenLifespan != null && - this.AuthorizationCodeGrantIdTokenLifespan.Equals(input.AuthorizationCodeGrantIdTokenLifespan)) - ) && - ( - this.AuthorizationCodeGrantRefreshTokenLifespan == input.AuthorizationCodeGrantRefreshTokenLifespan || - (this.AuthorizationCodeGrantRefreshTokenLifespan != null && - this.AuthorizationCodeGrantRefreshTokenLifespan.Equals(input.AuthorizationCodeGrantRefreshTokenLifespan)) - ) && - ( - this.BackchannelLogoutSessionRequired == input.BackchannelLogoutSessionRequired || - this.BackchannelLogoutSessionRequired.Equals(input.BackchannelLogoutSessionRequired) - ) && - ( - this.BackchannelLogoutUri == input.BackchannelLogoutUri || - (this.BackchannelLogoutUri != null && - this.BackchannelLogoutUri.Equals(input.BackchannelLogoutUri)) - ) && - ( - this.ClientCredentialsGrantAccessTokenLifespan == input.ClientCredentialsGrantAccessTokenLifespan || - (this.ClientCredentialsGrantAccessTokenLifespan != null && - this.ClientCredentialsGrantAccessTokenLifespan.Equals(input.ClientCredentialsGrantAccessTokenLifespan)) - ) && - ( - this.ClientId == input.ClientId || - (this.ClientId != null && - this.ClientId.Equals(input.ClientId)) - ) && - ( - this.ClientName == input.ClientName || - (this.ClientName != null && - this.ClientName.Equals(input.ClientName)) - ) && - ( - this.ClientSecret == input.ClientSecret || - (this.ClientSecret != null && - this.ClientSecret.Equals(input.ClientSecret)) - ) && - ( - this.ClientSecretExpiresAt == input.ClientSecretExpiresAt || - this.ClientSecretExpiresAt.Equals(input.ClientSecretExpiresAt) - ) && - ( - this.ClientUri == input.ClientUri || - (this.ClientUri != null && - this.ClientUri.Equals(input.ClientUri)) - ) && - ( - this.Contacts == input.Contacts || - this.Contacts != null && - input.Contacts != null && - this.Contacts.SequenceEqual(input.Contacts) - ) && - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.FrontchannelLogoutSessionRequired == input.FrontchannelLogoutSessionRequired || - this.FrontchannelLogoutSessionRequired.Equals(input.FrontchannelLogoutSessionRequired) - ) && - ( - this.FrontchannelLogoutUri == input.FrontchannelLogoutUri || - (this.FrontchannelLogoutUri != null && - this.FrontchannelLogoutUri.Equals(input.FrontchannelLogoutUri)) - ) && - ( - this.GrantTypes == input.GrantTypes || - this.GrantTypes != null && - input.GrantTypes != null && - this.GrantTypes.SequenceEqual(input.GrantTypes) - ) && - ( - this.ImplicitGrantAccessTokenLifespan == input.ImplicitGrantAccessTokenLifespan || - (this.ImplicitGrantAccessTokenLifespan != null && - this.ImplicitGrantAccessTokenLifespan.Equals(input.ImplicitGrantAccessTokenLifespan)) - ) && - ( - this.ImplicitGrantIdTokenLifespan == input.ImplicitGrantIdTokenLifespan || - (this.ImplicitGrantIdTokenLifespan != null && - this.ImplicitGrantIdTokenLifespan.Equals(input.ImplicitGrantIdTokenLifespan)) - ) && - ( - this.Jwks == input.Jwks || - (this.Jwks != null && - this.Jwks.Equals(input.Jwks)) - ) && - ( - this.JwksUri == input.JwksUri || - (this.JwksUri != null && - this.JwksUri.Equals(input.JwksUri)) - ) && - ( - this.JwtBearerGrantAccessTokenLifespan == input.JwtBearerGrantAccessTokenLifespan || - (this.JwtBearerGrantAccessTokenLifespan != null && - this.JwtBearerGrantAccessTokenLifespan.Equals(input.JwtBearerGrantAccessTokenLifespan)) - ) && - ( - this.LogoUri == input.LogoUri || - (this.LogoUri != null && - this.LogoUri.Equals(input.LogoUri)) - ) && - ( - this.Metadata == input.Metadata || - (this.Metadata != null && - this.Metadata.Equals(input.Metadata)) - ) && - ( - this.Owner == input.Owner || - (this.Owner != null && - this.Owner.Equals(input.Owner)) - ) && - ( - this.PolicyUri == input.PolicyUri || - (this.PolicyUri != null && - this.PolicyUri.Equals(input.PolicyUri)) - ) && - ( - this.PostLogoutRedirectUris == input.PostLogoutRedirectUris || - this.PostLogoutRedirectUris != null && - input.PostLogoutRedirectUris != null && - this.PostLogoutRedirectUris.SequenceEqual(input.PostLogoutRedirectUris) - ) && - ( - this.RedirectUris == input.RedirectUris || - this.RedirectUris != null && - input.RedirectUris != null && - this.RedirectUris.SequenceEqual(input.RedirectUris) - ) && - ( - this.RefreshTokenGrantAccessTokenLifespan == input.RefreshTokenGrantAccessTokenLifespan || - (this.RefreshTokenGrantAccessTokenLifespan != null && - this.RefreshTokenGrantAccessTokenLifespan.Equals(input.RefreshTokenGrantAccessTokenLifespan)) - ) && - ( - this.RefreshTokenGrantIdTokenLifespan == input.RefreshTokenGrantIdTokenLifespan || - (this.RefreshTokenGrantIdTokenLifespan != null && - this.RefreshTokenGrantIdTokenLifespan.Equals(input.RefreshTokenGrantIdTokenLifespan)) - ) && - ( - this.RefreshTokenGrantRefreshTokenLifespan == input.RefreshTokenGrantRefreshTokenLifespan || - (this.RefreshTokenGrantRefreshTokenLifespan != null && - this.RefreshTokenGrantRefreshTokenLifespan.Equals(input.RefreshTokenGrantRefreshTokenLifespan)) - ) && - ( - this.RegistrationAccessToken == input.RegistrationAccessToken || - (this.RegistrationAccessToken != null && - this.RegistrationAccessToken.Equals(input.RegistrationAccessToken)) - ) && - ( - this.RegistrationClientUri == input.RegistrationClientUri || - (this.RegistrationClientUri != null && - this.RegistrationClientUri.Equals(input.RegistrationClientUri)) - ) && - ( - this.RequestObjectSigningAlg == input.RequestObjectSigningAlg || - (this.RequestObjectSigningAlg != null && - this.RequestObjectSigningAlg.Equals(input.RequestObjectSigningAlg)) - ) && - ( - this.RequestUris == input.RequestUris || - this.RequestUris != null && - input.RequestUris != null && - this.RequestUris.SequenceEqual(input.RequestUris) - ) && - ( - this.ResponseTypes == input.ResponseTypes || - this.ResponseTypes != null && - input.ResponseTypes != null && - this.ResponseTypes.SequenceEqual(input.ResponseTypes) - ) && - ( - this.Scope == input.Scope || - (this.Scope != null && - this.Scope.Equals(input.Scope)) - ) && - ( - this.SectorIdentifierUri == input.SectorIdentifierUri || - (this.SectorIdentifierUri != null && - this.SectorIdentifierUri.Equals(input.SectorIdentifierUri)) - ) && - ( - this.SkipConsent == input.SkipConsent || - this.SkipConsent.Equals(input.SkipConsent) - ) && - ( - this.SkipLogoutConsent == input.SkipLogoutConsent || - this.SkipLogoutConsent.Equals(input.SkipLogoutConsent) - ) && - ( - this.SubjectType == input.SubjectType || - (this.SubjectType != null && - this.SubjectType.Equals(input.SubjectType)) - ) && - ( - this.TokenEndpointAuthMethod == input.TokenEndpointAuthMethod || - (this.TokenEndpointAuthMethod != null && - this.TokenEndpointAuthMethod.Equals(input.TokenEndpointAuthMethod)) - ) && - ( - this.TokenEndpointAuthSigningAlg == input.TokenEndpointAuthSigningAlg || - (this.TokenEndpointAuthSigningAlg != null && - this.TokenEndpointAuthSigningAlg.Equals(input.TokenEndpointAuthSigningAlg)) - ) && - ( - this.TosUri == input.TosUri || - (this.TosUri != null && - this.TosUri.Equals(input.TosUri)) - ) && - ( - this.UpdatedAt == input.UpdatedAt || - (this.UpdatedAt != null && - this.UpdatedAt.Equals(input.UpdatedAt)) - ) && - ( - this.UserinfoSignedResponseAlg == input.UserinfoSignedResponseAlg || - (this.UserinfoSignedResponseAlg != null && - this.UserinfoSignedResponseAlg.Equals(input.UserinfoSignedResponseAlg)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccessTokenStrategy != null) - { - hashCode = (hashCode * 59) + this.AccessTokenStrategy.GetHashCode(); - } - if (this.AllowedCorsOrigins != null) - { - hashCode = (hashCode * 59) + this.AllowedCorsOrigins.GetHashCode(); - } - if (this.Audience != null) - { - hashCode = (hashCode * 59) + this.Audience.GetHashCode(); - } - if (this.AuthorizationCodeGrantAccessTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.AuthorizationCodeGrantAccessTokenLifespan.GetHashCode(); - } - if (this.AuthorizationCodeGrantIdTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.AuthorizationCodeGrantIdTokenLifespan.GetHashCode(); - } - if (this.AuthorizationCodeGrantRefreshTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.AuthorizationCodeGrantRefreshTokenLifespan.GetHashCode(); - } - hashCode = (hashCode * 59) + this.BackchannelLogoutSessionRequired.GetHashCode(); - if (this.BackchannelLogoutUri != null) - { - hashCode = (hashCode * 59) + this.BackchannelLogoutUri.GetHashCode(); - } - if (this.ClientCredentialsGrantAccessTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.ClientCredentialsGrantAccessTokenLifespan.GetHashCode(); - } - if (this.ClientId != null) - { - hashCode = (hashCode * 59) + this.ClientId.GetHashCode(); - } - if (this.ClientName != null) - { - hashCode = (hashCode * 59) + this.ClientName.GetHashCode(); - } - if (this.ClientSecret != null) - { - hashCode = (hashCode * 59) + this.ClientSecret.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ClientSecretExpiresAt.GetHashCode(); - if (this.ClientUri != null) - { - hashCode = (hashCode * 59) + this.ClientUri.GetHashCode(); - } - if (this.Contacts != null) - { - hashCode = (hashCode * 59) + this.Contacts.GetHashCode(); - } - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FrontchannelLogoutSessionRequired.GetHashCode(); - if (this.FrontchannelLogoutUri != null) - { - hashCode = (hashCode * 59) + this.FrontchannelLogoutUri.GetHashCode(); - } - if (this.GrantTypes != null) - { - hashCode = (hashCode * 59) + this.GrantTypes.GetHashCode(); - } - if (this.ImplicitGrantAccessTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.ImplicitGrantAccessTokenLifespan.GetHashCode(); - } - if (this.ImplicitGrantIdTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.ImplicitGrantIdTokenLifespan.GetHashCode(); - } - if (this.Jwks != null) - { - hashCode = (hashCode * 59) + this.Jwks.GetHashCode(); - } - if (this.JwksUri != null) - { - hashCode = (hashCode * 59) + this.JwksUri.GetHashCode(); - } - if (this.JwtBearerGrantAccessTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.JwtBearerGrantAccessTokenLifespan.GetHashCode(); - } - if (this.LogoUri != null) - { - hashCode = (hashCode * 59) + this.LogoUri.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.Owner != null) - { - hashCode = (hashCode * 59) + this.Owner.GetHashCode(); - } - if (this.PolicyUri != null) - { - hashCode = (hashCode * 59) + this.PolicyUri.GetHashCode(); - } - if (this.PostLogoutRedirectUris != null) - { - hashCode = (hashCode * 59) + this.PostLogoutRedirectUris.GetHashCode(); - } - if (this.RedirectUris != null) - { - hashCode = (hashCode * 59) + this.RedirectUris.GetHashCode(); - } - if (this.RefreshTokenGrantAccessTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.RefreshTokenGrantAccessTokenLifespan.GetHashCode(); - } - if (this.RefreshTokenGrantIdTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.RefreshTokenGrantIdTokenLifespan.GetHashCode(); - } - if (this.RefreshTokenGrantRefreshTokenLifespan != null) - { - hashCode = (hashCode * 59) + this.RefreshTokenGrantRefreshTokenLifespan.GetHashCode(); - } - if (this.RegistrationAccessToken != null) - { - hashCode = (hashCode * 59) + this.RegistrationAccessToken.GetHashCode(); - } - if (this.RegistrationClientUri != null) - { - hashCode = (hashCode * 59) + this.RegistrationClientUri.GetHashCode(); - } - if (this.RequestObjectSigningAlg != null) - { - hashCode = (hashCode * 59) + this.RequestObjectSigningAlg.GetHashCode(); - } - if (this.RequestUris != null) - { - hashCode = (hashCode * 59) + this.RequestUris.GetHashCode(); - } - if (this.ResponseTypes != null) - { - hashCode = (hashCode * 59) + this.ResponseTypes.GetHashCode(); - } - if (this.Scope != null) - { - hashCode = (hashCode * 59) + this.Scope.GetHashCode(); - } - if (this.SectorIdentifierUri != null) - { - hashCode = (hashCode * 59) + this.SectorIdentifierUri.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SkipConsent.GetHashCode(); - hashCode = (hashCode * 59) + this.SkipLogoutConsent.GetHashCode(); - if (this.SubjectType != null) - { - hashCode = (hashCode * 59) + this.SubjectType.GetHashCode(); - } - if (this.TokenEndpointAuthMethod != null) - { - hashCode = (hashCode * 59) + this.TokenEndpointAuthMethod.GetHashCode(); - } - if (this.TokenEndpointAuthSigningAlg != null) - { - hashCode = (hashCode * 59) + this.TokenEndpointAuthSigningAlg.GetHashCode(); - } - if (this.TosUri != null) - { - hashCode = (hashCode * 59) + this.TosUri.GetHashCode(); - } - if (this.UpdatedAt != null) - { - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - } - if (this.UserinfoSignedResponseAlg != null) - { - hashCode = (hashCode * 59) + this.UserinfoSignedResponseAlg.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosOAuth2ConsentRequestOpenIDConnectContext.cs b/Ory.Kratos.Client/Model/KratosOAuth2ConsentRequestOpenIDConnectContext.cs index d7fa8a2e..d63a49b6 100644 --- a/Ory.Kratos.Client/Model/KratosOAuth2ConsentRequestOpenIDConnectContext.cs +++ b/Ory.Kratos.Client/Model/KratosOAuth2ConsentRequestOpenIDConnectContext.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// OAuth2ConsentRequestOpenIDConnectContext struct for OAuth2ConsentRequestOpenIDConnectContext /// [DataContract(Name = "OAuth2ConsentRequestOpenIDConnectContext")] - public partial class KratosOAuth2ConsentRequestOpenIDConnectContext : IEquatable, IValidatableObject + public partial class KratosOAuth2ConsentRequestOpenIDConnectContext : IValidatableObject { /// /// Initializes a new instance of the class. @@ -47,7 +46,6 @@ public partial class KratosOAuth2ConsentRequestOpenIDConnectContext : IEquatable this.IdTokenHintClaims = idTokenHintClaims; this.LoginHint = loginHint; this.UiLocales = uiLocales; - this.AdditionalProperties = new Dictionary(); } /// @@ -85,12 +83,6 @@ public partial class KratosOAuth2ConsentRequestOpenIDConnectContext : IEquatable [DataMember(Name = "ui_locales", EmitDefaultValue = false)] public List UiLocales { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -104,7 +96,6 @@ public override string ToString() sb.Append(" IdTokenHintClaims: ").Append(IdTokenHintClaims).Append("\n"); sb.Append(" LoginHint: ").Append(LoginHint).Append("\n"); sb.Append(" UiLocales: ").Append(UiLocales).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -118,102 +109,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosOAuth2ConsentRequestOpenIDConnectContext); - } - - /// - /// Returns true if KratosOAuth2ConsentRequestOpenIDConnectContext instances are equal - /// - /// Instance of KratosOAuth2ConsentRequestOpenIDConnectContext to be compared - /// Boolean - public bool Equals(KratosOAuth2ConsentRequestOpenIDConnectContext input) - { - if (input == null) - { - return false; - } - return - ( - this.AcrValues == input.AcrValues || - this.AcrValues != null && - input.AcrValues != null && - this.AcrValues.SequenceEqual(input.AcrValues) - ) && - ( - this.Display == input.Display || - (this.Display != null && - this.Display.Equals(input.Display)) - ) && - ( - this.IdTokenHintClaims == input.IdTokenHintClaims || - this.IdTokenHintClaims != null && - input.IdTokenHintClaims != null && - this.IdTokenHintClaims.SequenceEqual(input.IdTokenHintClaims) - ) && - ( - this.LoginHint == input.LoginHint || - (this.LoginHint != null && - this.LoginHint.Equals(input.LoginHint)) - ) && - ( - this.UiLocales == input.UiLocales || - this.UiLocales != null && - input.UiLocales != null && - this.UiLocales.SequenceEqual(input.UiLocales) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AcrValues != null) - { - hashCode = (hashCode * 59) + this.AcrValues.GetHashCode(); - } - if (this.Display != null) - { - hashCode = (hashCode * 59) + this.Display.GetHashCode(); - } - if (this.IdTokenHintClaims != null) - { - hashCode = (hashCode * 59) + this.IdTokenHintClaims.GetHashCode(); - } - if (this.LoginHint != null) - { - hashCode = (hashCode * 59) + this.LoginHint.GetHashCode(); - } - if (this.UiLocales != null) - { - hashCode = (hashCode * 59) + this.UiLocales.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosOAuth2LoginRequest.cs b/Ory.Kratos.Client/Model/KratosOAuth2LoginRequest.cs index 16aee7a2..4e75e154 100644 --- a/Ory.Kratos.Client/Model/KratosOAuth2LoginRequest.cs +++ b/Ory.Kratos.Client/Model/KratosOAuth2LoginRequest.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,13 +29,13 @@ namespace Ory.Kratos.Client.Model /// OAuth2LoginRequest struct for OAuth2LoginRequest /// [DataContract(Name = "OAuth2LoginRequest")] - public partial class KratosOAuth2LoginRequest : IEquatable, IValidatableObject + public partial class KratosOAuth2LoginRequest : IValidatableObject { /// /// Initializes a new instance of the class. /// /// ID is the identifier (\\\"login challenge\\\") of the login request. It is used to identify the session.. - /// _client. + /// varClient. /// oidcContext. /// RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters.. /// requestedAccessTokenAudience. @@ -44,10 +43,10 @@ public partial class KratosOAuth2LoginRequest : IEquatableSessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \\\"sid\\\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user.. /// Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect URL. This feature allows you to update / set session information.. /// Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client. If this value is set and `skip` is true, you MUST include this subject type when accepting the login request, or the request will fail.. - public KratosOAuth2LoginRequest(string challenge = default(string), KratosOAuth2Client _client = default(KratosOAuth2Client), KratosOAuth2ConsentRequestOpenIDConnectContext oidcContext = default(KratosOAuth2ConsentRequestOpenIDConnectContext), string requestUrl = default(string), List requestedAccessTokenAudience = default(List), List requestedScope = default(List), string sessionId = default(string), bool skip = default(bool), string subject = default(string)) + public KratosOAuth2LoginRequest(string challenge = default(string), KratosOAuth2Client varClient = default(KratosOAuth2Client), KratosOAuth2ConsentRequestOpenIDConnectContext oidcContext = default(KratosOAuth2ConsentRequestOpenIDConnectContext), string requestUrl = default(string), List requestedAccessTokenAudience = default(List), List requestedScope = default(List), string sessionId = default(string), bool skip = default(bool), string subject = default(string)) { this.Challenge = challenge; - this._Client = _client; + this.VarClient = varClient; this.OidcContext = oidcContext; this.RequestUrl = requestUrl; this.RequestedAccessTokenAudience = requestedAccessTokenAudience; @@ -55,7 +54,6 @@ public partial class KratosOAuth2LoginRequest : IEquatable(); } /// @@ -66,10 +64,10 @@ public partial class KratosOAuth2LoginRequest : IEquatable - /// Gets or Sets _Client + /// Gets or Sets VarClient /// [DataMember(Name = "client", EmitDefaultValue = false)] - public KratosOAuth2Client _Client { get; set; } + public KratosOAuth2Client VarClient { get; set; } /// /// Gets or Sets OidcContext @@ -117,12 +115,6 @@ public partial class KratosOAuth2LoginRequest : IEquatable - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -132,7 +124,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class KratosOAuth2LoginRequest {\n"); sb.Append(" Challenge: ").Append(Challenge).Append("\n"); - sb.Append(" _Client: ").Append(_Client).Append("\n"); + sb.Append(" VarClient: ").Append(VarClient).Append("\n"); sb.Append(" OidcContext: ").Append(OidcContext).Append("\n"); sb.Append(" RequestUrl: ").Append(RequestUrl).Append("\n"); sb.Append(" RequestedAccessTokenAudience: ").Append(RequestedAccessTokenAudience).Append("\n"); @@ -140,7 +132,6 @@ public override string ToString() sb.Append(" SessionId: ").Append(SessionId).Append("\n"); sb.Append(" Skip: ").Append(Skip).Append("\n"); sb.Append(" Subject: ").Append(Subject).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -154,133 +145,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosOAuth2LoginRequest); - } - - /// - /// Returns true if KratosOAuth2LoginRequest instances are equal - /// - /// Instance of KratosOAuth2LoginRequest to be compared - /// Boolean - public bool Equals(KratosOAuth2LoginRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Challenge == input.Challenge || - (this.Challenge != null && - this.Challenge.Equals(input.Challenge)) - ) && - ( - this._Client == input._Client || - (this._Client != null && - this._Client.Equals(input._Client)) - ) && - ( - this.OidcContext == input.OidcContext || - (this.OidcContext != null && - this.OidcContext.Equals(input.OidcContext)) - ) && - ( - this.RequestUrl == input.RequestUrl || - (this.RequestUrl != null && - this.RequestUrl.Equals(input.RequestUrl)) - ) && - ( - this.RequestedAccessTokenAudience == input.RequestedAccessTokenAudience || - this.RequestedAccessTokenAudience != null && - input.RequestedAccessTokenAudience != null && - this.RequestedAccessTokenAudience.SequenceEqual(input.RequestedAccessTokenAudience) - ) && - ( - this.RequestedScope == input.RequestedScope || - this.RequestedScope != null && - input.RequestedScope != null && - this.RequestedScope.SequenceEqual(input.RequestedScope) - ) && - ( - this.SessionId == input.SessionId || - (this.SessionId != null && - this.SessionId.Equals(input.SessionId)) - ) && - ( - this.Skip == input.Skip || - this.Skip.Equals(input.Skip) - ) && - ( - this.Subject == input.Subject || - (this.Subject != null && - this.Subject.Equals(input.Subject)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Challenge != null) - { - hashCode = (hashCode * 59) + this.Challenge.GetHashCode(); - } - if (this._Client != null) - { - hashCode = (hashCode * 59) + this._Client.GetHashCode(); - } - if (this.OidcContext != null) - { - hashCode = (hashCode * 59) + this.OidcContext.GetHashCode(); - } - if (this.RequestUrl != null) - { - hashCode = (hashCode * 59) + this.RequestUrl.GetHashCode(); - } - if (this.RequestedAccessTokenAudience != null) - { - hashCode = (hashCode * 59) + this.RequestedAccessTokenAudience.GetHashCode(); - } - if (this.RequestedScope != null) - { - hashCode = (hashCode * 59) + this.RequestedScope.GetHashCode(); - } - if (this.SessionId != null) - { - hashCode = (hashCode * 59) + this.SessionId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Skip.GetHashCode(); - if (this.Subject != null) - { - hashCode = (hashCode * 59) + this.Subject.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosPatchIdentitiesBody.cs b/Ory.Kratos.Client/Model/KratosPatchIdentitiesBody.cs index db323813..46303599 100644 --- a/Ory.Kratos.Client/Model/KratosPatchIdentitiesBody.cs +++ b/Ory.Kratos.Client/Model/KratosPatchIdentitiesBody.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// Patch Identities Body /// [DataContract(Name = "patchIdentitiesBody")] - public partial class KratosPatchIdentitiesBody : IEquatable, IValidatableObject + public partial class KratosPatchIdentitiesBody : IValidatableObject { /// /// Initializes a new instance of the class. @@ -39,7 +38,6 @@ public partial class KratosPatchIdentitiesBody : IEquatable identities = default(List)) { this.Identities = identities; - this.AdditionalProperties = new Dictionary(); } /// @@ -49,12 +47,6 @@ public partial class KratosPatchIdentitiesBody : IEquatable Identities { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -64,7 +56,6 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class KratosPatchIdentitiesBody {\n"); sb.Append(" Identities: ").Append(Identities).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -78,64 +69,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosPatchIdentitiesBody); - } - - /// - /// Returns true if KratosPatchIdentitiesBody instances are equal - /// - /// Instance of KratosPatchIdentitiesBody to be compared - /// Boolean - public bool Equals(KratosPatchIdentitiesBody input) - { - if (input == null) - { - return false; - } - return - ( - this.Identities == input.Identities || - this.Identities != null && - input.Identities != null && - this.Identities.SequenceEqual(input.Identities) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Identities != null) - { - hashCode = (hashCode * 59) + this.Identities.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosPerformNativeLogoutBody.cs b/Ory.Kratos.Client/Model/KratosPerformNativeLogoutBody.cs index 5dae878d..a7da57f4 100644 --- a/Ory.Kratos.Client/Model/KratosPerformNativeLogoutBody.cs +++ b/Ory.Kratos.Client/Model/KratosPerformNativeLogoutBody.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Perform Native Logout Request Body /// [DataContract(Name = "performNativeLogoutBody")] - public partial class KratosPerformNativeLogoutBody : IEquatable, IValidatableObject + public partial class KratosPerformNativeLogoutBody : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosPerformNativeLogoutBody() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosPerformNativeLogoutBody() { } /// /// Initializes a new instance of the class. /// @@ -47,26 +43,20 @@ protected KratosPerformNativeLogoutBody() public KratosPerformNativeLogoutBody(string sessionToken = default(string)) { // to ensure "sessionToken" is required (not null) - if (sessionToken == null) { + if (sessionToken == null) + { throw new ArgumentNullException("sessionToken is a required property for KratosPerformNativeLogoutBody and cannot be null"); } this.SessionToken = sessionToken; - this.AdditionalProperties = new Dictionary(); } /// /// The Session Token Invalidate this session token. /// /// The Session Token Invalidate this session token. - [DataMember(Name = "session_token", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "session_token", IsRequired = true, EmitDefaultValue = true)] public string SessionToken { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -76,7 +66,6 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class KratosPerformNativeLogoutBody {\n"); sb.Append(" SessionToken: ").Append(SessionToken).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -90,63 +79,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosPerformNativeLogoutBody); - } - - /// - /// Returns true if KratosPerformNativeLogoutBody instances are equal - /// - /// Instance of KratosPerformNativeLogoutBody to be compared - /// Boolean - public bool Equals(KratosPerformNativeLogoutBody input) - { - if (input == null) - { - return false; - } - return - ( - this.SessionToken == input.SessionToken || - (this.SessionToken != null && - this.SessionToken.Equals(input.SessionToken)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SessionToken != null) - { - hashCode = (hashCode * 59) + this.SessionToken.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosRecoveryCodeForIdentity.cs b/Ory.Kratos.Client/Model/KratosRecoveryCodeForIdentity.cs index f31d3275..e1846b90 100644 --- a/Ory.Kratos.Client/Model/KratosRecoveryCodeForIdentity.cs +++ b/Ory.Kratos.Client/Model/KratosRecoveryCodeForIdentity.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Used when an administrator creates a recovery code for an identity. /// [DataContract(Name = "recoveryCodeForIdentity")] - public partial class KratosRecoveryCodeForIdentity : IEquatable, IValidatableObject + public partial class KratosRecoveryCodeForIdentity : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosRecoveryCodeForIdentity() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosRecoveryCodeForIdentity() { } /// /// Initializes a new instance of the class. /// @@ -49,17 +45,18 @@ protected KratosRecoveryCodeForIdentity() public KratosRecoveryCodeForIdentity(DateTime expiresAt = default(DateTime), string recoveryCode = default(string), string recoveryLink = default(string)) { // to ensure "recoveryCode" is required (not null) - if (recoveryCode == null) { + if (recoveryCode == null) + { throw new ArgumentNullException("recoveryCode is a required property for KratosRecoveryCodeForIdentity and cannot be null"); } this.RecoveryCode = recoveryCode; // to ensure "recoveryLink" is required (not null) - if (recoveryLink == null) { + if (recoveryLink == null) + { throw new ArgumentNullException("recoveryLink is a required property for KratosRecoveryCodeForIdentity and cannot be null"); } this.RecoveryLink = recoveryLink; this.ExpiresAt = expiresAt; - this.AdditionalProperties = new Dictionary(); } /// @@ -73,22 +70,16 @@ protected KratosRecoveryCodeForIdentity() /// RecoveryCode is the code that can be used to recover the account /// /// RecoveryCode is the code that can be used to recover the account - [DataMember(Name = "recovery_code", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "recovery_code", IsRequired = true, EmitDefaultValue = true)] public string RecoveryCode { get; set; } /// /// RecoveryLink with flow This link opens the recovery UI with an empty `code` field. /// /// RecoveryLink with flow This link opens the recovery UI with an empty `code` field. - [DataMember(Name = "recovery_link", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "recovery_link", IsRequired = true, EmitDefaultValue = true)] public string RecoveryLink { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -100,7 +91,6 @@ public override string ToString() sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); sb.Append(" RecoveryCode: ").Append(RecoveryCode).Append("\n"); sb.Append(" RecoveryLink: ").Append(RecoveryLink).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -114,81 +104,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosRecoveryCodeForIdentity); - } - - /// - /// Returns true if KratosRecoveryCodeForIdentity instances are equal - /// - /// Instance of KratosRecoveryCodeForIdentity to be compared - /// Boolean - public bool Equals(KratosRecoveryCodeForIdentity input) - { - if (input == null) - { - return false; - } - return - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ) && - ( - this.RecoveryCode == input.RecoveryCode || - (this.RecoveryCode != null && - this.RecoveryCode.Equals(input.RecoveryCode)) - ) && - ( - this.RecoveryLink == input.RecoveryLink || - (this.RecoveryLink != null && - this.RecoveryLink.Equals(input.RecoveryLink)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - if (this.RecoveryCode != null) - { - hashCode = (hashCode * 59) + this.RecoveryCode.GetHashCode(); - } - if (this.RecoveryLink != null) - { - hashCode = (hashCode * 59) + this.RecoveryLink.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosRecoveryFlow.cs b/Ory.Kratos.Client/Model/KratosRecoveryFlow.cs index a95bb9bd..cdd84d3b 100644 --- a/Ory.Kratos.Client/Model/KratosRecoveryFlow.cs +++ b/Ory.Kratos.Client/Model/KratosRecoveryFlow.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// This request is used when an identity wants to recover their account. We recommend reading the [Account Recovery Documentation](../self-service/flows/password-reset-account-recovery) /// [DataContract(Name = "recoveryFlow")] - public partial class KratosRecoveryFlow : IEquatable, IValidatableObject + public partial class KratosRecoveryFlow : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosRecoveryFlow() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosRecoveryFlow() { } /// /// Initializes a new instance of the class. /// @@ -57,35 +53,39 @@ protected KratosRecoveryFlow() { this.ExpiresAt = expiresAt; // to ensure "id" is required (not null) - if (id == null) { + if (id == null) + { throw new ArgumentNullException("id is a required property for KratosRecoveryFlow and cannot be null"); } this.Id = id; this.IssuedAt = issuedAt; // to ensure "requestUrl" is required (not null) - if (requestUrl == null) { + if (requestUrl == null) + { throw new ArgumentNullException("requestUrl is a required property for KratosRecoveryFlow and cannot be null"); } this.RequestUrl = requestUrl; // to ensure "state" is required (not null) - if (state == null) { + if (state == null) + { throw new ArgumentNullException("state is a required property for KratosRecoveryFlow and cannot be null"); } this.State = state; // to ensure "type" is required (not null) - if (type == null) { + if (type == null) + { throw new ArgumentNullException("type is a required property for KratosRecoveryFlow and cannot be null"); } this.Type = type; // to ensure "ui" is required (not null) - if (ui == null) { + if (ui == null) + { throw new ArgumentNullException("ui is a required property for KratosRecoveryFlow and cannot be null"); } this.Ui = ui; this.Active = active; this.ContinueWith = continueWith; this.ReturnTo = returnTo; - this.AdditionalProperties = new Dictionary(); } /// @@ -106,28 +106,28 @@ protected KratosRecoveryFlow() /// ExpiresAt is the time (UTC) when the request expires. If the user still wishes to update the setting, a new request has to be initiated. /// /// ExpiresAt is the time (UTC) when the request expires. If the user still wishes to update the setting, a new request has to be initiated. - [DataMember(Name = "expires_at", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "expires_at", IsRequired = true, EmitDefaultValue = true)] public DateTime ExpiresAt { get; set; } /// /// ID represents the request's unique ID. When performing the recovery flow, this represents the id in the recovery ui's query parameter: http://<selfservice.flows.recovery.ui_url>?request=<id> /// /// ID represents the request's unique ID. When performing the recovery flow, this represents the id in the recovery ui's query parameter: http://<selfservice.flows.recovery.ui_url>?request=<id> - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] public string Id { get; set; } /// /// IssuedAt is the time (UTC) when the request occurred. /// /// IssuedAt is the time (UTC) when the request occurred. - [DataMember(Name = "issued_at", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "issued_at", IsRequired = true, EmitDefaultValue = true)] public DateTime IssuedAt { get; set; } /// /// RequestURL is the initial URL that was requested from Ory Kratos. It can be used to forward information contained in the URL's path or query for example. /// /// RequestURL is the initial URL that was requested from Ory Kratos. It can be used to forward information contained in the URL's path or query for example. - [DataMember(Name = "request_url", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "request_url", IsRequired = true, EmitDefaultValue = true)] public string RequestUrl { get; set; } /// @@ -148,21 +148,15 @@ protected KratosRecoveryFlow() /// The flow type can either be `api` or `browser`. /// /// The flow type can either be `api` or `browser`. - [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } /// /// Gets or Sets Ui /// - [DataMember(Name = "ui", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "ui", IsRequired = true, EmitDefaultValue = true)] public KratosUiContainer Ui { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -181,7 +175,6 @@ public override string ToString() sb.Append(" State: ").Append(State).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Ui: ").Append(Ui).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -195,145 +188,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosRecoveryFlow); - } - - /// - /// Returns true if KratosRecoveryFlow instances are equal - /// - /// Instance of KratosRecoveryFlow to be compared - /// Boolean - public bool Equals(KratosRecoveryFlow input) - { - if (input == null) - { - return false; - } - return - ( - this.Active == input.Active || - (this.Active != null && - this.Active.Equals(input.Active)) - ) && - ( - this.ContinueWith == input.ContinueWith || - this.ContinueWith != null && - input.ContinueWith != null && - this.ContinueWith.SequenceEqual(input.ContinueWith) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.IssuedAt == input.IssuedAt || - (this.IssuedAt != null && - this.IssuedAt.Equals(input.IssuedAt)) - ) && - ( - this.RequestUrl == input.RequestUrl || - (this.RequestUrl != null && - this.RequestUrl.Equals(input.RequestUrl)) - ) && - ( - this.ReturnTo == input.ReturnTo || - (this.ReturnTo != null && - this.ReturnTo.Equals(input.ReturnTo)) - ) && - ( - this.State == input.State || - (this.State != null && - this.State.Equals(input.State)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Ui == input.Ui || - (this.Ui != null && - this.Ui.Equals(input.Ui)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Active != null) - { - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - } - if (this.ContinueWith != null) - { - hashCode = (hashCode * 59) + this.ContinueWith.GetHashCode(); - } - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.IssuedAt != null) - { - hashCode = (hashCode * 59) + this.IssuedAt.GetHashCode(); - } - if (this.RequestUrl != null) - { - hashCode = (hashCode * 59) + this.RequestUrl.GetHashCode(); - } - if (this.ReturnTo != null) - { - hashCode = (hashCode * 59) + this.ReturnTo.GetHashCode(); - } - if (this.State != null) - { - hashCode = (hashCode * 59) + this.State.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Ui != null) - { - hashCode = (hashCode * 59) + this.Ui.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosRecoveryFlowState.cs b/Ory.Kratos.Client/Model/KratosRecoveryFlowState.cs index f561d55e..7ebfdd04 100644 --- a/Ory.Kratos.Client/Model/KratosRecoveryFlowState.cs +++ b/Ory.Kratos.Client/Model/KratosRecoveryFlowState.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -50,7 +49,6 @@ public enum KratosRecoveryFlowState /// [EnumMember(Value = "passed_challenge")] PassedChallenge = 3 - } } diff --git a/Ory.Kratos.Client/Model/KratosRecoveryIdentityAddress.cs b/Ory.Kratos.Client/Model/KratosRecoveryIdentityAddress.cs index 2ec4c081..49562065 100644 --- a/Ory.Kratos.Client/Model/KratosRecoveryIdentityAddress.cs +++ b/Ory.Kratos.Client/Model/KratosRecoveryIdentityAddress.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// KratosRecoveryIdentityAddress /// [DataContract(Name = "recoveryIdentityAddress")] - public partial class KratosRecoveryIdentityAddress : IEquatable, IValidatableObject + public partial class KratosRecoveryIdentityAddress : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosRecoveryIdentityAddress() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosRecoveryIdentityAddress() { } /// /// Initializes a new instance of the class. /// @@ -51,23 +47,25 @@ protected KratosRecoveryIdentityAddress() public KratosRecoveryIdentityAddress(DateTime createdAt = default(DateTime), string id = default(string), DateTime updatedAt = default(DateTime), string value = default(string), string via = default(string)) { // to ensure "id" is required (not null) - if (id == null) { + if (id == null) + { throw new ArgumentNullException("id is a required property for KratosRecoveryIdentityAddress and cannot be null"); } this.Id = id; // to ensure "value" is required (not null) - if (value == null) { + if (value == null) + { throw new ArgumentNullException("value is a required property for KratosRecoveryIdentityAddress and cannot be null"); } this.Value = value; // to ensure "via" is required (not null) - if (via == null) { + if (via == null) + { throw new ArgumentNullException("via is a required property for KratosRecoveryIdentityAddress and cannot be null"); } this.Via = via; this.CreatedAt = createdAt; this.UpdatedAt = updatedAt; - this.AdditionalProperties = new Dictionary(); } /// @@ -80,7 +78,7 @@ protected KratosRecoveryIdentityAddress() /// /// Gets or Sets Id /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] public string Id { get; set; } /// @@ -93,21 +91,15 @@ protected KratosRecoveryIdentityAddress() /// /// Gets or Sets Value /// - [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)] public string Value { get; set; } /// /// Gets or Sets Via /// - [DataMember(Name = "via", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "via", IsRequired = true, EmitDefaultValue = true)] public string Via { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -121,7 +113,6 @@ public override string ToString() sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); sb.Append(" Value: ").Append(Value).Append("\n"); sb.Append(" Via: ").Append(Via).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -135,99 +126,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosRecoveryIdentityAddress); - } - - /// - /// Returns true if KratosRecoveryIdentityAddress instances are equal - /// - /// Instance of KratosRecoveryIdentityAddress to be compared - /// Boolean - public bool Equals(KratosRecoveryIdentityAddress input) - { - if (input == null) - { - return false; - } - return - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.UpdatedAt == input.UpdatedAt || - (this.UpdatedAt != null && - this.UpdatedAt.Equals(input.UpdatedAt)) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) && - ( - this.Via == input.Via || - (this.Via != null && - this.Via.Equals(input.Via)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.UpdatedAt != null) - { - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - if (this.Via != null) - { - hashCode = (hashCode * 59) + this.Via.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosRecoveryLinkForIdentity.cs b/Ory.Kratos.Client/Model/KratosRecoveryLinkForIdentity.cs index e9551535..143976c6 100644 --- a/Ory.Kratos.Client/Model/KratosRecoveryLinkForIdentity.cs +++ b/Ory.Kratos.Client/Model/KratosRecoveryLinkForIdentity.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Used when an administrator creates a recovery link for an identity. /// [DataContract(Name = "recoveryLinkForIdentity")] - public partial class KratosRecoveryLinkForIdentity : IEquatable, IValidatableObject + public partial class KratosRecoveryLinkForIdentity : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosRecoveryLinkForIdentity() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosRecoveryLinkForIdentity() { } /// /// Initializes a new instance of the class. /// @@ -48,12 +44,12 @@ protected KratosRecoveryLinkForIdentity() public KratosRecoveryLinkForIdentity(DateTime expiresAt = default(DateTime), string recoveryLink = default(string)) { // to ensure "recoveryLink" is required (not null) - if (recoveryLink == null) { + if (recoveryLink == null) + { throw new ArgumentNullException("recoveryLink is a required property for KratosRecoveryLinkForIdentity and cannot be null"); } this.RecoveryLink = recoveryLink; this.ExpiresAt = expiresAt; - this.AdditionalProperties = new Dictionary(); } /// @@ -67,15 +63,9 @@ protected KratosRecoveryLinkForIdentity() /// Recovery Link This link can be used to recover the account. /// /// Recovery Link This link can be used to recover the account. - [DataMember(Name = "recovery_link", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "recovery_link", IsRequired = true, EmitDefaultValue = true)] public string RecoveryLink { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -86,7 +76,6 @@ public override string ToString() sb.Append("class KratosRecoveryLinkForIdentity {\n"); sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); sb.Append(" RecoveryLink: ").Append(RecoveryLink).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -100,72 +89,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosRecoveryLinkForIdentity); - } - - /// - /// Returns true if KratosRecoveryLinkForIdentity instances are equal - /// - /// Instance of KratosRecoveryLinkForIdentity to be compared - /// Boolean - public bool Equals(KratosRecoveryLinkForIdentity input) - { - if (input == null) - { - return false; - } - return - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ) && - ( - this.RecoveryLink == input.RecoveryLink || - (this.RecoveryLink != null && - this.RecoveryLink.Equals(input.RecoveryLink)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - if (this.RecoveryLink != null) - { - hashCode = (hashCode * 59) + this.RecoveryLink.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosRegistrationFlow.cs b/Ory.Kratos.Client/Model/KratosRegistrationFlow.cs index bb9d95d4..81fc8294 100644 --- a/Ory.Kratos.Client/Model/KratosRegistrationFlow.cs +++ b/Ory.Kratos.Client/Model/KratosRegistrationFlow.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// KratosRegistrationFlow /// [DataContract(Name = "registrationFlow")] - public partial class KratosRegistrationFlow : IEquatable, IValidatableObject + public partial class KratosRegistrationFlow : IValidatableObject { /// /// Active, if set, contains the registration method that is being used. It is initially not set. password CredentialsTypePassword oidc CredentialsTypeOIDC totp CredentialsTypeTOTP lookup_secret CredentialsTypeLookup webauthn CredentialsTypeWebAuthn code CredentialsTypeCodeAuth link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself. code_recovery CredentialsTypeRecoveryCode @@ -86,7 +85,6 @@ public enum ActiveEnum /// [EnumMember(Value = "code_recovery")] CodeRecovery = 8 - } @@ -100,10 +98,7 @@ public enum ActiveEnum /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosRegistrationFlow() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosRegistrationFlow() { } /// /// Initializes a new instance of the class. /// @@ -125,28 +120,33 @@ protected KratosRegistrationFlow() { this.ExpiresAt = expiresAt; // to ensure "id" is required (not null) - if (id == null) { + if (id == null) + { throw new ArgumentNullException("id is a required property for KratosRegistrationFlow and cannot be null"); } this.Id = id; this.IssuedAt = issuedAt; // to ensure "requestUrl" is required (not null) - if (requestUrl == null) { + if (requestUrl == null) + { throw new ArgumentNullException("requestUrl is a required property for KratosRegistrationFlow and cannot be null"); } this.RequestUrl = requestUrl; // to ensure "state" is required (not null) - if (state == null) { + if (state == null) + { throw new ArgumentNullException("state is a required property for KratosRegistrationFlow and cannot be null"); } this.State = state; // to ensure "type" is required (not null) - if (type == null) { + if (type == null) + { throw new ArgumentNullException("type is a required property for KratosRegistrationFlow and cannot be null"); } this.Type = type; // to ensure "ui" is required (not null) - if (ui == null) { + if (ui == null) + { throw new ArgumentNullException("ui is a required property for KratosRegistrationFlow and cannot be null"); } this.Ui = ui; @@ -157,28 +157,27 @@ protected KratosRegistrationFlow() this.ReturnTo = returnTo; this.SessionTokenExchangeCode = sessionTokenExchangeCode; this.TransientPayload = transientPayload; - this.AdditionalProperties = new Dictionary(); } /// /// ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to log in, a new flow has to be initiated. /// /// ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to log in, a new flow has to be initiated. - [DataMember(Name = "expires_at", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "expires_at", IsRequired = true, EmitDefaultValue = true)] public DateTime ExpiresAt { get; set; } /// /// ID represents the flow's unique ID. When performing the registration flow, this represents the id in the registration ui's query parameter: http://<selfservice.flows.registration.ui_url>/?flow=<id> /// /// ID represents the flow's unique ID. When performing the registration flow, this represents the id in the registration ui's query parameter: http://<selfservice.flows.registration.ui_url>/?flow=<id> - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] public string Id { get; set; } /// /// IssuedAt is the time (UTC) when the flow occurred. /// /// IssuedAt is the time (UTC) when the flow occurred. - [DataMember(Name = "issued_at", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "issued_at", IsRequired = true, EmitDefaultValue = true)] public DateTime IssuedAt { get; set; } /// @@ -204,7 +203,7 @@ protected KratosRegistrationFlow() /// RequestURL is the initial URL that was requested from Ory Kratos. It can be used to forward information contained in the URL's path or query for example. /// /// RequestURL is the initial URL that was requested from Ory Kratos. It can be used to forward information contained in the URL's path or query for example. - [DataMember(Name = "request_url", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "request_url", IsRequired = true, EmitDefaultValue = true)] public string RequestUrl { get; set; } /// @@ -239,21 +238,15 @@ protected KratosRegistrationFlow() /// The flow type can either be `api` or `browser`. /// /// The flow type can either be `api` or `browser`. - [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } /// /// Gets or Sets Ui /// - [DataMember(Name = "ui", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "ui", IsRequired = true, EmitDefaultValue = true)] public KratosUiContainer Ui { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -276,7 +269,6 @@ public override string ToString() sb.Append(" TransientPayload: ").Append(TransientPayload).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Ui: ").Append(Ui).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -290,176 +282,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosRegistrationFlow); - } - - /// - /// Returns true if KratosRegistrationFlow instances are equal - /// - /// Instance of KratosRegistrationFlow to be compared - /// Boolean - public bool Equals(KratosRegistrationFlow input) - { - if (input == null) - { - return false; - } - return - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.IssuedAt == input.IssuedAt || - (this.IssuedAt != null && - this.IssuedAt.Equals(input.IssuedAt)) - ) && - ( - this.Oauth2LoginChallenge == input.Oauth2LoginChallenge || - (this.Oauth2LoginChallenge != null && - this.Oauth2LoginChallenge.Equals(input.Oauth2LoginChallenge)) - ) && - ( - this.Oauth2LoginRequest == input.Oauth2LoginRequest || - (this.Oauth2LoginRequest != null && - this.Oauth2LoginRequest.Equals(input.Oauth2LoginRequest)) - ) && - ( - this.OrganizationId == input.OrganizationId || - (this.OrganizationId != null && - this.OrganizationId.Equals(input.OrganizationId)) - ) && - ( - this.RequestUrl == input.RequestUrl || - (this.RequestUrl != null && - this.RequestUrl.Equals(input.RequestUrl)) - ) && - ( - this.ReturnTo == input.ReturnTo || - (this.ReturnTo != null && - this.ReturnTo.Equals(input.ReturnTo)) - ) && - ( - this.SessionTokenExchangeCode == input.SessionTokenExchangeCode || - (this.SessionTokenExchangeCode != null && - this.SessionTokenExchangeCode.Equals(input.SessionTokenExchangeCode)) - ) && - ( - this.State == input.State || - (this.State != null && - this.State.Equals(input.State)) - ) && - ( - this.TransientPayload == input.TransientPayload || - (this.TransientPayload != null && - this.TransientPayload.Equals(input.TransientPayload)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Ui == input.Ui || - (this.Ui != null && - this.Ui.Equals(input.Ui)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.IssuedAt != null) - { - hashCode = (hashCode * 59) + this.IssuedAt.GetHashCode(); - } - if (this.Oauth2LoginChallenge != null) - { - hashCode = (hashCode * 59) + this.Oauth2LoginChallenge.GetHashCode(); - } - if (this.Oauth2LoginRequest != null) - { - hashCode = (hashCode * 59) + this.Oauth2LoginRequest.GetHashCode(); - } - if (this.OrganizationId != null) - { - hashCode = (hashCode * 59) + this.OrganizationId.GetHashCode(); - } - if (this.RequestUrl != null) - { - hashCode = (hashCode * 59) + this.RequestUrl.GetHashCode(); - } - if (this.ReturnTo != null) - { - hashCode = (hashCode * 59) + this.ReturnTo.GetHashCode(); - } - if (this.SessionTokenExchangeCode != null) - { - hashCode = (hashCode * 59) + this.SessionTokenExchangeCode.GetHashCode(); - } - if (this.State != null) - { - hashCode = (hashCode * 59) + this.State.GetHashCode(); - } - if (this.TransientPayload != null) - { - hashCode = (hashCode * 59) + this.TransientPayload.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Ui != null) - { - hashCode = (hashCode * 59) + this.Ui.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosRegistrationFlowState.cs b/Ory.Kratos.Client/Model/KratosRegistrationFlowState.cs index e1b65f8e..161631fd 100644 --- a/Ory.Kratos.Client/Model/KratosRegistrationFlowState.cs +++ b/Ory.Kratos.Client/Model/KratosRegistrationFlowState.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -50,7 +49,6 @@ public enum KratosRegistrationFlowState /// [EnumMember(Value = "passed_challenge")] PassedChallenge = 3 - } } diff --git a/Ory.Kratos.Client/Model/KratosSelfServiceFlowExpiredError.cs b/Ory.Kratos.Client/Model/KratosSelfServiceFlowExpiredError.cs index 701d08ad..cfd33df2 100644 --- a/Ory.Kratos.Client/Model/KratosSelfServiceFlowExpiredError.cs +++ b/Ory.Kratos.Client/Model/KratosSelfServiceFlowExpiredError.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// Is sent when a flow is expired /// [DataContract(Name = "selfServiceFlowExpiredError")] - public partial class KratosSelfServiceFlowExpiredError : IEquatable, IValidatableObject + public partial class KratosSelfServiceFlowExpiredError : IValidatableObject { /// /// Initializes a new instance of the class. @@ -45,7 +44,6 @@ public partial class KratosSelfServiceFlowExpiredError : IEquatable(); } /// @@ -75,12 +73,6 @@ public partial class KratosSelfServiceFlowExpiredError : IEquatable - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -93,7 +85,6 @@ public override string ToString() sb.Append(" ExpiredAt: ").Append(ExpiredAt).Append("\n"); sb.Append(" Since: ").Append(Since).Append("\n"); sb.Append(" UseFlowId: ").Append(UseFlowId).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -107,86 +98,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosSelfServiceFlowExpiredError); - } - - /// - /// Returns true if KratosSelfServiceFlowExpiredError instances are equal - /// - /// Instance of KratosSelfServiceFlowExpiredError to be compared - /// Boolean - public bool Equals(KratosSelfServiceFlowExpiredError input) - { - if (input == null) - { - return false; - } - return - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.ExpiredAt == input.ExpiredAt || - (this.ExpiredAt != null && - this.ExpiredAt.Equals(input.ExpiredAt)) - ) && - ( - this.Since == input.Since || - this.Since.Equals(input.Since) - ) && - ( - this.UseFlowId == input.UseFlowId || - (this.UseFlowId != null && - this.UseFlowId.Equals(input.UseFlowId)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.ExpiredAt != null) - { - hashCode = (hashCode * 59) + this.ExpiredAt.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Since.GetHashCode(); - if (this.UseFlowId != null) - { - hashCode = (hashCode * 59) + this.UseFlowId.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosSession.cs b/Ory.Kratos.Client/Model/KratosSession.cs index 64af4271..83cbe0c8 100644 --- a/Ory.Kratos.Client/Model/KratosSession.cs +++ b/Ory.Kratos.Client/Model/KratosSession.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,19 @@ namespace Ory.Kratos.Client.Model /// A Session /// [DataContract(Name = "session")] - public partial class KratosSession : IEquatable, IValidatableObject + public partial class KratosSession : IValidatableObject { + + /// + /// Gets or Sets AuthenticatorAssuranceLevel + /// + [DataMember(Name = "authenticator_assurance_level", EmitDefaultValue = false)] + public KratosAuthenticatorAssuranceLevel? AuthenticatorAssuranceLevel { get; set; } /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosSession() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosSession() { } /// /// Initializes a new instance of the class. /// @@ -53,10 +55,11 @@ protected KratosSession() /// identity. /// The Session Issuance Timestamp When this session was issued at. Usually equal or close to `authenticated_at`.. /// Tokenized is the tokenized (e.g. JWT) version of the session. It is only set when the `tokenize` query parameter was set to a valid tokenize template during calls to `/session/whoami`.. - public KratosSession(bool active = default(bool), DateTime authenticatedAt = default(DateTime), List authenticationMethods = default(List), KratosAuthenticatorAssuranceLevel authenticatorAssuranceLevel = default(KratosAuthenticatorAssuranceLevel), List devices = default(List), DateTime expiresAt = default(DateTime), string id = default(string), KratosIdentity identity = default(KratosIdentity), DateTime issuedAt = default(DateTime), string tokenized = default(string)) + public KratosSession(bool active = default(bool), DateTime authenticatedAt = default(DateTime), List authenticationMethods = default(List), KratosAuthenticatorAssuranceLevel? authenticatorAssuranceLevel = default(KratosAuthenticatorAssuranceLevel?), List devices = default(List), DateTime expiresAt = default(DateTime), string id = default(string), KratosIdentity identity = default(KratosIdentity), DateTime issuedAt = default(DateTime), string tokenized = default(string)) { // to ensure "id" is required (not null) - if (id == null) { + if (id == null) + { throw new ArgumentNullException("id is a required property for KratosSession and cannot be null"); } this.Id = id; @@ -69,7 +72,6 @@ protected KratosSession() this.Identity = identity; this.IssuedAt = issuedAt; this.Tokenized = tokenized; - this.AdditionalProperties = new Dictionary(); } /// @@ -93,12 +95,6 @@ protected KratosSession() [DataMember(Name = "authentication_methods", EmitDefaultValue = false)] public List AuthenticationMethods { get; set; } - /// - /// Gets or Sets AuthenticatorAssuranceLevel - /// - [DataMember(Name = "authenticator_assurance_level", EmitDefaultValue = false)] - public KratosAuthenticatorAssuranceLevel AuthenticatorAssuranceLevel { get; set; } - /// /// Devices has history of all endpoints where the session was used /// @@ -117,7 +113,7 @@ protected KratosSession() /// Session ID /// /// Session ID - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] public string Id { get; set; } /// @@ -140,12 +136,6 @@ protected KratosSession() [DataMember(Name = "tokenized", EmitDefaultValue = false)] public string Tokenized { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -164,7 +154,6 @@ public override string ToString() sb.Append(" Identity: ").Append(Identity).Append("\n"); sb.Append(" IssuedAt: ").Append(IssuedAt).Append("\n"); sb.Append(" Tokenized: ").Append(Tokenized).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -178,142 +167,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosSession); - } - - /// - /// Returns true if KratosSession instances are equal - /// - /// Instance of KratosSession to be compared - /// Boolean - public bool Equals(KratosSession input) - { - if (input == null) - { - return false; - } - return - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.AuthenticatedAt == input.AuthenticatedAt || - (this.AuthenticatedAt != null && - this.AuthenticatedAt.Equals(input.AuthenticatedAt)) - ) && - ( - this.AuthenticationMethods == input.AuthenticationMethods || - this.AuthenticationMethods != null && - input.AuthenticationMethods != null && - this.AuthenticationMethods.SequenceEqual(input.AuthenticationMethods) - ) && - ( - this.AuthenticatorAssuranceLevel == input.AuthenticatorAssuranceLevel || - (this.AuthenticatorAssuranceLevel != null && - this.AuthenticatorAssuranceLevel.Equals(input.AuthenticatorAssuranceLevel)) - ) && - ( - this.Devices == input.Devices || - this.Devices != null && - input.Devices != null && - this.Devices.SequenceEqual(input.Devices) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Identity == input.Identity || - (this.Identity != null && - this.Identity.Equals(input.Identity)) - ) && - ( - this.IssuedAt == input.IssuedAt || - (this.IssuedAt != null && - this.IssuedAt.Equals(input.IssuedAt)) - ) && - ( - this.Tokenized == input.Tokenized || - (this.Tokenized != null && - this.Tokenized.Equals(input.Tokenized)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - if (this.AuthenticatedAt != null) - { - hashCode = (hashCode * 59) + this.AuthenticatedAt.GetHashCode(); - } - if (this.AuthenticationMethods != null) - { - hashCode = (hashCode * 59) + this.AuthenticationMethods.GetHashCode(); - } - if (this.AuthenticatorAssuranceLevel != null) - { - hashCode = (hashCode * 59) + this.AuthenticatorAssuranceLevel.GetHashCode(); - } - if (this.Devices != null) - { - hashCode = (hashCode * 59) + this.Devices.GetHashCode(); - } - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Identity != null) - { - hashCode = (hashCode * 59) + this.Identity.GetHashCode(); - } - if (this.IssuedAt != null) - { - hashCode = (hashCode * 59) + this.IssuedAt.GetHashCode(); - } - if (this.Tokenized != null) - { - hashCode = (hashCode * 59) + this.Tokenized.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosSessionAuthenticationMethod.cs b/Ory.Kratos.Client/Model/KratosSessionAuthenticationMethod.cs index c1af0d77..1d522ffd 100644 --- a/Ory.Kratos.Client/Model/KratosSessionAuthenticationMethod.cs +++ b/Ory.Kratos.Client/Model/KratosSessionAuthenticationMethod.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,8 +29,14 @@ namespace Ory.Kratos.Client.Model /// A singular authenticator used during authentication / login. /// [DataContract(Name = "sessionAuthenticationMethod")] - public partial class KratosSessionAuthenticationMethod : IEquatable, IValidatableObject + public partial class KratosSessionAuthenticationMethod : IValidatableObject { + + /// + /// Gets or Sets Aal + /// + [DataMember(Name = "aal", EmitDefaultValue = false)] + public KratosAuthenticatorAssuranceLevel? Aal { get; set; } /// /// Defines Method /// @@ -91,7 +96,6 @@ public enum MethodEnum /// [EnumMember(Value = "v0.6_legacy_session")] V06LegacySession = 9 - } @@ -108,22 +112,15 @@ public enum MethodEnum /// method. /// The Organization id used for authentication. /// OIDC or SAML provider id used for authentication. - public KratosSessionAuthenticationMethod(KratosAuthenticatorAssuranceLevel aal = default(KratosAuthenticatorAssuranceLevel), DateTime completedAt = default(DateTime), MethodEnum? method = default(MethodEnum?), string organization = default(string), string provider = default(string)) + public KratosSessionAuthenticationMethod(KratosAuthenticatorAssuranceLevel? aal = default(KratosAuthenticatorAssuranceLevel?), DateTime completedAt = default(DateTime), MethodEnum? method = default(MethodEnum?), string organization = default(string), string provider = default(string)) { this.Aal = aal; this.CompletedAt = completedAt; this.Method = method; this.Organization = organization; this.Provider = provider; - this.AdditionalProperties = new Dictionary(); } - /// - /// Gets or Sets Aal - /// - [DataMember(Name = "aal", EmitDefaultValue = false)] - public KratosAuthenticatorAssuranceLevel Aal { get; set; } - /// /// When the authentication challenge was completed. /// @@ -145,12 +142,6 @@ public enum MethodEnum [DataMember(Name = "provider", EmitDefaultValue = false)] public string Provider { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -164,7 +155,6 @@ public override string ToString() sb.Append(" Method: ").Append(Method).Append("\n"); sb.Append(" Organization: ").Append(Organization).Append("\n"); sb.Append(" Provider: ").Append(Provider).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -178,95 +168,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosSessionAuthenticationMethod); - } - - /// - /// Returns true if KratosSessionAuthenticationMethod instances are equal - /// - /// Instance of KratosSessionAuthenticationMethod to be compared - /// Boolean - public bool Equals(KratosSessionAuthenticationMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.Aal == input.Aal || - (this.Aal != null && - this.Aal.Equals(input.Aal)) - ) && - ( - this.CompletedAt == input.CompletedAt || - (this.CompletedAt != null && - this.CompletedAt.Equals(input.CompletedAt)) - ) && - ( - this.Method == input.Method || - this.Method.Equals(input.Method) - ) && - ( - this.Organization == input.Organization || - (this.Organization != null && - this.Organization.Equals(input.Organization)) - ) && - ( - this.Provider == input.Provider || - (this.Provider != null && - this.Provider.Equals(input.Provider)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Aal != null) - { - hashCode = (hashCode * 59) + this.Aal.GetHashCode(); - } - if (this.CompletedAt != null) - { - hashCode = (hashCode * 59) + this.CompletedAt.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - if (this.Organization != null) - { - hashCode = (hashCode * 59) + this.Organization.GetHashCode(); - } - if (this.Provider != null) - { - hashCode = (hashCode * 59) + this.Provider.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosSessionDevice.cs b/Ory.Kratos.Client/Model/KratosSessionDevice.cs index 8db3cf3f..e2413186 100644 --- a/Ory.Kratos.Client/Model/KratosSessionDevice.cs +++ b/Ory.Kratos.Client/Model/KratosSessionDevice.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Device corresponding to a Session /// [DataContract(Name = "sessionDevice")] - public partial class KratosSessionDevice : IEquatable, IValidatableObject + public partial class KratosSessionDevice : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosSessionDevice() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosSessionDevice() { } /// /// Initializes a new instance of the class. /// @@ -50,21 +46,21 @@ protected KratosSessionDevice() public KratosSessionDevice(string id = default(string), string ipAddress = default(string), string location = default(string), string userAgent = default(string)) { // to ensure "id" is required (not null) - if (id == null) { + if (id == null) + { throw new ArgumentNullException("id is a required property for KratosSessionDevice and cannot be null"); } this.Id = id; this.IpAddress = ipAddress; this.Location = location; this.UserAgent = userAgent; - this.AdditionalProperties = new Dictionary(); } /// /// Device record ID /// /// Device record ID - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] public string Id { get; set; } /// @@ -88,12 +84,6 @@ protected KratosSessionDevice() [DataMember(Name = "user_agent", EmitDefaultValue = false)] public string UserAgent { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -106,7 +96,6 @@ public override string ToString() sb.Append(" IpAddress: ").Append(IpAddress).Append("\n"); sb.Append(" Location: ").Append(Location).Append("\n"); sb.Append(" UserAgent: ").Append(UserAgent).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -120,90 +109,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosSessionDevice); - } - - /// - /// Returns true if KratosSessionDevice instances are equal - /// - /// Instance of KratosSessionDevice to be compared - /// Boolean - public bool Equals(KratosSessionDevice input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.IpAddress == input.IpAddress || - (this.IpAddress != null && - this.IpAddress.Equals(input.IpAddress)) - ) && - ( - this.Location == input.Location || - (this.Location != null && - this.Location.Equals(input.Location)) - ) && - ( - this.UserAgent == input.UserAgent || - (this.UserAgent != null && - this.UserAgent.Equals(input.UserAgent)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.IpAddress != null) - { - hashCode = (hashCode * 59) + this.IpAddress.GetHashCode(); - } - if (this.Location != null) - { - hashCode = (hashCode * 59) + this.Location.GetHashCode(); - } - if (this.UserAgent != null) - { - hashCode = (hashCode * 59) + this.UserAgent.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosSettingsFlow.cs b/Ory.Kratos.Client/Model/KratosSettingsFlow.cs index f7338e65..e23e3544 100644 --- a/Ory.Kratos.Client/Model/KratosSettingsFlow.cs +++ b/Ory.Kratos.Client/Model/KratosSettingsFlow.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// This flow is used when an identity wants to update settings (e.g. profile data, passwords, ...) in a selfservice manner. We recommend reading the [User Settings Documentation](../self-service/flows/user-settings) /// [DataContract(Name = "settingsFlow")] - public partial class KratosSettingsFlow : IEquatable, IValidatableObject + public partial class KratosSettingsFlow : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosSettingsFlow() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosSettingsFlow() { } /// /// Initializes a new instance of the class. /// @@ -58,40 +54,45 @@ protected KratosSettingsFlow() { this.ExpiresAt = expiresAt; // to ensure "id" is required (not null) - if (id == null) { + if (id == null) + { throw new ArgumentNullException("id is a required property for KratosSettingsFlow and cannot be null"); } this.Id = id; // to ensure "identity" is required (not null) - if (identity == null) { + if (identity == null) + { throw new ArgumentNullException("identity is a required property for KratosSettingsFlow and cannot be null"); } this.Identity = identity; this.IssuedAt = issuedAt; // to ensure "requestUrl" is required (not null) - if (requestUrl == null) { + if (requestUrl == null) + { throw new ArgumentNullException("requestUrl is a required property for KratosSettingsFlow and cannot be null"); } this.RequestUrl = requestUrl; // to ensure "state" is required (not null) - if (state == null) { + if (state == null) + { throw new ArgumentNullException("state is a required property for KratosSettingsFlow and cannot be null"); } this.State = state; // to ensure "type" is required (not null) - if (type == null) { + if (type == null) + { throw new ArgumentNullException("type is a required property for KratosSettingsFlow and cannot be null"); } this.Type = type; // to ensure "ui" is required (not null) - if (ui == null) { + if (ui == null) + { throw new ArgumentNullException("ui is a required property for KratosSettingsFlow and cannot be null"); } this.Ui = ui; this.Active = active; this.ContinueWith = continueWith; this.ReturnTo = returnTo; - this.AdditionalProperties = new Dictionary(); } /// @@ -112,34 +113,34 @@ protected KratosSettingsFlow() /// ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to update the setting, a new flow has to be initiated. /// /// ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to update the setting, a new flow has to be initiated. - [DataMember(Name = "expires_at", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "expires_at", IsRequired = true, EmitDefaultValue = true)] public DateTime ExpiresAt { get; set; } /// /// ID represents the flow's unique ID. When performing the settings flow, this represents the id in the settings ui's query parameter: http://<selfservice.flows.settings.ui_url>?flow=<id> /// /// ID represents the flow's unique ID. When performing the settings flow, this represents the id in the settings ui's query parameter: http://<selfservice.flows.settings.ui_url>?flow=<id> - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] public string Id { get; set; } /// /// Gets or Sets Identity /// - [DataMember(Name = "identity", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "identity", IsRequired = true, EmitDefaultValue = true)] public KratosIdentity Identity { get; set; } /// /// IssuedAt is the time (UTC) when the flow occurred. /// /// IssuedAt is the time (UTC) when the flow occurred. - [DataMember(Name = "issued_at", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "issued_at", IsRequired = true, EmitDefaultValue = true)] public DateTime IssuedAt { get; set; } /// /// RequestURL is the initial URL that was requested from Ory Kratos. It can be used to forward information contained in the URL's path or query for example. /// /// RequestURL is the initial URL that was requested from Ory Kratos. It can be used to forward information contained in the URL's path or query for example. - [DataMember(Name = "request_url", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "request_url", IsRequired = true, EmitDefaultValue = true)] public string RequestUrl { get; set; } /// @@ -160,21 +161,15 @@ protected KratosSettingsFlow() /// The flow type can either be `api` or `browser`. /// /// The flow type can either be `api` or `browser`. - [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } /// /// Gets or Sets Ui /// - [DataMember(Name = "ui", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "ui", IsRequired = true, EmitDefaultValue = true)] public KratosUiContainer Ui { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -194,7 +189,6 @@ public override string ToString() sb.Append(" State: ").Append(State).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Ui: ").Append(Ui).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -208,154 +202,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosSettingsFlow); - } - - /// - /// Returns true if KratosSettingsFlow instances are equal - /// - /// Instance of KratosSettingsFlow to be compared - /// Boolean - public bool Equals(KratosSettingsFlow input) - { - if (input == null) - { - return false; - } - return - ( - this.Active == input.Active || - (this.Active != null && - this.Active.Equals(input.Active)) - ) && - ( - this.ContinueWith == input.ContinueWith || - this.ContinueWith != null && - input.ContinueWith != null && - this.ContinueWith.SequenceEqual(input.ContinueWith) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Identity == input.Identity || - (this.Identity != null && - this.Identity.Equals(input.Identity)) - ) && - ( - this.IssuedAt == input.IssuedAt || - (this.IssuedAt != null && - this.IssuedAt.Equals(input.IssuedAt)) - ) && - ( - this.RequestUrl == input.RequestUrl || - (this.RequestUrl != null && - this.RequestUrl.Equals(input.RequestUrl)) - ) && - ( - this.ReturnTo == input.ReturnTo || - (this.ReturnTo != null && - this.ReturnTo.Equals(input.ReturnTo)) - ) && - ( - this.State == input.State || - (this.State != null && - this.State.Equals(input.State)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Ui == input.Ui || - (this.Ui != null && - this.Ui.Equals(input.Ui)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Active != null) - { - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - } - if (this.ContinueWith != null) - { - hashCode = (hashCode * 59) + this.ContinueWith.GetHashCode(); - } - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Identity != null) - { - hashCode = (hashCode * 59) + this.Identity.GetHashCode(); - } - if (this.IssuedAt != null) - { - hashCode = (hashCode * 59) + this.IssuedAt.GetHashCode(); - } - if (this.RequestUrl != null) - { - hashCode = (hashCode * 59) + this.RequestUrl.GetHashCode(); - } - if (this.ReturnTo != null) - { - hashCode = (hashCode * 59) + this.ReturnTo.GetHashCode(); - } - if (this.State != null) - { - hashCode = (hashCode * 59) + this.State.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Ui != null) - { - hashCode = (hashCode * 59) + this.Ui.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosSettingsFlowState.cs b/Ory.Kratos.Client/Model/KratosSettingsFlowState.cs index b3ad59d9..8633e977 100644 --- a/Ory.Kratos.Client/Model/KratosSettingsFlowState.cs +++ b/Ory.Kratos.Client/Model/KratosSettingsFlowState.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -44,7 +43,6 @@ public enum KratosSettingsFlowState /// [EnumMember(Value = "success")] Success = 2 - } } diff --git a/Ory.Kratos.Client/Model/KratosSuccessfulCodeExchangeResponse.cs b/Ory.Kratos.Client/Model/KratosSuccessfulCodeExchangeResponse.cs index 5bb3c177..3ba27d69 100644 --- a/Ory.Kratos.Client/Model/KratosSuccessfulCodeExchangeResponse.cs +++ b/Ory.Kratos.Client/Model/KratosSuccessfulCodeExchangeResponse.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// The Response for Registration Flows via API /// [DataContract(Name = "successfulCodeExchangeResponse")] - public partial class KratosSuccessfulCodeExchangeResponse : IEquatable, IValidatableObject + public partial class KratosSuccessfulCodeExchangeResponse : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosSuccessfulCodeExchangeResponse() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosSuccessfulCodeExchangeResponse() { } /// /// Initializes a new instance of the class. /// @@ -48,18 +44,18 @@ protected KratosSuccessfulCodeExchangeResponse() public KratosSuccessfulCodeExchangeResponse(KratosSession session = default(KratosSession), string sessionToken = default(string)) { // to ensure "session" is required (not null) - if (session == null) { + if (session == null) + { throw new ArgumentNullException("session is a required property for KratosSuccessfulCodeExchangeResponse and cannot be null"); } this.Session = session; this.SessionToken = sessionToken; - this.AdditionalProperties = new Dictionary(); } /// /// Gets or Sets Session /// - [DataMember(Name = "session", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "session", IsRequired = true, EmitDefaultValue = true)] public KratosSession Session { get; set; } /// @@ -69,12 +65,6 @@ protected KratosSuccessfulCodeExchangeResponse() [DataMember(Name = "session_token", EmitDefaultValue = false)] public string SessionToken { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -85,7 +75,6 @@ public override string ToString() sb.Append("class KratosSuccessfulCodeExchangeResponse {\n"); sb.Append(" Session: ").Append(Session).Append("\n"); sb.Append(" SessionToken: ").Append(SessionToken).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -99,72 +88,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosSuccessfulCodeExchangeResponse); - } - - /// - /// Returns true if KratosSuccessfulCodeExchangeResponse instances are equal - /// - /// Instance of KratosSuccessfulCodeExchangeResponse to be compared - /// Boolean - public bool Equals(KratosSuccessfulCodeExchangeResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Session == input.Session || - (this.Session != null && - this.Session.Equals(input.Session)) - ) && - ( - this.SessionToken == input.SessionToken || - (this.SessionToken != null && - this.SessionToken.Equals(input.SessionToken)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Session != null) - { - hashCode = (hashCode * 59) + this.Session.GetHashCode(); - } - if (this.SessionToken != null) - { - hashCode = (hashCode * 59) + this.SessionToken.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosSuccessfulNativeLogin.cs b/Ory.Kratos.Client/Model/KratosSuccessfulNativeLogin.cs index e594178c..6a190768 100644 --- a/Ory.Kratos.Client/Model/KratosSuccessfulNativeLogin.cs +++ b/Ory.Kratos.Client/Model/KratosSuccessfulNativeLogin.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// The Response for Login Flows via API /// [DataContract(Name = "successfulNativeLogin")] - public partial class KratosSuccessfulNativeLogin : IEquatable, IValidatableObject + public partial class KratosSuccessfulNativeLogin : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosSuccessfulNativeLogin() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosSuccessfulNativeLogin() { } /// /// Initializes a new instance of the class. /// @@ -48,18 +44,18 @@ protected KratosSuccessfulNativeLogin() public KratosSuccessfulNativeLogin(KratosSession session = default(KratosSession), string sessionToken = default(string)) { // to ensure "session" is required (not null) - if (session == null) { + if (session == null) + { throw new ArgumentNullException("session is a required property for KratosSuccessfulNativeLogin and cannot be null"); } this.Session = session; this.SessionToken = sessionToken; - this.AdditionalProperties = new Dictionary(); } /// /// Gets or Sets Session /// - [DataMember(Name = "session", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "session", IsRequired = true, EmitDefaultValue = true)] public KratosSession Session { get; set; } /// @@ -69,12 +65,6 @@ protected KratosSuccessfulNativeLogin() [DataMember(Name = "session_token", EmitDefaultValue = false)] public string SessionToken { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -85,7 +75,6 @@ public override string ToString() sb.Append("class KratosSuccessfulNativeLogin {\n"); sb.Append(" Session: ").Append(Session).Append("\n"); sb.Append(" SessionToken: ").Append(SessionToken).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -99,72 +88,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosSuccessfulNativeLogin); - } - - /// - /// Returns true if KratosSuccessfulNativeLogin instances are equal - /// - /// Instance of KratosSuccessfulNativeLogin to be compared - /// Boolean - public bool Equals(KratosSuccessfulNativeLogin input) - { - if (input == null) - { - return false; - } - return - ( - this.Session == input.Session || - (this.Session != null && - this.Session.Equals(input.Session)) - ) && - ( - this.SessionToken == input.SessionToken || - (this.SessionToken != null && - this.SessionToken.Equals(input.SessionToken)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Session != null) - { - hashCode = (hashCode * 59) + this.Session.GetHashCode(); - } - if (this.SessionToken != null) - { - hashCode = (hashCode * 59) + this.SessionToken.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosSuccessfulNativeRegistration.cs b/Ory.Kratos.Client/Model/KratosSuccessfulNativeRegistration.cs index ee911e77..6022438d 100644 --- a/Ory.Kratos.Client/Model/KratosSuccessfulNativeRegistration.cs +++ b/Ory.Kratos.Client/Model/KratosSuccessfulNativeRegistration.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// The Response for Registration Flows via API /// [DataContract(Name = "successfulNativeRegistration")] - public partial class KratosSuccessfulNativeRegistration : IEquatable, IValidatableObject + public partial class KratosSuccessfulNativeRegistration : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosSuccessfulNativeRegistration() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosSuccessfulNativeRegistration() { } /// /// Initializes a new instance of the class. /// @@ -50,14 +46,14 @@ protected KratosSuccessfulNativeRegistration() public KratosSuccessfulNativeRegistration(List continueWith = default(List), KratosIdentity identity = default(KratosIdentity), KratosSession session = default(KratosSession), string sessionToken = default(string)) { // to ensure "identity" is required (not null) - if (identity == null) { + if (identity == null) + { throw new ArgumentNullException("identity is a required property for KratosSuccessfulNativeRegistration and cannot be null"); } this.Identity = identity; this.ContinueWith = continueWith; this.Session = session; this.SessionToken = sessionToken; - this.AdditionalProperties = new Dictionary(); } /// @@ -70,7 +66,7 @@ protected KratosSuccessfulNativeRegistration() /// /// Gets or Sets Identity /// - [DataMember(Name = "identity", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "identity", IsRequired = true, EmitDefaultValue = true)] public KratosIdentity Identity { get; set; } /// @@ -86,12 +82,6 @@ protected KratosSuccessfulNativeRegistration() [DataMember(Name = "session_token", EmitDefaultValue = false)] public string SessionToken { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -104,7 +94,6 @@ public override string ToString() sb.Append(" Identity: ").Append(Identity).Append("\n"); sb.Append(" Session: ").Append(Session).Append("\n"); sb.Append(" SessionToken: ").Append(SessionToken).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -118,91 +107,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosSuccessfulNativeRegistration); - } - - /// - /// Returns true if KratosSuccessfulNativeRegistration instances are equal - /// - /// Instance of KratosSuccessfulNativeRegistration to be compared - /// Boolean - public bool Equals(KratosSuccessfulNativeRegistration input) - { - if (input == null) - { - return false; - } - return - ( - this.ContinueWith == input.ContinueWith || - this.ContinueWith != null && - input.ContinueWith != null && - this.ContinueWith.SequenceEqual(input.ContinueWith) - ) && - ( - this.Identity == input.Identity || - (this.Identity != null && - this.Identity.Equals(input.Identity)) - ) && - ( - this.Session == input.Session || - (this.Session != null && - this.Session.Equals(input.Session)) - ) && - ( - this.SessionToken == input.SessionToken || - (this.SessionToken != null && - this.SessionToken.Equals(input.SessionToken)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ContinueWith != null) - { - hashCode = (hashCode * 59) + this.ContinueWith.GetHashCode(); - } - if (this.Identity != null) - { - hashCode = (hashCode * 59) + this.Identity.GetHashCode(); - } - if (this.Session != null) - { - hashCode = (hashCode * 59) + this.Session.GetHashCode(); - } - if (this.SessionToken != null) - { - hashCode = (hashCode * 59) + this.SessionToken.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosTokenPagination.cs b/Ory.Kratos.Client/Model/KratosTokenPagination.cs index b5afae22..480a3e1b 100644 --- a/Ory.Kratos.Client/Model/KratosTokenPagination.cs +++ b/Ory.Kratos.Client/Model/KratosTokenPagination.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,19 +29,18 @@ namespace Ory.Kratos.Client.Model /// KratosTokenPagination /// [DataContract(Name = "tokenPagination")] - public partial class KratosTokenPagination : IEquatable, IValidatableObject + public partial class KratosTokenPagination : IValidatableObject { /// /// Initializes a new instance of the class. /// /// Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (default to 250). /// Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (default to "1"). - public KratosTokenPagination(long pageSize = 250, string pageToken = "1") + public KratosTokenPagination(long pageSize = 250, string pageToken = @"1") { this.PageSize = pageSize; // use default value if no "pageToken" provided - this.PageToken = pageToken ?? "1"; - this.AdditionalProperties = new Dictionary(); + this.PageToken = pageToken ?? @"1"; } /// @@ -59,12 +57,6 @@ public KratosTokenPagination(long pageSize = 250, string pageToken = "1") [DataMember(Name = "page_token", EmitDefaultValue = false)] public string PageToken { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -75,7 +67,6 @@ public override string ToString() sb.Append("class KratosTokenPagination {\n"); sb.Append(" PageSize: ").Append(PageSize).Append("\n"); sb.Append(" PageToken: ").Append(PageToken).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -89,68 +80,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosTokenPagination); - } - - /// - /// Returns true if KratosTokenPagination instances are equal - /// - /// Instance of KratosTokenPagination to be compared - /// Boolean - public bool Equals(KratosTokenPagination input) - { - if (input == null) - { - return false; - } - return - ( - this.PageSize == input.PageSize || - this.PageSize.Equals(input.PageSize) - ) && - ( - this.PageToken == input.PageToken || - (this.PageToken != null && - this.PageToken.Equals(input.PageToken)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.PageSize.GetHashCode(); - if (this.PageToken != null) - { - hashCode = (hashCode * 59) + this.PageToken.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { // PageSize (long) maximum if (this.PageSize > (long)1000) diff --git a/Ory.Kratos.Client/Model/KratosTokenPaginationHeaders.cs b/Ory.Kratos.Client/Model/KratosTokenPaginationHeaders.cs index 2fda089d..340a1118 100644 --- a/Ory.Kratos.Client/Model/KratosTokenPaginationHeaders.cs +++ b/Ory.Kratos.Client/Model/KratosTokenPaginationHeaders.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// KratosTokenPaginationHeaders /// [DataContract(Name = "tokenPaginationHeaders")] - public partial class KratosTokenPaginationHeaders : IEquatable, IValidatableObject + public partial class KratosTokenPaginationHeaders : IValidatableObject { /// /// Initializes a new instance of the class. @@ -41,7 +40,6 @@ public partial class KratosTokenPaginationHeaders : IEquatable(); } /// @@ -58,12 +56,6 @@ public partial class KratosTokenPaginationHeaders : IEquatable - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -74,7 +66,6 @@ public override string ToString() sb.Append("class KratosTokenPaginationHeaders {\n"); sb.Append(" Link: ").Append(Link).Append("\n"); sb.Append(" XTotalCount: ").Append(XTotalCount).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -88,72 +79,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosTokenPaginationHeaders); - } - - /// - /// Returns true if KratosTokenPaginationHeaders instances are equal - /// - /// Instance of KratosTokenPaginationHeaders to be compared - /// Boolean - public bool Equals(KratosTokenPaginationHeaders input) - { - if (input == null) - { - return false; - } - return - ( - this.Link == input.Link || - (this.Link != null && - this.Link.Equals(input.Link)) - ) && - ( - this.XTotalCount == input.XTotalCount || - (this.XTotalCount != null && - this.XTotalCount.Equals(input.XTotalCount)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Link != null) - { - hashCode = (hashCode * 59) + this.Link.GetHashCode(); - } - if (this.XTotalCount != null) - { - hashCode = (hashCode * 59) + this.XTotalCount.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUiContainer.cs b/Ory.Kratos.Client/Model/KratosUiContainer.cs index 49df7517..05ad1221 100644 --- a/Ory.Kratos.Client/Model/KratosUiContainer.cs +++ b/Ory.Kratos.Client/Model/KratosUiContainer.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Container represents a HTML Form. The container can work with both HTTP Form and JSON requests /// [DataContract(Name = "uiContainer")] - public partial class KratosUiContainer : IEquatable, IValidatableObject + public partial class KratosUiContainer : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUiContainer() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUiContainer() { } /// /// Initializes a new instance of the class. /// @@ -50,29 +46,31 @@ protected KratosUiContainer() public KratosUiContainer(string action = default(string), List messages = default(List), string method = default(string), List nodes = default(List)) { // to ensure "action" is required (not null) - if (action == null) { + if (action == null) + { throw new ArgumentNullException("action is a required property for KratosUiContainer and cannot be null"); } this.Action = action; // to ensure "method" is required (not null) - if (method == null) { + if (method == null) + { throw new ArgumentNullException("method is a required property for KratosUiContainer and cannot be null"); } this.Method = method; // to ensure "nodes" is required (not null) - if (nodes == null) { + if (nodes == null) + { throw new ArgumentNullException("nodes is a required property for KratosUiContainer and cannot be null"); } this.Nodes = nodes; this.Messages = messages; - this.AdditionalProperties = new Dictionary(); } /// /// Action should be used as the form action URL `<form action=\"{{ .Action }}\" method=\"post\">`. /// /// Action should be used as the form action URL `<form action=\"{{ .Action }}\" method=\"post\">`. - [DataMember(Name = "action", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "action", IsRequired = true, EmitDefaultValue = true)] public string Action { get; set; } /// @@ -85,21 +83,15 @@ protected KratosUiContainer() /// Method is the form method (e.g. POST) /// /// Method is the form method (e.g. POST) - [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = true)] public string Method { get; set; } /// /// Gets or Sets Nodes /// - [DataMember(Name = "nodes", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "nodes", IsRequired = true, EmitDefaultValue = true)] public List Nodes { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -112,7 +104,6 @@ public override string ToString() sb.Append(" Messages: ").Append(Messages).Append("\n"); sb.Append(" Method: ").Append(Method).Append("\n"); sb.Append(" Nodes: ").Append(Nodes).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -126,92 +117,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUiContainer); - } - - /// - /// Returns true if KratosUiContainer instances are equal - /// - /// Instance of KratosUiContainer to be compared - /// Boolean - public bool Equals(KratosUiContainer input) - { - if (input == null) - { - return false; - } - return - ( - this.Action == input.Action || - (this.Action != null && - this.Action.Equals(input.Action)) - ) && - ( - this.Messages == input.Messages || - this.Messages != null && - input.Messages != null && - this.Messages.SequenceEqual(input.Messages) - ) && - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) && - ( - this.Nodes == input.Nodes || - this.Nodes != null && - input.Nodes != null && - this.Nodes.SequenceEqual(input.Nodes) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Action != null) - { - hashCode = (hashCode * 59) + this.Action.GetHashCode(); - } - if (this.Messages != null) - { - hashCode = (hashCode * 59) + this.Messages.GetHashCode(); - } - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.Nodes != null) - { - hashCode = (hashCode * 59) + this.Nodes.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUiNode.cs b/Ory.Kratos.Client/Model/KratosUiNode.cs index 58f962d7..d7993b73 100644 --- a/Ory.Kratos.Client/Model/KratosUiNode.cs +++ b/Ory.Kratos.Client/Model/KratosUiNode.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// Nodes are represented as HTML elements or their native UI equivalents. For example, a node can be an `<img>` tag, or an `<input element>` but also `some plain text`. /// [DataContract(Name = "uiNode")] - public partial class KratosUiNode : IEquatable, IValidatableObject + public partial class KratosUiNode : IValidatableObject { /// /// Group specifies which group (e.g. password authenticator) this node belongs to. default DefaultGroup password PasswordGroup oidc OpenIDConnectGroup profile ProfileGroup link LinkGroup code CodeGroup totp TOTPGroup lookup_secret LookupGroup webauthn WebAuthnGroup @@ -92,7 +91,6 @@ public enum GroupEnum /// [EnumMember(Value = "webauthn")] Webauthn = 9 - } @@ -100,7 +98,7 @@ public enum GroupEnum /// Group specifies which group (e.g. password authenticator) this node belongs to. default DefaultGroup password PasswordGroup oidc OpenIDConnectGroup profile ProfileGroup link LinkGroup code CodeGroup totp TOTPGroup lookup_secret LookupGroup webauthn WebAuthnGroup /// /// Group specifies which group (e.g. password authenticator) this node belongs to. default DefaultGroup password PasswordGroup oidc OpenIDConnectGroup profile ProfileGroup link LinkGroup code CodeGroup totp TOTPGroup lookup_secret LookupGroup webauthn WebAuthnGroup - [DataMember(Name = "group", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "group", IsRequired = true, EmitDefaultValue = true)] public GroupEnum Group { get; set; } /// /// The node's type text Text input Input img Image a Anchor script Script @@ -138,7 +136,6 @@ public enum TypeEnum /// [EnumMember(Value = "script")] Script = 5 - } @@ -146,16 +143,13 @@ public enum TypeEnum /// The node's type text Text input Input img Image a Anchor script Script /// /// The node's type text Text input Input img Image a Anchor script Script - [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public TypeEnum Type { get; set; } /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUiNode() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUiNode() { } /// /// Initializes a new instance of the class. /// @@ -167,49 +161,45 @@ protected KratosUiNode() public KratosUiNode(KratosUiNodeAttributes attributes = default(KratosUiNodeAttributes), GroupEnum group = default(GroupEnum), List messages = default(List), KratosUiNodeMeta meta = default(KratosUiNodeMeta), TypeEnum type = default(TypeEnum)) { // to ensure "attributes" is required (not null) - if (attributes == null) { + if (attributes == null) + { throw new ArgumentNullException("attributes is a required property for KratosUiNode and cannot be null"); } this.Attributes = attributes; this.Group = group; // to ensure "messages" is required (not null) - if (messages == null) { + if (messages == null) + { throw new ArgumentNullException("messages is a required property for KratosUiNode and cannot be null"); } this.Messages = messages; // to ensure "meta" is required (not null) - if (meta == null) { + if (meta == null) + { throw new ArgumentNullException("meta is a required property for KratosUiNode and cannot be null"); } this.Meta = meta; this.Type = type; - this.AdditionalProperties = new Dictionary(); } /// /// Gets or Sets Attributes /// - [DataMember(Name = "attributes", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "attributes", IsRequired = true, EmitDefaultValue = true)] public KratosUiNodeAttributes Attributes { get; set; } /// /// Gets or Sets Messages /// - [DataMember(Name = "messages", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "messages", IsRequired = true, EmitDefaultValue = true)] public List Messages { get; set; } /// /// Gets or Sets Meta /// - [DataMember(Name = "meta", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "meta", IsRequired = true, EmitDefaultValue = true)] public KratosUiNodeMeta Meta { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -223,7 +213,6 @@ public override string ToString() sb.Append(" Messages: ").Append(Messages).Append("\n"); sb.Append(" Meta: ").Append(Meta).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -237,92 +226,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUiNode); - } - - /// - /// Returns true if KratosUiNode instances are equal - /// - /// Instance of KratosUiNode to be compared - /// Boolean - public bool Equals(KratosUiNode input) - { - if (input == null) - { - return false; - } - return - ( - this.Attributes == input.Attributes || - (this.Attributes != null && - this.Attributes.Equals(input.Attributes)) - ) && - ( - this.Group == input.Group || - this.Group.Equals(input.Group) - ) && - ( - this.Messages == input.Messages || - this.Messages != null && - input.Messages != null && - this.Messages.SequenceEqual(input.Messages) - ) && - ( - this.Meta == input.Meta || - (this.Meta != null && - this.Meta.Equals(input.Meta)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Attributes != null) - { - hashCode = (hashCode * 59) + this.Attributes.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Group.GetHashCode(); - if (this.Messages != null) - { - hashCode = (hashCode * 59) + this.Messages.GetHashCode(); - } - if (this.Meta != null) - { - hashCode = (hashCode * 59) + this.Meta.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUiNodeAnchorAttributes.cs b/Ory.Kratos.Client/Model/KratosUiNodeAnchorAttributes.cs index 184c6df9..d23a4532 100644 --- a/Ory.Kratos.Client/Model/KratosUiNodeAnchorAttributes.cs +++ b/Ory.Kratos.Client/Model/KratosUiNodeAnchorAttributes.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// KratosUiNodeAnchorAttributes /// [DataContract(Name = "uiNodeAnchorAttributes")] - public partial class KratosUiNodeAnchorAttributes : IEquatable, IValidatableObject + public partial class KratosUiNodeAnchorAttributes : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUiNodeAnchorAttributes() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUiNodeAnchorAttributes() { } /// /// Initializes a new instance of the class. /// @@ -50,61 +46,58 @@ protected KratosUiNodeAnchorAttributes() public KratosUiNodeAnchorAttributes(string href = default(string), string id = default(string), string nodeType = default(string), KratosUiText title = default(KratosUiText)) { // to ensure "href" is required (not null) - if (href == null) { + if (href == null) + { throw new ArgumentNullException("href is a required property for KratosUiNodeAnchorAttributes and cannot be null"); } this.Href = href; // to ensure "id" is required (not null) - if (id == null) { + if (id == null) + { throw new ArgumentNullException("id is a required property for KratosUiNodeAnchorAttributes and cannot be null"); } this.Id = id; // to ensure "nodeType" is required (not null) - if (nodeType == null) { + if (nodeType == null) + { throw new ArgumentNullException("nodeType is a required property for KratosUiNodeAnchorAttributes and cannot be null"); } this.NodeType = nodeType; // to ensure "title" is required (not null) - if (title == null) { + if (title == null) + { throw new ArgumentNullException("title is a required property for KratosUiNodeAnchorAttributes and cannot be null"); } this.Title = title; - this.AdditionalProperties = new Dictionary(); } /// /// The link's href (destination) URL. format: uri /// /// The link's href (destination) URL. format: uri - [DataMember(Name = "href", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "href", IsRequired = true, EmitDefaultValue = true)] public string Href { get; set; } /// /// A unique identifier /// /// A unique identifier - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] public string Id { get; set; } /// /// NodeType represents this node's types. It is a mirror of `node.type` and is primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is \"a\". /// /// NodeType represents this node's types. It is a mirror of `node.type` and is primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is \"a\". - [DataMember(Name = "node_type", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "node_type", IsRequired = true, EmitDefaultValue = true)] public string NodeType { get; set; } /// /// Gets or Sets Title /// - [DataMember(Name = "title", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "title", IsRequired = true, EmitDefaultValue = true)] public KratosUiText Title { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -117,7 +110,6 @@ public override string ToString() sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" NodeType: ").Append(NodeType).Append("\n"); sb.Append(" Title: ").Append(Title).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -131,90 +123,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUiNodeAnchorAttributes); - } - - /// - /// Returns true if KratosUiNodeAnchorAttributes instances are equal - /// - /// Instance of KratosUiNodeAnchorAttributes to be compared - /// Boolean - public bool Equals(KratosUiNodeAnchorAttributes input) - { - if (input == null) - { - return false; - } - return - ( - this.Href == input.Href || - (this.Href != null && - this.Href.Equals(input.Href)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.NodeType == input.NodeType || - (this.NodeType != null && - this.NodeType.Equals(input.NodeType)) - ) && - ( - this.Title == input.Title || - (this.Title != null && - this.Title.Equals(input.Title)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Href != null) - { - hashCode = (hashCode * 59) + this.Href.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.NodeType != null) - { - hashCode = (hashCode * 59) + this.NodeType.GetHashCode(); - } - if (this.Title != null) - { - hashCode = (hashCode * 59) + this.Title.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUiNodeAttributes.cs b/Ory.Kratos.Client/Model/KratosUiNodeAttributes.cs index dd6e12f0..b85a12fc 100644 --- a/Ory.Kratos.Client/Model/KratosUiNodeAttributes.cs +++ b/Ory.Kratos.Client/Model/KratosUiNodeAttributes.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -33,14 +32,14 @@ namespace Ory.Kratos.Client.Model /// [JsonConverter(typeof(KratosUiNodeAttributesJsonConverter))] [DataContract(Name = "uiNodeAttributes")] - public partial class KratosUiNodeAttributes : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class KratosUiNodeAttributes : AbstractOpenAPISchema, IValidatableObject { /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosUiNodeAnchorAttributes. - public KratosUiNodeAttributes(KratosUiNodeAnchorAttributes actualInstance) + /// An instance of KratosUiNodeInputAttributes. + public KratosUiNodeAttributes(KratosUiNodeInputAttributes actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -49,10 +48,10 @@ public KratosUiNodeAttributes(KratosUiNodeAnchorAttributes actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosUiNodeImageAttributes. - public KratosUiNodeAttributes(KratosUiNodeImageAttributes actualInstance) + /// An instance of KratosUiNodeTextAttributes. + public KratosUiNodeAttributes(KratosUiNodeTextAttributes actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -61,10 +60,10 @@ public KratosUiNodeAttributes(KratosUiNodeImageAttributes actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosUiNodeInputAttributes. - public KratosUiNodeAttributes(KratosUiNodeInputAttributes actualInstance) + /// An instance of KratosUiNodeImageAttributes. + public KratosUiNodeAttributes(KratosUiNodeImageAttributes actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -73,10 +72,10 @@ public KratosUiNodeAttributes(KratosUiNodeInputAttributes actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosUiNodeScriptAttributes. - public KratosUiNodeAttributes(KratosUiNodeScriptAttributes actualInstance) + /// An instance of KratosUiNodeAnchorAttributes. + public KratosUiNodeAttributes(KratosUiNodeAnchorAttributes actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -85,10 +84,10 @@ public KratosUiNodeAttributes(KratosUiNodeScriptAttributes actualInstance) /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosUiNodeTextAttributes. - public KratosUiNodeAttributes(KratosUiNodeTextAttributes actualInstance) + /// An instance of KratosUiNodeScriptAttributes. + public KratosUiNodeAttributes(KratosUiNodeScriptAttributes actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -137,13 +136,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `KratosUiNodeAnchorAttributes`. If the actual instance is not `KratosUiNodeAnchorAttributes`, + /// Get the actual instance of `KratosUiNodeInputAttributes`. If the actual instance is not `KratosUiNodeInputAttributes`, /// the InvalidClassException will be thrown /// - /// An instance of KratosUiNodeAnchorAttributes - public KratosUiNodeAnchorAttributes GetKratosUiNodeAnchorAttributes() + /// An instance of KratosUiNodeInputAttributes + public KratosUiNodeInputAttributes GetKratosUiNodeInputAttributes() { - return (KratosUiNodeAnchorAttributes)this.ActualInstance; + return (KratosUiNodeInputAttributes)this.ActualInstance; + } + + /// + /// Get the actual instance of `KratosUiNodeTextAttributes`. If the actual instance is not `KratosUiNodeTextAttributes`, + /// the InvalidClassException will be thrown + /// + /// An instance of KratosUiNodeTextAttributes + public KratosUiNodeTextAttributes GetKratosUiNodeTextAttributes() + { + return (KratosUiNodeTextAttributes)this.ActualInstance; } /// @@ -157,13 +166,13 @@ public KratosUiNodeImageAttributes GetKratosUiNodeImageAttributes() } /// - /// Get the actual instance of `KratosUiNodeInputAttributes`. If the actual instance is not `KratosUiNodeInputAttributes`, + /// Get the actual instance of `KratosUiNodeAnchorAttributes`. If the actual instance is not `KratosUiNodeAnchorAttributes`, /// the InvalidClassException will be thrown /// - /// An instance of KratosUiNodeInputAttributes - public KratosUiNodeInputAttributes GetKratosUiNodeInputAttributes() + /// An instance of KratosUiNodeAnchorAttributes + public KratosUiNodeAnchorAttributes GetKratosUiNodeAnchorAttributes() { - return (KratosUiNodeInputAttributes)this.ActualInstance; + return (KratosUiNodeAnchorAttributes)this.ActualInstance; } /// @@ -176,16 +185,6 @@ public KratosUiNodeScriptAttributes GetKratosUiNodeScriptAttributes() return (KratosUiNodeScriptAttributes)this.ActualInstance; } - /// - /// Get the actual instance of `KratosUiNodeTextAttributes`. If the actual instance is not `KratosUiNodeTextAttributes`, - /// the InvalidClassException will be thrown - /// - /// An instance of KratosUiNodeTextAttributes - public KratosUiNodeTextAttributes GetKratosUiNodeTextAttributes() - { - return (KratosUiNodeTextAttributes)this.ActualInstance; - } - /// /// Returns the string presentation of the object /// @@ -330,50 +329,13 @@ public static KratosUiNodeAttributes FromJson(string jsonString) } else if (match > 1) { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + String.Join(",", matchedTypes)); } // deserialization is considered successful at this point if no exception has been thrown. return newKratosUiNodeAttributes; } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUiNodeAttributes); - } - - /// - /// Returns true if KratosUiNodeAttributes instances are equal - /// - /// Instance of KratosUiNodeAttributes to be compared - /// Boolean - public bool Equals(KratosUiNodeAttributes input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance @@ -412,11 +374,15 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s /// The object converted from the JSON string public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - if(reader.TokenType != JsonToken.Null) + switch(reader.TokenType) { - return KratosUiNodeAttributes.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartObject: + return KratosUiNodeAttributes.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return KratosUiNodeAttributes.FromJson(JArray.Load(reader).ToString(Formatting.None)); + default: + return null; } - return null; } /// diff --git a/Ory.Kratos.Client/Model/KratosUiNodeImageAttributes.cs b/Ory.Kratos.Client/Model/KratosUiNodeImageAttributes.cs index 816be9fb..fcc73a9f 100644 --- a/Ory.Kratos.Client/Model/KratosUiNodeImageAttributes.cs +++ b/Ory.Kratos.Client/Model/KratosUiNodeImageAttributes.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// KratosUiNodeImageAttributes /// [DataContract(Name = "uiNodeImageAttributes")] - public partial class KratosUiNodeImageAttributes : IEquatable, IValidatableObject + public partial class KratosUiNodeImageAttributes : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUiNodeImageAttributes() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUiNodeImageAttributes() { } /// /// Initializes a new instance of the class. /// @@ -52,65 +48,61 @@ protected KratosUiNodeImageAttributes() { this.Height = height; // to ensure "id" is required (not null) - if (id == null) { + if (id == null) + { throw new ArgumentNullException("id is a required property for KratosUiNodeImageAttributes and cannot be null"); } this.Id = id; // to ensure "nodeType" is required (not null) - if (nodeType == null) { + if (nodeType == null) + { throw new ArgumentNullException("nodeType is a required property for KratosUiNodeImageAttributes and cannot be null"); } this.NodeType = nodeType; // to ensure "src" is required (not null) - if (src == null) { + if (src == null) + { throw new ArgumentNullException("src is a required property for KratosUiNodeImageAttributes and cannot be null"); } this.Src = src; this.Width = width; - this.AdditionalProperties = new Dictionary(); } /// /// Height of the image /// /// Height of the image - [DataMember(Name = "height", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "height", IsRequired = true, EmitDefaultValue = true)] public long Height { get; set; } /// /// A unique identifier /// /// A unique identifier - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] public string Id { get; set; } /// /// NodeType represents this node's types. It is a mirror of `node.type` and is primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is \"img\". /// /// NodeType represents this node's types. It is a mirror of `node.type` and is primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is \"img\". - [DataMember(Name = "node_type", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "node_type", IsRequired = true, EmitDefaultValue = true)] public string NodeType { get; set; } /// /// The image's source URL. format: uri /// /// The image's source URL. format: uri - [DataMember(Name = "src", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "src", IsRequired = true, EmitDefaultValue = true)] public string Src { get; set; } /// /// Width of the image /// /// Width of the image - [DataMember(Name = "width", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "width", IsRequired = true, EmitDefaultValue = true)] public long Width { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -124,7 +116,6 @@ public override string ToString() sb.Append(" NodeType: ").Append(NodeType).Append("\n"); sb.Append(" Src: ").Append(Src).Append("\n"); sb.Append(" Width: ").Append(Width).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -138,91 +129,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUiNodeImageAttributes); - } - - /// - /// Returns true if KratosUiNodeImageAttributes instances are equal - /// - /// Instance of KratosUiNodeImageAttributes to be compared - /// Boolean - public bool Equals(KratosUiNodeImageAttributes input) - { - if (input == null) - { - return false; - } - return - ( - this.Height == input.Height || - this.Height.Equals(input.Height) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.NodeType == input.NodeType || - (this.NodeType != null && - this.NodeType.Equals(input.NodeType)) - ) && - ( - this.Src == input.Src || - (this.Src != null && - this.Src.Equals(input.Src)) - ) && - ( - this.Width == input.Width || - this.Width.Equals(input.Width) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Height.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.NodeType != null) - { - hashCode = (hashCode * 59) + this.NodeType.GetHashCode(); - } - if (this.Src != null) - { - hashCode = (hashCode * 59) + this.Src.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Width.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUiNodeInputAttributes.cs b/Ory.Kratos.Client/Model/KratosUiNodeInputAttributes.cs index 7fc1b460..c248bfd5 100644 --- a/Ory.Kratos.Client/Model/KratosUiNodeInputAttributes.cs +++ b/Ory.Kratos.Client/Model/KratosUiNodeInputAttributes.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// InputAttributes represents the attributes of an input node /// [DataContract(Name = "uiNodeInputAttributes")] - public partial class KratosUiNodeInputAttributes : IEquatable, IValidatableObject + public partial class KratosUiNodeInputAttributes : IValidatableObject { /// /// The autocomplete attribute for the input. email InputAttributeAutocompleteEmail tel InputAttributeAutocompleteTel url InputAttributeAutocompleteUrl current-password InputAttributeAutocompleteCurrentPassword new-password InputAttributeAutocompleteNewPassword one-time-code InputAttributeAutocompleteOneTimeCode @@ -74,7 +73,6 @@ public enum AutocompleteEnum /// [EnumMember(Value = "one-time-code")] OneTimeCode = 6 - } @@ -162,7 +160,6 @@ public enum TypeEnum /// [EnumMember(Value = "url")] Url = 12 - } @@ -170,16 +167,13 @@ public enum TypeEnum /// The input's element type. text InputAttributeTypeText password InputAttributeTypePassword number InputAttributeTypeNumber checkbox InputAttributeTypeCheckbox hidden InputAttributeTypeHidden email InputAttributeTypeEmail tel InputAttributeTypeTel submit InputAttributeTypeSubmit button InputAttributeTypeButton datetime-local InputAttributeTypeDateTimeLocal date InputAttributeTypeDate url InputAttributeTypeURI /// /// The input's element type. text InputAttributeTypeText password InputAttributeTypePassword number InputAttributeTypeNumber checkbox InputAttributeTypeCheckbox hidden InputAttributeTypeHidden email InputAttributeTypeEmail tel InputAttributeTypeTel submit InputAttributeTypeSubmit button InputAttributeTypeButton datetime-local InputAttributeTypeDateTimeLocal date InputAttributeTypeDate url InputAttributeTypeURI - [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public TypeEnum Type { get; set; } /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUiNodeInputAttributes() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUiNodeInputAttributes() { } /// /// Initializes a new instance of the class. /// @@ -197,12 +191,14 @@ protected KratosUiNodeInputAttributes() { this.Disabled = disabled; // to ensure "name" is required (not null) - if (name == null) { + if (name == null) + { throw new ArgumentNullException("name is a required property for KratosUiNodeInputAttributes and cannot be null"); } this.Name = name; // to ensure "nodeType" is required (not null) - if (nodeType == null) { + if (nodeType == null) + { throw new ArgumentNullException("nodeType is a required property for KratosUiNodeInputAttributes and cannot be null"); } this.NodeType = nodeType; @@ -213,7 +209,6 @@ protected KratosUiNodeInputAttributes() this.Pattern = pattern; this.Required = required; this.Value = value; - this.AdditionalProperties = new Dictionary(); } /// @@ -233,14 +228,14 @@ protected KratosUiNodeInputAttributes() /// The input's element name. /// /// The input's element name. - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] public string Name { get; set; } /// /// NodeType represents this node's types. It is a mirror of `node.type` and is primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is \"input\". /// /// NodeType represents this node's types. It is a mirror of `node.type` and is primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is \"input\". - [DataMember(Name = "node_type", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "node_type", IsRequired = true, EmitDefaultValue = true)] public string NodeType { get; set; } /// @@ -271,12 +266,6 @@ protected KratosUiNodeInputAttributes() [DataMember(Name = "value", EmitDefaultValue = true)] public Object Value { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -295,7 +284,6 @@ public override string ToString() sb.Append(" Required: ").Append(Required).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -309,128 +297,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUiNodeInputAttributes); - } - - /// - /// Returns true if KratosUiNodeInputAttributes instances are equal - /// - /// Instance of KratosUiNodeInputAttributes to be compared - /// Boolean - public bool Equals(KratosUiNodeInputAttributes input) - { - if (input == null) - { - return false; - } - return - ( - this.Autocomplete == input.Autocomplete || - this.Autocomplete.Equals(input.Autocomplete) - ) && - ( - this.Disabled == input.Disabled || - this.Disabled.Equals(input.Disabled) - ) && - ( - this.Label == input.Label || - (this.Label != null && - this.Label.Equals(input.Label)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.NodeType == input.NodeType || - (this.NodeType != null && - this.NodeType.Equals(input.NodeType)) - ) && - ( - this.Onclick == input.Onclick || - (this.Onclick != null && - this.Onclick.Equals(input.Onclick)) - ) && - ( - this.Pattern == input.Pattern || - (this.Pattern != null && - this.Pattern.Equals(input.Pattern)) - ) && - ( - this.Required == input.Required || - this.Required.Equals(input.Required) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Autocomplete.GetHashCode(); - hashCode = (hashCode * 59) + this.Disabled.GetHashCode(); - if (this.Label != null) - { - hashCode = (hashCode * 59) + this.Label.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.NodeType != null) - { - hashCode = (hashCode * 59) + this.NodeType.GetHashCode(); - } - if (this.Onclick != null) - { - hashCode = (hashCode * 59) + this.Onclick.GetHashCode(); - } - if (this.Pattern != null) - { - hashCode = (hashCode * 59) + this.Pattern.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Required.GetHashCode(); - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUiNodeMeta.cs b/Ory.Kratos.Client/Model/KratosUiNodeMeta.cs index de513cce..ca7af7f2 100644 --- a/Ory.Kratos.Client/Model/KratosUiNodeMeta.cs +++ b/Ory.Kratos.Client/Model/KratosUiNodeMeta.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// This might include a label and other information that can optionally be used to render UIs. /// [DataContract(Name = "uiNodeMeta")] - public partial class KratosUiNodeMeta : IEquatable, IValidatableObject + public partial class KratosUiNodeMeta : IValidatableObject { /// /// Initializes a new instance of the class. @@ -39,7 +38,6 @@ public partial class KratosUiNodeMeta : IEquatable, IValidatab public KratosUiNodeMeta(KratosUiText label = default(KratosUiText)) { this.Label = label; - this.AdditionalProperties = new Dictionary(); } /// @@ -48,12 +46,6 @@ public partial class KratosUiNodeMeta : IEquatable, IValidatab [DataMember(Name = "label", EmitDefaultValue = false)] public KratosUiText Label { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -63,7 +55,6 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class KratosUiNodeMeta {\n"); sb.Append(" Label: ").Append(Label).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -77,63 +68,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUiNodeMeta); - } - - /// - /// Returns true if KratosUiNodeMeta instances are equal - /// - /// Instance of KratosUiNodeMeta to be compared - /// Boolean - public bool Equals(KratosUiNodeMeta input) - { - if (input == null) - { - return false; - } - return - ( - this.Label == input.Label || - (this.Label != null && - this.Label.Equals(input.Label)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Label != null) - { - hashCode = (hashCode * 59) + this.Label.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUiNodeScriptAttributes.cs b/Ory.Kratos.Client/Model/KratosUiNodeScriptAttributes.cs index cf6956a8..cfaf9906 100644 --- a/Ory.Kratos.Client/Model/KratosUiNodeScriptAttributes.cs +++ b/Ory.Kratos.Client/Model/KratosUiNodeScriptAttributes.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// KratosUiNodeScriptAttributes /// [DataContract(Name = "uiNodeScriptAttributes")] - public partial class KratosUiNodeScriptAttributes : IEquatable, IValidatableObject + public partial class KratosUiNodeScriptAttributes : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUiNodeScriptAttributes() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUiNodeScriptAttributes() { } /// /// Initializes a new instance of the class. /// @@ -56,46 +52,53 @@ protected KratosUiNodeScriptAttributes() { this.Async = async; // to ensure "crossorigin" is required (not null) - if (crossorigin == null) { + if (crossorigin == null) + { throw new ArgumentNullException("crossorigin is a required property for KratosUiNodeScriptAttributes and cannot be null"); } this.Crossorigin = crossorigin; // to ensure "id" is required (not null) - if (id == null) { + if (id == null) + { throw new ArgumentNullException("id is a required property for KratosUiNodeScriptAttributes and cannot be null"); } this.Id = id; // to ensure "integrity" is required (not null) - if (integrity == null) { + if (integrity == null) + { throw new ArgumentNullException("integrity is a required property for KratosUiNodeScriptAttributes and cannot be null"); } this.Integrity = integrity; // to ensure "nodeType" is required (not null) - if (nodeType == null) { + if (nodeType == null) + { throw new ArgumentNullException("nodeType is a required property for KratosUiNodeScriptAttributes and cannot be null"); } this.NodeType = nodeType; // to ensure "nonce" is required (not null) - if (nonce == null) { + if (nonce == null) + { throw new ArgumentNullException("nonce is a required property for KratosUiNodeScriptAttributes and cannot be null"); } this.Nonce = nonce; // to ensure "referrerpolicy" is required (not null) - if (referrerpolicy == null) { + if (referrerpolicy == null) + { throw new ArgumentNullException("referrerpolicy is a required property for KratosUiNodeScriptAttributes and cannot be null"); } this.Referrerpolicy = referrerpolicy; // to ensure "src" is required (not null) - if (src == null) { + if (src == null) + { throw new ArgumentNullException("src is a required property for KratosUiNodeScriptAttributes and cannot be null"); } this.Src = src; // to ensure "type" is required (not null) - if (type == null) { + if (type == null) + { throw new ArgumentNullException("type is a required property for KratosUiNodeScriptAttributes and cannot be null"); } this.Type = type; - this.AdditionalProperties = new Dictionary(); } /// @@ -109,64 +112,58 @@ protected KratosUiNodeScriptAttributes() /// The script cross origin policy /// /// The script cross origin policy - [DataMember(Name = "crossorigin", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "crossorigin", IsRequired = true, EmitDefaultValue = true)] public string Crossorigin { get; set; } /// /// A unique identifier /// /// A unique identifier - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] public string Id { get; set; } /// /// The script's integrity hash /// /// The script's integrity hash - [DataMember(Name = "integrity", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "integrity", IsRequired = true, EmitDefaultValue = true)] public string Integrity { get; set; } /// /// NodeType represents this node's types. It is a mirror of `node.type` and is primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is \"script\". /// /// NodeType represents this node's types. It is a mirror of `node.type` and is primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is \"script\". - [DataMember(Name = "node_type", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "node_type", IsRequired = true, EmitDefaultValue = true)] public string NodeType { get; set; } /// /// Nonce for CSP A nonce you may want to use to improve your Content Security Policy. You do not have to use this value but if you want to improve your CSP policies you may use it. You can also choose to use your own nonce value! /// /// Nonce for CSP A nonce you may want to use to improve your Content Security Policy. You do not have to use this value but if you want to improve your CSP policies you may use it. You can also choose to use your own nonce value! - [DataMember(Name = "nonce", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "nonce", IsRequired = true, EmitDefaultValue = true)] public string Nonce { get; set; } /// /// The script referrer policy /// /// The script referrer policy - [DataMember(Name = "referrerpolicy", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "referrerpolicy", IsRequired = true, EmitDefaultValue = true)] public string Referrerpolicy { get; set; } /// /// The script source /// /// The script source - [DataMember(Name = "src", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "src", IsRequired = true, EmitDefaultValue = true)] public string Src { get; set; } /// /// The script MIME type /// /// The script MIME type - [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -184,7 +181,6 @@ public override string ToString() sb.Append(" Referrerpolicy: ").Append(Referrerpolicy).Append("\n"); sb.Append(" Src: ").Append(Src).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -198,131 +194,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUiNodeScriptAttributes); - } - - /// - /// Returns true if KratosUiNodeScriptAttributes instances are equal - /// - /// Instance of KratosUiNodeScriptAttributes to be compared - /// Boolean - public bool Equals(KratosUiNodeScriptAttributes input) - { - if (input == null) - { - return false; - } - return - ( - this.Async == input.Async || - this.Async.Equals(input.Async) - ) && - ( - this.Crossorigin == input.Crossorigin || - (this.Crossorigin != null && - this.Crossorigin.Equals(input.Crossorigin)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Integrity == input.Integrity || - (this.Integrity != null && - this.Integrity.Equals(input.Integrity)) - ) && - ( - this.NodeType == input.NodeType || - (this.NodeType != null && - this.NodeType.Equals(input.NodeType)) - ) && - ( - this.Nonce == input.Nonce || - (this.Nonce != null && - this.Nonce.Equals(input.Nonce)) - ) && - ( - this.Referrerpolicy == input.Referrerpolicy || - (this.Referrerpolicy != null && - this.Referrerpolicy.Equals(input.Referrerpolicy)) - ) && - ( - this.Src == input.Src || - (this.Src != null && - this.Src.Equals(input.Src)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Async.GetHashCode(); - if (this.Crossorigin != null) - { - hashCode = (hashCode * 59) + this.Crossorigin.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Integrity != null) - { - hashCode = (hashCode * 59) + this.Integrity.GetHashCode(); - } - if (this.NodeType != null) - { - hashCode = (hashCode * 59) + this.NodeType.GetHashCode(); - } - if (this.Nonce != null) - { - hashCode = (hashCode * 59) + this.Nonce.GetHashCode(); - } - if (this.Referrerpolicy != null) - { - hashCode = (hashCode * 59) + this.Referrerpolicy.GetHashCode(); - } - if (this.Src != null) - { - hashCode = (hashCode * 59) + this.Src.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUiNodeTextAttributes.cs b/Ory.Kratos.Client/Model/KratosUiNodeTextAttributes.cs index 3db50f28..e996132d 100644 --- a/Ory.Kratos.Client/Model/KratosUiNodeTextAttributes.cs +++ b/Ory.Kratos.Client/Model/KratosUiNodeTextAttributes.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// KratosUiNodeTextAttributes /// [DataContract(Name = "uiNodeTextAttributes")] - public partial class KratosUiNodeTextAttributes : IEquatable, IValidatableObject + public partial class KratosUiNodeTextAttributes : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUiNodeTextAttributes() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUiNodeTextAttributes() { } /// /// Initializes a new instance of the class. /// @@ -49,49 +45,45 @@ protected KratosUiNodeTextAttributes() public KratosUiNodeTextAttributes(string id = default(string), string nodeType = default(string), KratosUiText text = default(KratosUiText)) { // to ensure "id" is required (not null) - if (id == null) { + if (id == null) + { throw new ArgumentNullException("id is a required property for KratosUiNodeTextAttributes and cannot be null"); } this.Id = id; // to ensure "nodeType" is required (not null) - if (nodeType == null) { + if (nodeType == null) + { throw new ArgumentNullException("nodeType is a required property for KratosUiNodeTextAttributes and cannot be null"); } this.NodeType = nodeType; // to ensure "text" is required (not null) - if (text == null) { + if (text == null) + { throw new ArgumentNullException("text is a required property for KratosUiNodeTextAttributes and cannot be null"); } this.Text = text; - this.AdditionalProperties = new Dictionary(); } /// /// A unique identifier /// /// A unique identifier - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] public string Id { get; set; } /// /// NodeType represents this node's types. It is a mirror of `node.type` and is primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is \"text\". /// /// NodeType represents this node's types. It is a mirror of `node.type` and is primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is \"text\". - [DataMember(Name = "node_type", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "node_type", IsRequired = true, EmitDefaultValue = true)] public string NodeType { get; set; } /// /// Gets or Sets Text /// - [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = true)] public KratosUiText Text { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -103,7 +95,6 @@ public override string ToString() sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" NodeType: ").Append(NodeType).Append("\n"); sb.Append(" Text: ").Append(Text).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -117,81 +108,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUiNodeTextAttributes); - } - - /// - /// Returns true if KratosUiNodeTextAttributes instances are equal - /// - /// Instance of KratosUiNodeTextAttributes to be compared - /// Boolean - public bool Equals(KratosUiNodeTextAttributes input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.NodeType == input.NodeType || - (this.NodeType != null && - this.NodeType.Equals(input.NodeType)) - ) && - ( - this.Text == input.Text || - (this.Text != null && - this.Text.Equals(input.Text)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.NodeType != null) - { - hashCode = (hashCode * 59) + this.NodeType.GetHashCode(); - } - if (this.Text != null) - { - hashCode = (hashCode * 59) + this.Text.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUiText.cs b/Ory.Kratos.Client/Model/KratosUiText.cs index 56cae651..07e166f6 100644 --- a/Ory.Kratos.Client/Model/KratosUiText.cs +++ b/Ory.Kratos.Client/Model/KratosUiText.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// KratosUiText /// [DataContract(Name = "uiText")] - public partial class KratosUiText : IEquatable, IValidatableObject + public partial class KratosUiText : IValidatableObject { /// /// The message type. info Info error Error success Success @@ -56,7 +55,6 @@ public enum TypeEnum /// [EnumMember(Value = "success")] Success = 3 - } @@ -64,16 +62,13 @@ public enum TypeEnum /// The message type. info Info error Error success Success /// /// The message type. info Info error Error success Success - [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public TypeEnum Type { get; set; } /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUiText() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUiText() { } /// /// Initializes a new instance of the class. /// @@ -85,13 +80,13 @@ protected KratosUiText() { this.Id = id; // to ensure "text" is required (not null) - if (text == null) { + if (text == null) + { throw new ArgumentNullException("text is a required property for KratosUiText and cannot be null"); } this.Text = text; this.Type = type; this.Context = context; - this.AdditionalProperties = new Dictionary(); } /// @@ -104,22 +99,16 @@ protected KratosUiText() /// /// Gets or Sets Id /// - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] public long Id { get; set; } /// /// The message text. Written in american english. /// /// The message text. Written in american english. - [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = true)] public string Text { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -132,7 +121,6 @@ public override string ToString() sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Text: ").Append(Text).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -146,82 +134,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUiText); - } - - /// - /// Returns true if KratosUiText instances are equal - /// - /// Instance of KratosUiText to be compared - /// Boolean - public bool Equals(KratosUiText input) - { - if (input == null) - { - return false; - } - return - ( - this.Context == input.Context || - (this.Context != null && - this.Context.Equals(input.Context)) - ) && - ( - this.Id == input.Id || - this.Id.Equals(input.Id) - ) && - ( - this.Text == input.Text || - (this.Text != null && - this.Text.Equals(input.Text)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Context != null) - { - hashCode = (hashCode * 59) + this.Context.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Text != null) - { - hashCode = (hashCode * 59) + this.Text.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUpdateIdentityBody.cs b/Ory.Kratos.Client/Model/KratosUpdateIdentityBody.cs index 3d885fde..780d38b9 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateIdentityBody.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateIdentityBody.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// Update Identity Body /// [DataContract(Name = "updateIdentityBody")] - public partial class KratosUpdateIdentityBody : IEquatable, IValidatableObject + public partial class KratosUpdateIdentityBody : IValidatableObject { /// /// State is the identity's state. active StateActive inactive StateInactive @@ -50,7 +49,6 @@ public enum StateEnum /// [EnumMember(Value = "inactive")] Inactive = 2 - } @@ -58,16 +56,13 @@ public enum StateEnum /// State is the identity's state. active StateActive inactive StateInactive /// /// State is the identity's state. active StateActive inactive StateInactive - [DataMember(Name = "state", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "state", IsRequired = true, EmitDefaultValue = true)] public StateEnum State { get; set; } /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUpdateIdentityBody() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUpdateIdentityBody() { } /// /// Initializes a new instance of the class. /// @@ -80,20 +75,21 @@ protected KratosUpdateIdentityBody() public KratosUpdateIdentityBody(KratosIdentityWithCredentials credentials = default(KratosIdentityWithCredentials), Object metadataAdmin = default(Object), Object metadataPublic = default(Object), string schemaId = default(string), StateEnum state = default(StateEnum), Object traits = default(Object)) { // to ensure "schemaId" is required (not null) - if (schemaId == null) { + if (schemaId == null) + { throw new ArgumentNullException("schemaId is a required property for KratosUpdateIdentityBody and cannot be null"); } this.SchemaId = schemaId; this.State = state; // to ensure "traits" is required (not null) - if (traits == null) { + if (traits == null) + { throw new ArgumentNullException("traits is a required property for KratosUpdateIdentityBody and cannot be null"); } this.Traits = traits; this.Credentials = credentials; this.MetadataAdmin = metadataAdmin; this.MetadataPublic = metadataPublic; - this.AdditionalProperties = new Dictionary(); } /// @@ -120,22 +116,16 @@ protected KratosUpdateIdentityBody() /// SchemaID is the ID of the JSON Schema to be used for validating the identity's traits. If set will update the Identity's SchemaID. /// /// SchemaID is the ID of the JSON Schema to be used for validating the identity's traits. If set will update the Identity's SchemaID. - [DataMember(Name = "schema_id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "schema_id", IsRequired = true, EmitDefaultValue = true)] public string SchemaId { get; set; } /// /// Traits represent an identity's traits. The identity is able to create, modify, and delete traits in a self-service manner. The input will always be validated against the JSON Schema defined in `schema_id`. /// /// Traits represent an identity's traits. The identity is able to create, modify, and delete traits in a self-service manner. The input will always be validated against the JSON Schema defined in `schema_id`. - [DataMember(Name = "traits", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "traits", IsRequired = true, EmitDefaultValue = true)] public Object Traits { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -150,7 +140,6 @@ public override string ToString() sb.Append(" SchemaId: ").Append(SchemaId).Append("\n"); sb.Append(" State: ").Append(State).Append("\n"); sb.Append(" Traits: ").Append(Traits).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -164,104 +153,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateIdentityBody); - } - - /// - /// Returns true if KratosUpdateIdentityBody instances are equal - /// - /// Instance of KratosUpdateIdentityBody to be compared - /// Boolean - public bool Equals(KratosUpdateIdentityBody input) - { - if (input == null) - { - return false; - } - return - ( - this.Credentials == input.Credentials || - (this.Credentials != null && - this.Credentials.Equals(input.Credentials)) - ) && - ( - this.MetadataAdmin == input.MetadataAdmin || - (this.MetadataAdmin != null && - this.MetadataAdmin.Equals(input.MetadataAdmin)) - ) && - ( - this.MetadataPublic == input.MetadataPublic || - (this.MetadataPublic != null && - this.MetadataPublic.Equals(input.MetadataPublic)) - ) && - ( - this.SchemaId == input.SchemaId || - (this.SchemaId != null && - this.SchemaId.Equals(input.SchemaId)) - ) && - ( - this.State == input.State || - this.State.Equals(input.State) - ) && - ( - this.Traits == input.Traits || - (this.Traits != null && - this.Traits.Equals(input.Traits)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Credentials != null) - { - hashCode = (hashCode * 59) + this.Credentials.GetHashCode(); - } - if (this.MetadataAdmin != null) - { - hashCode = (hashCode * 59) + this.MetadataAdmin.GetHashCode(); - } - if (this.MetadataPublic != null) - { - hashCode = (hashCode * 59) + this.MetadataPublic.GetHashCode(); - } - if (this.SchemaId != null) - { - hashCode = (hashCode * 59) + this.SchemaId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.State.GetHashCode(); - if (this.Traits != null) - { - hashCode = (hashCode * 59) + this.Traits.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUpdateLoginFlowBody.cs b/Ory.Kratos.Client/Model/KratosUpdateLoginFlowBody.cs index 31d7abd1..db2b5c9a 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateLoginFlowBody.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateLoginFlowBody.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -33,14 +32,14 @@ namespace Ory.Kratos.Client.Model /// [JsonConverter(typeof(KratosUpdateLoginFlowBodyJsonConverter))] [DataContract(Name = "updateLoginFlowBody")] - public partial class KratosUpdateLoginFlowBody : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class KratosUpdateLoginFlowBody : AbstractOpenAPISchema, IValidatableObject { /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosUpdateLoginFlowWithCodeMethod. - public KratosUpdateLoginFlowBody(KratosUpdateLoginFlowWithCodeMethod actualInstance) + /// An instance of KratosUpdateLoginFlowWithPasswordMethod. + public KratosUpdateLoginFlowBody(KratosUpdateLoginFlowWithPasswordMethod actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -49,10 +48,10 @@ public KratosUpdateLoginFlowBody(KratosUpdateLoginFlowWithCodeMethod actualInsta /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosUpdateLoginFlowWithLookupSecretMethod. - public KratosUpdateLoginFlowBody(KratosUpdateLoginFlowWithLookupSecretMethod actualInstance) + /// An instance of KratosUpdateLoginFlowWithOidcMethod. + public KratosUpdateLoginFlowBody(KratosUpdateLoginFlowWithOidcMethod actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -61,10 +60,10 @@ public KratosUpdateLoginFlowBody(KratosUpdateLoginFlowWithLookupSecretMethod act /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosUpdateLoginFlowWithOidcMethod. - public KratosUpdateLoginFlowBody(KratosUpdateLoginFlowWithOidcMethod actualInstance) + /// An instance of KratosUpdateLoginFlowWithTotpMethod. + public KratosUpdateLoginFlowBody(KratosUpdateLoginFlowWithTotpMethod actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -73,10 +72,10 @@ public KratosUpdateLoginFlowBody(KratosUpdateLoginFlowWithOidcMethod actualInsta /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosUpdateLoginFlowWithPasswordMethod. - public KratosUpdateLoginFlowBody(KratosUpdateLoginFlowWithPasswordMethod actualInstance) + /// An instance of KratosUpdateLoginFlowWithWebAuthnMethod. + public KratosUpdateLoginFlowBody(KratosUpdateLoginFlowWithWebAuthnMethod actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -85,10 +84,10 @@ public KratosUpdateLoginFlowBody(KratosUpdateLoginFlowWithPasswordMethod actualI /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosUpdateLoginFlowWithTotpMethod. - public KratosUpdateLoginFlowBody(KratosUpdateLoginFlowWithTotpMethod actualInstance) + /// An instance of KratosUpdateLoginFlowWithLookupSecretMethod. + public KratosUpdateLoginFlowBody(KratosUpdateLoginFlowWithLookupSecretMethod actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -97,10 +96,10 @@ public KratosUpdateLoginFlowBody(KratosUpdateLoginFlowWithTotpMethod actualInsta /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosUpdateLoginFlowWithWebAuthnMethod. - public KratosUpdateLoginFlowBody(KratosUpdateLoginFlowWithWebAuthnMethod actualInstance) + /// An instance of KratosUpdateLoginFlowWithCodeMethod. + public KratosUpdateLoginFlowBody(KratosUpdateLoginFlowWithCodeMethod actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -153,23 +152,13 @@ public override Object ActualInstance } /// - /// Get the actual instance of `KratosUpdateLoginFlowWithCodeMethod`. If the actual instance is not `KratosUpdateLoginFlowWithCodeMethod`, - /// the InvalidClassException will be thrown - /// - /// An instance of KratosUpdateLoginFlowWithCodeMethod - public KratosUpdateLoginFlowWithCodeMethod GetKratosUpdateLoginFlowWithCodeMethod() - { - return (KratosUpdateLoginFlowWithCodeMethod)this.ActualInstance; - } - - /// - /// Get the actual instance of `KratosUpdateLoginFlowWithLookupSecretMethod`. If the actual instance is not `KratosUpdateLoginFlowWithLookupSecretMethod`, + /// Get the actual instance of `KratosUpdateLoginFlowWithPasswordMethod`. If the actual instance is not `KratosUpdateLoginFlowWithPasswordMethod`, /// the InvalidClassException will be thrown /// - /// An instance of KratosUpdateLoginFlowWithLookupSecretMethod - public KratosUpdateLoginFlowWithLookupSecretMethod GetKratosUpdateLoginFlowWithLookupSecretMethod() + /// An instance of KratosUpdateLoginFlowWithPasswordMethod + public KratosUpdateLoginFlowWithPasswordMethod GetKratosUpdateLoginFlowWithPasswordMethod() { - return (KratosUpdateLoginFlowWithLookupSecretMethod)this.ActualInstance; + return (KratosUpdateLoginFlowWithPasswordMethod)this.ActualInstance; } /// @@ -182,16 +171,6 @@ public KratosUpdateLoginFlowWithOidcMethod GetKratosUpdateLoginFlowWithOidcMetho return (KratosUpdateLoginFlowWithOidcMethod)this.ActualInstance; } - /// - /// Get the actual instance of `KratosUpdateLoginFlowWithPasswordMethod`. If the actual instance is not `KratosUpdateLoginFlowWithPasswordMethod`, - /// the InvalidClassException will be thrown - /// - /// An instance of KratosUpdateLoginFlowWithPasswordMethod - public KratosUpdateLoginFlowWithPasswordMethod GetKratosUpdateLoginFlowWithPasswordMethod() - { - return (KratosUpdateLoginFlowWithPasswordMethod)this.ActualInstance; - } - /// /// Get the actual instance of `KratosUpdateLoginFlowWithTotpMethod`. If the actual instance is not `KratosUpdateLoginFlowWithTotpMethod`, /// the InvalidClassException will be thrown @@ -212,6 +191,26 @@ public KratosUpdateLoginFlowWithWebAuthnMethod GetKratosUpdateLoginFlowWithWebAu return (KratosUpdateLoginFlowWithWebAuthnMethod)this.ActualInstance; } + /// + /// Get the actual instance of `KratosUpdateLoginFlowWithLookupSecretMethod`. If the actual instance is not `KratosUpdateLoginFlowWithLookupSecretMethod`, + /// the InvalidClassException will be thrown + /// + /// An instance of KratosUpdateLoginFlowWithLookupSecretMethod + public KratosUpdateLoginFlowWithLookupSecretMethod GetKratosUpdateLoginFlowWithLookupSecretMethod() + { + return (KratosUpdateLoginFlowWithLookupSecretMethod)this.ActualInstance; + } + + /// + /// Get the actual instance of `KratosUpdateLoginFlowWithCodeMethod`. If the actual instance is not `KratosUpdateLoginFlowWithCodeMethod`, + /// the InvalidClassException will be thrown + /// + /// An instance of KratosUpdateLoginFlowWithCodeMethod + public KratosUpdateLoginFlowWithCodeMethod GetKratosUpdateLoginFlowWithCodeMethod() + { + return (KratosUpdateLoginFlowWithCodeMethod)this.ActualInstance; + } + /// /// Returns the string presentation of the object /// @@ -376,50 +375,13 @@ public static KratosUpdateLoginFlowBody FromJson(string jsonString) } else if (match > 1) { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + String.Join(",", matchedTypes)); } // deserialization is considered successful at this point if no exception has been thrown. return newKratosUpdateLoginFlowBody; } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateLoginFlowBody); - } - - /// - /// Returns true if KratosUpdateLoginFlowBody instances are equal - /// - /// Instance of KratosUpdateLoginFlowBody to be compared - /// Boolean - public bool Equals(KratosUpdateLoginFlowBody input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance @@ -458,11 +420,15 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s /// The object converted from the JSON string public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - if(reader.TokenType != JsonToken.Null) + switch(reader.TokenType) { - return KratosUpdateLoginFlowBody.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartObject: + return KratosUpdateLoginFlowBody.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return KratosUpdateLoginFlowBody.FromJson(JArray.Load(reader).ToString(Formatting.None)); + default: + return null; } - return null; } /// diff --git a/Ory.Kratos.Client/Model/KratosUpdateLoginFlowWithCodeMethod.cs b/Ory.Kratos.Client/Model/KratosUpdateLoginFlowWithCodeMethod.cs index f8e268da..8c02ad82 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateLoginFlowWithCodeMethod.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateLoginFlowWithCodeMethod.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Update Login flow using the code method /// [DataContract(Name = "updateLoginFlowWithCodeMethod")] - public partial class KratosUpdateLoginFlowWithCodeMethod : IEquatable, IValidatableObject + public partial class KratosUpdateLoginFlowWithCodeMethod : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUpdateLoginFlowWithCodeMethod() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUpdateLoginFlowWithCodeMethod() { } /// /// Initializes a new instance of the class. /// @@ -51,19 +47,20 @@ protected KratosUpdateLoginFlowWithCodeMethod() public KratosUpdateLoginFlowWithCodeMethod(string code = default(string), string csrfToken = default(string), string identifier = default(string), string method = default(string), string resend = default(string)) { // to ensure "csrfToken" is required (not null) - if (csrfToken == null) { + if (csrfToken == null) + { throw new ArgumentNullException("csrfToken is a required property for KratosUpdateLoginFlowWithCodeMethod and cannot be null"); } this.CsrfToken = csrfToken; // to ensure "method" is required (not null) - if (method == null) { + if (method == null) + { throw new ArgumentNullException("method is a required property for KratosUpdateLoginFlowWithCodeMethod and cannot be null"); } this.Method = method; this.Code = code; this.Identifier = identifier; this.Resend = resend; - this.AdditionalProperties = new Dictionary(); } /// @@ -77,7 +74,7 @@ protected KratosUpdateLoginFlowWithCodeMethod() /// CSRFToken is the anti-CSRF token /// /// CSRFToken is the anti-CSRF token - [DataMember(Name = "csrf_token", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "csrf_token", IsRequired = true, EmitDefaultValue = true)] public string CsrfToken { get; set; } /// @@ -91,7 +88,7 @@ protected KratosUpdateLoginFlowWithCodeMethod() /// Method should be set to \"code\" when logging in using the code strategy. /// /// Method should be set to \"code\" when logging in using the code strategy. - [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = true)] public string Method { get; set; } /// @@ -101,12 +98,6 @@ protected KratosUpdateLoginFlowWithCodeMethod() [DataMember(Name = "resend", EmitDefaultValue = false)] public string Resend { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -120,7 +111,6 @@ public override string ToString() sb.Append(" Identifier: ").Append(Identifier).Append("\n"); sb.Append(" Method: ").Append(Method).Append("\n"); sb.Append(" Resend: ").Append(Resend).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -134,99 +124,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateLoginFlowWithCodeMethod); - } - - /// - /// Returns true if KratosUpdateLoginFlowWithCodeMethod instances are equal - /// - /// Instance of KratosUpdateLoginFlowWithCodeMethod to be compared - /// Boolean - public bool Equals(KratosUpdateLoginFlowWithCodeMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.CsrfToken == input.CsrfToken || - (this.CsrfToken != null && - this.CsrfToken.Equals(input.CsrfToken)) - ) && - ( - this.Identifier == input.Identifier || - (this.Identifier != null && - this.Identifier.Equals(input.Identifier)) - ) && - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) && - ( - this.Resend == input.Resend || - (this.Resend != null && - this.Resend.Equals(input.Resend)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.CsrfToken != null) - { - hashCode = (hashCode * 59) + this.CsrfToken.GetHashCode(); - } - if (this.Identifier != null) - { - hashCode = (hashCode * 59) + this.Identifier.GetHashCode(); - } - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.Resend != null) - { - hashCode = (hashCode * 59) + this.Resend.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUpdateLoginFlowWithLookupSecretMethod.cs b/Ory.Kratos.Client/Model/KratosUpdateLoginFlowWithLookupSecretMethod.cs index a3d17e92..c1d083aa 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateLoginFlowWithLookupSecretMethod.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateLoginFlowWithLookupSecretMethod.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Update Login Flow with Lookup Secret Method /// [DataContract(Name = "updateLoginFlowWithLookupSecretMethod")] - public partial class KratosUpdateLoginFlowWithLookupSecretMethod : IEquatable, IValidatableObject + public partial class KratosUpdateLoginFlowWithLookupSecretMethod : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUpdateLoginFlowWithLookupSecretMethod() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUpdateLoginFlowWithLookupSecretMethod() { } /// /// Initializes a new instance of the class. /// @@ -49,17 +45,18 @@ protected KratosUpdateLoginFlowWithLookupSecretMethod() public KratosUpdateLoginFlowWithLookupSecretMethod(string csrfToken = default(string), string lookupSecret = default(string), string method = default(string)) { // to ensure "lookupSecret" is required (not null) - if (lookupSecret == null) { + if (lookupSecret == null) + { throw new ArgumentNullException("lookupSecret is a required property for KratosUpdateLoginFlowWithLookupSecretMethod and cannot be null"); } this.LookupSecret = lookupSecret; // to ensure "method" is required (not null) - if (method == null) { + if (method == null) + { throw new ArgumentNullException("method is a required property for KratosUpdateLoginFlowWithLookupSecretMethod and cannot be null"); } this.Method = method; this.CsrfToken = csrfToken; - this.AdditionalProperties = new Dictionary(); } /// @@ -73,22 +70,16 @@ protected KratosUpdateLoginFlowWithLookupSecretMethod() /// The lookup secret. /// /// The lookup secret. - [DataMember(Name = "lookup_secret", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "lookup_secret", IsRequired = true, EmitDefaultValue = true)] public string LookupSecret { get; set; } /// /// Method should be set to \"lookup_secret\" when logging in using the lookup_secret strategy. /// /// Method should be set to \"lookup_secret\" when logging in using the lookup_secret strategy. - [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = true)] public string Method { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -100,7 +91,6 @@ public override string ToString() sb.Append(" CsrfToken: ").Append(CsrfToken).Append("\n"); sb.Append(" LookupSecret: ").Append(LookupSecret).Append("\n"); sb.Append(" Method: ").Append(Method).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -114,81 +104,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateLoginFlowWithLookupSecretMethod); - } - - /// - /// Returns true if KratosUpdateLoginFlowWithLookupSecretMethod instances are equal - /// - /// Instance of KratosUpdateLoginFlowWithLookupSecretMethod to be compared - /// Boolean - public bool Equals(KratosUpdateLoginFlowWithLookupSecretMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.CsrfToken == input.CsrfToken || - (this.CsrfToken != null && - this.CsrfToken.Equals(input.CsrfToken)) - ) && - ( - this.LookupSecret == input.LookupSecret || - (this.LookupSecret != null && - this.LookupSecret.Equals(input.LookupSecret)) - ) && - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CsrfToken != null) - { - hashCode = (hashCode * 59) + this.CsrfToken.GetHashCode(); - } - if (this.LookupSecret != null) - { - hashCode = (hashCode * 59) + this.LookupSecret.GetHashCode(); - } - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUpdateLoginFlowWithOidcMethod.cs b/Ory.Kratos.Client/Model/KratosUpdateLoginFlowWithOidcMethod.cs index c8fbdc9f..47d45ff5 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateLoginFlowWithOidcMethod.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateLoginFlowWithOidcMethod.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Update Login Flow with OpenID Connect Method /// [DataContract(Name = "updateLoginFlowWithOidcMethod")] - public partial class KratosUpdateLoginFlowWithOidcMethod : IEquatable, IValidatableObject + public partial class KratosUpdateLoginFlowWithOidcMethod : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUpdateLoginFlowWithOidcMethod() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUpdateLoginFlowWithOidcMethod() { } /// /// Initializes a new instance of the class. /// @@ -53,12 +49,14 @@ protected KratosUpdateLoginFlowWithOidcMethod() public KratosUpdateLoginFlowWithOidcMethod(string csrfToken = default(string), string idToken = default(string), string idTokenNonce = default(string), string method = default(string), string provider = default(string), Object traits = default(Object), Object upstreamParameters = default(Object)) { // to ensure "method" is required (not null) - if (method == null) { + if (method == null) + { throw new ArgumentNullException("method is a required property for KratosUpdateLoginFlowWithOidcMethod and cannot be null"); } this.Method = method; // to ensure "provider" is required (not null) - if (provider == null) { + if (provider == null) + { throw new ArgumentNullException("provider is a required property for KratosUpdateLoginFlowWithOidcMethod and cannot be null"); } this.Provider = provider; @@ -67,7 +65,6 @@ protected KratosUpdateLoginFlowWithOidcMethod() this.IdTokenNonce = idTokenNonce; this.Traits = traits; this.UpstreamParameters = upstreamParameters; - this.AdditionalProperties = new Dictionary(); } /// @@ -95,14 +92,14 @@ protected KratosUpdateLoginFlowWithOidcMethod() /// Method to use This field must be set to `oidc` when using the oidc method. /// /// Method to use This field must be set to `oidc` when using the oidc method. - [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = true)] public string Method { get; set; } /// /// The provider to register with /// /// The provider to register with - [DataMember(Name = "provider", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "provider", IsRequired = true, EmitDefaultValue = true)] public string Provider { get; set; } /// @@ -119,12 +116,6 @@ protected KratosUpdateLoginFlowWithOidcMethod() [DataMember(Name = "upstream_parameters", EmitDefaultValue = false)] public Object UpstreamParameters { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -140,7 +131,6 @@ public override string ToString() sb.Append(" Provider: ").Append(Provider).Append("\n"); sb.Append(" Traits: ").Append(Traits).Append("\n"); sb.Append(" UpstreamParameters: ").Append(UpstreamParameters).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -154,117 +144,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateLoginFlowWithOidcMethod); - } - - /// - /// Returns true if KratosUpdateLoginFlowWithOidcMethod instances are equal - /// - /// Instance of KratosUpdateLoginFlowWithOidcMethod to be compared - /// Boolean - public bool Equals(KratosUpdateLoginFlowWithOidcMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.CsrfToken == input.CsrfToken || - (this.CsrfToken != null && - this.CsrfToken.Equals(input.CsrfToken)) - ) && - ( - this.IdToken == input.IdToken || - (this.IdToken != null && - this.IdToken.Equals(input.IdToken)) - ) && - ( - this.IdTokenNonce == input.IdTokenNonce || - (this.IdTokenNonce != null && - this.IdTokenNonce.Equals(input.IdTokenNonce)) - ) && - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) && - ( - this.Provider == input.Provider || - (this.Provider != null && - this.Provider.Equals(input.Provider)) - ) && - ( - this.Traits == input.Traits || - (this.Traits != null && - this.Traits.Equals(input.Traits)) - ) && - ( - this.UpstreamParameters == input.UpstreamParameters || - (this.UpstreamParameters != null && - this.UpstreamParameters.Equals(input.UpstreamParameters)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CsrfToken != null) - { - hashCode = (hashCode * 59) + this.CsrfToken.GetHashCode(); - } - if (this.IdToken != null) - { - hashCode = (hashCode * 59) + this.IdToken.GetHashCode(); - } - if (this.IdTokenNonce != null) - { - hashCode = (hashCode * 59) + this.IdTokenNonce.GetHashCode(); - } - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.Provider != null) - { - hashCode = (hashCode * 59) + this.Provider.GetHashCode(); - } - if (this.Traits != null) - { - hashCode = (hashCode * 59) + this.Traits.GetHashCode(); - } - if (this.UpstreamParameters != null) - { - hashCode = (hashCode * 59) + this.UpstreamParameters.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUpdateLoginFlowWithPasswordMethod.cs b/Ory.Kratos.Client/Model/KratosUpdateLoginFlowWithPasswordMethod.cs index b5190803..1e744c23 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateLoginFlowWithPasswordMethod.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateLoginFlowWithPasswordMethod.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Update Login Flow with Password Method /// [DataContract(Name = "updateLoginFlowWithPasswordMethod")] - public partial class KratosUpdateLoginFlowWithPasswordMethod : IEquatable, IValidatableObject + public partial class KratosUpdateLoginFlowWithPasswordMethod : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUpdateLoginFlowWithPasswordMethod() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUpdateLoginFlowWithPasswordMethod() { } /// /// Initializes a new instance of the class. /// @@ -51,23 +47,25 @@ protected KratosUpdateLoginFlowWithPasswordMethod() public KratosUpdateLoginFlowWithPasswordMethod(string csrfToken = default(string), string identifier = default(string), string method = default(string), string password = default(string), string passwordIdentifier = default(string)) { // to ensure "identifier" is required (not null) - if (identifier == null) { + if (identifier == null) + { throw new ArgumentNullException("identifier is a required property for KratosUpdateLoginFlowWithPasswordMethod and cannot be null"); } this.Identifier = identifier; // to ensure "method" is required (not null) - if (method == null) { + if (method == null) + { throw new ArgumentNullException("method is a required property for KratosUpdateLoginFlowWithPasswordMethod and cannot be null"); } this.Method = method; // to ensure "password" is required (not null) - if (password == null) { + if (password == null) + { throw new ArgumentNullException("password is a required property for KratosUpdateLoginFlowWithPasswordMethod and cannot be null"); } this.Password = password; this.CsrfToken = csrfToken; this.PasswordIdentifier = passwordIdentifier; - this.AdditionalProperties = new Dictionary(); } /// @@ -81,21 +79,21 @@ protected KratosUpdateLoginFlowWithPasswordMethod() /// 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. - [DataMember(Name = "identifier", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "identifier", IsRequired = true, EmitDefaultValue = true)] public string Identifier { get; set; } /// /// Method should be set to \"password\" when logging in using the identifier and password strategy. /// /// Method should be set to \"password\" when logging in using the identifier and password strategy. - [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = true)] public string Method { get; set; } /// /// The user's password. /// /// The user's password. - [DataMember(Name = "password", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "password", IsRequired = true, EmitDefaultValue = true)] public string Password { get; set; } /// @@ -105,12 +103,6 @@ protected KratosUpdateLoginFlowWithPasswordMethod() [DataMember(Name = "password_identifier", EmitDefaultValue = false)] public string PasswordIdentifier { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -124,7 +116,6 @@ public override string ToString() sb.Append(" Method: ").Append(Method).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" PasswordIdentifier: ").Append(PasswordIdentifier).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -138,99 +129,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateLoginFlowWithPasswordMethod); - } - - /// - /// Returns true if KratosUpdateLoginFlowWithPasswordMethod instances are equal - /// - /// Instance of KratosUpdateLoginFlowWithPasswordMethod to be compared - /// Boolean - public bool Equals(KratosUpdateLoginFlowWithPasswordMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.CsrfToken == input.CsrfToken || - (this.CsrfToken != null && - this.CsrfToken.Equals(input.CsrfToken)) - ) && - ( - this.Identifier == input.Identifier || - (this.Identifier != null && - this.Identifier.Equals(input.Identifier)) - ) && - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) && - ( - this.PasswordIdentifier == input.PasswordIdentifier || - (this.PasswordIdentifier != null && - this.PasswordIdentifier.Equals(input.PasswordIdentifier)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CsrfToken != null) - { - hashCode = (hashCode * 59) + this.CsrfToken.GetHashCode(); - } - if (this.Identifier != null) - { - hashCode = (hashCode * 59) + this.Identifier.GetHashCode(); - } - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.Password != null) - { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); - } - if (this.PasswordIdentifier != null) - { - hashCode = (hashCode * 59) + this.PasswordIdentifier.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUpdateLoginFlowWithTotpMethod.cs b/Ory.Kratos.Client/Model/KratosUpdateLoginFlowWithTotpMethod.cs index 7809dd83..a7458010 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateLoginFlowWithTotpMethod.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateLoginFlowWithTotpMethod.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Update Login Flow with TOTP Method /// [DataContract(Name = "updateLoginFlowWithTotpMethod")] - public partial class KratosUpdateLoginFlowWithTotpMethod : IEquatable, IValidatableObject + public partial class KratosUpdateLoginFlowWithTotpMethod : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUpdateLoginFlowWithTotpMethod() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUpdateLoginFlowWithTotpMethod() { } /// /// Initializes a new instance of the class. /// @@ -49,17 +45,18 @@ protected KratosUpdateLoginFlowWithTotpMethod() public KratosUpdateLoginFlowWithTotpMethod(string csrfToken = default(string), string method = default(string), string totpCode = default(string)) { // to ensure "method" is required (not null) - if (method == null) { + if (method == null) + { throw new ArgumentNullException("method is a required property for KratosUpdateLoginFlowWithTotpMethod and cannot be null"); } this.Method = method; // to ensure "totpCode" is required (not null) - if (totpCode == null) { + if (totpCode == null) + { throw new ArgumentNullException("totpCode is a required property for KratosUpdateLoginFlowWithTotpMethod and cannot be null"); } this.TotpCode = totpCode; this.CsrfToken = csrfToken; - this.AdditionalProperties = new Dictionary(); } /// @@ -73,22 +70,16 @@ protected KratosUpdateLoginFlowWithTotpMethod() /// Method should be set to \"totp\" when logging in using the TOTP strategy. /// /// Method should be set to \"totp\" when logging in using the TOTP strategy. - [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = true)] public string Method { get; set; } /// /// The TOTP code. /// /// The TOTP code. - [DataMember(Name = "totp_code", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "totp_code", IsRequired = true, EmitDefaultValue = true)] public string TotpCode { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -100,7 +91,6 @@ public override string ToString() sb.Append(" CsrfToken: ").Append(CsrfToken).Append("\n"); sb.Append(" Method: ").Append(Method).Append("\n"); sb.Append(" TotpCode: ").Append(TotpCode).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -114,81 +104,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateLoginFlowWithTotpMethod); - } - - /// - /// Returns true if KratosUpdateLoginFlowWithTotpMethod instances are equal - /// - /// Instance of KratosUpdateLoginFlowWithTotpMethod to be compared - /// Boolean - public bool Equals(KratosUpdateLoginFlowWithTotpMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.CsrfToken == input.CsrfToken || - (this.CsrfToken != null && - this.CsrfToken.Equals(input.CsrfToken)) - ) && - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) && - ( - this.TotpCode == input.TotpCode || - (this.TotpCode != null && - this.TotpCode.Equals(input.TotpCode)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CsrfToken != null) - { - hashCode = (hashCode * 59) + this.CsrfToken.GetHashCode(); - } - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.TotpCode != null) - { - hashCode = (hashCode * 59) + this.TotpCode.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUpdateLoginFlowWithWebAuthnMethod.cs b/Ory.Kratos.Client/Model/KratosUpdateLoginFlowWithWebAuthnMethod.cs index 5751deea..14e4e2d8 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateLoginFlowWithWebAuthnMethod.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateLoginFlowWithWebAuthnMethod.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Update Login Flow with WebAuthn Method /// [DataContract(Name = "updateLoginFlowWithWebAuthnMethod")] - public partial class KratosUpdateLoginFlowWithWebAuthnMethod : IEquatable, IValidatableObject + public partial class KratosUpdateLoginFlowWithWebAuthnMethod : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUpdateLoginFlowWithWebAuthnMethod() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUpdateLoginFlowWithWebAuthnMethod() { } /// /// Initializes a new instance of the class. /// @@ -50,18 +46,19 @@ protected KratosUpdateLoginFlowWithWebAuthnMethod() public KratosUpdateLoginFlowWithWebAuthnMethod(string csrfToken = default(string), string identifier = default(string), string method = default(string), string webauthnLogin = default(string)) { // to ensure "identifier" is required (not null) - if (identifier == null) { + if (identifier == null) + { throw new ArgumentNullException("identifier is a required property for KratosUpdateLoginFlowWithWebAuthnMethod and cannot be null"); } this.Identifier = identifier; // to ensure "method" is required (not null) - if (method == null) { + if (method == null) + { throw new ArgumentNullException("method is a required property for KratosUpdateLoginFlowWithWebAuthnMethod and cannot be null"); } this.Method = method; this.CsrfToken = csrfToken; this.WebauthnLogin = webauthnLogin; - this.AdditionalProperties = new Dictionary(); } /// @@ -75,14 +72,14 @@ protected KratosUpdateLoginFlowWithWebAuthnMethod() /// 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. - [DataMember(Name = "identifier", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "identifier", IsRequired = true, EmitDefaultValue = true)] public string Identifier { get; set; } /// /// Method should be set to \"webAuthn\" when logging in using the WebAuthn strategy. /// /// Method should be set to \"webAuthn\" when logging in using the WebAuthn strategy. - [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = true)] public string Method { get; set; } /// @@ -92,12 +89,6 @@ protected KratosUpdateLoginFlowWithWebAuthnMethod() [DataMember(Name = "webauthn_login", EmitDefaultValue = false)] public string WebauthnLogin { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -110,7 +101,6 @@ public override string ToString() sb.Append(" Identifier: ").Append(Identifier).Append("\n"); sb.Append(" Method: ").Append(Method).Append("\n"); sb.Append(" WebauthnLogin: ").Append(WebauthnLogin).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -124,90 +114,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateLoginFlowWithWebAuthnMethod); - } - - /// - /// Returns true if KratosUpdateLoginFlowWithWebAuthnMethod instances are equal - /// - /// Instance of KratosUpdateLoginFlowWithWebAuthnMethod to be compared - /// Boolean - public bool Equals(KratosUpdateLoginFlowWithWebAuthnMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.CsrfToken == input.CsrfToken || - (this.CsrfToken != null && - this.CsrfToken.Equals(input.CsrfToken)) - ) && - ( - this.Identifier == input.Identifier || - (this.Identifier != null && - this.Identifier.Equals(input.Identifier)) - ) && - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) && - ( - this.WebauthnLogin == input.WebauthnLogin || - (this.WebauthnLogin != null && - this.WebauthnLogin.Equals(input.WebauthnLogin)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CsrfToken != null) - { - hashCode = (hashCode * 59) + this.CsrfToken.GetHashCode(); - } - if (this.Identifier != null) - { - hashCode = (hashCode * 59) + this.Identifier.GetHashCode(); - } - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.WebauthnLogin != null) - { - hashCode = (hashCode * 59) + this.WebauthnLogin.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUpdateRecoveryFlowBody.cs b/Ory.Kratos.Client/Model/KratosUpdateRecoveryFlowBody.cs index 2b592d66..302a4987 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateRecoveryFlowBody.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateRecoveryFlowBody.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -33,14 +32,14 @@ namespace Ory.Kratos.Client.Model /// [JsonConverter(typeof(KratosUpdateRecoveryFlowBodyJsonConverter))] [DataContract(Name = "updateRecoveryFlowBody")] - public partial class KratosUpdateRecoveryFlowBody : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class KratosUpdateRecoveryFlowBody : AbstractOpenAPISchema, IValidatableObject { /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosUpdateRecoveryFlowWithCodeMethod. - public KratosUpdateRecoveryFlowBody(KratosUpdateRecoveryFlowWithCodeMethod actualInstance) + /// An instance of KratosUpdateRecoveryFlowWithLinkMethod. + public KratosUpdateRecoveryFlowBody(KratosUpdateRecoveryFlowWithLinkMethod actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -49,10 +48,10 @@ public KratosUpdateRecoveryFlowBody(KratosUpdateRecoveryFlowWithCodeMethod actua /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosUpdateRecoveryFlowWithLinkMethod. - public KratosUpdateRecoveryFlowBody(KratosUpdateRecoveryFlowWithLinkMethod actualInstance) + /// An instance of KratosUpdateRecoveryFlowWithCodeMethod. + public KratosUpdateRecoveryFlowBody(KratosUpdateRecoveryFlowWithCodeMethod actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -89,23 +88,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `KratosUpdateRecoveryFlowWithCodeMethod`. If the actual instance is not `KratosUpdateRecoveryFlowWithCodeMethod`, + /// Get the actual instance of `KratosUpdateRecoveryFlowWithLinkMethod`. If the actual instance is not `KratosUpdateRecoveryFlowWithLinkMethod`, /// the InvalidClassException will be thrown /// - /// An instance of KratosUpdateRecoveryFlowWithCodeMethod - public KratosUpdateRecoveryFlowWithCodeMethod GetKratosUpdateRecoveryFlowWithCodeMethod() + /// An instance of KratosUpdateRecoveryFlowWithLinkMethod + public KratosUpdateRecoveryFlowWithLinkMethod GetKratosUpdateRecoveryFlowWithLinkMethod() { - return (KratosUpdateRecoveryFlowWithCodeMethod)this.ActualInstance; + return (KratosUpdateRecoveryFlowWithLinkMethod)this.ActualInstance; } /// - /// Get the actual instance of `KratosUpdateRecoveryFlowWithLinkMethod`. If the actual instance is not `KratosUpdateRecoveryFlowWithLinkMethod`, + /// Get the actual instance of `KratosUpdateRecoveryFlowWithCodeMethod`. If the actual instance is not `KratosUpdateRecoveryFlowWithCodeMethod`, /// the InvalidClassException will be thrown /// - /// An instance of KratosUpdateRecoveryFlowWithLinkMethod - public KratosUpdateRecoveryFlowWithLinkMethod GetKratosUpdateRecoveryFlowWithLinkMethod() + /// An instance of KratosUpdateRecoveryFlowWithCodeMethod + public KratosUpdateRecoveryFlowWithCodeMethod GetKratosUpdateRecoveryFlowWithCodeMethod() { - return (KratosUpdateRecoveryFlowWithLinkMethod)this.ActualInstance; + return (KratosUpdateRecoveryFlowWithCodeMethod)this.ActualInstance; } /// @@ -192,50 +191,13 @@ public static KratosUpdateRecoveryFlowBody FromJson(string jsonString) } else if (match > 1) { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + String.Join(",", matchedTypes)); } // deserialization is considered successful at this point if no exception has been thrown. return newKratosUpdateRecoveryFlowBody; } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateRecoveryFlowBody); - } - - /// - /// Returns true if KratosUpdateRecoveryFlowBody instances are equal - /// - /// Instance of KratosUpdateRecoveryFlowBody to be compared - /// Boolean - public bool Equals(KratosUpdateRecoveryFlowBody input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance @@ -274,11 +236,15 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s /// The object converted from the JSON string public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - if(reader.TokenType != JsonToken.Null) + switch(reader.TokenType) { - return KratosUpdateRecoveryFlowBody.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartObject: + return KratosUpdateRecoveryFlowBody.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return KratosUpdateRecoveryFlowBody.FromJson(JArray.Load(reader).ToString(Formatting.None)); + default: + return null; } - return null; } /// diff --git a/Ory.Kratos.Client/Model/KratosUpdateRecoveryFlowWithCodeMethod.cs b/Ory.Kratos.Client/Model/KratosUpdateRecoveryFlowWithCodeMethod.cs index e364c2ad..17b43565 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateRecoveryFlowWithCodeMethod.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateRecoveryFlowWithCodeMethod.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// Update Recovery Flow with Code Method /// [DataContract(Name = "updateRecoveryFlowWithCodeMethod")] - public partial class KratosUpdateRecoveryFlowWithCodeMethod : IEquatable, IValidatableObject + public partial class KratosUpdateRecoveryFlowWithCodeMethod : IValidatableObject { /// /// Method is the method that should be used for this recovery flow Allowed values are `link` and `code`. link RecoveryStrategyLink code RecoveryStrategyCode @@ -50,7 +49,6 @@ public enum MethodEnum /// [EnumMember(Value = "code")] Code = 2 - } @@ -58,16 +56,13 @@ public enum MethodEnum /// Method is the method that should be used for this recovery flow Allowed values are `link` and `code`. link RecoveryStrategyLink code RecoveryStrategyCode /// /// Method is the method that should be used for this recovery flow Allowed values are `link` and `code`. link RecoveryStrategyLink code RecoveryStrategyCode - [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = true)] public MethodEnum Method { get; set; } /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUpdateRecoveryFlowWithCodeMethod() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUpdateRecoveryFlowWithCodeMethod() { } /// /// Initializes a new instance of the class. /// @@ -81,7 +76,6 @@ protected KratosUpdateRecoveryFlowWithCodeMethod() this.Code = code; this.CsrfToken = csrfToken; this.Email = email; - this.AdditionalProperties = new Dictionary(); } /// @@ -105,12 +99,6 @@ protected KratosUpdateRecoveryFlowWithCodeMethod() [DataMember(Name = "email", EmitDefaultValue = false)] public string Email { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -123,7 +111,6 @@ public override string ToString() sb.Append(" CsrfToken: ").Append(CsrfToken).Append("\n"); sb.Append(" Email: ").Append(Email).Append("\n"); sb.Append(" Method: ").Append(Method).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -137,86 +124,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateRecoveryFlowWithCodeMethod); - } - - /// - /// Returns true if KratosUpdateRecoveryFlowWithCodeMethod instances are equal - /// - /// Instance of KratosUpdateRecoveryFlowWithCodeMethod to be compared - /// Boolean - public bool Equals(KratosUpdateRecoveryFlowWithCodeMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.CsrfToken == input.CsrfToken || - (this.CsrfToken != null && - this.CsrfToken.Equals(input.CsrfToken)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Method == input.Method || - this.Method.Equals(input.Method) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.CsrfToken != null) - { - hashCode = (hashCode * 59) + this.CsrfToken.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUpdateRecoveryFlowWithLinkMethod.cs b/Ory.Kratos.Client/Model/KratosUpdateRecoveryFlowWithLinkMethod.cs index df5ccfc9..30694f49 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateRecoveryFlowWithLinkMethod.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateRecoveryFlowWithLinkMethod.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// Update Recovery Flow with Link Method /// [DataContract(Name = "updateRecoveryFlowWithLinkMethod")] - public partial class KratosUpdateRecoveryFlowWithLinkMethod : IEquatable, IValidatableObject + public partial class KratosUpdateRecoveryFlowWithLinkMethod : IValidatableObject { /// /// Method is the method that should be used for this recovery flow Allowed values are `link` and `code` link RecoveryStrategyLink code RecoveryStrategyCode @@ -50,7 +49,6 @@ public enum MethodEnum /// [EnumMember(Value = "code")] Code = 2 - } @@ -58,16 +56,13 @@ public enum MethodEnum /// Method is the method that should be used for this recovery flow Allowed values are `link` and `code` link RecoveryStrategyLink code RecoveryStrategyCode /// /// Method is the method that should be used for this recovery flow Allowed values are `link` and `code` link RecoveryStrategyLink code RecoveryStrategyCode - [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = true)] public MethodEnum Method { get; set; } /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUpdateRecoveryFlowWithLinkMethod() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUpdateRecoveryFlowWithLinkMethod() { } /// /// Initializes a new instance of the class. /// @@ -77,13 +72,13 @@ protected KratosUpdateRecoveryFlowWithLinkMethod() public KratosUpdateRecoveryFlowWithLinkMethod(string csrfToken = default(string), string email = default(string), MethodEnum method = default(MethodEnum)) { // to ensure "email" is required (not null) - if (email == null) { + if (email == null) + { throw new ArgumentNullException("email is a required property for KratosUpdateRecoveryFlowWithLinkMethod and cannot be null"); } this.Email = email; this.Method = method; this.CsrfToken = csrfToken; - this.AdditionalProperties = new Dictionary(); } /// @@ -97,15 +92,9 @@ protected KratosUpdateRecoveryFlowWithLinkMethod() /// Email to Recover Needs to be set when initiating the flow. If the email is a registered recovery email, a recovery link will be sent. If the email is not known, a email with details on what happened will be sent instead. format: email /// /// Email to Recover Needs to be set when initiating the flow. If the email is a registered recovery email, a recovery link will be sent. If the email is not known, a email with details on what happened will be sent instead. format: email - [DataMember(Name = "email", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "email", IsRequired = true, EmitDefaultValue = true)] public string Email { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -117,7 +106,6 @@ public override string ToString() sb.Append(" CsrfToken: ").Append(CsrfToken).Append("\n"); sb.Append(" Email: ").Append(Email).Append("\n"); sb.Append(" Method: ").Append(Method).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -131,77 +119,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateRecoveryFlowWithLinkMethod); - } - - /// - /// Returns true if KratosUpdateRecoveryFlowWithLinkMethod instances are equal - /// - /// Instance of KratosUpdateRecoveryFlowWithLinkMethod to be compared - /// Boolean - public bool Equals(KratosUpdateRecoveryFlowWithLinkMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.CsrfToken == input.CsrfToken || - (this.CsrfToken != null && - this.CsrfToken.Equals(input.CsrfToken)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Method == input.Method || - this.Method.Equals(input.Method) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CsrfToken != null) - { - hashCode = (hashCode * 59) + this.CsrfToken.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUpdateRegistrationFlowBody.cs b/Ory.Kratos.Client/Model/KratosUpdateRegistrationFlowBody.cs index 04316105..40c7ae77 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateRegistrationFlowBody.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateRegistrationFlowBody.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -33,14 +32,14 @@ namespace Ory.Kratos.Client.Model /// [JsonConverter(typeof(KratosUpdateRegistrationFlowBodyJsonConverter))] [DataContract(Name = "updateRegistrationFlowBody")] - public partial class KratosUpdateRegistrationFlowBody : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class KratosUpdateRegistrationFlowBody : AbstractOpenAPISchema, IValidatableObject { /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosUpdateRegistrationFlowWithCodeMethod. - public KratosUpdateRegistrationFlowBody(KratosUpdateRegistrationFlowWithCodeMethod actualInstance) + /// An instance of KratosUpdateRegistrationFlowWithPasswordMethod. + public KratosUpdateRegistrationFlowBody(KratosUpdateRegistrationFlowWithPasswordMethod actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -61,10 +60,10 @@ public KratosUpdateRegistrationFlowBody(KratosUpdateRegistrationFlowWithOidcMeth /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosUpdateRegistrationFlowWithPasswordMethod. - public KratosUpdateRegistrationFlowBody(KratosUpdateRegistrationFlowWithPasswordMethod actualInstance) + /// An instance of KratosUpdateRegistrationFlowWithWebAuthnMethod. + public KratosUpdateRegistrationFlowBody(KratosUpdateRegistrationFlowWithWebAuthnMethod actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -73,10 +72,10 @@ public KratosUpdateRegistrationFlowBody(KratosUpdateRegistrationFlowWithPassword /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosUpdateRegistrationFlowWithWebAuthnMethod. - public KratosUpdateRegistrationFlowBody(KratosUpdateRegistrationFlowWithWebAuthnMethod actualInstance) + /// An instance of KratosUpdateRegistrationFlowWithCodeMethod. + public KratosUpdateRegistrationFlowBody(KratosUpdateRegistrationFlowWithCodeMethod actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -121,13 +120,13 @@ public override Object ActualInstance } /// - /// Get the actual instance of `KratosUpdateRegistrationFlowWithCodeMethod`. If the actual instance is not `KratosUpdateRegistrationFlowWithCodeMethod`, + /// Get the actual instance of `KratosUpdateRegistrationFlowWithPasswordMethod`. If the actual instance is not `KratosUpdateRegistrationFlowWithPasswordMethod`, /// the InvalidClassException will be thrown /// - /// An instance of KratosUpdateRegistrationFlowWithCodeMethod - public KratosUpdateRegistrationFlowWithCodeMethod GetKratosUpdateRegistrationFlowWithCodeMethod() + /// An instance of KratosUpdateRegistrationFlowWithPasswordMethod + public KratosUpdateRegistrationFlowWithPasswordMethod GetKratosUpdateRegistrationFlowWithPasswordMethod() { - return (KratosUpdateRegistrationFlowWithCodeMethod)this.ActualInstance; + return (KratosUpdateRegistrationFlowWithPasswordMethod)this.ActualInstance; } /// @@ -141,23 +140,23 @@ public KratosUpdateRegistrationFlowWithOidcMethod GetKratosUpdateRegistrationFlo } /// - /// Get the actual instance of `KratosUpdateRegistrationFlowWithPasswordMethod`. If the actual instance is not `KratosUpdateRegistrationFlowWithPasswordMethod`, + /// Get the actual instance of `KratosUpdateRegistrationFlowWithWebAuthnMethod`. If the actual instance is not `KratosUpdateRegistrationFlowWithWebAuthnMethod`, /// the InvalidClassException will be thrown /// - /// An instance of KratosUpdateRegistrationFlowWithPasswordMethod - public KratosUpdateRegistrationFlowWithPasswordMethod GetKratosUpdateRegistrationFlowWithPasswordMethod() + /// An instance of KratosUpdateRegistrationFlowWithWebAuthnMethod + public KratosUpdateRegistrationFlowWithWebAuthnMethod GetKratosUpdateRegistrationFlowWithWebAuthnMethod() { - return (KratosUpdateRegistrationFlowWithPasswordMethod)this.ActualInstance; + return (KratosUpdateRegistrationFlowWithWebAuthnMethod)this.ActualInstance; } /// - /// Get the actual instance of `KratosUpdateRegistrationFlowWithWebAuthnMethod`. If the actual instance is not `KratosUpdateRegistrationFlowWithWebAuthnMethod`, + /// Get the actual instance of `KratosUpdateRegistrationFlowWithCodeMethod`. If the actual instance is not `KratosUpdateRegistrationFlowWithCodeMethod`, /// the InvalidClassException will be thrown /// - /// An instance of KratosUpdateRegistrationFlowWithWebAuthnMethod - public KratosUpdateRegistrationFlowWithWebAuthnMethod GetKratosUpdateRegistrationFlowWithWebAuthnMethod() + /// An instance of KratosUpdateRegistrationFlowWithCodeMethod + public KratosUpdateRegistrationFlowWithCodeMethod GetKratosUpdateRegistrationFlowWithCodeMethod() { - return (KratosUpdateRegistrationFlowWithWebAuthnMethod)this.ActualInstance; + return (KratosUpdateRegistrationFlowWithCodeMethod)this.ActualInstance; } /// @@ -284,50 +283,13 @@ public static KratosUpdateRegistrationFlowBody FromJson(string jsonString) } else if (match > 1) { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + String.Join(",", matchedTypes)); } // deserialization is considered successful at this point if no exception has been thrown. return newKratosUpdateRegistrationFlowBody; } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateRegistrationFlowBody); - } - - /// - /// Returns true if KratosUpdateRegistrationFlowBody instances are equal - /// - /// Instance of KratosUpdateRegistrationFlowBody to be compared - /// Boolean - public bool Equals(KratosUpdateRegistrationFlowBody input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance @@ -366,11 +328,15 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s /// The object converted from the JSON string public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - if(reader.TokenType != JsonToken.Null) + switch(reader.TokenType) { - return KratosUpdateRegistrationFlowBody.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartObject: + return KratosUpdateRegistrationFlowBody.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return KratosUpdateRegistrationFlowBody.FromJson(JArray.Load(reader).ToString(Formatting.None)); + default: + return null; } - return null; } /// diff --git a/Ory.Kratos.Client/Model/KratosUpdateRegistrationFlowWithCodeMethod.cs b/Ory.Kratos.Client/Model/KratosUpdateRegistrationFlowWithCodeMethod.cs index 60d4ae93..0860ad1f 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateRegistrationFlowWithCodeMethod.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateRegistrationFlowWithCodeMethod.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Update Registration Flow with Code Method /// [DataContract(Name = "updateRegistrationFlowWithCodeMethod")] - public partial class KratosUpdateRegistrationFlowWithCodeMethod : IEquatable, IValidatableObject + public partial class KratosUpdateRegistrationFlowWithCodeMethod : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUpdateRegistrationFlowWithCodeMethod() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUpdateRegistrationFlowWithCodeMethod() { } /// /// Initializes a new instance of the class. /// @@ -52,12 +48,14 @@ protected KratosUpdateRegistrationFlowWithCodeMethod() public KratosUpdateRegistrationFlowWithCodeMethod(string code = default(string), string csrfToken = default(string), string method = default(string), string resend = default(string), Object traits = default(Object), Object transientPayload = default(Object)) { // to ensure "method" is required (not null) - if (method == null) { + if (method == null) + { throw new ArgumentNullException("method is a required property for KratosUpdateRegistrationFlowWithCodeMethod and cannot be null"); } this.Method = method; // to ensure "traits" is required (not null) - if (traits == null) { + if (traits == null) + { throw new ArgumentNullException("traits is a required property for KratosUpdateRegistrationFlowWithCodeMethod and cannot be null"); } this.Traits = traits; @@ -65,7 +63,6 @@ protected KratosUpdateRegistrationFlowWithCodeMethod() this.CsrfToken = csrfToken; this.Resend = resend; this.TransientPayload = transientPayload; - this.AdditionalProperties = new Dictionary(); } /// @@ -86,7 +83,7 @@ protected KratosUpdateRegistrationFlowWithCodeMethod() /// Method to use This field must be set to `code` when using the code method. /// /// Method to use This field must be set to `code` when using the code method. - [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = true)] public string Method { get; set; } /// @@ -100,7 +97,7 @@ protected KratosUpdateRegistrationFlowWithCodeMethod() /// The identity's traits /// /// The identity's traits - [DataMember(Name = "traits", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "traits", IsRequired = true, EmitDefaultValue = true)] public Object Traits { get; set; } /// @@ -110,12 +107,6 @@ protected KratosUpdateRegistrationFlowWithCodeMethod() [DataMember(Name = "transient_payload", EmitDefaultValue = false)] public Object TransientPayload { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -130,7 +121,6 @@ public override string ToString() sb.Append(" Resend: ").Append(Resend).Append("\n"); sb.Append(" Traits: ").Append(Traits).Append("\n"); sb.Append(" TransientPayload: ").Append(TransientPayload).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -144,108 +134,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateRegistrationFlowWithCodeMethod); - } - - /// - /// Returns true if KratosUpdateRegistrationFlowWithCodeMethod instances are equal - /// - /// Instance of KratosUpdateRegistrationFlowWithCodeMethod to be compared - /// Boolean - public bool Equals(KratosUpdateRegistrationFlowWithCodeMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.CsrfToken == input.CsrfToken || - (this.CsrfToken != null && - this.CsrfToken.Equals(input.CsrfToken)) - ) && - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) && - ( - this.Resend == input.Resend || - (this.Resend != null && - this.Resend.Equals(input.Resend)) - ) && - ( - this.Traits == input.Traits || - (this.Traits != null && - this.Traits.Equals(input.Traits)) - ) && - ( - this.TransientPayload == input.TransientPayload || - (this.TransientPayload != null && - this.TransientPayload.Equals(input.TransientPayload)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.CsrfToken != null) - { - hashCode = (hashCode * 59) + this.CsrfToken.GetHashCode(); - } - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.Resend != null) - { - hashCode = (hashCode * 59) + this.Resend.GetHashCode(); - } - if (this.Traits != null) - { - hashCode = (hashCode * 59) + this.Traits.GetHashCode(); - } - if (this.TransientPayload != null) - { - hashCode = (hashCode * 59) + this.TransientPayload.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUpdateRegistrationFlowWithOidcMethod.cs b/Ory.Kratos.Client/Model/KratosUpdateRegistrationFlowWithOidcMethod.cs index fc1290a5..a9717d84 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateRegistrationFlowWithOidcMethod.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateRegistrationFlowWithOidcMethod.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Update Registration Flow with OpenID Connect Method /// [DataContract(Name = "updateRegistrationFlowWithOidcMethod")] - public partial class KratosUpdateRegistrationFlowWithOidcMethod : IEquatable, IValidatableObject + public partial class KratosUpdateRegistrationFlowWithOidcMethod : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUpdateRegistrationFlowWithOidcMethod() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUpdateRegistrationFlowWithOidcMethod() { } /// /// Initializes a new instance of the class. /// @@ -54,12 +50,14 @@ protected KratosUpdateRegistrationFlowWithOidcMethod() public KratosUpdateRegistrationFlowWithOidcMethod(string csrfToken = default(string), string idToken = default(string), string idTokenNonce = default(string), string method = default(string), string provider = default(string), Object traits = default(Object), Object transientPayload = default(Object), Object upstreamParameters = default(Object)) { // to ensure "method" is required (not null) - if (method == null) { + if (method == null) + { throw new ArgumentNullException("method is a required property for KratosUpdateRegistrationFlowWithOidcMethod and cannot be null"); } this.Method = method; // to ensure "provider" is required (not null) - if (provider == null) { + if (provider == null) + { throw new ArgumentNullException("provider is a required property for KratosUpdateRegistrationFlowWithOidcMethod and cannot be null"); } this.Provider = provider; @@ -69,7 +67,6 @@ protected KratosUpdateRegistrationFlowWithOidcMethod() this.Traits = traits; this.TransientPayload = transientPayload; this.UpstreamParameters = upstreamParameters; - this.AdditionalProperties = new Dictionary(); } /// @@ -97,14 +94,14 @@ protected KratosUpdateRegistrationFlowWithOidcMethod() /// Method to use This field must be set to `oidc` when using the oidc method. /// /// Method to use This field must be set to `oidc` when using the oidc method. - [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = true)] public string Method { get; set; } /// /// The provider to register with /// /// The provider to register with - [DataMember(Name = "provider", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "provider", IsRequired = true, EmitDefaultValue = true)] public string Provider { get; set; } /// @@ -128,12 +125,6 @@ protected KratosUpdateRegistrationFlowWithOidcMethod() [DataMember(Name = "upstream_parameters", EmitDefaultValue = false)] public Object UpstreamParameters { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -150,7 +141,6 @@ public override string ToString() sb.Append(" Traits: ").Append(Traits).Append("\n"); sb.Append(" TransientPayload: ").Append(TransientPayload).Append("\n"); sb.Append(" UpstreamParameters: ").Append(UpstreamParameters).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -164,126 +154,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateRegistrationFlowWithOidcMethod); - } - - /// - /// Returns true if KratosUpdateRegistrationFlowWithOidcMethod instances are equal - /// - /// Instance of KratosUpdateRegistrationFlowWithOidcMethod to be compared - /// Boolean - public bool Equals(KratosUpdateRegistrationFlowWithOidcMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.CsrfToken == input.CsrfToken || - (this.CsrfToken != null && - this.CsrfToken.Equals(input.CsrfToken)) - ) && - ( - this.IdToken == input.IdToken || - (this.IdToken != null && - this.IdToken.Equals(input.IdToken)) - ) && - ( - this.IdTokenNonce == input.IdTokenNonce || - (this.IdTokenNonce != null && - this.IdTokenNonce.Equals(input.IdTokenNonce)) - ) && - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) && - ( - this.Provider == input.Provider || - (this.Provider != null && - this.Provider.Equals(input.Provider)) - ) && - ( - this.Traits == input.Traits || - (this.Traits != null && - this.Traits.Equals(input.Traits)) - ) && - ( - this.TransientPayload == input.TransientPayload || - (this.TransientPayload != null && - this.TransientPayload.Equals(input.TransientPayload)) - ) && - ( - this.UpstreamParameters == input.UpstreamParameters || - (this.UpstreamParameters != null && - this.UpstreamParameters.Equals(input.UpstreamParameters)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CsrfToken != null) - { - hashCode = (hashCode * 59) + this.CsrfToken.GetHashCode(); - } - if (this.IdToken != null) - { - hashCode = (hashCode * 59) + this.IdToken.GetHashCode(); - } - if (this.IdTokenNonce != null) - { - hashCode = (hashCode * 59) + this.IdTokenNonce.GetHashCode(); - } - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.Provider != null) - { - hashCode = (hashCode * 59) + this.Provider.GetHashCode(); - } - if (this.Traits != null) - { - hashCode = (hashCode * 59) + this.Traits.GetHashCode(); - } - if (this.TransientPayload != null) - { - hashCode = (hashCode * 59) + this.TransientPayload.GetHashCode(); - } - if (this.UpstreamParameters != null) - { - hashCode = (hashCode * 59) + this.UpstreamParameters.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUpdateRegistrationFlowWithPasswordMethod.cs b/Ory.Kratos.Client/Model/KratosUpdateRegistrationFlowWithPasswordMethod.cs index 9480fdd7..386e9d50 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateRegistrationFlowWithPasswordMethod.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateRegistrationFlowWithPasswordMethod.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Update Registration Flow with Password Method /// [DataContract(Name = "updateRegistrationFlowWithPasswordMethod")] - public partial class KratosUpdateRegistrationFlowWithPasswordMethod : IEquatable, IValidatableObject + public partial class KratosUpdateRegistrationFlowWithPasswordMethod : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUpdateRegistrationFlowWithPasswordMethod() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUpdateRegistrationFlowWithPasswordMethod() { } /// /// Initializes a new instance of the class. /// @@ -51,23 +47,25 @@ protected KratosUpdateRegistrationFlowWithPasswordMethod() public KratosUpdateRegistrationFlowWithPasswordMethod(string csrfToken = default(string), string method = default(string), string password = default(string), Object traits = default(Object), Object transientPayload = default(Object)) { // to ensure "method" is required (not null) - if (method == null) { + if (method == null) + { throw new ArgumentNullException("method is a required property for KratosUpdateRegistrationFlowWithPasswordMethod and cannot be null"); } this.Method = method; // to ensure "password" is required (not null) - if (password == null) { + if (password == null) + { throw new ArgumentNullException("password is a required property for KratosUpdateRegistrationFlowWithPasswordMethod and cannot be null"); } this.Password = password; // to ensure "traits" is required (not null) - if (traits == null) { + if (traits == null) + { throw new ArgumentNullException("traits is a required property for KratosUpdateRegistrationFlowWithPasswordMethod and cannot be null"); } this.Traits = traits; this.CsrfToken = csrfToken; this.TransientPayload = transientPayload; - this.AdditionalProperties = new Dictionary(); } /// @@ -81,21 +79,21 @@ protected KratosUpdateRegistrationFlowWithPasswordMethod() /// Method to use This field must be set to `password` when using the password method. /// /// Method to use This field must be set to `password` when using the password method. - [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = true)] public string Method { get; set; } /// /// Password to sign the user up with /// /// Password to sign the user up with - [DataMember(Name = "password", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "password", IsRequired = true, EmitDefaultValue = true)] public string Password { get; set; } /// /// The identity's traits /// /// The identity's traits - [DataMember(Name = "traits", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "traits", IsRequired = true, EmitDefaultValue = true)] public Object Traits { get; set; } /// @@ -105,12 +103,6 @@ protected KratosUpdateRegistrationFlowWithPasswordMethod() [DataMember(Name = "transient_payload", EmitDefaultValue = false)] public Object TransientPayload { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -124,7 +116,6 @@ public override string ToString() sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" Traits: ").Append(Traits).Append("\n"); sb.Append(" TransientPayload: ").Append(TransientPayload).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -138,99 +129,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateRegistrationFlowWithPasswordMethod); - } - - /// - /// Returns true if KratosUpdateRegistrationFlowWithPasswordMethod instances are equal - /// - /// Instance of KratosUpdateRegistrationFlowWithPasswordMethod to be compared - /// Boolean - public bool Equals(KratosUpdateRegistrationFlowWithPasswordMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.CsrfToken == input.CsrfToken || - (this.CsrfToken != null && - this.CsrfToken.Equals(input.CsrfToken)) - ) && - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) && - ( - this.Traits == input.Traits || - (this.Traits != null && - this.Traits.Equals(input.Traits)) - ) && - ( - this.TransientPayload == input.TransientPayload || - (this.TransientPayload != null && - this.TransientPayload.Equals(input.TransientPayload)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CsrfToken != null) - { - hashCode = (hashCode * 59) + this.CsrfToken.GetHashCode(); - } - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.Password != null) - { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); - } - if (this.Traits != null) - { - hashCode = (hashCode * 59) + this.Traits.GetHashCode(); - } - if (this.TransientPayload != null) - { - hashCode = (hashCode * 59) + this.TransientPayload.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUpdateRegistrationFlowWithWebAuthnMethod.cs b/Ory.Kratos.Client/Model/KratosUpdateRegistrationFlowWithWebAuthnMethod.cs index c96df9ab..491e5728 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateRegistrationFlowWithWebAuthnMethod.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateRegistrationFlowWithWebAuthnMethod.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Update Registration Flow with WebAuthn Method /// [DataContract(Name = "updateRegistrationFlowWithWebAuthnMethod")] - public partial class KratosUpdateRegistrationFlowWithWebAuthnMethod : IEquatable, IValidatableObject + public partial class KratosUpdateRegistrationFlowWithWebAuthnMethod : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUpdateRegistrationFlowWithWebAuthnMethod() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUpdateRegistrationFlowWithWebAuthnMethod() { } /// /// Initializes a new instance of the class. /// @@ -52,12 +48,14 @@ protected KratosUpdateRegistrationFlowWithWebAuthnMethod() public KratosUpdateRegistrationFlowWithWebAuthnMethod(string csrfToken = default(string), string method = default(string), Object traits = default(Object), Object transientPayload = default(Object), string webauthnRegister = default(string), string webauthnRegisterDisplayname = default(string)) { // to ensure "method" is required (not null) - if (method == null) { + if (method == null) + { throw new ArgumentNullException("method is a required property for KratosUpdateRegistrationFlowWithWebAuthnMethod and cannot be null"); } this.Method = method; // to ensure "traits" is required (not null) - if (traits == null) { + if (traits == null) + { throw new ArgumentNullException("traits is a required property for KratosUpdateRegistrationFlowWithWebAuthnMethod and cannot be null"); } this.Traits = traits; @@ -65,7 +63,6 @@ protected KratosUpdateRegistrationFlowWithWebAuthnMethod() this.TransientPayload = transientPayload; this.WebauthnRegister = webauthnRegister; this.WebauthnRegisterDisplayname = webauthnRegisterDisplayname; - this.AdditionalProperties = new Dictionary(); } /// @@ -79,14 +76,14 @@ protected KratosUpdateRegistrationFlowWithWebAuthnMethod() /// Method Should be set to \"webauthn\" when trying to add, update, or remove a webAuthn pairing. /// /// Method Should be set to \"webauthn\" when trying to add, update, or remove a webAuthn pairing. - [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = true)] public string Method { get; set; } /// /// The identity's traits /// /// The identity's traits - [DataMember(Name = "traits", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "traits", IsRequired = true, EmitDefaultValue = true)] public Object Traits { get; set; } /// @@ -110,12 +107,6 @@ protected KratosUpdateRegistrationFlowWithWebAuthnMethod() [DataMember(Name = "webauthn_register_displayname", EmitDefaultValue = false)] public string WebauthnRegisterDisplayname { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -130,7 +121,6 @@ public override string ToString() sb.Append(" TransientPayload: ").Append(TransientPayload).Append("\n"); sb.Append(" WebauthnRegister: ").Append(WebauthnRegister).Append("\n"); sb.Append(" WebauthnRegisterDisplayname: ").Append(WebauthnRegisterDisplayname).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -144,108 +134,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateRegistrationFlowWithWebAuthnMethod); - } - - /// - /// Returns true if KratosUpdateRegistrationFlowWithWebAuthnMethod instances are equal - /// - /// Instance of KratosUpdateRegistrationFlowWithWebAuthnMethod to be compared - /// Boolean - public bool Equals(KratosUpdateRegistrationFlowWithWebAuthnMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.CsrfToken == input.CsrfToken || - (this.CsrfToken != null && - this.CsrfToken.Equals(input.CsrfToken)) - ) && - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) && - ( - this.Traits == input.Traits || - (this.Traits != null && - this.Traits.Equals(input.Traits)) - ) && - ( - this.TransientPayload == input.TransientPayload || - (this.TransientPayload != null && - this.TransientPayload.Equals(input.TransientPayload)) - ) && - ( - this.WebauthnRegister == input.WebauthnRegister || - (this.WebauthnRegister != null && - this.WebauthnRegister.Equals(input.WebauthnRegister)) - ) && - ( - this.WebauthnRegisterDisplayname == input.WebauthnRegisterDisplayname || - (this.WebauthnRegisterDisplayname != null && - this.WebauthnRegisterDisplayname.Equals(input.WebauthnRegisterDisplayname)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CsrfToken != null) - { - hashCode = (hashCode * 59) + this.CsrfToken.GetHashCode(); - } - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.Traits != null) - { - hashCode = (hashCode * 59) + this.Traits.GetHashCode(); - } - if (this.TransientPayload != null) - { - hashCode = (hashCode * 59) + this.TransientPayload.GetHashCode(); - } - if (this.WebauthnRegister != null) - { - hashCode = (hashCode * 59) + this.WebauthnRegister.GetHashCode(); - } - if (this.WebauthnRegisterDisplayname != null) - { - hashCode = (hashCode * 59) + this.WebauthnRegisterDisplayname.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowBody.cs b/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowBody.cs index dc8a4f35..eb6f361b 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowBody.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowBody.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -33,14 +32,14 @@ namespace Ory.Kratos.Client.Model /// [JsonConverter(typeof(KratosUpdateSettingsFlowBodyJsonConverter))] [DataContract(Name = "updateSettingsFlowBody")] - public partial class KratosUpdateSettingsFlowBody : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class KratosUpdateSettingsFlowBody : AbstractOpenAPISchema, IValidatableObject { /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosUpdateSettingsFlowWithLookupMethod. - public KratosUpdateSettingsFlowBody(KratosUpdateSettingsFlowWithLookupMethod actualInstance) + /// An instance of KratosUpdateSettingsFlowWithPasswordMethod. + public KratosUpdateSettingsFlowBody(KratosUpdateSettingsFlowWithPasswordMethod actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -49,10 +48,10 @@ public KratosUpdateSettingsFlowBody(KratosUpdateSettingsFlowWithLookupMethod act /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosUpdateSettingsFlowWithOidcMethod. - public KratosUpdateSettingsFlowBody(KratosUpdateSettingsFlowWithOidcMethod actualInstance) + /// An instance of KratosUpdateSettingsFlowWithProfileMethod. + public KratosUpdateSettingsFlowBody(KratosUpdateSettingsFlowWithProfileMethod actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -61,10 +60,10 @@ public KratosUpdateSettingsFlowBody(KratosUpdateSettingsFlowWithOidcMethod actua /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosUpdateSettingsFlowWithPasswordMethod. - public KratosUpdateSettingsFlowBody(KratosUpdateSettingsFlowWithPasswordMethod actualInstance) + /// An instance of KratosUpdateSettingsFlowWithOidcMethod. + public KratosUpdateSettingsFlowBody(KratosUpdateSettingsFlowWithOidcMethod actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -73,10 +72,10 @@ public KratosUpdateSettingsFlowBody(KratosUpdateSettingsFlowWithPasswordMethod a /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosUpdateSettingsFlowWithProfileMethod. - public KratosUpdateSettingsFlowBody(KratosUpdateSettingsFlowWithProfileMethod actualInstance) + /// An instance of KratosUpdateSettingsFlowWithTotpMethod. + public KratosUpdateSettingsFlowBody(KratosUpdateSettingsFlowWithTotpMethod actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -85,10 +84,10 @@ public KratosUpdateSettingsFlowBody(KratosUpdateSettingsFlowWithProfileMethod ac /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosUpdateSettingsFlowWithTotpMethod. - public KratosUpdateSettingsFlowBody(KratosUpdateSettingsFlowWithTotpMethod actualInstance) + /// An instance of KratosUpdateSettingsFlowWithWebAuthnMethod. + public KratosUpdateSettingsFlowBody(KratosUpdateSettingsFlowWithWebAuthnMethod actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -97,10 +96,10 @@ public KratosUpdateSettingsFlowBody(KratosUpdateSettingsFlowWithTotpMethod actua /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosUpdateSettingsFlowWithWebAuthnMethod. - public KratosUpdateSettingsFlowBody(KratosUpdateSettingsFlowWithWebAuthnMethod actualInstance) + /// An instance of KratosUpdateSettingsFlowWithLookupMethod. + public KratosUpdateSettingsFlowBody(KratosUpdateSettingsFlowWithLookupMethod actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -152,26 +151,6 @@ public override Object ActualInstance } } - /// - /// Get the actual instance of `KratosUpdateSettingsFlowWithLookupMethod`. If the actual instance is not `KratosUpdateSettingsFlowWithLookupMethod`, - /// the InvalidClassException will be thrown - /// - /// An instance of KratosUpdateSettingsFlowWithLookupMethod - public KratosUpdateSettingsFlowWithLookupMethod GetKratosUpdateSettingsFlowWithLookupMethod() - { - return (KratosUpdateSettingsFlowWithLookupMethod)this.ActualInstance; - } - - /// - /// Get the actual instance of `KratosUpdateSettingsFlowWithOidcMethod`. If the actual instance is not `KratosUpdateSettingsFlowWithOidcMethod`, - /// the InvalidClassException will be thrown - /// - /// An instance of KratosUpdateSettingsFlowWithOidcMethod - public KratosUpdateSettingsFlowWithOidcMethod GetKratosUpdateSettingsFlowWithOidcMethod() - { - return (KratosUpdateSettingsFlowWithOidcMethod)this.ActualInstance; - } - /// /// Get the actual instance of `KratosUpdateSettingsFlowWithPasswordMethod`. If the actual instance is not `KratosUpdateSettingsFlowWithPasswordMethod`, /// the InvalidClassException will be thrown @@ -192,6 +171,16 @@ public KratosUpdateSettingsFlowWithProfileMethod GetKratosUpdateSettingsFlowWith return (KratosUpdateSettingsFlowWithProfileMethod)this.ActualInstance; } + /// + /// Get the actual instance of `KratosUpdateSettingsFlowWithOidcMethod`. If the actual instance is not `KratosUpdateSettingsFlowWithOidcMethod`, + /// the InvalidClassException will be thrown + /// + /// An instance of KratosUpdateSettingsFlowWithOidcMethod + public KratosUpdateSettingsFlowWithOidcMethod GetKratosUpdateSettingsFlowWithOidcMethod() + { + return (KratosUpdateSettingsFlowWithOidcMethod)this.ActualInstance; + } + /// /// Get the actual instance of `KratosUpdateSettingsFlowWithTotpMethod`. If the actual instance is not `KratosUpdateSettingsFlowWithTotpMethod`, /// the InvalidClassException will be thrown @@ -212,6 +201,16 @@ public KratosUpdateSettingsFlowWithWebAuthnMethod GetKratosUpdateSettingsFlowWit return (KratosUpdateSettingsFlowWithWebAuthnMethod)this.ActualInstance; } + /// + /// Get the actual instance of `KratosUpdateSettingsFlowWithLookupMethod`. If the actual instance is not `KratosUpdateSettingsFlowWithLookupMethod`, + /// the InvalidClassException will be thrown + /// + /// An instance of KratosUpdateSettingsFlowWithLookupMethod + public KratosUpdateSettingsFlowWithLookupMethod GetKratosUpdateSettingsFlowWithLookupMethod() + { + return (KratosUpdateSettingsFlowWithLookupMethod)this.ActualInstance; + } + /// /// Returns the string presentation of the object /// @@ -376,50 +375,13 @@ public static KratosUpdateSettingsFlowBody FromJson(string jsonString) } else if (match > 1) { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + String.Join(",", matchedTypes)); } // deserialization is considered successful at this point if no exception has been thrown. return newKratosUpdateSettingsFlowBody; } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateSettingsFlowBody); - } - - /// - /// Returns true if KratosUpdateSettingsFlowBody instances are equal - /// - /// Instance of KratosUpdateSettingsFlowBody to be compared - /// Boolean - public bool Equals(KratosUpdateSettingsFlowBody input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance @@ -458,11 +420,15 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s /// The object converted from the JSON string public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - if(reader.TokenType != JsonToken.Null) + switch(reader.TokenType) { - return KratosUpdateSettingsFlowBody.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartObject: + return KratosUpdateSettingsFlowBody.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return KratosUpdateSettingsFlowBody.FromJson(JArray.Load(reader).ToString(Formatting.None)); + default: + return null; } - return null; } /// diff --git a/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowWithLookupMethod.cs b/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowWithLookupMethod.cs index 643c5460..f31ce1eb 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowWithLookupMethod.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowWithLookupMethod.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Update Settings Flow with Lookup Method /// [DataContract(Name = "updateSettingsFlowWithLookupMethod")] - public partial class KratosUpdateSettingsFlowWithLookupMethod : IEquatable, IValidatableObject + public partial class KratosUpdateSettingsFlowWithLookupMethod : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUpdateSettingsFlowWithLookupMethod() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUpdateSettingsFlowWithLookupMethod() { } /// /// Initializes a new instance of the class. /// @@ -52,7 +48,8 @@ protected KratosUpdateSettingsFlowWithLookupMethod() public KratosUpdateSettingsFlowWithLookupMethod(string csrfToken = default(string), bool lookupSecretConfirm = default(bool), bool lookupSecretDisable = default(bool), bool lookupSecretRegenerate = default(bool), bool lookupSecretReveal = default(bool), string method = default(string)) { // to ensure "method" is required (not null) - if (method == null) { + if (method == null) + { throw new ArgumentNullException("method is a required property for KratosUpdateSettingsFlowWithLookupMethod and cannot be null"); } this.Method = method; @@ -61,7 +58,6 @@ protected KratosUpdateSettingsFlowWithLookupMethod() this.LookupSecretDisable = lookupSecretDisable; this.LookupSecretRegenerate = lookupSecretRegenerate; this.LookupSecretReveal = lookupSecretReveal; - this.AdditionalProperties = new Dictionary(); } /// @@ -103,15 +99,9 @@ protected KratosUpdateSettingsFlowWithLookupMethod() /// Method Should be set to \"lookup\" when trying to add, update, or remove a lookup pairing. /// /// Method Should be set to \"lookup\" when trying to add, update, or remove a lookup pairing. - [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = true)] public string Method { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -126,7 +116,6 @@ public override string ToString() sb.Append(" LookupSecretRegenerate: ").Append(LookupSecretRegenerate).Append("\n"); sb.Append(" LookupSecretReveal: ").Append(LookupSecretReveal).Append("\n"); sb.Append(" Method: ").Append(Method).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -140,92 +129,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateSettingsFlowWithLookupMethod); - } - - /// - /// Returns true if KratosUpdateSettingsFlowWithLookupMethod instances are equal - /// - /// Instance of KratosUpdateSettingsFlowWithLookupMethod to be compared - /// Boolean - public bool Equals(KratosUpdateSettingsFlowWithLookupMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.CsrfToken == input.CsrfToken || - (this.CsrfToken != null && - this.CsrfToken.Equals(input.CsrfToken)) - ) && - ( - this.LookupSecretConfirm == input.LookupSecretConfirm || - this.LookupSecretConfirm.Equals(input.LookupSecretConfirm) - ) && - ( - this.LookupSecretDisable == input.LookupSecretDisable || - this.LookupSecretDisable.Equals(input.LookupSecretDisable) - ) && - ( - this.LookupSecretRegenerate == input.LookupSecretRegenerate || - this.LookupSecretRegenerate.Equals(input.LookupSecretRegenerate) - ) && - ( - this.LookupSecretReveal == input.LookupSecretReveal || - this.LookupSecretReveal.Equals(input.LookupSecretReveal) - ) && - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CsrfToken != null) - { - hashCode = (hashCode * 59) + this.CsrfToken.GetHashCode(); - } - hashCode = (hashCode * 59) + this.LookupSecretConfirm.GetHashCode(); - hashCode = (hashCode * 59) + this.LookupSecretDisable.GetHashCode(); - hashCode = (hashCode * 59) + this.LookupSecretRegenerate.GetHashCode(); - hashCode = (hashCode * 59) + this.LookupSecretReveal.GetHashCode(); - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowWithOidcMethod.cs b/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowWithOidcMethod.cs index 7ded8b9c..d1a8cdef 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowWithOidcMethod.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowWithOidcMethod.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Update Settings Flow with OpenID Connect Method /// [DataContract(Name = "updateSettingsFlowWithOidcMethod")] - public partial class KratosUpdateSettingsFlowWithOidcMethod : IEquatable, IValidatableObject + public partial class KratosUpdateSettingsFlowWithOidcMethod : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUpdateSettingsFlowWithOidcMethod() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUpdateSettingsFlowWithOidcMethod() { } /// /// Initializes a new instance of the class. /// @@ -52,7 +48,8 @@ protected KratosUpdateSettingsFlowWithOidcMethod() public KratosUpdateSettingsFlowWithOidcMethod(string flow = default(string), string link = default(string), string method = default(string), Object traits = default(Object), string unlink = default(string), Object upstreamParameters = default(Object)) { // to ensure "method" is required (not null) - if (method == null) { + if (method == null) + { throw new ArgumentNullException("method is a required property for KratosUpdateSettingsFlowWithOidcMethod and cannot be null"); } this.Method = method; @@ -61,7 +58,6 @@ protected KratosUpdateSettingsFlowWithOidcMethod() this.Traits = traits; this.Unlink = unlink; this.UpstreamParameters = upstreamParameters; - this.AdditionalProperties = new Dictionary(); } /// @@ -82,7 +78,7 @@ protected KratosUpdateSettingsFlowWithOidcMethod() /// Method Should be set to profile when trying to update a profile. /// /// Method Should be set to profile when trying to update a profile. - [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = true)] public string Method { get; set; } /// @@ -106,12 +102,6 @@ protected KratosUpdateSettingsFlowWithOidcMethod() [DataMember(Name = "upstream_parameters", EmitDefaultValue = false)] public Object UpstreamParameters { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -126,7 +116,6 @@ public override string ToString() sb.Append(" Traits: ").Append(Traits).Append("\n"); sb.Append(" Unlink: ").Append(Unlink).Append("\n"); sb.Append(" UpstreamParameters: ").Append(UpstreamParameters).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -140,108 +129,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateSettingsFlowWithOidcMethod); - } - - /// - /// Returns true if KratosUpdateSettingsFlowWithOidcMethod instances are equal - /// - /// Instance of KratosUpdateSettingsFlowWithOidcMethod to be compared - /// Boolean - public bool Equals(KratosUpdateSettingsFlowWithOidcMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.Flow == input.Flow || - (this.Flow != null && - this.Flow.Equals(input.Flow)) - ) && - ( - this.Link == input.Link || - (this.Link != null && - this.Link.Equals(input.Link)) - ) && - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) && - ( - this.Traits == input.Traits || - (this.Traits != null && - this.Traits.Equals(input.Traits)) - ) && - ( - this.Unlink == input.Unlink || - (this.Unlink != null && - this.Unlink.Equals(input.Unlink)) - ) && - ( - this.UpstreamParameters == input.UpstreamParameters || - (this.UpstreamParameters != null && - this.UpstreamParameters.Equals(input.UpstreamParameters)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Flow != null) - { - hashCode = (hashCode * 59) + this.Flow.GetHashCode(); - } - if (this.Link != null) - { - hashCode = (hashCode * 59) + this.Link.GetHashCode(); - } - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.Traits != null) - { - hashCode = (hashCode * 59) + this.Traits.GetHashCode(); - } - if (this.Unlink != null) - { - hashCode = (hashCode * 59) + this.Unlink.GetHashCode(); - } - if (this.UpstreamParameters != null) - { - hashCode = (hashCode * 59) + this.UpstreamParameters.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowWithPasswordMethod.cs b/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowWithPasswordMethod.cs index a8ae6023..f0fb4b6f 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowWithPasswordMethod.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowWithPasswordMethod.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Update Settings Flow with Password Method /// [DataContract(Name = "updateSettingsFlowWithPasswordMethod")] - public partial class KratosUpdateSettingsFlowWithPasswordMethod : IEquatable, IValidatableObject + public partial class KratosUpdateSettingsFlowWithPasswordMethod : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUpdateSettingsFlowWithPasswordMethod() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUpdateSettingsFlowWithPasswordMethod() { } /// /// Initializes a new instance of the class. /// @@ -49,17 +45,18 @@ protected KratosUpdateSettingsFlowWithPasswordMethod() public KratosUpdateSettingsFlowWithPasswordMethod(string csrfToken = default(string), string method = default(string), string password = default(string)) { // to ensure "method" is required (not null) - if (method == null) { + if (method == null) + { throw new ArgumentNullException("method is a required property for KratosUpdateSettingsFlowWithPasswordMethod and cannot be null"); } this.Method = method; // to ensure "password" is required (not null) - if (password == null) { + if (password == null) + { throw new ArgumentNullException("password is a required property for KratosUpdateSettingsFlowWithPasswordMethod and cannot be null"); } this.Password = password; this.CsrfToken = csrfToken; - this.AdditionalProperties = new Dictionary(); } /// @@ -73,22 +70,16 @@ protected KratosUpdateSettingsFlowWithPasswordMethod() /// Method Should be set to password when trying to update a password. /// /// Method Should be set to password when trying to update a password. - [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = true)] public string Method { get; set; } /// /// Password is the updated password /// /// Password is the updated password - [DataMember(Name = "password", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "password", IsRequired = true, EmitDefaultValue = true)] public string Password { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -100,7 +91,6 @@ public override string ToString() sb.Append(" CsrfToken: ").Append(CsrfToken).Append("\n"); sb.Append(" Method: ").Append(Method).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -114,81 +104,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateSettingsFlowWithPasswordMethod); - } - - /// - /// Returns true if KratosUpdateSettingsFlowWithPasswordMethod instances are equal - /// - /// Instance of KratosUpdateSettingsFlowWithPasswordMethod to be compared - /// Boolean - public bool Equals(KratosUpdateSettingsFlowWithPasswordMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.CsrfToken == input.CsrfToken || - (this.CsrfToken != null && - this.CsrfToken.Equals(input.CsrfToken)) - ) && - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CsrfToken != null) - { - hashCode = (hashCode * 59) + this.CsrfToken.GetHashCode(); - } - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.Password != null) - { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowWithProfileMethod.cs b/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowWithProfileMethod.cs index eccba3b7..8487da17 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowWithProfileMethod.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowWithProfileMethod.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Update Settings Flow with Profile Method /// [DataContract(Name = "updateSettingsFlowWithProfileMethod")] - public partial class KratosUpdateSettingsFlowWithProfileMethod : IEquatable, IValidatableObject + public partial class KratosUpdateSettingsFlowWithProfileMethod : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUpdateSettingsFlowWithProfileMethod() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUpdateSettingsFlowWithProfileMethod() { } /// /// Initializes a new instance of the class. /// @@ -49,17 +45,18 @@ protected KratosUpdateSettingsFlowWithProfileMethod() public KratosUpdateSettingsFlowWithProfileMethod(string csrfToken = default(string), string method = default(string), Object traits = default(Object)) { // to ensure "method" is required (not null) - if (method == null) { + if (method == null) + { throw new ArgumentNullException("method is a required property for KratosUpdateSettingsFlowWithProfileMethod and cannot be null"); } this.Method = method; // to ensure "traits" is required (not null) - if (traits == null) { + if (traits == null) + { throw new ArgumentNullException("traits is a required property for KratosUpdateSettingsFlowWithProfileMethod and cannot be null"); } this.Traits = traits; this.CsrfToken = csrfToken; - this.AdditionalProperties = new Dictionary(); } /// @@ -73,22 +70,16 @@ protected KratosUpdateSettingsFlowWithProfileMethod() /// Method Should be set to profile when trying to update a profile. /// /// Method Should be set to profile when trying to update a profile. - [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = true)] public string Method { get; set; } /// /// Traits The identity's traits. /// /// Traits The identity's traits. - [DataMember(Name = "traits", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "traits", IsRequired = true, EmitDefaultValue = true)] public Object Traits { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -100,7 +91,6 @@ public override string ToString() sb.Append(" CsrfToken: ").Append(CsrfToken).Append("\n"); sb.Append(" Method: ").Append(Method).Append("\n"); sb.Append(" Traits: ").Append(Traits).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -114,81 +104,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateSettingsFlowWithProfileMethod); - } - - /// - /// Returns true if KratosUpdateSettingsFlowWithProfileMethod instances are equal - /// - /// Instance of KratosUpdateSettingsFlowWithProfileMethod to be compared - /// Boolean - public bool Equals(KratosUpdateSettingsFlowWithProfileMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.CsrfToken == input.CsrfToken || - (this.CsrfToken != null && - this.CsrfToken.Equals(input.CsrfToken)) - ) && - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) && - ( - this.Traits == input.Traits || - (this.Traits != null && - this.Traits.Equals(input.Traits)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CsrfToken != null) - { - hashCode = (hashCode * 59) + this.CsrfToken.GetHashCode(); - } - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.Traits != null) - { - hashCode = (hashCode * 59) + this.Traits.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowWithTotpMethod.cs b/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowWithTotpMethod.cs index 5186c3e3..ead9fc53 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowWithTotpMethod.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowWithTotpMethod.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Update Settings Flow with TOTP Method /// [DataContract(Name = "updateSettingsFlowWithTotpMethod")] - public partial class KratosUpdateSettingsFlowWithTotpMethod : IEquatable, IValidatableObject + public partial class KratosUpdateSettingsFlowWithTotpMethod : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUpdateSettingsFlowWithTotpMethod() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUpdateSettingsFlowWithTotpMethod() { } /// /// Initializes a new instance of the class. /// @@ -50,14 +46,14 @@ protected KratosUpdateSettingsFlowWithTotpMethod() public KratosUpdateSettingsFlowWithTotpMethod(string csrfToken = default(string), string method = default(string), string totpCode = default(string), bool totpUnlink = default(bool)) { // to ensure "method" is required (not null) - if (method == null) { + if (method == null) + { throw new ArgumentNullException("method is a required property for KratosUpdateSettingsFlowWithTotpMethod and cannot be null"); } this.Method = method; this.CsrfToken = csrfToken; this.TotpCode = totpCode; this.TotpUnlink = totpUnlink; - this.AdditionalProperties = new Dictionary(); } /// @@ -71,7 +67,7 @@ protected KratosUpdateSettingsFlowWithTotpMethod() /// Method Should be set to \"totp\" when trying to add, update, or remove a totp pairing. /// /// Method Should be set to \"totp\" when trying to add, update, or remove a totp pairing. - [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = true)] public string Method { get; set; } /// @@ -88,12 +84,6 @@ protected KratosUpdateSettingsFlowWithTotpMethod() [DataMember(Name = "totp_unlink", EmitDefaultValue = true)] public bool TotpUnlink { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -106,7 +96,6 @@ public override string ToString() sb.Append(" Method: ").Append(Method).Append("\n"); sb.Append(" TotpCode: ").Append(TotpCode).Append("\n"); sb.Append(" TotpUnlink: ").Append(TotpUnlink).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -120,86 +109,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateSettingsFlowWithTotpMethod); - } - - /// - /// Returns true if KratosUpdateSettingsFlowWithTotpMethod instances are equal - /// - /// Instance of KratosUpdateSettingsFlowWithTotpMethod to be compared - /// Boolean - public bool Equals(KratosUpdateSettingsFlowWithTotpMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.CsrfToken == input.CsrfToken || - (this.CsrfToken != null && - this.CsrfToken.Equals(input.CsrfToken)) - ) && - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) && - ( - this.TotpCode == input.TotpCode || - (this.TotpCode != null && - this.TotpCode.Equals(input.TotpCode)) - ) && - ( - this.TotpUnlink == input.TotpUnlink || - this.TotpUnlink.Equals(input.TotpUnlink) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CsrfToken != null) - { - hashCode = (hashCode * 59) + this.CsrfToken.GetHashCode(); - } - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.TotpCode != null) - { - hashCode = (hashCode * 59) + this.TotpCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TotpUnlink.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowWithWebAuthnMethod.cs b/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowWithWebAuthnMethod.cs index 593cbf6c..a6715f04 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowWithWebAuthnMethod.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateSettingsFlowWithWebAuthnMethod.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Update Settings Flow with WebAuthn Method /// [DataContract(Name = "updateSettingsFlowWithWebAuthnMethod")] - public partial class KratosUpdateSettingsFlowWithWebAuthnMethod : IEquatable, IValidatableObject + public partial class KratosUpdateSettingsFlowWithWebAuthnMethod : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUpdateSettingsFlowWithWebAuthnMethod() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUpdateSettingsFlowWithWebAuthnMethod() { } /// /// Initializes a new instance of the class. /// @@ -51,7 +47,8 @@ protected KratosUpdateSettingsFlowWithWebAuthnMethod() public KratosUpdateSettingsFlowWithWebAuthnMethod(string csrfToken = default(string), string method = default(string), string webauthnRegister = default(string), string webauthnRegisterDisplayname = default(string), string webauthnRemove = default(string)) { // to ensure "method" is required (not null) - if (method == null) { + if (method == null) + { throw new ArgumentNullException("method is a required property for KratosUpdateSettingsFlowWithWebAuthnMethod and cannot be null"); } this.Method = method; @@ -59,7 +56,6 @@ protected KratosUpdateSettingsFlowWithWebAuthnMethod() this.WebauthnRegister = webauthnRegister; this.WebauthnRegisterDisplayname = webauthnRegisterDisplayname; this.WebauthnRemove = webauthnRemove; - this.AdditionalProperties = new Dictionary(); } /// @@ -73,7 +69,7 @@ protected KratosUpdateSettingsFlowWithWebAuthnMethod() /// Method Should be set to \"webauthn\" when trying to add, update, or remove a webAuthn pairing. /// /// Method Should be set to \"webauthn\" when trying to add, update, or remove a webAuthn pairing. - [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = true)] public string Method { get; set; } /// @@ -97,12 +93,6 @@ protected KratosUpdateSettingsFlowWithWebAuthnMethod() [DataMember(Name = "webauthn_remove", EmitDefaultValue = false)] public string WebauthnRemove { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -116,7 +106,6 @@ public override string ToString() sb.Append(" WebauthnRegister: ").Append(WebauthnRegister).Append("\n"); sb.Append(" WebauthnRegisterDisplayname: ").Append(WebauthnRegisterDisplayname).Append("\n"); sb.Append(" WebauthnRemove: ").Append(WebauthnRemove).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -130,99 +119,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateSettingsFlowWithWebAuthnMethod); - } - - /// - /// Returns true if KratosUpdateSettingsFlowWithWebAuthnMethod instances are equal - /// - /// Instance of KratosUpdateSettingsFlowWithWebAuthnMethod to be compared - /// Boolean - public bool Equals(KratosUpdateSettingsFlowWithWebAuthnMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.CsrfToken == input.CsrfToken || - (this.CsrfToken != null && - this.CsrfToken.Equals(input.CsrfToken)) - ) && - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) && - ( - this.WebauthnRegister == input.WebauthnRegister || - (this.WebauthnRegister != null && - this.WebauthnRegister.Equals(input.WebauthnRegister)) - ) && - ( - this.WebauthnRegisterDisplayname == input.WebauthnRegisterDisplayname || - (this.WebauthnRegisterDisplayname != null && - this.WebauthnRegisterDisplayname.Equals(input.WebauthnRegisterDisplayname)) - ) && - ( - this.WebauthnRemove == input.WebauthnRemove || - (this.WebauthnRemove != null && - this.WebauthnRemove.Equals(input.WebauthnRemove)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CsrfToken != null) - { - hashCode = (hashCode * 59) + this.CsrfToken.GetHashCode(); - } - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.WebauthnRegister != null) - { - hashCode = (hashCode * 59) + this.WebauthnRegister.GetHashCode(); - } - if (this.WebauthnRegisterDisplayname != null) - { - hashCode = (hashCode * 59) + this.WebauthnRegisterDisplayname.GetHashCode(); - } - if (this.WebauthnRemove != null) - { - hashCode = (hashCode * 59) + this.WebauthnRemove.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUpdateVerificationFlowBody.cs b/Ory.Kratos.Client/Model/KratosUpdateVerificationFlowBody.cs index 7fdb0791..1f816e68 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateVerificationFlowBody.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateVerificationFlowBody.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -33,14 +32,14 @@ namespace Ory.Kratos.Client.Model /// [JsonConverter(typeof(KratosUpdateVerificationFlowBodyJsonConverter))] [DataContract(Name = "updateVerificationFlowBody")] - public partial class KratosUpdateVerificationFlowBody : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class KratosUpdateVerificationFlowBody : AbstractOpenAPISchema, IValidatableObject { /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosUpdateVerificationFlowWithCodeMethod. - public KratosUpdateVerificationFlowBody(KratosUpdateVerificationFlowWithCodeMethod actualInstance) + /// An instance of KratosUpdateVerificationFlowWithLinkMethod. + public KratosUpdateVerificationFlowBody(KratosUpdateVerificationFlowWithLinkMethod actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -49,10 +48,10 @@ public KratosUpdateVerificationFlowBody(KratosUpdateVerificationFlowWithCodeMeth /// /// Initializes a new instance of the class - /// with the class + /// with the class /// - /// An instance of KratosUpdateVerificationFlowWithLinkMethod. - public KratosUpdateVerificationFlowBody(KratosUpdateVerificationFlowWithLinkMethod actualInstance) + /// An instance of KratosUpdateVerificationFlowWithCodeMethod. + public KratosUpdateVerificationFlowBody(KratosUpdateVerificationFlowWithCodeMethod actualInstance) { this.IsNullable = false; this.SchemaType= "oneOf"; @@ -89,23 +88,23 @@ public override Object ActualInstance } /// - /// Get the actual instance of `KratosUpdateVerificationFlowWithCodeMethod`. If the actual instance is not `KratosUpdateVerificationFlowWithCodeMethod`, + /// Get the actual instance of `KratosUpdateVerificationFlowWithLinkMethod`. If the actual instance is not `KratosUpdateVerificationFlowWithLinkMethod`, /// the InvalidClassException will be thrown /// - /// An instance of KratosUpdateVerificationFlowWithCodeMethod - public KratosUpdateVerificationFlowWithCodeMethod GetKratosUpdateVerificationFlowWithCodeMethod() + /// An instance of KratosUpdateVerificationFlowWithLinkMethod + public KratosUpdateVerificationFlowWithLinkMethod GetKratosUpdateVerificationFlowWithLinkMethod() { - return (KratosUpdateVerificationFlowWithCodeMethod)this.ActualInstance; + return (KratosUpdateVerificationFlowWithLinkMethod)this.ActualInstance; } /// - /// Get the actual instance of `KratosUpdateVerificationFlowWithLinkMethod`. If the actual instance is not `KratosUpdateVerificationFlowWithLinkMethod`, + /// Get the actual instance of `KratosUpdateVerificationFlowWithCodeMethod`. If the actual instance is not `KratosUpdateVerificationFlowWithCodeMethod`, /// the InvalidClassException will be thrown /// - /// An instance of KratosUpdateVerificationFlowWithLinkMethod - public KratosUpdateVerificationFlowWithLinkMethod GetKratosUpdateVerificationFlowWithLinkMethod() + /// An instance of KratosUpdateVerificationFlowWithCodeMethod + public KratosUpdateVerificationFlowWithCodeMethod GetKratosUpdateVerificationFlowWithCodeMethod() { - return (KratosUpdateVerificationFlowWithLinkMethod)this.ActualInstance; + return (KratosUpdateVerificationFlowWithCodeMethod)this.ActualInstance; } /// @@ -192,50 +191,13 @@ public static KratosUpdateVerificationFlowBody FromJson(string jsonString) } else if (match > 1) { - throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + matchedTypes); + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + String.Join(",", matchedTypes)); } // deserialization is considered successful at this point if no exception has been thrown. return newKratosUpdateVerificationFlowBody; } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateVerificationFlowBody); - } - - /// - /// Returns true if KratosUpdateVerificationFlowBody instances are equal - /// - /// Instance of KratosUpdateVerificationFlowBody to be compared - /// Boolean - public bool Equals(KratosUpdateVerificationFlowBody input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance @@ -274,11 +236,15 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s /// The object converted from the JSON string public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - if(reader.TokenType != JsonToken.Null) + switch(reader.TokenType) { - return KratosUpdateVerificationFlowBody.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartObject: + return KratosUpdateVerificationFlowBody.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return KratosUpdateVerificationFlowBody.FromJson(JArray.Load(reader).ToString(Formatting.None)); + default: + return null; } - return null; } /// diff --git a/Ory.Kratos.Client/Model/KratosUpdateVerificationFlowWithCodeMethod.cs b/Ory.Kratos.Client/Model/KratosUpdateVerificationFlowWithCodeMethod.cs index 5f726624..21cab38d 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateVerificationFlowWithCodeMethod.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateVerificationFlowWithCodeMethod.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// KratosUpdateVerificationFlowWithCodeMethod /// [DataContract(Name = "updateVerificationFlowWithCodeMethod")] - public partial class KratosUpdateVerificationFlowWithCodeMethod : IEquatable, IValidatableObject + public partial class KratosUpdateVerificationFlowWithCodeMethod : IValidatableObject { /// /// Method is the method that should be used for this verification flow Allowed values are `link` and `code`. link VerificationStrategyLink code VerificationStrategyCode @@ -50,7 +49,6 @@ public enum MethodEnum /// [EnumMember(Value = "code")] Code = 2 - } @@ -58,16 +56,13 @@ public enum MethodEnum /// Method is the method that should be used for this verification flow Allowed values are `link` and `code`. link VerificationStrategyLink code VerificationStrategyCode /// /// Method is the method that should be used for this verification flow Allowed values are `link` and `code`. link VerificationStrategyLink code VerificationStrategyCode - [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = true)] public MethodEnum Method { get; set; } /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUpdateVerificationFlowWithCodeMethod() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUpdateVerificationFlowWithCodeMethod() { } /// /// Initializes a new instance of the class. /// @@ -81,7 +76,6 @@ protected KratosUpdateVerificationFlowWithCodeMethod() this.Code = code; this.CsrfToken = csrfToken; this.Email = email; - this.AdditionalProperties = new Dictionary(); } /// @@ -105,12 +99,6 @@ protected KratosUpdateVerificationFlowWithCodeMethod() [DataMember(Name = "email", EmitDefaultValue = false)] public string Email { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -123,7 +111,6 @@ public override string ToString() sb.Append(" CsrfToken: ").Append(CsrfToken).Append("\n"); sb.Append(" Email: ").Append(Email).Append("\n"); sb.Append(" Method: ").Append(Method).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -137,86 +124,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateVerificationFlowWithCodeMethod); - } - - /// - /// Returns true if KratosUpdateVerificationFlowWithCodeMethod instances are equal - /// - /// Instance of KratosUpdateVerificationFlowWithCodeMethod to be compared - /// Boolean - public bool Equals(KratosUpdateVerificationFlowWithCodeMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.CsrfToken == input.CsrfToken || - (this.CsrfToken != null && - this.CsrfToken.Equals(input.CsrfToken)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Method == input.Method || - this.Method.Equals(input.Method) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.CsrfToken != null) - { - hashCode = (hashCode * 59) + this.CsrfToken.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosUpdateVerificationFlowWithLinkMethod.cs b/Ory.Kratos.Client/Model/KratosUpdateVerificationFlowWithLinkMethod.cs index 94e44d5f..299e17e1 100644 --- a/Ory.Kratos.Client/Model/KratosUpdateVerificationFlowWithLinkMethod.cs +++ b/Ory.Kratos.Client/Model/KratosUpdateVerificationFlowWithLinkMethod.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// Update Verification Flow with Link Method /// [DataContract(Name = "updateVerificationFlowWithLinkMethod")] - public partial class KratosUpdateVerificationFlowWithLinkMethod : IEquatable, IValidatableObject + public partial class KratosUpdateVerificationFlowWithLinkMethod : IValidatableObject { /// /// Method is the method that should be used for this verification flow Allowed values are `link` and `code` link VerificationStrategyLink code VerificationStrategyCode @@ -50,7 +49,6 @@ public enum MethodEnum /// [EnumMember(Value = "code")] Code = 2 - } @@ -58,16 +56,13 @@ public enum MethodEnum /// Method is the method that should be used for this verification flow Allowed values are `link` and `code` link VerificationStrategyLink code VerificationStrategyCode /// /// Method is the method that should be used for this verification flow Allowed values are `link` and `code` link VerificationStrategyLink code VerificationStrategyCode - [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "method", IsRequired = true, EmitDefaultValue = true)] public MethodEnum Method { get; set; } /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosUpdateVerificationFlowWithLinkMethod() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosUpdateVerificationFlowWithLinkMethod() { } /// /// Initializes a new instance of the class. /// @@ -77,13 +72,13 @@ protected KratosUpdateVerificationFlowWithLinkMethod() public KratosUpdateVerificationFlowWithLinkMethod(string csrfToken = default(string), string email = default(string), MethodEnum method = default(MethodEnum)) { // to ensure "email" is required (not null) - if (email == null) { + if (email == null) + { throw new ArgumentNullException("email is a required property for KratosUpdateVerificationFlowWithLinkMethod and cannot be null"); } this.Email = email; this.Method = method; this.CsrfToken = csrfToken; - this.AdditionalProperties = new Dictionary(); } /// @@ -97,15 +92,9 @@ protected KratosUpdateVerificationFlowWithLinkMethod() /// Email to Verify Needs to be set when initiating the flow. If the email is a registered verification email, a verification link will be sent. If the email is not known, a email with details on what happened will be sent instead. format: email /// /// Email to Verify Needs to be set when initiating the flow. If the email is a registered verification email, a verification link will be sent. If the email is not known, a email with details on what happened will be sent instead. format: email - [DataMember(Name = "email", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "email", IsRequired = true, EmitDefaultValue = true)] public string Email { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -117,7 +106,6 @@ public override string ToString() sb.Append(" CsrfToken: ").Append(CsrfToken).Append("\n"); sb.Append(" Email: ").Append(Email).Append("\n"); sb.Append(" Method: ").Append(Method).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -131,77 +119,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosUpdateVerificationFlowWithLinkMethod); - } - - /// - /// Returns true if KratosUpdateVerificationFlowWithLinkMethod instances are equal - /// - /// Instance of KratosUpdateVerificationFlowWithLinkMethod to be compared - /// Boolean - public bool Equals(KratosUpdateVerificationFlowWithLinkMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.CsrfToken == input.CsrfToken || - (this.CsrfToken != null && - this.CsrfToken.Equals(input.CsrfToken)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Method == input.Method || - this.Method.Equals(input.Method) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CsrfToken != null) - { - hashCode = (hashCode * 59) + this.CsrfToken.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosVerifiableIdentityAddress.cs b/Ory.Kratos.Client/Model/KratosVerifiableIdentityAddress.cs index 11b04914..3ee6bdba 100644 --- a/Ory.Kratos.Client/Model/KratosVerifiableIdentityAddress.cs +++ b/Ory.Kratos.Client/Model/KratosVerifiableIdentityAddress.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,7 +29,7 @@ namespace Ory.Kratos.Client.Model /// VerifiableAddress is an identity's verifiable address /// [DataContract(Name = "verifiableIdentityAddress")] - public partial class KratosVerifiableIdentityAddress : IEquatable, IValidatableObject + public partial class KratosVerifiableIdentityAddress : IValidatableObject { /// /// The delivery method @@ -50,7 +49,6 @@ public enum ViaEnum /// [EnumMember(Value = "sms")] Sms = 2 - } @@ -58,16 +56,14 @@ public enum ViaEnum /// The delivery method /// /// The delivery method - [DataMember(Name = "via", IsRequired = true, EmitDefaultValue = false)] + /// email + [DataMember(Name = "via", IsRequired = true, EmitDefaultValue = true)] public ViaEnum Via { get; set; } /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosVerifiableIdentityAddress() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosVerifiableIdentityAddress() { } /// /// Initializes a new instance of the class. /// @@ -82,12 +78,14 @@ protected KratosVerifiableIdentityAddress() public KratosVerifiableIdentityAddress(DateTime createdAt = default(DateTime), string id = default(string), string status = default(string), DateTime updatedAt = default(DateTime), string value = default(string), bool verified = default(bool), DateTime verifiedAt = default(DateTime), ViaEnum via = default(ViaEnum)) { // to ensure "status" is required (not null) - if (status == null) { + if (status == null) + { throw new ArgumentNullException("status is a required property for KratosVerifiableIdentityAddress and cannot be null"); } this.Status = status; // to ensure "value" is required (not null) - if (value == null) { + if (value == null) + { throw new ArgumentNullException("value is a required property for KratosVerifiableIdentityAddress and cannot be null"); } this.Value = value; @@ -97,13 +95,13 @@ protected KratosVerifiableIdentityAddress() this.Id = id; this.UpdatedAt = updatedAt; this.VerifiedAt = verifiedAt; - this.AdditionalProperties = new Dictionary(); } /// /// When this entry was created /// /// When this entry was created + /// 2014-01-01T23:28:56.782Z [DataMember(Name = "created_at", EmitDefaultValue = false)] public DateTime CreatedAt { get; set; } @@ -118,13 +116,14 @@ protected KratosVerifiableIdentityAddress() /// VerifiableAddressStatus must not exceed 16 characters as that is the limitation in the SQL Schema /// /// VerifiableAddressStatus must not exceed 16 characters as that is the limitation in the SQL Schema - [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] public string Status { get; set; } /// /// When this entry was last updated /// /// When this entry was last updated + /// 2014-01-01T23:28:56.782Z [DataMember(Name = "updated_at", EmitDefaultValue = false)] public DateTime UpdatedAt { get; set; } @@ -132,13 +131,14 @@ protected KratosVerifiableIdentityAddress() /// The address value example foo@user.com /// /// The address value example foo@user.com - [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)] public string Value { get; set; } /// /// Indicates if the address has already been verified /// /// Indicates if the address has already been verified + /// true [DataMember(Name = "verified", IsRequired = true, EmitDefaultValue = true)] public bool Verified { get; set; } @@ -148,12 +148,6 @@ protected KratosVerifiableIdentityAddress() [DataMember(Name = "verified_at", EmitDefaultValue = false)] public DateTime VerifiedAt { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -170,7 +164,6 @@ public override string ToString() sb.Append(" Verified: ").Append(Verified).Append("\n"); sb.Append(" VerifiedAt: ").Append(VerifiedAt).Append("\n"); sb.Append(" Via: ").Append(Via).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -184,118 +177,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosVerifiableIdentityAddress); - } - - /// - /// Returns true if KratosVerifiableIdentityAddress instances are equal - /// - /// Instance of KratosVerifiableIdentityAddress to be compared - /// Boolean - public bool Equals(KratosVerifiableIdentityAddress input) - { - if (input == null) - { - return false; - } - return - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.UpdatedAt == input.UpdatedAt || - (this.UpdatedAt != null && - this.UpdatedAt.Equals(input.UpdatedAt)) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) && - ( - this.Verified == input.Verified || - this.Verified.Equals(input.Verified) - ) && - ( - this.VerifiedAt == input.VerifiedAt || - (this.VerifiedAt != null && - this.VerifiedAt.Equals(input.VerifiedAt)) - ) && - ( - this.Via == input.Via || - this.Via.Equals(input.Via) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - if (this.UpdatedAt != null) - { - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Verified.GetHashCode(); - if (this.VerifiedAt != null) - { - hashCode = (hashCode * 59) + this.VerifiedAt.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Via.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosVerificationFlow.cs b/Ory.Kratos.Client/Model/KratosVerificationFlow.cs index 8ee010c8..27574fae 100644 --- a/Ory.Kratos.Client/Model/KratosVerificationFlow.cs +++ b/Ory.Kratos.Client/Model/KratosVerificationFlow.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,13 @@ namespace Ory.Kratos.Client.Model /// Used to verify an out-of-band communication channel such as an email address or a phone number. For more information head over to: https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation /// [DataContract(Name = "verificationFlow")] - public partial class KratosVerificationFlow : IEquatable, IValidatableObject + public partial class KratosVerificationFlow : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected KratosVerificationFlow() - { - this.AdditionalProperties = new Dictionary(); - } + protected KratosVerificationFlow() { } /// /// Initializes a new instance of the class. /// @@ -55,22 +51,26 @@ protected KratosVerificationFlow() public KratosVerificationFlow(string active = default(string), DateTime expiresAt = default(DateTime), string id = default(string), DateTime issuedAt = default(DateTime), string requestUrl = default(string), string returnTo = default(string), Object state = default(Object), string type = default(string), KratosUiContainer ui = default(KratosUiContainer)) { // to ensure "id" is required (not null) - if (id == null) { + if (id == null) + { throw new ArgumentNullException("id is a required property for KratosVerificationFlow and cannot be null"); } this.Id = id; // to ensure "state" is required (not null) - if (state == null) { + if (state == null) + { throw new ArgumentNullException("state is a required property for KratosVerificationFlow and cannot be null"); } this.State = state; // to ensure "type" is required (not null) - if (type == null) { + if (type == null) + { throw new ArgumentNullException("type is a required property for KratosVerificationFlow and cannot be null"); } this.Type = type; // to ensure "ui" is required (not null) - if (ui == null) { + if (ui == null) + { throw new ArgumentNullException("ui is a required property for KratosVerificationFlow and cannot be null"); } this.Ui = ui; @@ -79,7 +79,6 @@ protected KratosVerificationFlow() this.IssuedAt = issuedAt; this.RequestUrl = requestUrl; this.ReturnTo = returnTo; - this.AdditionalProperties = new Dictionary(); } /// @@ -100,7 +99,7 @@ protected KratosVerificationFlow() /// ID represents the request's unique ID. When performing the verification flow, this represents the id in the verify ui's query parameter: http://<selfservice.flows.verification.ui_url>?request=<id> type: string format: uuid /// /// ID represents the request's unique ID. When performing the verification flow, this represents the id in the verify ui's query parameter: http://<selfservice.flows.verification.ui_url>?request=<id> type: string format: uuid - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] public string Id { get; set; } /// @@ -135,21 +134,15 @@ protected KratosVerificationFlow() /// The flow type can either be `api` or `browser`. /// /// The flow type can either be `api` or `browser`. - [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } /// /// Gets or Sets Ui /// - [DataMember(Name = "ui", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "ui", IsRequired = true, EmitDefaultValue = true)] public KratosUiContainer Ui { get; set; } - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - /// /// Returns the string presentation of the object /// @@ -167,7 +160,6 @@ public override string ToString() sb.Append(" State: ").Append(State).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Ui: ").Append(Ui).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -181,135 +173,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosVerificationFlow); - } - - /// - /// Returns true if KratosVerificationFlow instances are equal - /// - /// Instance of KratosVerificationFlow to be compared - /// Boolean - public bool Equals(KratosVerificationFlow input) - { - if (input == null) - { - return false; - } - return - ( - this.Active == input.Active || - (this.Active != null && - this.Active.Equals(input.Active)) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.IssuedAt == input.IssuedAt || - (this.IssuedAt != null && - this.IssuedAt.Equals(input.IssuedAt)) - ) && - ( - this.RequestUrl == input.RequestUrl || - (this.RequestUrl != null && - this.RequestUrl.Equals(input.RequestUrl)) - ) && - ( - this.ReturnTo == input.ReturnTo || - (this.ReturnTo != null && - this.ReturnTo.Equals(input.ReturnTo)) - ) && - ( - this.State == input.State || - (this.State != null && - this.State.Equals(input.State)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Ui == input.Ui || - (this.Ui != null && - this.Ui.Equals(input.Ui)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Active != null) - { - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - } - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.IssuedAt != null) - { - hashCode = (hashCode * 59) + this.IssuedAt.GetHashCode(); - } - if (this.RequestUrl != null) - { - hashCode = (hashCode * 59) + this.RequestUrl.GetHashCode(); - } - if (this.ReturnTo != null) - { - hashCode = (hashCode * 59) + this.ReturnTo.GetHashCode(); - } - if (this.State != null) - { - hashCode = (hashCode * 59) + this.State.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Ui != null) - { - hashCode = (hashCode * 59) + this.Ui.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Model/KratosVerificationFlowState.cs b/Ory.Kratos.Client/Model/KratosVerificationFlowState.cs index 102bffbe..d4700279 100644 --- a/Ory.Kratos.Client/Model/KratosVerificationFlowState.cs +++ b/Ory.Kratos.Client/Model/KratosVerificationFlowState.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -50,7 +49,6 @@ public enum KratosVerificationFlowState /// [EnumMember(Value = "passed_challenge")] PassedChallenge = 3 - } } diff --git a/Ory.Kratos.Client/Model/KratosVersion.cs b/Ory.Kratos.Client/Model/KratosVersion.cs index 7e7e07df..c2ab2f57 100644 --- a/Ory.Kratos.Client/Model/KratosVersion.cs +++ b/Ory.Kratos.Client/Model/KratosVersion.cs @@ -3,7 +3,6 @@ * * This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more. * - * The version of the OpenAPI document: v1.1.0 * Contact: office@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,16 +29,15 @@ namespace Ory.Kratos.Client.Model /// KratosVersion /// [DataContract(Name = "version")] - public partial class KratosVersion : IEquatable, IValidatableObject + public partial class KratosVersion : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Version is the service's version.. - public KratosVersion(string version = default(string)) + /// Version is the service's version.. + public KratosVersion(string varVersion = default(string)) { - this._Version = version; - this.AdditionalProperties = new Dictionary(); + this.VarVersion = varVersion; } /// @@ -47,13 +45,7 @@ public partial class KratosVersion : IEquatable, IValidatableObje /// /// Version is the service's version. [DataMember(Name = "version", EmitDefaultValue = false)] - public string _Version { get; set; } - - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } + public string VarVersion { get; set; } /// /// Returns the string presentation of the object @@ -63,8 +55,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class KratosVersion {\n"); - sb.Append(" _Version: ").Append(_Version).Append("\n"); - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append(" VarVersion: ").Append(VarVersion).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -78,63 +69,12 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KratosVersion); - } - - /// - /// Returns true if KratosVersion instances are equal - /// - /// Instance of KratosVersion to be compared - /// Boolean - public bool Equals(KratosVersion input) - { - if (input == null) - { - return false; - } - return - ( - this._Version == input._Version || - (this._Version != null && - this._Version.Equals(input._Version)) - ) - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._Version != null) - { - hashCode = (hashCode * 59) + this._Version.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } diff --git a/Ory.Kratos.Client/Ory.Kratos.Client.csproj b/Ory.Kratos.Client/Ory.Kratos.Client.csproj index 2b74e6df..39186234 100644 --- a/Ory.Kratos.Client/Ory.Kratos.Client.csproj +++ b/Ory.Kratos.Client/Ory.Kratos.Client.csproj @@ -1,17 +1,36 @@  + false net8.0 - enable - disable + Ory.Kratos.Client + Ory.Kratos.Client + Library + OpenAPI + OpenAPI + OpenAPI Library + A library generated from a OpenAPI doc + No Copyright + Ory.Kratos.Client + 1.1.0 + bin\$(Configuration)\$(TargetFramework)\Ory.Kratos.Client.xml + https://github.com/GIT_USER_ID/GIT_REPO_ID.git + git + Minor update + annotations - - - - - + + + + + + + + + + diff --git a/OryAdmin/Components/Pages/Home.razor.cs b/OryAdmin/Components/Pages/Home.razor.cs index 71a1fffc..5e7d39d2 100644 --- a/OryAdmin/Components/Pages/Home.razor.cs +++ b/OryAdmin/Components/Pages/Home.razor.cs @@ -62,7 +62,7 @@ protected override async Task OnInitializedAsync() try { var version = await ApiService.KratosMetadata.GetVersionAsync(); - _kratosVersion = version._Version; + _kratosVersion = version.VarVersion; } catch (Exception) { @@ -104,7 +104,7 @@ protected override async Task OnInitializedAsync() try { var version = await ApiService.HydraMetadata.GetVersionAsync(); - _hydraVersion = version._Version; + _hydraVersion = version.VarVersion; } catch (Exception) { diff --git a/OryAdmin/Components/Pages/Identities/Messages/Index.razor.cs b/OryAdmin/Components/Pages/Identities/Messages/Index.razor.cs index a82504bd..010cccee 100644 --- a/OryAdmin/Components/Pages/Identities/Messages/Index.razor.cs +++ b/OryAdmin/Components/Pages/Identities/Messages/Index.razor.cs @@ -1,4 +1,7 @@ -using Microsoft.AspNetCore.Components; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Components; using Ory.Kratos.Client.Model; using OryAdmin.Extensions; using OryAdmin.Services; diff --git a/OryAdmin/Components/Pages/Identities/Users/View.razor b/OryAdmin/Components/Pages/Identities/Users/View.razor index 91bae4e8..e421bd79 100644 --- a/OryAdmin/Components/Pages/Identities/Users/View.razor +++ b/OryAdmin/Components/Pages/Identities/Users/View.razor @@ -218,11 +218,11 @@ else { - - @session.ConsentRequest._Client.ClientName + + @session.ConsentRequest.VarClient.ClientName - @if (session.ConsentRequest.Skip || session.ConsentRequest._Client.SkipConsent) + @if (session.ConsentRequest.Skip || session.ConsentRequest.VarClient.SkipConsent) { Consent skipped } @@ -341,7 +341,7 @@ else { @credential.Type - @credential._Version + @credential.VarVersion @string.Join(", ", credential.Identifiers)

Updated: @credential.UpdatedAt

diff --git a/OryAdmin/Components/Pages/Identities/Users/View.razor.cs b/OryAdmin/Components/Pages/Identities/Users/View.razor.cs index ea61af62..1efd30a9 100644 --- a/OryAdmin/Components/Pages/Identities/Users/View.razor.cs +++ b/OryAdmin/Components/Pages/Identities/Users/View.razor.cs @@ -1,4 +1,6 @@ -using Microsoft.AspNetCore.Components; +using System.Collections.Generic; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Mvc; using Ory.Hydra.Client.Model; using Ory.Kratos.Client.Model; diff --git a/OryAdmin/OryAdmin.csproj b/OryAdmin/OryAdmin.csproj index 70d062a4..56e83a02 100644 --- a/OryAdmin/OryAdmin.csproj +++ b/OryAdmin/OryAdmin.csproj @@ -17,7 +17,6 @@ - @@ -45,7 +44,11 @@ - + + + + + diff --git a/OryUI.sln b/OryUI.sln index 315336e7..4e244105 100644 --- a/OryUI.sln +++ b/OryUI.sln @@ -4,7 +4,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OryAdmin", "OryAdmin\OryAdm EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KratosSelfService", "KratosSelfService\KratosSelfService.csproj", "{3AED08D2-8192-4F04-A042-9D0F29AAB936}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ory.Kratos.Client", "Ory.Kratos.Client\Ory.Kratos.Client.csproj", "{790EEB36-E682-4F0E-BA30-214093EF0461}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ory.Hydra.Client", "Ory.Hydra.Client\Ory.Hydra.Client.csproj", "{4778A638-3F0B-4C99-B22C-00671AD9441F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ory.Kratos.Client", "Ory.Kratos.Client\Ory.Kratos.Client.csproj", "{34C5BC8E-C2DD-4A97-9D4D-659AC499325A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -20,9 +22,13 @@ Global {3AED08D2-8192-4F04-A042-9D0F29AAB936}.Debug|Any CPU.Build.0 = Debug|Any CPU {3AED08D2-8192-4F04-A042-9D0F29AAB936}.Release|Any CPU.ActiveCfg = Release|Any CPU {3AED08D2-8192-4F04-A042-9D0F29AAB936}.Release|Any CPU.Build.0 = Release|Any CPU - {790EEB36-E682-4F0E-BA30-214093EF0461}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {790EEB36-E682-4F0E-BA30-214093EF0461}.Debug|Any CPU.Build.0 = Debug|Any CPU - {790EEB36-E682-4F0E-BA30-214093EF0461}.Release|Any CPU.ActiveCfg = Release|Any CPU - {790EEB36-E682-4F0E-BA30-214093EF0461}.Release|Any CPU.Build.0 = Release|Any CPU + {4778A638-3F0B-4C99-B22C-00671AD9441F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4778A638-3F0B-4C99-B22C-00671AD9441F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4778A638-3F0B-4C99-B22C-00671AD9441F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4778A638-3F0B-4C99-B22C-00671AD9441F}.Release|Any CPU.Build.0 = Release|Any CPU + {34C5BC8E-C2DD-4A97-9D4D-659AC499325A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {34C5BC8E-C2DD-4A97-9D4D-659AC499325A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {34C5BC8E-C2DD-4A97-9D4D-659AC499325A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {34C5BC8E-C2DD-4A97-9D4D-659AC499325A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/README.md b/README.md index cdc89434..054594f9 100644 --- a/README.md +++ b/README.md @@ -161,13 +161,13 @@ Check out the [./docker-compose.yml](https://github.com/josxha/OryUI/blob/main/d git clone https://github.com/josxha/OryUI.git ``` -3. Start the ORY services: Run ORY locally by using the [/ory/docker-compose.yml](ory/docker-compose.yml) file. ORY will +3. Start the ORY services: Run ORY locally by using the [/ory-services/docker-compose.yml](ory-services/docker-compose.yml) file. ORY will store its data persistently in SqLite databases: ```bash docker network create ory -cd ./ory +cd ./ory-services docker compose up -d ``` diff --git a/generate-api-clients.ps1 b/generate-api-clients.ps1 new file mode 100644 index 00000000..bfc12a43 --- /dev/null +++ b/generate-api-clients.ps1 @@ -0,0 +1,7 @@ +openapi-generator-cli.cmd generate -i "openapi-kratos.json" -g csharp -o "Ory.Kratos" --model-name-prefix Kratos --additional-properties=nullableReferenceTypes=true,packageName=Ory.Kratos.Client,packageVersion=1.1.0,netCoreProjectFile=true,sourceFolder=. +mv Ory.Kratos\Ory.Kratos.Client\* .\Ory.Kratos.Client +rm -r -fo Ory.Kratos + +openapi-generator-cli.cmd generate -i "openapi-hydra.json" -g csharp -o "Ory.Hydra" --model-name-prefix Hydra --additional-properties=nullableReferenceTypes=true,packageName=Ory.Hydra.Client,packageVersion=2.2.0,netCoreProjectFile=true,sourceFolder=. +mv Ory.Hydra\Ory.Hydra.Client\* .\Ory.Hydra.Client +rm -r -fo Ory.Hydra diff --git a/openapi-hydra.json b/openapi-hydra.json new file mode 100644 index 00000000..143ebbbf --- /dev/null +++ b/openapi-hydra.json @@ -0,0 +1,3891 @@ +{ + "components": { + "responses": { + "emptyResponse": { + "description": "Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is\ntypically 201." + }, + "errorOAuth2BadRequest": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "Bad Request Error Response" + }, + "errorOAuth2Default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "Default Error Response" + }, + "errorOAuth2NotFound": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "Not Found Error Response" + }, + "listOAuth2Clients": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/oAuth2Client" + }, + "type": "array" + } + } + }, + "description": "Paginated OAuth2 Client List Response" + } + }, + "schemas": { + "CreateVerifiableCredentialRequestBody": { + "properties": { + "format": { + "type": "string" + }, + "proof": { + "$ref": "#/components/schemas/VerifiableCredentialProof" + }, + "types": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "title": "CreateVerifiableCredentialRequestBody contains the request body to request a verifiable credential.", + "type": "object" + }, + "DefaultError": {}, + "JSONRawMessage": { + "title": "JSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger." + }, + "NullBool": { + "nullable": true, + "type": "boolean" + }, + "NullDuration": { + "description": "Specify a time duration in milliseconds, seconds, minutes, hours.", + "pattern": "^([0-9]+(ns|us|ms|s|m|h))*$", + "title": "Time duration", + "type": "string" + }, + "NullInt": { + "nullable": true, + "type": "integer" + }, + "NullString": { + "nullable": true, + "type": "string" + }, + "NullTime": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "NullUUID": { + "format": "uuid4", + "nullable": true, + "type": "string" + }, + "RFC6749ErrorJson": { + "properties": { + "error": { + "type": "string" + }, + "error_debug": { + "type": "string" + }, + "error_description": { + "type": "string" + }, + "error_hint": { + "type": "string" + }, + "status_code": { + "format": "int64", + "type": "integer" + } + }, + "title": "RFC6749ErrorJson is a helper struct for JSON encoding/decoding of RFC6749Error.", + "type": "object" + }, + "StringSliceJSONFormat": { + "items": { + "type": "string" + }, + "title": "StringSliceJSONFormat represents []string{} which is encoded to/from JSON for SQL storage.", + "type": "array" + }, + "Time": { + "format": "date-time", + "type": "string" + }, + "UUID": { + "format": "uuid4", + "type": "string" + }, + "VerifiableCredentialProof": { + "properties": { + "jwt": { + "type": "string" + }, + "proof_type": { + "type": "string" + } + }, + "title": "VerifiableCredentialProof contains the proof of a verifiable credential.", + "type": "object" + }, + "acceptOAuth2ConsentRequest": { + "properties": { + "context": { + "$ref": "#/components/schemas/JSONRawMessage" + }, + "grant_access_token_audience": { + "$ref": "#/components/schemas/StringSliceJSONFormat" + }, + "grant_scope": { + "$ref": "#/components/schemas/StringSliceJSONFormat" + }, + "handled_at": { + "$ref": "#/components/schemas/nullTime" + }, + "remember": { + "description": "Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same\nclient asks the same user for the same, or a subset of, scope.", + "type": "boolean" + }, + "remember_for": { + "description": "RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the\nauthorization will be remembered indefinitely.", + "format": "int64", + "type": "integer" + }, + "session": { + "$ref": "#/components/schemas/acceptOAuth2ConsentRequestSession" + } + }, + "title": "The request payload used to accept a consent request.", + "type": "object" + }, + "acceptOAuth2ConsentRequestSession": { + "properties": { + "access_token": { + "description": "AccessToken sets session data for the access and refresh token, as well as any future tokens issued by the\nrefresh grant. Keep in mind that this data will be available to anyone performing OAuth 2.0 Challenge Introspection.\nIf only your services can perform OAuth 2.0 Challenge Introspection, this is usually fine. But if third parties\ncan access that endpoint as well, sensitive data from the session might be exposed to them. Use with care!" + }, + "id_token": { + "description": "IDToken sets session data for the OpenID Connect ID token. Keep in mind that the session'id payloads are readable\nby anyone that has access to the ID Challenge. Use with care!" + } + }, + "title": "Pass session data to a consent request.", + "type": "object" + }, + "acceptOAuth2LoginRequest": { + "properties": { + "acr": { + "description": "ACR sets the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it\nto express that, for example, a user authenticated using two factor authentication.", + "type": "string" + }, + "amr": { + "$ref": "#/components/schemas/StringSliceJSONFormat" + }, + "context": { + "$ref": "#/components/schemas/JSONRawMessage" + }, + "extend_session_lifespan": { + "description": "Extend OAuth2 authentication session lifespan\n\nIf set to `true`, the OAuth2 authentication cookie lifespan is extended. This is for example useful if you want the user to be able to use `prompt=none` continuously.\n\nThis value can only be set to `true` if the user has an authentication, which is the case if the `skip` value is `true`.", + "type": "boolean" + }, + "force_subject_identifier": { + "description": "ForceSubjectIdentifier forces the \"pairwise\" user ID of the end-user that authenticated. The \"pairwise\" user ID refers to the\n(Pairwise Identifier Algorithm)[http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg] of the OpenID\nConnect specification. It allows you to set an obfuscated subject (\"user\") identifier that is unique to the client.\n\nPlease note that this changes the user ID on endpoint /userinfo and sub claim of the ID Token. It does not change the\nsub claim in the OAuth 2.0 Introspection.\n\nPer default, ORY Hydra handles this value with its own algorithm. In case you want to set this yourself\nyou can use this field. Please note that setting this field has no effect if `pairwise` is not configured in\nORY Hydra or the OAuth 2.0 Client does not expect a pairwise identifier (set via `subject_type` key in the client's\nconfiguration).\n\nPlease also be aware that ORY Hydra is unable to properly compute this value during authentication. This implies\nthat you have to compute this value on every authentication process (probably depending on the client ID or some\nother unique value).\n\nIf you fail to compute the proper value, then authentication processes which have id_token_hint set might fail.", + "type": "string" + }, + "identity_provider_session_id": { + "description": "IdentityProviderSessionID is the session ID of the end-user that authenticated.\nIf specified, we will use this value to propagate the logout.", + "type": "string" + }, + "remember": { + "description": "Remember, if set to true, tells ORY Hydra to remember this user by telling the user agent (browser) to store\na cookie with authentication data. If the same user performs another OAuth 2.0 Authorization Request, he/she\nwill not be asked to log in again.", + "type": "boolean" + }, + "remember_for": { + "description": "RememberFor sets how long the authentication should be remembered for in seconds. If set to `0`, the\nauthorization will be remembered for the duration of the browser session (using a session cookie).", + "format": "int64", + "type": "integer" + }, + "subject": { + "description": "Subject is the user ID of the end-user that authenticated.", + "type": "string" + } + }, + "required": [ + "subject" + ], + "title": "HandledLoginRequest is the request payload used to accept a login request.", + "type": "object" + }, + "createJsonWebKeySet": { + "description": "Create JSON Web Key Set Request Body", + "properties": { + "alg": { + "description": "JSON Web Key Algorithm\n\nThe algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`.", + "type": "string" + }, + "kid": { + "description": "JSON Web Key ID\n\nThe Key ID of the key to be created.", + "type": "string" + }, + "use": { + "description": "JSON Web Key Use\n\nThe \"use\" (public key use) parameter identifies the intended use of\nthe public key. The \"use\" parameter is employed to indicate whether\na public key is used for encrypting data or verifying the signature\non data. Valid values are \"enc\" and \"sig\".", + "type": "string" + } + }, + "required": [ + "alg", + "use", + "kid" + ], + "type": "object" + }, + "credentialSupportedDraft00": { + "description": "Includes information about the supported verifiable credentials.", + "properties": { + "cryptographic_binding_methods_supported": { + "description": "OpenID Connect Verifiable Credentials Cryptographic Binding Methods Supported\n\nContains a list of cryptographic binding methods supported for signing the proof.", + "items": { + "type": "string" + }, + "type": "array" + }, + "cryptographic_suites_supported": { + "description": "OpenID Connect Verifiable Credentials Cryptographic Suites Supported\n\nContains a list of cryptographic suites methods supported for signing the proof.", + "items": { + "type": "string" + }, + "type": "array" + }, + "format": { + "description": "OpenID Connect Verifiable Credentials Format\n\nContains the format that is supported by this authorization server.", + "type": "string" + }, + "types": { + "description": "OpenID Connect Verifiable Credentials Types\n\nContains the types of verifiable credentials supported.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "title": "Verifiable Credentials Metadata (Draft 00)", + "type": "object" + }, + "errorOAuth2": { + "description": "Error", + "properties": { + "error": { + "description": "Error", + "type": "string" + }, + "error_debug": { + "description": "Error Debug Information\n\nOnly available in dev mode.", + "type": "string" + }, + "error_description": { + "description": "Error Description", + "type": "string" + }, + "error_hint": { + "description": "Error Hint\n\nHelps the user identify the error cause.", + "example": "The redirect URL is not allowed.", + "type": "string" + }, + "status_code": { + "description": "HTTP Status Code", + "example": 401, + "format": "int64", + "type": "integer" + } + }, + "type": "object" + }, + "genericError": { + "properties": { + "code": { + "description": "The status code", + "example": 404, + "format": "int64", + "type": "integer" + }, + "debug": { + "description": "Debug information\n\nThis field is often not exposed to protect against leaking\nsensitive information.", + "example": "SQL field \"foo\" is not a bool.", + "type": "string" + }, + "details": { + "description": "Further error details" + }, + "id": { + "description": "The error ID\n\nUseful when trying to identify various errors in application logic.", + "type": "string" + }, + "message": { + "description": "Error message\n\nThe error's message.", + "example": "The resource could not be found", + "type": "string" + }, + "reason": { + "description": "A human-readable reason for the error", + "example": "User with ID 1234 does not exist.", + "type": "string" + }, + "request": { + "description": "The request ID\n\nThe request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.", + "example": "d7ef54b1-ec15-46e6-bccb-524b82c035e6", + "type": "string" + }, + "status": { + "description": "The status description", + "example": "Not Found", + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + }, + "healthNotReadyStatus": { + "properties": { + "errors": { + "additionalProperties": { + "type": "string" + }, + "description": "Errors contains a list of errors that caused the not ready status.", + "type": "object" + } + }, + "type": "object" + }, + "healthStatus": { + "properties": { + "status": { + "description": "Status always contains \"ok\".", + "type": "string" + } + }, + "type": "object" + }, + "introspectedOAuth2Token": { + "description": "Introspection contains an access token's session data as specified by\n[IETF RFC 7662](https://tools.ietf.org/html/rfc7662)", + "properties": { + "active": { + "description": "Active is a boolean indicator of whether or not the presented token\nis currently active. The specifics of a token's \"active\" state\nwill vary depending on the implementation of the authorization\nserver and the information it keeps about its tokens, but a \"true\"\nvalue return for the \"active\" property will generally indicate\nthat a given token has been issued by this authorization server,\nhas not been revoked by the resource owner, and is within its\ngiven time window of validity (e.g., after its issuance time and\nbefore its expiration time).", + "type": "boolean" + }, + "aud": { + "description": "Audience contains a list of the token's intended audiences.", + "items": { + "type": "string" + }, + "type": "array" + }, + "client_id": { + "description": "ID is aclient identifier for the OAuth 2.0 client that\nrequested this token.", + "type": "string" + }, + "exp": { + "description": "Expires at is an integer timestamp, measured in the number of seconds\nsince January 1 1970 UTC, indicating when this token will expire.", + "format": "int64", + "type": "integer" + }, + "ext": { + "additionalProperties": {}, + "description": "Extra is arbitrary data set by the session.", + "type": "object" + }, + "iat": { + "description": "Issued at is an integer timestamp, measured in the number of seconds\nsince January 1 1970 UTC, indicating when this token was\noriginally issued.", + "format": "int64", + "type": "integer" + }, + "iss": { + "description": "IssuerURL is a string representing the issuer of this token", + "type": "string" + }, + "nbf": { + "description": "NotBefore is an integer timestamp, measured in the number of seconds\nsince January 1 1970 UTC, indicating when this token is not to be\nused before.", + "format": "int64", + "type": "integer" + }, + "obfuscated_subject": { + "description": "ObfuscatedSubject is set when the subject identifier algorithm was set to \"pairwise\" during authorization.\nIt is the `sub` value of the ID Token that was issued.", + "type": "string" + }, + "scope": { + "description": "Scope is a JSON string containing a space-separated list of\nscopes associated with this token.", + "type": "string" + }, + "sub": { + "description": "Subject of the token, as defined in JWT [RFC7519].\nUsually a machine-readable identifier of the resource owner who\nauthorized this token.", + "type": "string" + }, + "token_type": { + "description": "TokenType is the introspected token's type, typically `Bearer`.", + "type": "string" + }, + "token_use": { + "description": "TokenUse is the introspected token's use, for example `access_token` or `refresh_token`.", + "type": "string" + }, + "username": { + "description": "Username is a human-readable identifier for the resource owner who\nauthorized this token.", + "type": "string" + } + }, + "required": [ + "active" + ], + "type": "object" + }, + "jsonPatch": { + "description": "A JSONPatch document as defined by RFC 6902", + "properties": { + "from": { + "description": "This field is used together with operation \"move\" and uses JSON Pointer notation.\n\nLearn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).", + "example": "/name", + "type": "string" + }, + "op": { + "description": "The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\".", + "example": "replace", + "type": "string" + }, + "path": { + "description": "The path to the target path. Uses JSON pointer notation.\n\nLearn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).", + "example": "/name", + "type": "string" + }, + "value": { + "description": "The value to be used within the operations.\n\nLearn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).", + "example": "foobar" + } + }, + "required": [ + "op", + "path" + ], + "type": "object" + }, + "jsonPatchDocument": { + "description": "A JSONPatchDocument request", + "items": { + "$ref": "#/components/schemas/jsonPatch" + }, + "type": "array" + }, + "jsonWebKey": { + "properties": { + "alg": { + "description": "The \"alg\" (algorithm) parameter identifies the algorithm intended for\nuse with the key. The values used should either be registered in the\nIANA \"JSON Web Signature and Encryption Algorithms\" registry\nestablished by [JWA] or be a value that contains a Collision-\nResistant Name.", + "example": "RS256", + "type": "string" + }, + "crv": { + "example": "P-256", + "type": "string" + }, + "d": { + "example": "T_N8I-6He3M8a7X1vWt6TGIx4xB_GP3Mb4SsZSA4v-orvJzzRiQhLlRR81naWYxfQAYt5isDI6_C2L9bdWo4FFPjGQFvNoRX-_sBJyBI_rl-TBgsZYoUlAj3J92WmY2inbA-PwyJfsaIIDceYBC-eX-xiCu6qMqkZi3MwQAFL6bMdPEM0z4JBcwFT3VdiWAIRUuACWQwrXMq672x7fMuaIaHi7XDGgt1ith23CLfaREmJku9PQcchbt_uEY-hqrFY6ntTtS4paWWQj86xLL94S-Tf6v6xkL918PfLSOTq6XCzxvlFwzBJqApnAhbwqLjpPhgUG04EDRrqrSBc5Y1BLevn6Ip5h1AhessBp3wLkQgz_roeckt-ybvzKTjESMuagnpqLvOT7Y9veIug2MwPJZI2VjczRc1vzMs25XrFQ8DpUy-bNdp89TmvAXwctUMiJdgHloJw23Cv03gIUAkDnsTqZmkpbIf-crpgNKFmQP_EDKoe8p_PXZZgfbRri3NoEVGP7Mk6yEu8LjJhClhZaBNjuWw2-KlBfOA3g79mhfBnkInee5KO9mGR50qPk1V-MorUYNTFMZIm0kFE6eYVWFBwJHLKYhHU34DoiK1VP-svZpC2uAMFNA_UJEwM9CQ2b8qe4-5e9aywMvwcuArRkAB5mBIfOaOJao3mfukKAE", + "type": "string" + }, + "dp": { + "example": "G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0", + "type": "string" + }, + "dq": { + "example": "s9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk", + "type": "string" + }, + "e": { + "example": "AQAB", + "type": "string" + }, + "k": { + "example": "GawgguFyGrWKav7AX4VKUg", + "type": "string" + }, + "kid": { + "description": "The \"kid\" (key ID) parameter is used to match a specific key. This\nis used, for instance, to choose among a set of keys within a JWK Set\nduring key rollover. The structure of the \"kid\" value is\nunspecified. When \"kid\" values are used within a JWK Set, different\nkeys within the JWK Set SHOULD use distinct \"kid\" values. (One\nexample in which different keys might use the same \"kid\" value is if\nthey have different \"kty\" (key type) values but are considered to be\nequivalent alternatives by the application using them.) The \"kid\"\nvalue is a case-sensitive string.", + "example": "1603dfe0af8f4596", + "type": "string" + }, + "kty": { + "description": "The \"kty\" (key type) parameter identifies the cryptographic algorithm\nfamily used with the key, such as \"RSA\" or \"EC\". \"kty\" values should\neither be registered in the IANA \"JSON Web Key Types\" registry\nestablished by [JWA] or be a value that contains a Collision-\nResistant Name. The \"kty\" value is a case-sensitive string.", + "example": "RSA", + "type": "string" + }, + "n": { + "example": "vTqrxUyQPl_20aqf5kXHwDZrel-KovIp8s7ewJod2EXHl8tWlRB3_Rem34KwBfqlKQGp1nqah-51H4Jzruqe0cFP58hPEIt6WqrvnmJCXxnNuIB53iX_uUUXXHDHBeaPCSRoNJzNysjoJ30TIUsKBiirhBa7f235PXbKiHducLevV6PcKxJ5cY8zO286qJLBWSPm-OIevwqsIsSIH44Qtm9sioFikhkbLwoqwWORGAY0nl6XvVOlhADdLjBSqSAeT1FPuCDCnXwzCDR8N9IFB_IjdStFkC-rVt2K5BYfPd0c3yFp_vHR15eRd0zJ8XQ7woBC8Vnsac6Et1pKS59pX6256DPWu8UDdEOolKAPgcd_g2NpA76cAaF_jcT80j9KrEzw8Tv0nJBGesuCjPNjGs_KzdkWTUXt23Hn9QJsdc1MZuaW0iqXBepHYfYoqNelzVte117t4BwVp0kUM6we0IqyXClaZgOI8S-WDBw2_Ovdm8e5NmhYAblEVoygcX8Y46oH6bKiaCQfKCFDMcRgChme7AoE1yZZYsPbaG_3IjPrC4LBMHQw8rM9dWjJ8ImjicvZ1pAm0dx-KHCP3y5PVKrxBDf1zSOsBRkOSjB8TPODnJMz6-jd5hTtZxpZPwPoIdCanTZ3ZD6uRBpTmDwtpRGm63UQs1m5FWPwb0T2IF0", + "type": "string" + }, + "p": { + "example": "6NbkXwDWUhi-eR55Cgbf27FkQDDWIamOaDr0rj1q0f1fFEz1W5A_09YvG09Fiv1AO2-D8Rl8gS1Vkz2i0zCSqnyy8A025XOcRviOMK7nIxE4OH_PEsko8dtIrb3TmE2hUXvCkmzw9EsTF1LQBOGC6iusLTXepIC1x9ukCKFZQvdgtEObQ5kzd9Nhq-cdqmSeMVLoxPLd1blviVT9Vm8-y12CtYpeJHOaIDtVPLlBhJiBoPKWg3vxSm4XxIliNOefqegIlsmTIa3MpS6WWlCK3yHhat0Q-rRxDxdyiVdG_wzJvp0Iw_2wms7pe-PgNPYvUWH9JphWP5K38YqEBiJFXQ", + "type": "string" + }, + "q": { + "example": "0A1FmpOWR91_RAWpqreWSavNaZb9nXeKiBo0DQGBz32DbqKqQ8S4aBJmbRhJcctjCLjain-ivut477tAUMmzJwVJDDq2MZFwC9Q-4VYZmFU4HJityQuSzHYe64RjN-E_NQ02TWhG3QGW6roq6c57c99rrUsETwJJiwS8M5p15Miuz53DaOjv-uqqFAFfywN5WkxHbraBcjHtMiQuyQbQqkCFh-oanHkwYNeytsNhTu2mQmwR5DR2roZ2nPiFjC6nsdk-A7E3S3wMzYYFw7jvbWWoYWo9vB40_MY2Y0FYQSqcDzcBIcq_0tnnasf3VW4Fdx6m80RzOb2Fsnln7vKXAQ", + "type": "string" + }, + "qi": { + "example": "GyM_p6JrXySiz1toFgKbWV-JdI3jQ4ypu9rbMWx3rQJBfmt0FoYzgUIZEVFEcOqwemRN81zoDAaa-Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rxyR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU", + "type": "string" + }, + "use": { + "description": "Use (\"public key use\") identifies the intended use of\nthe public key. The \"use\" parameter is employed to indicate whether\na public key is used for encrypting data or verifying the signature\non data. Values are commonly \"sig\" (signature) or \"enc\" (encryption).", + "example": "sig", + "type": "string" + }, + "x": { + "example": "f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU", + "type": "string" + }, + "x5c": { + "description": "The \"x5c\" (X.509 certificate chain) parameter contains a chain of one\nor more PKIX certificates [RFC5280]. The certificate chain is\nrepresented as a JSON array of certificate value strings. Each\nstring in the array is a base64-encoded (Section 4 of [RFC4648] --\nnot base64url-encoded) DER [ITU.X690.1994] PKIX certificate value.\nThe PKIX certificate containing the key value MUST be the first\ncertificate.", + "items": { + "type": "string" + }, + "type": "array" + }, + "y": { + "example": "x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0", + "type": "string" + } + }, + "required": [ + "use", + "kty", + "kid", + "alg" + ], + "type": "object" + }, + "jsonWebKeySet": { + "description": "JSON Web Key Set", + "properties": { + "keys": { + "description": "List of JSON Web Keys\n\nThe value of the \"keys\" parameter is an array of JSON Web Key (JWK)\nvalues. By default, the order of the JWK values within the array does\nnot imply an order of preference among them, although applications\nof JWK Sets can choose to assign a meaning to the order for their\npurposes, if desired.", + "items": { + "$ref": "#/components/schemas/jsonWebKey" + }, + "type": "array" + } + }, + "type": "object" + }, + "nullDuration": { + "nullable": true, + "pattern": "^[0-9]+(ns|us|ms|s|m|h)$", + "type": "string" + }, + "nullInt64": { + "nullable": true, + "type": "integer" + }, + "nullTime": { + "format": "date-time", + "title": "NullTime implements sql.NullTime functionality.", + "type": "string" + }, + "oAuth2Client": { + "description": "OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are\ngenerated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.", + "properties": { + "access_token_strategy": { + "description": "OAuth 2.0 Access Token Strategy\n\nAccessTokenStrategy is the strategy used to generate access tokens.\nValid options are `jwt` and `opaque`. `jwt` is a bad idea, see https://www.ory.sh/docs/hydra/advanced#json-web-tokens\nSetting the stragegy here overrides the global setting in `strategies.access_token`.", + "type": "string" + }, + "allowed_cors_origins": { + "$ref": "#/components/schemas/StringSliceJSONFormat" + }, + "audience": { + "$ref": "#/components/schemas/StringSliceJSONFormat" + }, + "authorization_code_grant_access_token_lifespan": { + "$ref": "#/components/schemas/NullDuration" + }, + "authorization_code_grant_id_token_lifespan": { + "$ref": "#/components/schemas/NullDuration" + }, + "authorization_code_grant_refresh_token_lifespan": { + "$ref": "#/components/schemas/NullDuration" + }, + "backchannel_logout_session_required": { + "description": "OpenID Connect Back-Channel Logout Session Required\n\nBoolean value specifying whether the RP requires that a sid (session ID) Claim be included in the Logout\nToken to identify the RP session with the OP when the backchannel_logout_uri is used.\nIf omitted, the default value is false.", + "type": "boolean" + }, + "backchannel_logout_uri": { + "description": "OpenID Connect Back-Channel Logout URI\n\nRP URL that will cause the RP to log itself out when sent a Logout Token by the OP.", + "type": "string" + }, + "client_credentials_grant_access_token_lifespan": { + "$ref": "#/components/schemas/NullDuration" + }, + "client_id": { + "description": "OAuth 2.0 Client ID\n\nThe ID is immutable. If no ID is provided, a UUID4 will be generated.", + "type": "string" + }, + "client_name": { + "description": "OAuth 2.0 Client Name\n\nThe human-readable name of the client to be presented to the\nend-user during authorization.", + "type": "string" + }, + "client_secret": { + "description": "OAuth 2.0 Client Secret\n\nThe secret will be included in the create request as cleartext, and then\nnever again. The secret is kept in hashed format and is not recoverable once lost.", + "type": "string" + }, + "client_secret_expires_at": { + "description": "OAuth 2.0 Client Secret Expires At\n\nThe field is currently not supported and its value is always 0.", + "format": "int64", + "type": "integer" + }, + "client_uri": { + "description": "OAuth 2.0 Client URI\n\nClientURI is a URL string of a web page providing information about the client.\nIf present, the server SHOULD display this URL to the end-user in\na clickable fashion.", + "type": "string" + }, + "contacts": { + "$ref": "#/components/schemas/StringSliceJSONFormat" + }, + "created_at": { + "description": "OAuth 2.0 Client Creation Date\n\nCreatedAt returns the timestamp of the client's creation.", + "format": "date-time", + "type": "string" + }, + "frontchannel_logout_session_required": { + "description": "OpenID Connect Front-Channel Logout Session Required\n\nBoolean value specifying whether the RP requires that iss (issuer) and sid (session ID) query parameters be\nincluded to identify the RP session with the OP when the frontchannel_logout_uri is used.\nIf omitted, the default value is false.", + "type": "boolean" + }, + "frontchannel_logout_uri": { + "description": "OpenID Connect Front-Channel Logout URI\n\nRP URL that will cause the RP to log itself out when rendered in an iframe by the OP. An iss (issuer) query\nparameter and a sid (session ID) query parameter MAY be included by the OP to enable the RP to validate the\nrequest and to determine which of the potentially multiple sessions is to be logged out; if either is\nincluded, both MUST be.", + "type": "string" + }, + "grant_types": { + "$ref": "#/components/schemas/StringSliceJSONFormat" + }, + "implicit_grant_access_token_lifespan": { + "$ref": "#/components/schemas/NullDuration" + }, + "implicit_grant_id_token_lifespan": { + "$ref": "#/components/schemas/NullDuration" + }, + "jwks": { + "description": "OAuth 2.0 Client JSON Web Key Set\n\nClient's JSON Web Key Set [JWK] document, passed by value. The semantics of the jwks parameter are the same as\nthe jwks_uri parameter, other than that the JWK Set is passed by value, rather than by reference. This parameter\nis intended only to be used by Clients that, for some reason, are unable to use the jwks_uri parameter, for\ninstance, by native applications that might not have a location to host the contents of the JWK Set. If a Client\ncan use jwks_uri, it MUST NOT use jwks. One significant downside of jwks is that it does not enable key rotation\n(which jwks_uri does, as described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The jwks_uri and jwks\nparameters MUST NOT be used together." + }, + "jwks_uri": { + "description": "OAuth 2.0 Client JSON Web Key Set URL\n\nURL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains\nthe signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the\nClient's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing\nand encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced\nJWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both\nsignatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used\nto provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST\nmatch those in the certificate.", + "type": "string" + }, + "jwt_bearer_grant_access_token_lifespan": { + "$ref": "#/components/schemas/NullDuration" + }, + "logo_uri": { + "description": "OAuth 2.0 Client Logo URI\n\nA URL string referencing the client's logo.", + "type": "string" + }, + "metadata": { + "$ref": "#/components/schemas/JSONRawMessage" + }, + "owner": { + "description": "OAuth 2.0 Client Owner\n\nOwner is a string identifying the owner of the OAuth 2.0 Client.", + "type": "string" + }, + "policy_uri": { + "description": "OAuth 2.0 Client Policy URI\n\nPolicyURI is a URL string that points to a human-readable privacy policy document\nthat describes how the deployment organization collects, uses,\nretains, and discloses personal data.", + "type": "string" + }, + "post_logout_redirect_uris": { + "$ref": "#/components/schemas/StringSliceJSONFormat" + }, + "redirect_uris": { + "$ref": "#/components/schemas/StringSliceJSONFormat" + }, + "refresh_token_grant_access_token_lifespan": { + "$ref": "#/components/schemas/NullDuration" + }, + "refresh_token_grant_id_token_lifespan": { + "$ref": "#/components/schemas/NullDuration" + }, + "refresh_token_grant_refresh_token_lifespan": { + "$ref": "#/components/schemas/NullDuration" + }, + "registration_access_token": { + "description": "OpenID Connect Dynamic Client Registration Access Token\n\nRegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. It is sent when creating a client\nusing Dynamic Client Registration.", + "type": "string" + }, + "registration_client_uri": { + "description": "OpenID Connect Dynamic Client Registration URL\n\nRegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client.", + "type": "string" + }, + "request_object_signing_alg": { + "description": "OpenID Connect Request Object Signing Algorithm\n\nJWS [JWS] alg algorithm [JWA] that MUST be used for signing Request Objects sent to the OP. All Request Objects\nfrom this Client MUST be rejected, if not signed with this algorithm.", + "type": "string" + }, + "request_uris": { + "$ref": "#/components/schemas/StringSliceJSONFormat" + }, + "response_types": { + "$ref": "#/components/schemas/StringSliceJSONFormat" + }, + "scope": { + "description": "OAuth 2.0 Client Scope\n\nScope is a string containing a space-separated list of scope values (as\ndescribed in Section 3.3 of OAuth 2.0 [RFC6749]) that the client\ncan use when requesting access tokens.", + "example": "scope1 scope-2 scope.3 scope:4", + "type": "string" + }, + "sector_identifier_uri": { + "description": "OpenID Connect Sector Identifier URI\n\nURL using the https scheme to be used in calculating Pseudonymous Identifiers by the OP. The URL references a\nfile with a single JSON array of redirect_uri values.", + "type": "string" + }, + "skip_consent": { + "description": "SkipConsent skips the consent screen for this client. This field can only\nbe set from the admin API.", + "type": "boolean" + }, + "skip_logout_consent": { + "description": "SkipLogoutConsent skips the logout consent screen for this client. This field can only\nbe set from the admin API.", + "type": "boolean" + }, + "subject_type": { + "description": "OpenID Connect Subject Type\n\nThe `subject_types_supported` Discovery parameter contains a\nlist of the supported subject_type values for this server. Valid types include `pairwise` and `public`.", + "type": "string" + }, + "token_endpoint_auth_method": { + "default": "client_secret_basic", + "description": "OAuth 2.0 Token Endpoint Authentication Method\n\nRequested Client Authentication method for the Token Endpoint. The options are:\n\n`client_secret_basic`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header.\n`client_secret_post`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body.\n`private_key_jwt`: Use JSON Web Tokens to authenticate the client.\n`none`: Used for public clients (native apps, mobile apps) which can not have secrets.", + "type": "string" + }, + "token_endpoint_auth_signing_alg": { + "description": "OAuth 2.0 Token Endpoint Signing Algorithm\n\nRequested Client Authentication signing algorithm for the Token Endpoint.", + "type": "string" + }, + "tos_uri": { + "description": "OAuth 2.0 Client Terms of Service URI\n\nA URL string pointing to a human-readable terms of service\ndocument for the client that describes a contractual relationship\nbetween the end-user and the client that the end-user accepts when\nauthorizing the client.", + "type": "string" + }, + "updated_at": { + "description": "OAuth 2.0 Client Last Update Date\n\nUpdatedAt returns the timestamp of the last update.", + "format": "date-time", + "type": "string" + }, + "userinfo_signed_response_alg": { + "description": "OpenID Connect Request Userinfo Signed Response Algorithm\n\nJWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT\n[JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims\nas a UTF-8 encoded JSON object using the application/json content-type.", + "type": "string" + } + }, + "title": "OAuth 2.0 Client", + "type": "object" + }, + "oAuth2ClientTokenLifespans": { + "description": "Lifespans of different token types issued for this OAuth 2.0 Client.", + "properties": { + "authorization_code_grant_access_token_lifespan": { + "$ref": "#/components/schemas/NullDuration" + }, + "authorization_code_grant_id_token_lifespan": { + "$ref": "#/components/schemas/NullDuration" + }, + "authorization_code_grant_refresh_token_lifespan": { + "$ref": "#/components/schemas/NullDuration" + }, + "client_credentials_grant_access_token_lifespan": { + "$ref": "#/components/schemas/NullDuration" + }, + "implicit_grant_access_token_lifespan": { + "$ref": "#/components/schemas/NullDuration" + }, + "implicit_grant_id_token_lifespan": { + "$ref": "#/components/schemas/NullDuration" + }, + "jwt_bearer_grant_access_token_lifespan": { + "$ref": "#/components/schemas/NullDuration" + }, + "refresh_token_grant_access_token_lifespan": { + "$ref": "#/components/schemas/NullDuration" + }, + "refresh_token_grant_id_token_lifespan": { + "$ref": "#/components/schemas/NullDuration" + }, + "refresh_token_grant_refresh_token_lifespan": { + "$ref": "#/components/schemas/NullDuration" + } + }, + "title": "OAuth 2.0 Client Token Lifespans", + "type": "object" + }, + "oAuth2ConsentRequest": { + "properties": { + "acr": { + "description": "ACR represents the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it\nto express that, for example, a user authenticated using two factor authentication.", + "type": "string" + }, + "amr": { + "$ref": "#/components/schemas/StringSliceJSONFormat" + }, + "challenge": { + "description": "ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to\nidentify the session.", + "type": "string" + }, + "client": { + "$ref": "#/components/schemas/oAuth2Client" + }, + "context": { + "$ref": "#/components/schemas/JSONRawMessage" + }, + "login_challenge": { + "description": "LoginChallenge is the login challenge this consent challenge belongs to. It can be used to associate\na login and consent request in the login & consent app.", + "type": "string" + }, + "login_session_id": { + "description": "LoginSessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag)\nthis ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false)\nthis will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back-\nchannel logout. It's value can generally be used to associate consecutive login requests by a certain user.", + "type": "string" + }, + "oidc_context": { + "$ref": "#/components/schemas/oAuth2ConsentRequestOpenIDConnectContext" + }, + "request_url": { + "description": "RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which\ninitiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but\nmight come in handy if you want to deal with additional request parameters.", + "type": "string" + }, + "requested_access_token_audience": { + "$ref": "#/components/schemas/StringSliceJSONFormat" + }, + "requested_scope": { + "$ref": "#/components/schemas/StringSliceJSONFormat" + }, + "skip": { + "description": "Skip, if true, implies that the client has requested the same scopes from the same user previously.\nIf true, you must not ask the user to grant the requested scopes. You must however either allow or deny the\nconsent request using the usual API call.", + "type": "boolean" + }, + "subject": { + "description": "Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope\nrequested by the OAuth 2.0 client.", + "type": "string" + } + }, + "required": [ + "challenge" + ], + "title": "Contains information on an ongoing consent request.", + "type": "object" + }, + "oAuth2ConsentRequestOpenIDConnectContext": { + "properties": { + "acr_values": { + "description": "ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request.\nIt is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required.\n\nOpenID Connect defines it as follows:\n> Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values\nthat the Authorization Server is being requested to use for processing this Authentication Request, with the\nvalues appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication\nperformed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a\nVoluntary Claim by this parameter.", + "items": { + "type": "string" + }, + "type": "array" + }, + "display": { + "description": "Display is a string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User.\nThe defined values are:\npage: The Authorization Server SHOULD display the authentication and consent UI consistent with a full User Agent page view. If the display parameter is not specified, this is the default display mode.\npopup: The Authorization Server SHOULD display the authentication and consent UI consistent with a popup User Agent window. The popup User Agent window should be of an appropriate size for a login-focused dialog and should not obscure the entire window that it is popping up over.\ntouch: The Authorization Server SHOULD display the authentication and consent UI consistent with a device that leverages a touch interface.\nwap: The Authorization Server SHOULD display the authentication and consent UI consistent with a \"feature phone\" type display.\n\nThe Authorization Server MAY also attempt to detect the capabilities of the User Agent and present an appropriate display.", + "type": "string" + }, + "id_token_hint_claims": { + "additionalProperties": {}, + "description": "IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the\nEnd-User's current or past authenticated session with the Client.", + "type": "object" + }, + "login_hint": { + "description": "LoginHint hints about the login identifier the End-User might use to log in (if necessary).\nThis hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier)\nand then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a\nphone number in the format specified for the phone_number Claim. The use of this parameter is optional.", + "type": "string" + }, + "ui_locales": { + "description": "UILocales is the End-User'id preferred languages and scripts for the user interface, represented as a\nspace-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value\n\"fr-CA fr en\" represents a preference for French as spoken in Canada, then French (without a region designation),\nfollowed by English (without a region designation). An error SHOULD NOT result if some or all of the requested\nlocales are not supported by the OpenID Provider.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "title": "Contains optional information about the OpenID Connect request.", + "type": "object" + }, + "oAuth2ConsentSession": { + "description": "A completed OAuth 2.0 Consent Session.", + "properties": { + "consent_request": { + "$ref": "#/components/schemas/oAuth2ConsentRequest" + }, + "context": { + "$ref": "#/components/schemas/JSONRawMessage" + }, + "expires_at": { + "properties": { + "access_token": { + "format": "date-time", + "type": "string" + }, + "authorize_code": { + "format": "date-time", + "type": "string" + }, + "id_token": { + "format": "date-time", + "type": "string" + }, + "par_context": { + "format": "date-time", + "type": "string" + }, + "refresh_token": { + "format": "date-time", + "type": "string" + } + }, + "type": "object" + }, + "grant_access_token_audience": { + "$ref": "#/components/schemas/StringSliceJSONFormat" + }, + "grant_scope": { + "$ref": "#/components/schemas/StringSliceJSONFormat" + }, + "handled_at": { + "$ref": "#/components/schemas/nullTime" + }, + "remember": { + "description": "Remember Consent\n\nRemember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same\nclient asks the same user for the same, or a subset of, scope.", + "type": "boolean" + }, + "remember_for": { + "description": "Remember Consent For\n\nRememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the\nauthorization will be remembered indefinitely.", + "format": "int64", + "type": "integer" + }, + "session": { + "$ref": "#/components/schemas/acceptOAuth2ConsentRequestSession" + } + }, + "title": "OAuth 2.0 Consent Session", + "type": "object" + }, + "oAuth2ConsentSessions": { + "description": "List of OAuth 2.0 Consent Sessions", + "items": { + "$ref": "#/components/schemas/oAuth2ConsentSession" + }, + "type": "array" + }, + "oAuth2LoginRequest": { + "properties": { + "challenge": { + "description": "ID is the identifier (\"login challenge\") of the login request. It is used to\nidentify the session.", + "type": "string" + }, + "client": { + "$ref": "#/components/schemas/oAuth2Client" + }, + "oidc_context": { + "$ref": "#/components/schemas/oAuth2ConsentRequestOpenIDConnectContext" + }, + "request_url": { + "description": "RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which\ninitiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but\nmight come in handy if you want to deal with additional request parameters.", + "type": "string" + }, + "requested_access_token_audience": { + "$ref": "#/components/schemas/StringSliceJSONFormat" + }, + "requested_scope": { + "$ref": "#/components/schemas/StringSliceJSONFormat" + }, + "session_id": { + "description": "SessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag)\nthis ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false)\nthis will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back-\nchannel logout. It's value can generally be used to associate consecutive login requests by a certain user.", + "type": "string" + }, + "skip": { + "description": "Skip, if true, implies that the client has requested the same scopes from the same user previously.\nIf true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect URL.\n\nThis feature allows you to update / set session information.", + "type": "boolean" + }, + "subject": { + "description": "Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope\nrequested by the OAuth 2.0 client. If this value is set and `skip` is true, you MUST include this subject type\nwhen accepting the login request, or the request will fail.", + "type": "string" + } + }, + "required": [ + "challenge", + "skip", + "subject", + "client", + "request_url" + ], + "title": "Contains information on an ongoing login request.", + "type": "object" + }, + "oAuth2LogoutRequest": { + "properties": { + "challenge": { + "description": "Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to\nidentify the session.", + "type": "string" + }, + "client": { + "$ref": "#/components/schemas/oAuth2Client" + }, + "request_url": { + "description": "RequestURL is the original Logout URL requested.", + "type": "string" + }, + "rp_initiated": { + "description": "RPInitiated is set to true if the request was initiated by a Relying Party (RP), also known as an OAuth 2.0 Client.", + "type": "boolean" + }, + "sid": { + "description": "SessionID is the login session ID that was requested to log out.", + "type": "string" + }, + "subject": { + "description": "Subject is the user for whom the logout was request.", + "type": "string" + } + }, + "title": "Contains information about an ongoing logout request.", + "type": "object" + }, + "oAuth2RedirectTo": { + "description": "Contains a redirect URL used to complete a login, consent, or logout request.", + "properties": { + "redirect_to": { + "description": "RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed.", + "type": "string" + } + }, + "required": [ + "redirect_to" + ], + "title": "OAuth 2.0 Redirect Browser To", + "type": "object" + }, + "oAuth2TokenExchange": { + "description": "OAuth2 Token Exchange Result", + "properties": { + "access_token": { + "description": "The access token issued by the authorization server.", + "type": "string" + }, + "expires_in": { + "description": "The lifetime in seconds of the access token. For\nexample, the value \"3600\" denotes that the access token will\nexpire in one hour from the time the response was generated.", + "format": "int64", + "type": "integer" + }, + "id_token": { + "description": "To retrieve a refresh token request the id_token scope.", + "type": "string" + }, + "refresh_token": { + "description": "The refresh token, which can be used to obtain new\naccess tokens. To retrieve it add the scope \"offline\" to your access token request.", + "type": "string" + }, + "scope": { + "description": "The scope of the access token", + "type": "string" + }, + "token_type": { + "description": "The type of the token issued", + "type": "string" + } + }, + "type": "object" + }, + "oidcConfiguration": { + "description": "Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms\namong others.", + "properties": { + "authorization_endpoint": { + "description": "OAuth 2.0 Authorization Endpoint URL", + "example": "https://playground.ory.sh/ory-hydra/public/oauth2/auth", + "type": "string" + }, + "backchannel_logout_session_supported": { + "description": "OpenID Connect Back-Channel Logout Session Required\n\nBoolean value specifying whether the OP can pass a sid (session ID) Claim in the Logout Token to identify the RP\nsession with the OP. If supported, the sid Claim is also included in ID Tokens issued by the OP", + "type": "boolean" + }, + "backchannel_logout_supported": { + "description": "OpenID Connect Back-Channel Logout Supported\n\nBoolean value specifying whether the OP supports back-channel logout, with true indicating support.", + "type": "boolean" + }, + "claims_parameter_supported": { + "description": "OpenID Connect Claims Parameter Parameter Supported\n\nBoolean value specifying whether the OP supports use of the claims parameter, with true indicating support.", + "type": "boolean" + }, + "claims_supported": { + "description": "OpenID Connect Supported Claims\n\nJSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply\nvalues for. Note that for privacy or other reasons, this might not be an exhaustive list.", + "items": { + "type": "string" + }, + "type": "array" + }, + "code_challenge_methods_supported": { + "description": "OAuth 2.0 PKCE Supported Code Challenge Methods\n\nJSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported\nby this authorization server.", + "items": { + "type": "string" + }, + "type": "array" + }, + "credentials_endpoint_draft_00": { + "description": "OpenID Connect Verifiable Credentials Endpoint\n\nContains the URL of the Verifiable Credentials Endpoint.", + "type": "string" + }, + "credentials_supported_draft_00": { + "description": "OpenID Connect Verifiable Credentials Supported\n\nJSON array containing a list of the Verifiable Credentials supported by this authorization server.", + "items": { + "$ref": "#/components/schemas/credentialSupportedDraft00" + }, + "type": "array" + }, + "end_session_endpoint": { + "description": "OpenID Connect End-Session Endpoint\n\nURL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP.", + "type": "string" + }, + "frontchannel_logout_session_supported": { + "description": "OpenID Connect Front-Channel Logout Session Required\n\nBoolean value specifying whether the OP can pass iss (issuer) and sid (session ID) query parameters to identify\nthe RP session with the OP when the frontchannel_logout_uri is used. If supported, the sid Claim is also\nincluded in ID Tokens issued by the OP.", + "type": "boolean" + }, + "frontchannel_logout_supported": { + "description": "OpenID Connect Front-Channel Logout Supported\n\nBoolean value specifying whether the OP supports HTTP-based logout, with true indicating support.", + "type": "boolean" + }, + "grant_types_supported": { + "description": "OAuth 2.0 Supported Grant Types\n\nJSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports.", + "items": { + "type": "string" + }, + "type": "array" + }, + "id_token_signed_response_alg": { + "description": "OpenID Connect Default ID Token Signing Algorithms\n\nAlgorithm used to sign OpenID Connect ID Tokens.", + "items": { + "type": "string" + }, + "type": "array" + }, + "id_token_signing_alg_values_supported": { + "description": "OpenID Connect Supported ID Token Signing Algorithms\n\nJSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token\nto encode the Claims in a JWT.", + "items": { + "type": "string" + }, + "type": "array" + }, + "issuer": { + "description": "OpenID Connect Issuer URL\n\nAn URL using the https scheme with no query or fragment component that the OP asserts as its IssuerURL Identifier.\nIf IssuerURL discovery is supported , this value MUST be identical to the issuer value returned\nby WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this IssuerURL.", + "example": "https://playground.ory.sh/ory-hydra/public/", + "type": "string" + }, + "jwks_uri": { + "description": "OpenID Connect Well-Known JSON Web Keys URL\n\nURL of the OP's JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to validate\nsignatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs\nto encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use)\nparameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage.\nAlthough some algorithms allow the same key to be used for both signatures and encryption, doing so is\nNOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of\nkeys provided. When used, the bare key values MUST still be present and MUST match those in the certificate.", + "example": "https://{slug}.projects.oryapis.com/.well-known/jwks.json", + "type": "string" + }, + "registration_endpoint": { + "description": "OpenID Connect Dynamic Client Registration Endpoint URL", + "example": "https://playground.ory.sh/ory-hydra/admin/client", + "type": "string" + }, + "request_object_signing_alg_values_supported": { + "description": "OpenID Connect Supported Request Object Signing Algorithms\n\nJSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects,\nwhich are described in Section 6.1 of OpenID Connect Core 1.0 [OpenID.Core]. These algorithms are used both when\nthe Request Object is passed by value (using the request parameter) and when it is passed by reference\n(using the request_uri parameter).", + "items": { + "type": "string" + }, + "type": "array" + }, + "request_parameter_supported": { + "description": "OpenID Connect Request Parameter Supported\n\nBoolean value specifying whether the OP supports use of the request parameter, with true indicating support.", + "type": "boolean" + }, + "request_uri_parameter_supported": { + "description": "OpenID Connect Request URI Parameter Supported\n\nBoolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support.", + "type": "boolean" + }, + "require_request_uri_registration": { + "description": "OpenID Connect Requires Request URI Registration\n\nBoolean value specifying whether the OP requires any request_uri values used to be pre-registered\nusing the request_uris registration parameter.", + "type": "boolean" + }, + "response_modes_supported": { + "description": "OAuth 2.0 Supported Response Modes\n\nJSON array containing a list of the OAuth 2.0 response_mode values that this OP supports.", + "items": { + "type": "string" + }, + "type": "array" + }, + "response_types_supported": { + "description": "OAuth 2.0 Supported Response Types\n\nJSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID\nProviders MUST support the code, id_token, and the token id_token Response Type values.", + "items": { + "type": "string" + }, + "type": "array" + }, + "revocation_endpoint": { + "description": "OAuth 2.0 Token Revocation URL\n\nURL of the authorization server's OAuth 2.0 revocation endpoint.", + "type": "string" + }, + "scopes_supported": { + "description": "OAuth 2.0 Supported Scope Values\n\nJSON array containing a list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST\nsupport the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used", + "items": { + "type": "string" + }, + "type": "array" + }, + "subject_types_supported": { + "description": "OpenID Connect Supported Subject Types\n\nJSON array containing a list of the Subject Identifier types that this OP supports. Valid types include\npairwise and public.", + "items": { + "type": "string" + }, + "type": "array" + }, + "token_endpoint": { + "description": "OAuth 2.0 Token Endpoint URL", + "example": "https://playground.ory.sh/ory-hydra/public/oauth2/token", + "type": "string" + }, + "token_endpoint_auth_methods_supported": { + "description": "OAuth 2.0 Supported Client Authentication Methods\n\nJSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are\nclient_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0", + "items": { + "type": "string" + }, + "type": "array" + }, + "userinfo_endpoint": { + "description": "OpenID Connect Userinfo URL\n\nURL of the OP's UserInfo Endpoint.", + "type": "string" + }, + "userinfo_signed_response_alg": { + "description": "OpenID Connect User Userinfo Signing Algorithm\n\nAlgorithm used to sign OpenID Connect Userinfo Responses.", + "items": { + "type": "string" + }, + "type": "array" + }, + "userinfo_signing_alg_values_supported": { + "description": "OpenID Connect Supported Userinfo Signing Algorithm\n\nJSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "issuer", + "authorization_endpoint", + "token_endpoint", + "jwks_uri", + "subject_types_supported", + "response_types_supported", + "id_token_signing_alg_values_supported", + "id_token_signed_response_alg", + "userinfo_signed_response_alg" + ], + "title": "OpenID Connect Discovery Metadata", + "type": "object" + }, + "oidcUserInfo": { + "description": "OpenID Connect Userinfo", + "properties": { + "birthdate": { + "description": "End-User's birthday, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format. The year MAY be 0000, indicating that it is omitted. To represent only the year, YYYY format is allowed. Note that depending on the underlying platform's date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates.", + "type": "string" + }, + "email": { + "description": "End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7.", + "type": "string" + }, + "email_verified": { + "description": "True if the End-User's e-mail address has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this e-mail address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating.", + "type": "boolean" + }, + "family_name": { + "description": "Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters.", + "type": "string" + }, + "gender": { + "description": "End-User's gender. Values defined by this specification are female and male. Other values MAY be used when neither of the defined values are applicable.", + "type": "string" + }, + "given_name": { + "description": "Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters.", + "type": "string" + }, + "locale": { + "description": "End-User's locale, represented as a BCP47 [RFC5646] language tag. This is typically an ISO 639-1 Alpha-2 [ISO639‑1] language code in lowercase and an ISO 3166-1 Alpha-2 [ISO3166‑1] country code in uppercase, separated by a dash. For example, en-US or fr-CA. As a compatibility note, some implementations have used an underscore as the separator rather than a dash, for example, en_US; Relying Parties MAY choose to accept this locale syntax as well.", + "type": "string" + }, + "middle_name": { + "description": "Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used.", + "type": "string" + }, + "name": { + "description": "End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences.", + "type": "string" + }, + "nickname": { + "description": "Casual name of the End-User that may or may not be the same as the given_name. For instance, a nickname value of Mike might be returned alongside a given_name value of Michael.", + "type": "string" + }, + "phone_number": { + "description": "End-User's preferred telephone number. E.164 [E.164] is RECOMMENDED as the format of this Claim, for example, +1 (425) 555-1212 or +56 (2) 687 2400. If the phone number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678.", + "type": "string" + }, + "phone_number_verified": { + "description": "True if the End-User's phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format.", + "type": "boolean" + }, + "picture": { + "description": "URL of the End-User's profile picture. This URL MUST refer to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image. Note that this URL SHOULD specifically reference a profile photo of the End-User suitable for displaying when describing the End-User, rather than an arbitrary photo taken by the End-User.", + "type": "string" + }, + "preferred_username": { + "description": "Non-unique shorthand name by which the End-User wishes to be referred to at the RP, such as janedoe or j.doe. This value MAY be any valid JSON string including special characters such as @, /, or whitespace.", + "type": "string" + }, + "profile": { + "description": "URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User.", + "type": "string" + }, + "sub": { + "description": "Subject - Identifier for the End-User at the IssuerURL.", + "type": "string" + }, + "updated_at": { + "description": "Time the End-User's information was last updated. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time.", + "format": "int64", + "type": "integer" + }, + "website": { + "description": "URL of the End-User's Web page or blog. This Web page SHOULD contain information published by the End-User or an organization that the End-User is affiliated with.", + "type": "string" + }, + "zoneinfo": { + "description": "String from zoneinfo [zoneinfo] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles.", + "type": "string" + } + }, + "type": "object" + }, + "pagination": { + "properties": { + "page_size": { + "default": 250, + "description": "Items per page\n\nThis is the number of items per page to return.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).", + "format": "int64", + "maximum": 1000, + "minimum": 1, + "type": "integer" + }, + "page_token": { + "default": "1", + "description": "Next Page Token\n\nThe next page token.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).", + "minimum": 1, + "type": "string" + } + }, + "type": "object" + }, + "paginationHeaders": { + "properties": { + "link": { + "description": "The link header contains pagination links.\n\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).\n\nin: header", + "type": "string" + }, + "x-total-count": { + "description": "The total number of clients.\n\nin: header", + "type": "string" + } + }, + "type": "object" + }, + "rejectOAuth2Request": { + "properties": { + "error": { + "description": "The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`).\n\nDefaults to `request_denied`.", + "type": "string" + }, + "error_debug": { + "description": "Debug contains information to help resolve the problem as a developer. Usually not exposed\nto the public but only in the server logs.", + "type": "string" + }, + "error_description": { + "description": "Description of the error in a human readable format.", + "type": "string" + }, + "error_hint": { + "description": "Hint to help resolve the error.", + "type": "string" + }, + "status_code": { + "description": "Represents the HTTP status code of the error (e.g. 401 or 403)\n\nDefaults to 400", + "format": "int64", + "type": "integer" + } + }, + "title": "The request payload used to accept a login or consent request.", + "type": "object" + }, + "tokenPagination": { + "properties": { + "page_size": { + "default": 250, + "description": "Items per page\n\nThis is the number of items per page to return.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).", + "format": "int64", + "maximum": 1000, + "minimum": 1, + "type": "integer" + }, + "page_token": { + "default": "1", + "description": "Next Page Token\n\nThe next page token.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).", + "minimum": 1, + "type": "string" + } + }, + "type": "object" + }, + "tokenPaginationHeaders": { + "properties": { + "link": { + "description": "The link header contains pagination links.\n\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).\n\nin: header", + "type": "string" + }, + "x-total-count": { + "description": "The total number of clients.\n\nin: header", + "type": "string" + } + }, + "type": "object" + }, + "tokenPaginationRequestParameters": { + "description": "The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as:\n`; rel=\"{page}\"`\n\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).", + "properties": { + "page_size": { + "default": 250, + "description": "Items per Page\n\nThis is the number of items per page to return.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).", + "format": "int64", + "maximum": 500, + "minimum": 1, + "type": "integer" + }, + "page_token": { + "default": "1", + "description": "Next Page Token\n\nThe next page token.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).", + "minimum": 1, + "type": "string" + } + }, + "title": "Pagination Request Parameters", + "type": "object" + }, + "tokenPaginationResponseHeaders": { + "description": "The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as:\n`; rel=\"{page}\"`\n\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).", + "properties": { + "link": { + "description": "The Link HTTP Header\n\nThe `Link` header contains a comma-delimited list of links to the following pages:\n\nfirst: The first page of results.\nnext: The next page of results.\nprev: The previous page of results.\nlast: The last page of results.\n\nPages are omitted if they do not exist. For example, if there is no next page, the `next` link is omitted. Examples:\n\n; rel=\"first\",; rel=\"next\",; rel=\"prev\",; rel=\"last\"", + "type": "string" + }, + "x-total-count": { + "description": "The X-Total-Count HTTP Header\n\nThe `X-Total-Count` header contains the total number of items in the collection.", + "format": "int64", + "type": "integer" + } + }, + "title": "Pagination Response Header", + "type": "object" + }, + "trustOAuth2JwtGrantIssuer": { + "description": "Trust OAuth2 JWT Bearer Grant Type Issuer Request Body", + "properties": { + "allow_any_subject": { + "description": "The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT.", + "type": "boolean" + }, + "expires_at": { + "description": "The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\".", + "format": "date-time", + "type": "string" + }, + "issuer": { + "description": "The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT).", + "example": "https://jwt-idp.example.com", + "type": "string" + }, + "jwk": { + "$ref": "#/components/schemas/jsonWebKey" + }, + "scope": { + "description": "The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749])", + "example": [ + "openid", + "offline" + ], + "items": { + "type": "string" + }, + "type": "array" + }, + "subject": { + "description": "The \"subject\" identifies the principal that is the subject of the JWT.", + "example": "mike@example.com", + "type": "string" + } + }, + "required": [ + "issuer", + "scope", + "jwk", + "expires_at" + ], + "type": "object" + }, + "trustedOAuth2JwtGrantIssuer": { + "description": "OAuth2 JWT Bearer Grant Type Issuer Trust Relationship", + "properties": { + "allow_any_subject": { + "description": "The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT.", + "type": "boolean" + }, + "created_at": { + "description": "The \"created_at\" indicates, when grant was created.", + "format": "date-time", + "type": "string" + }, + "expires_at": { + "description": "The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\".", + "format": "date-time", + "type": "string" + }, + "id": { + "example": "9edc811f-4e28-453c-9b46-4de65f00217f", + "type": "string" + }, + "issuer": { + "description": "The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT).", + "example": "https://jwt-idp.example.com", + "type": "string" + }, + "public_key": { + "$ref": "#/components/schemas/trustedOAuth2JwtGrantJsonWebKey" + }, + "scope": { + "description": "The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749])", + "example": [ + "openid", + "offline" + ], + "items": { + "type": "string" + }, + "type": "array" + }, + "subject": { + "description": "The \"subject\" identifies the principal that is the subject of the JWT.", + "example": "mike@example.com", + "type": "string" + } + }, + "type": "object" + }, + "trustedOAuth2JwtGrantIssuers": { + "description": "OAuth2 JWT Bearer Grant Type Issuer Trust Relationships", + "items": { + "$ref": "#/components/schemas/trustedOAuth2JwtGrantIssuer" + }, + "type": "array" + }, + "trustedOAuth2JwtGrantJsonWebKey": { + "description": "OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key", + "properties": { + "kid": { + "description": "The \"key_id\" is key unique identifier (same as kid header in jws/jwt).", + "example": "123e4567-e89b-12d3-a456-426655440000", + "type": "string" + }, + "set": { + "description": "The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant.", + "example": "https://jwt-idp.example.com", + "type": "string" + } + }, + "type": "object" + }, + "unexpectedError": { + "type": "string" + }, + "verifiableCredentialPrimingResponse": { + "properties": { + "c_nonce": { + "type": "string" + }, + "c_nonce_expires_in": { + "format": "int64", + "type": "integer" + }, + "error": { + "type": "string" + }, + "error_debug": { + "type": "string" + }, + "error_description": { + "type": "string" + }, + "error_hint": { + "type": "string" + }, + "format": { + "type": "string" + }, + "status_code": { + "format": "int64", + "type": "integer" + } + }, + "title": "VerifiableCredentialPrimingResponse contains the nonce to include in the proof-of-possession JWT.", + "type": "object" + }, + "verifiableCredentialResponse": { + "properties": { + "credential_draft_00": { + "type": "string" + }, + "format": { + "type": "string" + } + }, + "title": "VerifiableCredentialResponse contains the verifiable credential.", + "type": "object" + }, + "version": { + "properties": { + "version": { + "description": "Version is the service's version.", + "type": "string" + } + }, + "type": "object" + } + }, + "securitySchemes": { + "basic": { + "scheme": "basic", + "type": "http" + }, + "bearer": { + "scheme": "bearer", + "type": "http" + }, + "oauth2": { + "flows": { + "authorizationCode": { + "authorizationUrl": "https://hydra.demo.ory.sh/oauth2/auth", + "scopes": { + "offline": "A scope required when requesting refresh tokens (alias for `offline_access`)", + "offline_access": "A scope required when requesting refresh tokens", + "openid": "Request an OpenID Connect ID Token" + }, + "tokenUrl": "https://hydra.demo.ory.sh/oauth2/token" + } + }, + "type": "oauth2" + } + } + }, + "info": { + "contact": { + "email": "hi@ory.sh" + }, + "description": "Documentation for all of Ory Hydra's APIs.\n", + "license": { + "name": "Apache 2.0" + }, + "title": "Ory Hydra API", + "version": "" + }, + "openapi": "3.0.3", + "paths": { + "/.well-known/jwks.json": { + "get": { + "description": "This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and,\nif enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like\n[node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others.", + "operationId": "discoverJsonWebKeys", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/jsonWebKeySet" + } + } + }, + "description": "jsonWebKeySet" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "Discover Well-Known JSON Web Keys", + "tags": [ + "wellknown" + ] + } + }, + "/.well-known/openid-configuration": { + "get": { + "description": "A mechanism for an OpenID Connect Relying Party to discover the End-User's OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations.\n\nPopular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others.\nFor a full list of clients go here: https://openid.net/developers/certified/", + "operationId": "discoverOidcConfiguration", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oidcConfiguration" + } + } + }, + "description": "oidcConfiguration" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "OpenID Connect Discovery", + "tags": [ + "oidc" + ] + } + }, + "/admin/clients": { + "get": { + "description": "This endpoint lists all clients in the database, and never returns client secrets.\nAs a default it lists the first 100 clients.", + "operationId": "listOAuth2Clients", + "parameters": [ + { + "description": "Items per Page\n\nThis is the number of items per page to return.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).", + "in": "query", + "name": "page_size", + "schema": { + "default": 250, + "format": "int64", + "maximum": 500, + "minimum": 1, + "type": "integer" + } + }, + { + "description": "Next Page Token\n\nThe next page token.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).", + "in": "query", + "name": "page_token", + "schema": { + "default": "1", + "minimum": 1, + "type": "string" + } + }, + { + "description": "The name of the clients to filter by.", + "in": "query", + "name": "client_name", + "schema": { + "type": "string" + } + }, + { + "description": "The owner of the clients to filter by.", + "in": "query", + "name": "owner", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/listOAuth2Clients" + }, + "default": { + "$ref": "#/components/responses/errorOAuth2Default" + } + }, + "summary": "List OAuth 2.0 Clients", + "tags": [ + "oAuth2" + ] + }, + "post": { + "description": "Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret\nis generated. The secret is echoed in the response. It is not possible to retrieve it later on.", + "operationId": "createOAuth2Client", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2Client" + } + } + }, + "description": "OAuth 2.0 Client Request Body", + "required": true, + "x-originalParamName": "Body" + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2Client" + } + } + }, + "description": "oAuth2Client" + }, + "400": { + "$ref": "#/components/responses/errorOAuth2BadRequest" + }, + "default": { + "$ref": "#/components/responses/errorOAuth2Default" + } + }, + "summary": "Create OAuth 2.0 Client", + "tags": [ + "oAuth2" + ] + } + }, + "/admin/clients/{id}": { + "delete": { + "description": "Delete an existing OAuth 2.0 Client by its ID.\n\nOAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are\ngenerated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.\n\nMake sure that this endpoint is well protected and only callable by first-party components.", + "operationId": "deleteOAuth2Client", + "parameters": [ + { + "description": "The id of the OAuth 2.0 Client.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/emptyResponse" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/genericError" + } + } + }, + "description": "genericError" + } + }, + "summary": "Delete OAuth 2.0 Client", + "tags": [ + "oAuth2" + ] + }, + "get": { + "description": "Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret.\n\nOAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are\ngenerated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.", + "operationId": "getOAuth2Client", + "parameters": [ + { + "description": "The id of the OAuth 2.0 Client.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2Client" + } + } + }, + "description": "oAuth2Client" + }, + "default": { + "$ref": "#/components/responses/errorOAuth2Default" + } + }, + "summary": "Get an OAuth 2.0 Client", + "tags": [ + "oAuth2" + ] + }, + "patch": { + "description": "Patch an existing OAuth 2.0 Client using JSON Patch. If you pass `client_secret`\nthe secret will be updated and returned via the API. This is the\nonly time you will be able to retrieve the client secret, so write it down and keep it safe.\n\nOAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are\ngenerated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.", + "operationId": "patchOAuth2Client", + "parameters": [ + { + "description": "The id of the OAuth 2.0 Client.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/jsonPatchDocument" + } + } + }, + "description": "OAuth 2.0 Client JSON Patch Body", + "required": true, + "x-originalParamName": "Body" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2Client" + } + } + }, + "description": "oAuth2Client" + }, + "404": { + "$ref": "#/components/responses/errorOAuth2NotFound" + }, + "default": { + "$ref": "#/components/responses/errorOAuth2Default" + } + }, + "summary": "Patch OAuth 2.0 Client", + "tags": [ + "oAuth2" + ] + }, + "put": { + "description": "Replaces an existing OAuth 2.0 Client with the payload you send. If you pass `client_secret` the secret is used,\notherwise the existing secret is used.\n\nIf set, the secret is echoed in the response. It is not possible to retrieve it later on.\n\nOAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are\ngenerated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.", + "operationId": "setOAuth2Client", + "parameters": [ + { + "description": "OAuth 2.0 Client ID", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2Client" + } + } + }, + "description": "OAuth 2.0 Client Request Body", + "required": true, + "x-originalParamName": "Body" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2Client" + } + } + }, + "description": "oAuth2Client" + }, + "400": { + "$ref": "#/components/responses/errorOAuth2BadRequest" + }, + "404": { + "$ref": "#/components/responses/errorOAuth2NotFound" + }, + "default": { + "$ref": "#/components/responses/errorOAuth2Default" + } + }, + "summary": "Set OAuth 2.0 Client", + "tags": [ + "oAuth2" + ] + } + }, + "/admin/clients/{id}/lifespans": { + "put": { + "description": "Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields.", + "operationId": "setOAuth2ClientLifespans", + "parameters": [ + { + "description": "OAuth 2.0 Client ID", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2ClientTokenLifespans" + } + } + }, + "x-originalParamName": "Body" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2Client" + } + } + }, + "description": "oAuth2Client" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/genericError" + } + } + }, + "description": "genericError" + } + }, + "summary": "Set OAuth2 Client Token Lifespans", + "tags": [ + "oAuth2" + ] + } + }, + "/admin/keys/{set}": { + "delete": { + "description": "Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set.\n\nA JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.", + "operationId": "deleteJsonWebKeySet", + "parameters": [ + { + "description": "The JSON Web Key Set", + "in": "path", + "name": "set", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/emptyResponse" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "Delete JSON Web Key Set", + "tags": [ + "jwk" + ] + }, + "get": { + "description": "This endpoint can be used to retrieve JWK Sets stored in ORY Hydra.\n\nA JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.", + "operationId": "getJsonWebKeySet", + "parameters": [ + { + "description": "JSON Web Key Set ID", + "in": "path", + "name": "set", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/jsonWebKeySet" + } + } + }, + "description": "jsonWebKeySet" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "Retrieve a JSON Web Key Set", + "tags": [ + "jwk" + ] + }, + "post": { + "description": "This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created.\n\nA JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.", + "operationId": "createJsonWebKeySet", + "parameters": [ + { + "description": "The JSON Web Key Set ID", + "in": "path", + "name": "set", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createJsonWebKeySet" + } + } + }, + "required": true, + "x-originalParamName": "Body" + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/jsonWebKeySet" + } + } + }, + "description": "jsonWebKeySet" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "Create JSON Web Key", + "tags": [ + "jwk" + ] + }, + "put": { + "description": "Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own.\n\nA JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.", + "operationId": "setJsonWebKeySet", + "parameters": [ + { + "description": "The JSON Web Key Set ID", + "in": "path", + "name": "set", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/jsonWebKeySet" + } + } + }, + "x-originalParamName": "Body" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/jsonWebKeySet" + } + } + }, + "description": "jsonWebKeySet" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "Update a JSON Web Key Set", + "tags": [ + "jwk" + ] + } + }, + "/admin/keys/{set}/{kid}": { + "delete": { + "description": "Use this endpoint to delete a single JSON Web Key.\n\nA JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A\nJWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses\nthis functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens),\nand allows storing user-defined keys as well.", + "operationId": "deleteJsonWebKey", + "parameters": [ + { + "description": "The JSON Web Key Set", + "in": "path", + "name": "set", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The JSON Web Key ID (kid)", + "in": "path", + "name": "kid", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/emptyResponse" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "Delete JSON Web Key", + "tags": [ + "jwk" + ] + }, + "get": { + "description": "This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid).", + "operationId": "getJsonWebKey", + "parameters": [ + { + "description": "JSON Web Key Set ID", + "in": "path", + "name": "set", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "JSON Web Key ID", + "in": "path", + "name": "kid", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/jsonWebKeySet" + } + } + }, + "description": "jsonWebKeySet" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "Get JSON Web Key", + "tags": [ + "jwk" + ] + }, + "put": { + "description": "Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own.\n\nA JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.", + "operationId": "setJsonWebKey", + "parameters": [ + { + "description": "The JSON Web Key Set ID", + "in": "path", + "name": "set", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "JSON Web Key ID", + "in": "path", + "name": "kid", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/jsonWebKey" + } + } + }, + "x-originalParamName": "Body" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/jsonWebKey" + } + } + }, + "description": "jsonWebKey" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "Set JSON Web Key", + "tags": [ + "jwk" + ] + } + }, + "/admin/oauth2/auth/requests/consent": { + "get": { + "description": "When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider\nto authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if\nthe OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf.\n\nThe consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent\nprovider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted\nor rejected the request.\n\nThe default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please\nhead over to the OAuth 2.0 documentation.", + "operationId": "getOAuth2ConsentRequest", + "parameters": [ + { + "description": "OAuth 2.0 Consent Request Challenge", + "in": "query", + "name": "consent_challenge", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2ConsentRequest" + } + } + }, + "description": "oAuth2ConsentRequest" + }, + "410": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2RedirectTo" + } + } + }, + "description": "oAuth2RedirectTo" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "Get OAuth 2.0 Consent Request", + "tags": [ + "oAuth2" + ] + } + }, + "/admin/oauth2/auth/requests/consent/accept": { + "put": { + "description": "When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider\nto authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if\nthe OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf.\n\nThe consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent\nprovider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted\nor rejected the request.\n\nThis endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf.\nThe consent provider includes additional information, such as session data for access and ID tokens, and if the\nconsent request should be used as basis for future requests.\n\nThe response contains a redirect URL which the consent provider should redirect the user-agent to.\n\nThe default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please\nhead over to the OAuth 2.0 documentation.", + "operationId": "acceptOAuth2ConsentRequest", + "parameters": [ + { + "description": "OAuth 2.0 Consent Request Challenge", + "in": "query", + "name": "consent_challenge", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/acceptOAuth2ConsentRequest" + } + } + }, + "x-originalParamName": "Body" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2RedirectTo" + } + } + }, + "description": "oAuth2RedirectTo" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "Accept OAuth 2.0 Consent Request", + "tags": [ + "oAuth2" + ] + } + }, + "/admin/oauth2/auth/requests/consent/reject": { + "put": { + "description": "When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider\nto authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if\nthe OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf.\n\nThe consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent\nprovider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted\nor rejected the request.\n\nThis endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf.\nThe consent provider must include a reason why the consent was not granted.\n\nThe response contains a redirect URL which the consent provider should redirect the user-agent to.\n\nThe default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please\nhead over to the OAuth 2.0 documentation.", + "operationId": "rejectOAuth2ConsentRequest", + "parameters": [ + { + "description": "OAuth 2.0 Consent Request Challenge", + "in": "query", + "name": "consent_challenge", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/rejectOAuth2Request" + } + } + }, + "x-originalParamName": "Body" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2RedirectTo" + } + } + }, + "description": "oAuth2RedirectTo" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "Reject OAuth 2.0 Consent Request", + "tags": [ + "oAuth2" + ] + } + }, + "/admin/oauth2/auth/requests/login": { + "get": { + "description": "When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider\nto authenticate the subject and then tell the Ory OAuth2 Service about it.\n\nPer default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app\nyou write and host, and it must be able to authenticate (\"show the subject a login screen\")\na subject (in OAuth2 the proper name for subject is \"resource owner\").\n\nThe authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login\nprovider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.", + "operationId": "getOAuth2LoginRequest", + "parameters": [ + { + "description": "OAuth 2.0 Login Request Challenge", + "in": "query", + "name": "login_challenge", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2LoginRequest" + } + } + }, + "description": "oAuth2LoginRequest" + }, + "410": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2RedirectTo" + } + } + }, + "description": "oAuth2RedirectTo" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "Get OAuth 2.0 Login Request", + "tags": [ + "oAuth2" + ] + } + }, + "/admin/oauth2/auth/requests/login/accept": { + "put": { + "description": "When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider\nto authenticate the subject and then tell the Ory OAuth2 Service about it.\n\nThe authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login\nprovider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.\n\nThis endpoint tells Ory that the subject has successfully authenticated and includes additional information such as\nthe subject's ID and if Ory should remember the subject's subject agent for future authentication attempts by setting\na cookie.\n\nThe response contains a redirect URL which the login provider should redirect the user-agent to.", + "operationId": "acceptOAuth2LoginRequest", + "parameters": [ + { + "description": "OAuth 2.0 Login Request Challenge", + "in": "query", + "name": "login_challenge", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/acceptOAuth2LoginRequest" + } + } + }, + "x-originalParamName": "Body" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2RedirectTo" + } + } + }, + "description": "oAuth2RedirectTo" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "Accept OAuth 2.0 Login Request", + "tags": [ + "oAuth2" + ] + } + }, + "/admin/oauth2/auth/requests/login/reject": { + "put": { + "description": "When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider\nto authenticate the subject and then tell the Ory OAuth2 Service about it.\n\nThe authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login\nprovider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.\n\nThis endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication\nwas denied.\n\nThe response contains a redirect URL which the login provider should redirect the user-agent to.", + "operationId": "rejectOAuth2LoginRequest", + "parameters": [ + { + "description": "OAuth 2.0 Login Request Challenge", + "in": "query", + "name": "login_challenge", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/rejectOAuth2Request" + } + } + }, + "x-originalParamName": "Body" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2RedirectTo" + } + } + }, + "description": "oAuth2RedirectTo" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "Reject OAuth 2.0 Login Request", + "tags": [ + "oAuth2" + ] + } + }, + "/admin/oauth2/auth/requests/logout": { + "get": { + "description": "Use this endpoint to fetch an Ory OAuth 2.0 logout request.", + "operationId": "getOAuth2LogoutRequest", + "parameters": [ + { + "in": "query", + "name": "logout_challenge", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2LogoutRequest" + } + } + }, + "description": "oAuth2LogoutRequest" + }, + "410": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2RedirectTo" + } + } + }, + "description": "oAuth2RedirectTo" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "Get OAuth 2.0 Session Logout Request", + "tags": [ + "oAuth2" + ] + } + }, + "/admin/oauth2/auth/requests/logout/accept": { + "put": { + "description": "When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request.\n\nThe response contains a redirect URL which the consent provider should redirect the user-agent to.", + "operationId": "acceptOAuth2LogoutRequest", + "parameters": [ + { + "description": "OAuth 2.0 Logout Request Challenge", + "in": "query", + "name": "logout_challenge", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2RedirectTo" + } + } + }, + "description": "oAuth2RedirectTo" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "Accept OAuth 2.0 Session Logout Request", + "tags": [ + "oAuth2" + ] + } + }, + "/admin/oauth2/auth/requests/logout/reject": { + "put": { + "description": "When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request.\nNo HTTP request body is required.\n\nThe response is empty as the logout provider has to chose what action to perform next.", + "operationId": "rejectOAuth2LogoutRequest", + "parameters": [ + { + "in": "query", + "name": "logout_challenge", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/emptyResponse" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "Reject OAuth 2.0 Session Logout Request", + "tags": [ + "oAuth2" + ] + } + }, + "/admin/oauth2/auth/sessions/consent": { + "delete": { + "description": "This endpoint revokes a subject's granted consent sessions and invalidates all\nassociated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID.", + "operationId": "revokeOAuth2ConsentSessions", + "parameters": [ + { + "description": "OAuth 2.0 Consent Subject\n\nThe subject whose consent sessions should be deleted.", + "in": "query", + "name": "subject", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "OAuth 2.0 Client ID\n\nIf set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID.", + "in": "query", + "name": "client", + "schema": { + "type": "string" + } + }, + { + "description": "Revoke All Consent Sessions\n\nIf set to `true` deletes all consent sessions by the Subject that have been granted.", + "in": "query", + "name": "all", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/emptyResponse" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "Revoke OAuth 2.0 Consent Sessions of a Subject", + "tags": [ + "oAuth2" + ] + }, + "get": { + "description": "This endpoint lists all subject's granted consent sessions, including client and granted scope.\nIf the subject is unknown or has not granted any consent sessions yet, the endpoint returns an\nempty JSON array with status code 200 OK.", + "operationId": "listOAuth2ConsentSessions", + "parameters": [ + { + "description": "Items per Page\n\nThis is the number of items per page to return.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).", + "in": "query", + "name": "page_size", + "schema": { + "default": 250, + "format": "int64", + "maximum": 500, + "minimum": 1, + "type": "integer" + } + }, + { + "description": "Next Page Token\n\nThe next page token.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).", + "in": "query", + "name": "page_token", + "schema": { + "default": "1", + "minimum": 1, + "type": "string" + } + }, + { + "description": "The subject to list the consent sessions for.", + "in": "query", + "name": "subject", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The login session id to list the consent sessions for.", + "in": "query", + "name": "login_session_id", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2ConsentSessions" + } + } + }, + "description": "oAuth2ConsentSessions" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "List OAuth 2.0 Consent Sessions of a Subject", + "tags": [ + "oAuth2" + ] + } + }, + "/admin/oauth2/auth/sessions/login": { + "delete": { + "description": "This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject\nhas to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens.\n\nIf you send the subject in a query param, all authentication sessions that belong to that subject are revoked.\nNo OpenID Connect Front- or Back-channel logout is performed in this case.\n\nAlternatively, you can send a SessionID via `sid` query param, in which case, only the session that is connected\nto that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case.", + "operationId": "revokeOAuth2LoginSessions", + "parameters": [ + { + "description": "OAuth 2.0 Subject\n\nThe subject to revoke authentication sessions for.", + "in": "query", + "name": "subject", + "schema": { + "type": "string" + } + }, + { + "description": "OAuth 2.0 Subject\n\nThe subject to revoke authentication sessions for.", + "in": "query", + "name": "sid", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/emptyResponse" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID", + "tags": [ + "oAuth2" + ] + } + }, + "/admin/oauth2/introspect": { + "post": { + "description": "The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token\nis neither expired nor revoked. If a token is active, additional information on the token will be included. You can\nset additional data for a token by setting `session.access_token` during the consent flow.", + "operationId": "introspectOAuth2Token", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "scope": { + "description": "An optional, space separated list of required scopes. If the access token was not granted one of the\nscopes, the result of active will be false.", + "type": "string", + "x-formData-name": "scope" + }, + "token": { + "description": "The string value of the token. For access tokens, this\nis the \"access_token\" value returned from the token endpoint\ndefined in OAuth 2.0. For refresh tokens, this is the \"refresh_token\"\nvalue returned.", + "required": [ + "token" + ], + "type": "string", + "x-formData-name": "token" + } + }, + "required": [ + "token" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/introspectedOAuth2Token" + } + } + }, + "description": "introspectedOAuth2Token" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "Introspect OAuth2 Access and Refresh Tokens", + "tags": [ + "oAuth2" + ] + } + }, + "/admin/oauth2/tokens": { + "delete": { + "description": "This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database.", + "operationId": "deleteOAuth2Token", + "parameters": [ + { + "description": "OAuth 2.0 Client ID", + "in": "query", + "name": "client_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/emptyResponse" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client", + "tags": [ + "oAuth2" + ] + } + }, + "/admin/trust/grants/jwt-bearer/issuers": { + "get": { + "description": "Use this endpoint to list all trusted JWT Bearer Grant Type Issuers.", + "operationId": "listTrustedOAuth2JwtGrantIssuers", + "parameters": [ + { + "in": "query", + "name": "MaxItems", + "schema": { + "format": "int64", + "type": "integer" + } + }, + { + "in": "query", + "name": "DefaultItems", + "schema": { + "format": "int64", + "type": "integer" + } + }, + { + "description": "If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned.", + "in": "query", + "name": "issuer", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/trustedOAuth2JwtGrantIssuers" + } + } + }, + "description": "trustedOAuth2JwtGrantIssuers" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/genericError" + } + } + }, + "description": "genericError" + } + }, + "summary": "List Trusted OAuth2 JWT Bearer Grant Type Issuers", + "tags": [ + "oAuth2" + ] + }, + "post": { + "description": "Use this endpoint to establish a trust relationship for a JWT issuer\nto perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication\nand Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523).", + "operationId": "trustOAuth2JwtGrantIssuer", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/trustOAuth2JwtGrantIssuer" + } + } + }, + "x-originalParamName": "Body" + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/trustedOAuth2JwtGrantIssuer" + } + } + }, + "description": "trustedOAuth2JwtGrantIssuer" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/genericError" + } + } + }, + "description": "genericError" + } + }, + "summary": "Trust OAuth2 JWT Bearer Grant Type Issuer", + "tags": [ + "oAuth2" + ] + } + }, + "/admin/trust/grants/jwt-bearer/issuers/{id}": { + "delete": { + "description": "Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you\ncreated the trust relationship.\n\nOnce deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile\nfor OAuth 2.0 Client Authentication and Authorization Grant.", + "operationId": "deleteTrustedOAuth2JwtGrantIssuer", + "parameters": [ + { + "description": "The id of the desired grant", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/emptyResponse" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/genericError" + } + } + }, + "description": "genericError" + } + }, + "summary": "Delete Trusted OAuth2 JWT Bearer Grant Type Issuer", + "tags": [ + "oAuth2" + ] + }, + "get": { + "description": "Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you\ncreated the trust relationship.", + "operationId": "getTrustedOAuth2JwtGrantIssuer", + "parameters": [ + { + "description": "The id of the desired grant", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/trustedOAuth2JwtGrantIssuer" + } + } + }, + "description": "trustedOAuth2JwtGrantIssuer" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/genericError" + } + } + }, + "description": "genericError" + } + }, + "summary": "Get Trusted OAuth2 JWT Bearer Grant Type Issuer", + "tags": [ + "oAuth2" + ] + } + }, + "/credentials": { + "post": { + "description": "This endpoint creates a verifiable credential that attests that the user\nauthenticated with the provided access token owns a certain public/private key\npair.\n\nMore information can be found at\nhttps://openid.net/specs/openid-connect-userinfo-vc-1_0.html.", + "operationId": "createVerifiableCredential", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateVerifiableCredentialRequestBody" + } + } + }, + "x-originalParamName": "Body" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/verifiableCredentialResponse" + } + } + }, + "description": "verifiableCredentialResponse" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/verifiableCredentialPrimingResponse" + } + } + }, + "description": "verifiableCredentialPrimingResponse" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "Issues a Verifiable Credential", + "tags": [ + "oidc" + ] + } + }, + "/health/alive": { + "get": { + "description": "This endpoint returns a HTTP 200 status code when Ory Hydra is accepting incoming\nHTTP requests. This status does currently not include checks whether the database connection is working.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the health status will never\nrefer to the cluster state, only to a single instance.", + "operationId": "isAlive", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/healthStatus" + } + } + }, + "description": "Ory Hydra is ready to accept connections." + }, + "500": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/genericError" + } + } + }, + "description": "genericError" + } + }, + "summary": "Check HTTP Server Status", + "tags": [ + "metadata" + ] + } + }, + "/health/ready": { + "get": { + "description": "This endpoint returns a HTTP 200 status code when Ory Hydra is up running and the environment dependencies (e.g.\nthe database) are responsive as well.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of Ory Hydra, the health status will never\nrefer to the cluster state, only to a single instance.", + "operationId": "isReady", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "description": "Always \"ok\".", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Ory Hydra is ready to accept requests." + }, + "503": { + "content": { + "application/json": { + "schema": { + "properties": { + "errors": { + "additionalProperties": { + "type": "string" + }, + "description": "Errors contains a list of errors that caused the not ready status.", + "type": "object" + } + }, + "type": "object" + } + } + }, + "description": "Ory Kratos is not yet ready to accept requests." + } + }, + "summary": "Check HTTP Server and Database Status", + "tags": [ + "metadata" + ] + } + }, + "/oauth2/auth": { + "get": { + "description": "Use open source libraries to perform OAuth 2.0 and OpenID Connect\navailable for any programming language. You can find a list of libraries at https://oauth.net/code/\n\nThe Ory SDK is not yet able to this endpoint properly.", + "operationId": "oAuth2Authorize", + "responses": { + "302": { + "$ref": "#/components/responses/emptyResponse" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "summary": "OAuth 2.0 Authorize Endpoint", + "tags": [ + "oAuth2" + ] + } + }, + "/oauth2/register": { + "post": { + "description": "This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the\npublic internet directly and can be used in self-service. It implements the OpenID Connect\nDynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint\nis disabled by default. It can be enabled by an administrator.\n\nPlease note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those\nvalues will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or\n`client_secret_post`.\n\nThe `client_secret` will be returned in the response and you will not be able to retrieve it later on.\nWrite the secret down and keep it somewhere safe.", + "operationId": "createOidcDynamicClient", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2Client" + } + } + }, + "description": "Dynamic Client Registration Request Body", + "required": true, + "x-originalParamName": "Body" + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2Client" + } + } + }, + "description": "oAuth2Client" + }, + "400": { + "$ref": "#/components/responses/errorOAuth2BadRequest" + }, + "default": { + "$ref": "#/components/responses/errorOAuth2Default" + } + }, + "summary": "Register OAuth2 Client using OpenID Dynamic Client Registration", + "tags": [ + "oidc" + ] + } + }, + "/oauth2/register/{id}": { + "delete": { + "description": "This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the\npublic internet directly and can be used in self-service. It implements the OpenID Connect\nDynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint\nis disabled by default. It can be enabled by an administrator.\n\nTo use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client\nuses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query.\nIf it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header.\n\nOAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are\ngenerated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.", + "operationId": "deleteOidcDynamicClient", + "parameters": [ + { + "description": "The id of the OAuth 2.0 Client.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/emptyResponse" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/genericError" + } + } + }, + "description": "genericError" + } + }, + "security": [ + { + "bearer": [] + } + ], + "summary": "Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol", + "tags": [ + "oidc" + ] + }, + "get": { + "description": "This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the\npublic internet directly and can be used in self-service. It implements the OpenID Connect\nDynamic Client Registration Protocol.\n\nTo use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client\nuses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query.\nIf it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header.", + "operationId": "getOidcDynamicClient", + "parameters": [ + { + "description": "The id of the OAuth 2.0 Client.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2Client" + } + } + }, + "description": "oAuth2Client" + }, + "default": { + "$ref": "#/components/responses/errorOAuth2Default" + } + }, + "security": [ + { + "bearer": [] + } + ], + "summary": "Get OAuth2 Client using OpenID Dynamic Client Registration", + "tags": [ + "oidc" + ] + }, + "put": { + "description": "This endpoint behaves like the administrative counterpart (`setOAuth2Client`) but is capable of facing the\npublic internet directly to be used by third parties. It implements the OpenID Connect\nDynamic Client Registration Protocol.\n\nThis feature is disabled per default. It can be enabled by a system administrator.\n\nIf you pass `client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response.\nIt is not possible to retrieve it later on.\n\nTo use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client\nuses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query.\nIf it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header.\n\nOAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are\ngenerated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.", + "operationId": "setOidcDynamicClient", + "parameters": [ + { + "description": "OAuth 2.0 Client ID", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2Client" + } + } + }, + "description": "OAuth 2.0 Client Request Body", + "required": true, + "x-originalParamName": "Body" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2Client" + } + } + }, + "description": "oAuth2Client" + }, + "404": { + "$ref": "#/components/responses/errorOAuth2NotFound" + }, + "default": { + "$ref": "#/components/responses/errorOAuth2Default" + } + }, + "security": [ + { + "bearer": [] + } + ], + "summary": "Set OAuth2 Client using OpenID Dynamic Client Registration", + "tags": [ + "oidc" + ] + } + }, + "/oauth2/revoke": { + "post": { + "description": "Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no\nlonger be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token.\nRevoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by\nthe client the token was generated for.", + "operationId": "revokeOAuth2Token", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "client_id": { + "type": "string", + "x-formData-name": "client_id" + }, + "client_secret": { + "type": "string", + "x-formData-name": "client_secret" + }, + "token": { + "required": [ + "token" + ], + "type": "string", + "x-formData-name": "token" + } + }, + "required": [ + "token" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/emptyResponse" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "security": [ + { + "basic": [] + }, + { + "oauth2": [] + } + ], + "summary": "Revoke OAuth 2.0 Access or Refresh Token", + "tags": [ + "oAuth2" + ] + } + }, + "/oauth2/sessions/logout": { + "get": { + "description": "This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout:\n\nhttps://openid.net/specs/openid-connect-frontchannel-1_0.html\nhttps://openid.net/specs/openid-connect-backchannel-1_0.html\n\nBack-channel logout is performed asynchronously and does not affect logout flow.", + "operationId": "revokeOidcSession", + "responses": { + "302": { + "$ref": "#/components/responses/emptyResponse" + } + }, + "summary": "OpenID Connect Front- and Back-channel Enabled Logout", + "tags": [ + "oidc" + ] + } + }, + "/oauth2/token": { + "post": { + "description": "Use open source libraries to perform OAuth 2.0 and OpenID Connect\navailable for any programming language. You can find a list of libraries here https://oauth.net/code/\n\nThe Ory SDK is not yet able to this endpoint properly.", + "operationId": "oauth2TokenExchange", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "client_id": { + "type": "string", + "x-formData-name": "client_id" + }, + "code": { + "type": "string", + "x-formData-name": "code" + }, + "grant_type": { + "required": [ + "grant_type" + ], + "type": "string", + "x-formData-name": "grant_type" + }, + "redirect_uri": { + "type": "string", + "x-formData-name": "redirect_uri" + }, + "refresh_token": { + "type": "string", + "x-formData-name": "refresh_token" + } + }, + "required": [ + "grant_type" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oAuth2TokenExchange" + } + } + }, + "description": "oAuth2TokenExchange" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "security": [ + { + "basic": [] + }, + { + "oauth2": [] + } + ], + "summary": "The OAuth 2.0 Token Endpoint", + "tags": [ + "oAuth2" + ] + } + }, + "/userinfo": { + "get": { + "description": "This endpoint returns the payload of the ID Token, including `session.id_token` values, of\nthe provided OAuth 2.0 Access Token's consent request.\n\nIn the case of authentication error, a WWW-Authenticate header might be set in the response\nwith more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3)\nfor more details about header format.", + "operationId": "getOidcUserInfo", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oidcUserInfo" + } + } + }, + "description": "oidcUserInfo" + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorOAuth2" + } + } + }, + "description": "errorOAuth2" + } + }, + "security": [ + { + "oauth2": [] + } + ], + "summary": "OpenID Connect Userinfo", + "tags": [ + "oidc" + ] + } + }, + "/version": { + "get": { + "description": "This endpoint returns the version of Ory Hydra.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the version will never\nrefer to the cluster state, only to a single instance.", + "operationId": "getVersion", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "version": { + "description": "The version of Ory Hydra.", + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Returns the Ory Hydra version." + } + }, + "summary": "Return Running Software Version.", + "tags": [ + "metadata" + ] + } + } + }, + "tags": [ + { + "description": "OAuth 2.0", + "name": "oAuth2" + }, + { + "description": "OpenID Connect", + "name": "oidc" + }, + { + "description": "JSON Web Keys", + "name": "jwk" + }, + { + "description": "Well-Known Endpoints", + "name": "wellknown" + }, + { + "description": "Service Metadata", + "name": "metadata" + } + ], + "x-forwarded-proto": "string", + "x-request-id": "string" +} \ No newline at end of file diff --git a/openapi-kratos.json b/openapi-kratos.json new file mode 100644 index 00000000..97981f0b --- /dev/null +++ b/openapi-kratos.json @@ -0,0 +1,7272 @@ +{ + "components": { + "responses": { + "emptyResponse": { + "description": "Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201." + }, + "identitySchemas": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/identitySchemas" + } + } + }, + "description": "List Identity JSON Schemas Response" + }, + "listCourierMessages": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/message" + }, + "type": "array" + } + } + }, + "description": "Paginated Courier Message List Response" + }, + "listIdentities": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/identity" + }, + "type": "array" + } + } + }, + "description": "Paginated Identity List Response" + }, + "listIdentitySessions": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/session" + }, + "type": "array" + } + } + }, + "description": "List Identity Sessions Response" + }, + "listMySessions": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/session" + }, + "type": "array" + } + } + }, + "description": "List My Session Response" + }, + "listSessions": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/session" + }, + "type": "array" + } + } + }, + "description": "Session List Response\n\nThe response given when listing sessions in an administrative context." + } + }, + "schemas": { + "DefaultError": {}, + "Duration": { + "description": "A Duration represents the elapsed time between two instants\nas an int64 nanosecond count. The representation limits the\nlargest representable duration to approximately 290 years.", + "format": "int64", + "type": "integer" + }, + "ID": { + "format": "int64", + "type": "integer" + }, + "JSONRawMessage": { + "title": "JSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger.", + "type": "object" + }, + "NullBool": { + "nullable": true, + "type": "boolean" + }, + "NullInt": { + "nullable": true, + "type": "integer" + }, + "NullString": { + "nullable": true, + "type": "string" + }, + "NullTime": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "NullUUID": { + "format": "uuid4", + "nullable": true, + "type": "string" + }, + "OAuth2Client": { + "properties": { + "access_token_strategy": { + "description": "OAuth 2.0 Access Token Strategy AccessTokenStrategy is the strategy used to generate access tokens. Valid options are `jwt` and `opaque`. `jwt` is a bad idea, see https://www.ory.sh/docs/hydra/advanced#json-web-tokens Setting the stragegy here overrides the global setting in `strategies.access_token`.", + "type": "string" + }, + "allowed_cors_origins": { + "items": { + "type": "string" + }, + "type": "array" + }, + "audience": { + "items": { + "type": "string" + }, + "type": "array" + }, + "authorization_code_grant_access_token_lifespan": { + "description": "Specify a time duration in milliseconds, seconds, minutes, hours.", + "type": "string" + }, + "authorization_code_grant_id_token_lifespan": { + "description": "Specify a time duration in milliseconds, seconds, minutes, hours.", + "type": "string" + }, + "authorization_code_grant_refresh_token_lifespan": { + "description": "Specify a time duration in milliseconds, seconds, minutes, hours.", + "type": "string" + }, + "backchannel_logout_session_required": { + "description": "OpenID Connect Back-Channel Logout Session Required Boolean value specifying whether the RP requires that a sid (session ID) Claim be included in the Logout Token to identify the RP session with the OP when the backchannel_logout_uri is used. If omitted, the default value is false.", + "type": "boolean" + }, + "backchannel_logout_uri": { + "description": "OpenID Connect Back-Channel Logout URI RP URL that will cause the RP to log itself out when sent a Logout Token by the OP.", + "type": "string" + }, + "client_credentials_grant_access_token_lifespan": { + "description": "Specify a time duration in milliseconds, seconds, minutes, hours.", + "type": "string" + }, + "client_id": { + "description": "OAuth 2.0 Client ID The ID is immutable. If no ID is provided, a UUID4 will be generated.", + "type": "string" + }, + "client_name": { + "description": "OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization.", + "type": "string" + }, + "client_secret": { + "description": "OAuth 2.0 Client Secret The secret will be included in the create request as cleartext, and then never again. The secret is kept in hashed format and is not recoverable once lost.", + "type": "string" + }, + "client_secret_expires_at": { + "description": "OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0.", + "format": "int64", + "type": "integer" + }, + "client_uri": { + "description": "OAuth 2.0 Client URI ClientURI is a URL string of a web page providing information about the client. If present, the server SHOULD display this URL to the end-user in a clickable fashion.", + "type": "string" + }, + "contacts": { + "items": { + "type": "string" + }, + "type": "array" + }, + "created_at": { + "description": "OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation.", + "format": "date-time", + "type": "string" + }, + "frontchannel_logout_session_required": { + "description": "OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the RP requires that iss (issuer) and sid (session ID) query parameters be included to identify the RP session with the OP when the frontchannel_logout_uri is used. If omitted, the default value is false.", + "type": "boolean" + }, + "frontchannel_logout_uri": { + "description": "OpenID Connect Front-Channel Logout URI RP URL that will cause the RP to log itself out when rendered in an iframe by the OP. An iss (issuer) query parameter and a sid (session ID) query parameter MAY be included by the OP to enable the RP to validate the request and to determine which of the potentially multiple sessions is to be logged out; if either is included, both MUST be.", + "type": "string" + }, + "grant_types": { + "items": { + "type": "string" + }, + "type": "array" + }, + "implicit_grant_access_token_lifespan": { + "description": "Specify a time duration in milliseconds, seconds, minutes, hours.", + "type": "string" + }, + "implicit_grant_id_token_lifespan": { + "description": "Specify a time duration in milliseconds, seconds, minutes, hours.", + "type": "string" + }, + "jwks": { + "description": "OAuth 2.0 Client JSON Web Key Set Client's JSON Web Key Set [JWK] document, passed by value. The semantics of the jwks parameter are the same as the jwks_uri parameter, other than that the JWK Set is passed by value, rather than by reference. This parameter is intended only to be used by Clients that, for some reason, are unable to use the jwks_uri parameter, for instance, by native applications that might not have a location to host the contents of the JWK Set. If a Client can use jwks_uri, it MUST NOT use jwks. One significant downside of jwks is that it does not enable key rotation (which jwks_uri does, as described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The jwks_uri and jwks parameters MUST NOT be used together." + }, + "jwks_uri": { + "description": "OAuth 2.0 Client JSON Web Key Set URL URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate.", + "type": "string" + }, + "jwt_bearer_grant_access_token_lifespan": { + "description": "Specify a time duration in milliseconds, seconds, minutes, hours.", + "type": "string" + }, + "logo_uri": { + "description": "OAuth 2.0 Client Logo URI A URL string referencing the client's logo.", + "type": "string" + }, + "metadata": {}, + "owner": { + "description": "OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client.", + "type": "string" + }, + "policy_uri": { + "description": "OAuth 2.0 Client Policy URI PolicyURI is a URL string that points to a human-readable privacy policy document that describes how the deployment organization collects, uses, retains, and discloses personal data.", + "type": "string" + }, + "post_logout_redirect_uris": { + "items": { + "type": "string" + }, + "type": "array" + }, + "redirect_uris": { + "items": { + "type": "string" + }, + "type": "array" + }, + "refresh_token_grant_access_token_lifespan": { + "description": "Specify a time duration in milliseconds, seconds, minutes, hours.", + "type": "string" + }, + "refresh_token_grant_id_token_lifespan": { + "description": "Specify a time duration in milliseconds, seconds, minutes, hours.", + "type": "string" + }, + "refresh_token_grant_refresh_token_lifespan": { + "description": "Specify a time duration in milliseconds, seconds, minutes, hours.", + "type": "string" + }, + "registration_access_token": { + "description": "OpenID Connect Dynamic Client Registration Access Token RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. It is sent when creating a client using Dynamic Client Registration.", + "type": "string" + }, + "registration_client_uri": { + "description": "OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client.", + "type": "string" + }, + "request_object_signing_alg": { + "description": "OpenID Connect Request Object Signing Algorithm JWS [JWS] alg algorithm [JWA] that MUST be used for signing Request Objects sent to the OP. All Request Objects from this Client MUST be rejected, if not signed with this algorithm.", + "type": "string" + }, + "request_uris": { + "items": { + "type": "string" + }, + "type": "array" + }, + "response_types": { + "items": { + "type": "string" + }, + "type": "array" + }, + "scope": { + "description": "OAuth 2.0 Client Scope Scope is a string containing a space-separated list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client can use when requesting access tokens.", + "type": "string" + }, + "sector_identifier_uri": { + "description": "OpenID Connect Sector Identifier URI URL using the https scheme to be used in calculating Pseudonymous Identifiers by the OP. The URL references a file with a single JSON array of redirect_uri values.", + "type": "string" + }, + "skip_consent": { + "description": "SkipConsent skips the consent screen for this client. This field can only be set from the admin API.", + "type": "boolean" + }, + "skip_logout_consent": { + "description": "SkipLogoutConsent skips the logout consent screen for this client. This field can only be set from the admin API.", + "type": "boolean" + }, + "subject_type": { + "description": "OpenID Connect Subject Type The `subject_types_supported` Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`.", + "type": "string" + }, + "token_endpoint_auth_method": { + "description": "OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_basic`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `client_secret_post`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `private_key_jwt`: Use JSON Web Tokens to authenticate the client. `none`: Used for public clients (native apps, mobile apps) which can not have secrets.", + "type": "string" + }, + "token_endpoint_auth_signing_alg": { + "description": "OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint.", + "type": "string" + }, + "tos_uri": { + "description": "OAuth 2.0 Client Terms of Service URI A URL string pointing to a human-readable terms of service document for the client that describes a contractual relationship between the end-user and the client that the end-user accepts when authorizing the client.", + "type": "string" + }, + "updated_at": { + "description": "OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update.", + "format": "date-time", + "type": "string" + }, + "userinfo_signed_response_alg": { + "description": "OpenID Connect Request Userinfo Signed Response Algorithm JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT [JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims as a UTF-8 encoded JSON object using the application/json content-type.", + "type": "string" + } + }, + "title": "OAuth2Client OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.", + "type": "object" + }, + "OAuth2ConsentRequestOpenIDConnectContext": { + "description": "OAuth2ConsentRequestOpenIDConnectContext struct for OAuth2ConsentRequestOpenIDConnectContext", + "properties": { + "acr_values": { + "description": "ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request. It is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required. OpenID Connect defines it as follows: > Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values that the Authorization Server is being requested to use for processing this Authentication Request, with the values appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a Voluntary Claim by this parameter.", + "items": { + "type": "string" + }, + "type": "array" + }, + "display": { + "description": "Display is a string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User. The defined values are: page: The Authorization Server SHOULD display the authentication and consent UI consistent with a full User Agent page view. If the display parameter is not specified, this is the default display mode. popup: The Authorization Server SHOULD display the authentication and consent UI consistent with a popup User Agent window. The popup User Agent window should be of an appropriate size for a login-focused dialog and should not obscure the entire window that it is popping up over. touch: The Authorization Server SHOULD display the authentication and consent UI consistent with a device that leverages a touch interface. wap: The Authorization Server SHOULD display the authentication and consent UI consistent with a \\\"feature phone\\\" type display. The Authorization Server MAY also attempt to detect the capabilities of the User Agent and present an appropriate display.", + "type": "string" + }, + "id_token_hint_claims": { + "additionalProperties": {}, + "description": "IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the End-User's current or past authenticated session with the Client.", + "type": "object" + }, + "login_hint": { + "description": "LoginHint hints about the login identifier the End-User might use to log in (if necessary). This hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier) and then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a phone number in the format specified for the phone_number Claim. The use of this parameter is optional.", + "type": "string" + }, + "ui_locales": { + "description": "UILocales is the End-User'id preferred languages and scripts for the user interface, represented as a space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value \\\"fr-CA fr en\\\" represents a preference for French as spoken in Canada, then French (without a region designation), followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested locales are not supported by the OpenID Provider.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "OAuth2LoginChallengeParams": { + "type": "object" + }, + "OAuth2LoginRequest": { + "description": "OAuth2LoginRequest struct for OAuth2LoginRequest", + "properties": { + "challenge": { + "description": "ID is the identifier (\\\"login challenge\\\") of the login request. It is used to identify the session.", + "type": "string" + }, + "client": { + "$ref": "#/components/schemas/OAuth2Client" + }, + "oidc_context": { + "$ref": "#/components/schemas/OAuth2ConsentRequestOpenIDConnectContext" + }, + "request_url": { + "description": "RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters.", + "type": "string" + }, + "requested_access_token_audience": { + "items": { + "type": "string" + }, + "type": "array" + }, + "requested_scope": { + "items": { + "type": "string" + }, + "type": "array" + }, + "session_id": { + "description": "SessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \\\"sid\\\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user.", + "type": "string" + }, + "skip": { + "description": "Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect URL. This feature allows you to update / set session information.", + "type": "boolean" + }, + "subject": { + "description": "Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client. If this value is set and `skip` is true, you MUST include this subject type when accepting the login request, or the request will fail.", + "type": "string" + } + }, + "type": "object" + }, + "RecoveryAddressType": { + "title": "RecoveryAddressType must not exceed 16 characters as that is the limitation in the SQL Schema.", + "type": "string" + }, + "Time": { + "format": "date-time", + "type": "string" + }, + "UUID": { + "format": "uuid4", + "type": "string" + }, + "authenticatorAssuranceLevel": { + "description": "The authenticator assurance level can be one of \"aal1\", \"aal2\", or \"aal3\". A higher number means that it is harder\nfor an attacker to compromise the account.\n\nGenerally, \"aal1\" implies that one authentication factor was used while AAL2 implies that two factors (e.g.\npassword + TOTP) have been used.\n\nTo learn more about these levels please head over to: https://www.ory.sh/kratos/docs/concepts/credentials", + "enum": [ + "aal0", + "aal1", + "aal2", + "aal3" + ], + "title": "Authenticator Assurance Level (AAL)", + "type": "string" + }, + "batchPatchIdentitiesResponse": { + "description": "Patch identities response", + "properties": { + "identities": { + "description": "The patch responses for the individual identities.", + "items": { + "$ref": "#/components/schemas/identityPatchResponse" + }, + "type": "array" + } + }, + "type": "object" + }, + "consistencyRequestParameters": { + "description": "Control API consistency guarantees", + "properties": { + "consistency": { + "description": "Read Consistency Level (preview)\n\nThe read consistency level determines the consistency guarantee for reads:\n\nstrong (slow): The read is guaranteed to return the most recent data committed at the start of the read.\neventual (very fast): The result will return data that is about 4.8 seconds old.\n\nThe default consistency guarantee can be changed in the Ory Network Console or using the Ory CLI with\n`ory patch project --replace '/previews/default_read_consistency_level=\"strong\"'`.\n\nSetting the default consistency level to `eventual` may cause regressions in the future as we add consistency\ncontrols to more APIs. Currently, the following APIs will be affected by this setting:\n\n`GET /admin/identities`\n\nThis feature is in preview and only available in Ory Network.\n ConsistencyLevelUnset ConsistencyLevelUnset is the unset / default consistency level.\nstrong ConsistencyLevelStrong ConsistencyLevelStrong is the strong consistency level.\neventual ConsistencyLevelEventual ConsistencyLevelEventual is the eventual consistency level using follower read timestamps.", + "enum": [ + "", + "strong", + "eventual" + ], + "type": "string", + "x-go-enum-desc": " ConsistencyLevelUnset ConsistencyLevelUnset is the unset / default consistency level.\nstrong ConsistencyLevelStrong ConsistencyLevelStrong is the strong consistency level.\neventual ConsistencyLevelEventual ConsistencyLevelEventual is the eventual consistency level using follower read timestamps." + } + }, + "type": "object" + }, + "continueWith": { + "discriminator": { + "mapping": { + "set_ory_session_token": "#/components/schemas/continueWithSetOrySessionToken", + "show_recovery_ui": "#/components/schemas/continueWithRecoveryUi", + "show_settings_ui": "#/components/schemas/continueWithSettingsUi", + "show_verification_ui": "#/components/schemas/continueWithVerificationUi" + }, + "propertyName": "action" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/continueWithVerificationUi" + }, + { + "$ref": "#/components/schemas/continueWithSetOrySessionToken" + }, + { + "$ref": "#/components/schemas/continueWithSettingsUi" + }, + { + "$ref": "#/components/schemas/continueWithRecoveryUi" + } + ] + }, + "continueWithRecoveryUi": { + "description": "Indicates, that the UI flow could be continued by showing a recovery ui", + "properties": { + "action": { + "description": "Action will always be `show_recovery_ui`\nshow_recovery_ui ContinueWithActionShowRecoveryUIString", + "enum": [ + "show_recovery_ui" + ], + "type": "string", + "x-go-enum-desc": "show_recovery_ui ContinueWithActionShowRecoveryUIString" + }, + "flow": { + "$ref": "#/components/schemas/continueWithRecoveryUiFlow" + } + }, + "required": [ + "action", + "flow" + ], + "type": "object" + }, + "continueWithRecoveryUiFlow": { + "properties": { + "id": { + "description": "The ID of the recovery flow", + "format": "uuid", + "type": "string" + }, + "url": { + "description": "The URL of the recovery flow", + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "continueWithSetOrySessionToken": { + "description": "Indicates that a session was issued, and the application should use this token for authenticated requests", + "properties": { + "action": { + "description": "Action will always be `set_ory_session_token`\nset_ory_session_token ContinueWithActionSetOrySessionTokenString", + "enum": [ + "set_ory_session_token" + ], + "type": "string", + "x-go-enum-desc": "set_ory_session_token ContinueWithActionSetOrySessionTokenString" + }, + "ory_session_token": { + "description": "Token is the token of the session", + "type": "string" + } + }, + "required": [ + "action", + "ory_session_token" + ], + "type": "object" + }, + "continueWithSettingsUi": { + "description": "Indicates, that the UI flow could be continued by showing a settings ui", + "properties": { + "action": { + "description": "Action will always be `show_settings_ui`\nshow_settings_ui ContinueWithActionShowSettingsUIString", + "enum": [ + "show_settings_ui" + ], + "type": "string", + "x-go-enum-desc": "show_settings_ui ContinueWithActionShowSettingsUIString" + }, + "flow": { + "$ref": "#/components/schemas/continueWithSettingsUiFlow" + } + }, + "required": [ + "action", + "flow" + ], + "type": "object" + }, + "continueWithSettingsUiFlow": { + "properties": { + "id": { + "description": "The ID of the settings flow", + "format": "uuid", + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "continueWithVerificationUi": { + "description": "Indicates, that the UI flow could be continued by showing a verification ui", + "properties": { + "action": { + "description": "Action will always be `show_verification_ui`\nshow_verification_ui ContinueWithActionShowVerificationUIString", + "enum": [ + "show_verification_ui" + ], + "type": "string", + "x-go-enum-desc": "show_verification_ui ContinueWithActionShowVerificationUIString" + }, + "flow": { + "$ref": "#/components/schemas/continueWithVerificationUiFlow" + } + }, + "required": [ + "action", + "flow" + ], + "type": "object" + }, + "continueWithVerificationUiFlow": { + "properties": { + "id": { + "description": "The ID of the verification flow", + "format": "uuid", + "type": "string" + }, + "url": { + "description": "The URL of the verification flow", + "type": "string" + }, + "verifiable_address": { + "description": "The address that should be verified in this flow", + "type": "string" + } + }, + "required": [ + "id", + "verifiable_address" + ], + "type": "object" + }, + "courierMessageStatus": { + "description": "A Message's Status", + "enum": [ + "queued", + "sent", + "processing", + "abandoned" + ], + "type": "string" + }, + "courierMessageType": { + "description": "It can either be `email` or `phone`", + "enum": [ + "email", + "phone" + ], + "title": "A Message's Type", + "type": "string" + }, + "createIdentityBody": { + "description": "Create Identity Body", + "properties": { + "credentials": { + "$ref": "#/components/schemas/identityWithCredentials" + }, + "metadata_admin": { + "description": "Store metadata about the user which is only accessible through admin APIs such as `GET /admin/identities/`." + }, + "metadata_public": { + "description": "Store metadata about the identity which the identity itself can see when calling for example the\nsession endpoint. Do not store sensitive information (e.g. credit score) about the identity in this field." + }, + "recovery_addresses": { + "description": "RecoveryAddresses contains all the addresses that can be used to recover an identity.\n\nUse this structure to import recovery addresses for an identity. Please keep in mind\nthat the address needs to be represented in the Identity Schema or this field will be overwritten\non the next identity update.", + "items": { + "$ref": "#/components/schemas/recoveryIdentityAddress" + }, + "type": "array" + }, + "schema_id": { + "description": "SchemaID is the ID of the JSON Schema to be used for validating the identity's traits.", + "type": "string" + }, + "state": { + "description": "State is the identity's state.\nactive StateActive\ninactive StateInactive", + "enum": [ + "active", + "inactive" + ], + "type": "string", + "x-go-enum-desc": "active StateActive\ninactive StateInactive" + }, + "traits": { + "description": "Traits represent an identity's traits. The identity is able to create, modify, and delete traits\nin a self-service manner. The input will always be validated against the JSON Schema defined\nin `schema_url`.", + "type": "object" + }, + "verifiable_addresses": { + "description": "VerifiableAddresses contains all the addresses that can be verified by the user.\n\nUse this structure to import verified addresses for an identity. Please keep in mind\nthat the address needs to be represented in the Identity Schema or this field will be overwritten\non the next identity update.", + "items": { + "$ref": "#/components/schemas/verifiableIdentityAddress" + }, + "type": "array" + } + }, + "required": [ + "schema_id", + "traits" + ], + "type": "object" + }, + "createRecoveryCodeForIdentityBody": { + "description": "Create Recovery Code for Identity Request Body", + "properties": { + "expires_in": { + "description": "Code Expires In\n\nThe recovery code will expire after that amount of time has passed. Defaults to the configuration value of\n`selfservice.methods.code.config.lifespan`.", + "pattern": "^([0-9]+(ns|us|ms|s|m|h))*$", + "type": "string" + }, + "identity_id": { + "description": "Identity to Recover\n\nThe identity's ID you wish to recover.", + "format": "uuid", + "type": "string" + } + }, + "required": [ + "identity_id" + ], + "type": "object" + }, + "createRecoveryLinkForIdentityBody": { + "description": "Create Recovery Link for Identity Request Body", + "properties": { + "expires_in": { + "description": "Link Expires In\n\nThe recovery link will expire after that amount of time has passed. Defaults to the configuration value of\n`selfservice.methods.code.config.lifespan`.", + "pattern": "^[0-9]+(ns|us|ms|s|m|h)$", + "type": "string" + }, + "identity_id": { + "description": "Identity to Recover\n\nThe identity's ID you wish to recover.", + "format": "uuid", + "type": "string" + } + }, + "required": [ + "identity_id" + ], + "type": "object" + }, + "deleteMySessionsCount": { + "description": "Deleted Session Count", + "properties": { + "count": { + "description": "The number of sessions that were revoked.", + "format": "int64", + "type": "integer" + } + }, + "type": "object" + }, + "errorAuthenticatorAssuranceLevelNotSatisfied": { + "properties": { + "error": { + "$ref": "#/components/schemas/genericError" + }, + "redirect_browser_to": { + "description": "Points to where to redirect the user to next.", + "type": "string" + } + }, + "title": "Is returned when an active session was found but the requested AAL is not satisfied.", + "type": "object" + }, + "errorBrowserLocationChangeRequired": { + "properties": { + "error": { + "$ref": "#/components/schemas/errorGeneric" + }, + "redirect_browser_to": { + "description": "Points to where to redirect the user to next.", + "type": "string" + } + }, + "title": "Is sent when a flow requires a browser to change its location.", + "type": "object" + }, + "errorFlowReplaced": { + "description": "Is sent when a flow is replaced by a different flow of the same class", + "properties": { + "error": { + "$ref": "#/components/schemas/genericError" + }, + "use_flow_id": { + "description": "The flow ID that should be used for the new flow as it contains the correct messages.", + "format": "uuid", + "type": "string" + } + }, + "type": "object" + }, + "errorGeneric": { + "description": "The standard Ory JSON API error format.", + "properties": { + "error": { + "$ref": "#/components/schemas/genericError" + } + }, + "required": [ + "error" + ], + "title": "JSON API Error Response", + "type": "object" + }, + "flowError": { + "properties": { + "created_at": { + "description": "CreatedAt is a helper struct field for gobuffalo.pop.", + "format": "date-time", + "type": "string" + }, + "error": { + "type": "object" + }, + "id": { + "description": "ID of the error container.", + "format": "uuid", + "type": "string" + }, + "updated_at": { + "description": "UpdatedAt is a helper struct field for gobuffalo.pop.", + "format": "date-time", + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "genericError": { + "properties": { + "code": { + "description": "The status code", + "example": 404, + "format": "int64", + "type": "integer" + }, + "debug": { + "description": "Debug information\n\nThis field is often not exposed to protect against leaking\nsensitive information.", + "example": "SQL field \"foo\" is not a bool.", + "type": "string" + }, + "details": { + "additionalProperties": false, + "description": "Further error details", + "type": "object" + }, + "id": { + "description": "The error ID\n\nUseful when trying to identify various errors in application logic.", + "type": "string" + }, + "message": { + "description": "Error message\n\nThe error's message.", + "example": "The resource could not be found", + "type": "string" + }, + "reason": { + "description": "A human-readable reason for the error", + "example": "User with ID 1234 does not exist.", + "type": "string" + }, + "request": { + "description": "The request ID\n\nThe request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.", + "example": "d7ef54b1-ec15-46e6-bccb-524b82c035e6", + "type": "string" + }, + "status": { + "description": "The status description", + "example": "Not Found", + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + }, + "healthNotReadyStatus": { + "properties": { + "errors": { + "additionalProperties": { + "type": "string" + }, + "description": "Errors contains a list of errors that caused the not ready status.", + "type": "object" + } + }, + "type": "object" + }, + "healthStatus": { + "properties": { + "status": { + "description": "Status always contains \"ok\".", + "type": "string" + } + }, + "type": "object" + }, + "identity": { + "description": "An [identity](https://www.ory.sh/docs/kratos/concepts/identity-user-model) represents a (human) user in Ory.", + "properties": { + "created_at": { + "description": "CreatedAt is a helper struct field for gobuffalo.pop.", + "format": "date-time", + "type": "string" + }, + "credentials": { + "additionalProperties": { + "$ref": "#/components/schemas/identityCredentials" + }, + "description": "Credentials represents all credentials that can be used for authenticating this identity.", + "type": "object" + }, + "id": { + "description": "ID is the identity's unique identifier.\n\nThe Identity ID can not be changed and can not be chosen. This ensures future\ncompatibility and optimization for distributed stores such as CockroachDB.", + "format": "uuid", + "type": "string" + }, + "metadata_admin": { + "$ref": "#/components/schemas/nullJsonRawMessage" + }, + "metadata_public": { + "$ref": "#/components/schemas/nullJsonRawMessage" + }, + "organization_id": { + "$ref": "#/components/schemas/NullUUID" + }, + "recovery_addresses": { + "description": "RecoveryAddresses contains all the addresses that can be used to recover an identity.", + "items": { + "$ref": "#/components/schemas/recoveryIdentityAddress" + }, + "type": "array", + "x-omitempty": true + }, + "schema_id": { + "description": "SchemaID is the ID of the JSON Schema to be used for validating the identity's traits.", + "type": "string" + }, + "schema_url": { + "description": "SchemaURL is the URL of the endpoint where the identity's traits schema can be fetched from.\n\nformat: url", + "type": "string" + }, + "state": { + "description": "State is the identity's state.\n\nThis value has currently no effect.\nactive StateActive\ninactive StateInactive", + "enum": [ + "active", + "inactive" + ], + "type": "string", + "x-go-enum-desc": "active StateActive\ninactive StateInactive" + }, + "state_changed_at": { + "$ref": "#/components/schemas/nullTime" + }, + "traits": { + "$ref": "#/components/schemas/identityTraits" + }, + "updated_at": { + "description": "UpdatedAt is a helper struct field for gobuffalo.pop.", + "format": "date-time", + "type": "string" + }, + "verifiable_addresses": { + "description": "VerifiableAddresses contains all the addresses that can be verified by the user.", + "items": { + "$ref": "#/components/schemas/verifiableIdentityAddress" + }, + "type": "array", + "x-omitempty": true + } + }, + "required": [ + "id", + "schema_id", + "schema_url", + "traits" + ], + "title": "Identity represents an Ory Kratos identity", + "type": "object" + }, + "identityCredentials": { + "description": "Credentials represents a specific credential type", + "properties": { + "config": { + "$ref": "#/components/schemas/JSONRawMessage" + }, + "created_at": { + "description": "CreatedAt is a helper struct field for gobuffalo.pop.", + "format": "date-time", + "type": "string" + }, + "identifiers": { + "description": "Identifiers represents a list of unique identifiers this credential type matches.", + "items": { + "type": "string" + }, + "type": "array" + }, + "type": { + "description": "Type discriminates between different types of credentials.\npassword CredentialsTypePassword\noidc CredentialsTypeOIDC\ntotp CredentialsTypeTOTP\nlookup_secret CredentialsTypeLookup\nwebauthn CredentialsTypeWebAuthn\ncode CredentialsTypeCodeAuth\nlink_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself.\ncode_recovery CredentialsTypeRecoveryCode", + "enum": [ + "password", + "oidc", + "totp", + "lookup_secret", + "webauthn", + "code", + "link_recovery", + "code_recovery" + ], + "type": "string", + "x-go-enum-desc": "password CredentialsTypePassword\noidc CredentialsTypeOIDC\ntotp CredentialsTypeTOTP\nlookup_secret CredentialsTypeLookup\nwebauthn CredentialsTypeWebAuthn\ncode CredentialsTypeCodeAuth\nlink_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself.\ncode_recovery CredentialsTypeRecoveryCode" + }, + "updated_at": { + "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" + }, + "identityCredentialsCode": { + "description": "CredentialsCode represents a one time login/registration code", + "properties": { + "address_type": { + "description": "The type of the address for this code", + "type": "string" + }, + "used_at": { + "$ref": "#/components/schemas/NullTime" + } + }, + "type": "object" + }, + "identityCredentialsOidc": { + "properties": { + "providers": { + "items": { + "$ref": "#/components/schemas/identityCredentialsOidcProvider" + }, + "type": "array" + } + }, + "title": "CredentialsOIDC is contains the configuration for credentials of the type oidc.", + "type": "object" + }, + "identityCredentialsOidcProvider": { + "properties": { + "initial_access_token": { + "type": "string" + }, + "initial_id_token": { + "type": "string" + }, + "initial_refresh_token": { + "type": "string" + }, + "organization": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "subject": { + "type": "string" + } + }, + "title": "CredentialsOIDCProvider is contains a specific OpenID COnnect credential for a particular connection (e.g. Google).", + "type": "object" + }, + "identityCredentialsPassword": { + "properties": { + "hashed_password": { + "description": "HashedPassword is a hash-representation of the password.", + "type": "string" + } + }, + "title": "CredentialsPassword is contains the configuration for credentials of the type password.", + "type": "object" + }, + "identityPatch": { + "description": "Payload for patching an identity", + "properties": { + "create": { + "$ref": "#/components/schemas/createIdentityBody" + }, + "patch_id": { + "description": "The ID of this patch.\n\nThe patch ID is optional. If specified, the ID will be returned in the\nresponse, so consumers of this API can correlate the response with the\npatch.", + "format": "uuid", + "type": "string" + } + }, + "type": "object" + }, + "identityPatchResponse": { + "description": "Response for a single identity patch", + "properties": { + "action": { + "description": "The action for this specific patch\ncreate ActionCreate Create this identity.", + "enum": [ + "create" + ], + "type": "string", + "x-go-enum-desc": "create ActionCreate Create this identity." + }, + "identity": { + "description": "The identity ID payload of this patch", + "format": "uuid", + "type": "string" + }, + "patch_id": { + "description": "The ID of this patch response, if an ID was specified in the patch.", + "format": "uuid", + "type": "string" + } + }, + "type": "object" + }, + "identitySchema": { + "description": "Raw JSON Schema", + "type": "object" + }, + "identitySchemaContainer": { + "description": "An Identity JSON Schema Container", + "properties": { + "id": { + "description": "The ID of the Identity JSON Schema", + "type": "string" + }, + "schema": { + "description": "The actual Identity JSON Schema", + "type": "object" + } + }, + "type": "object" + }, + "identitySchemas": { + "description": "List of Identity JSON Schemas", + "items": { + "$ref": "#/components/schemas/identitySchemaContainer" + }, + "type": "array" + }, + "identityTraits": { + "description": "Traits represent an identity's traits. The identity is able to create, modify, and delete traits\nin a self-service manner. The input will always be validated against the JSON Schema defined\nin `schema_url`." + }, + "identityVerifiableAddressStatus": { + "description": "VerifiableAddressStatus must not exceed 16 characters as that is the limitation in the SQL Schema", + "type": "string" + }, + "identityWithCredentials": { + "description": "Create Identity and Import Credentials", + "properties": { + "oidc": { + "$ref": "#/components/schemas/identityWithCredentialsOidc" + }, + "password": { + "$ref": "#/components/schemas/identityWithCredentialsPassword" + } + }, + "type": "object" + }, + "identityWithCredentialsOidc": { + "description": "Create Identity and Import Social Sign In Credentials", + "properties": { + "config": { + "$ref": "#/components/schemas/identityWithCredentialsOidcConfig" + } + }, + "type": "object" + }, + "identityWithCredentialsOidcConfig": { + "properties": { + "config": { + "$ref": "#/components/schemas/identityWithCredentialsPasswordConfig" + }, + "providers": { + "description": "A list of OpenID Connect Providers", + "items": { + "$ref": "#/components/schemas/identityWithCredentialsOidcConfigProvider" + }, + "type": "array" + } + }, + "type": "object" + }, + "identityWithCredentialsOidcConfigProvider": { + "description": "Create Identity and Import Social Sign In Credentials Configuration", + "properties": { + "provider": { + "description": "The OpenID Connect provider to link the subject to. Usually something like `google` or `github`.", + "type": "string" + }, + "subject": { + "description": "The subject (`sub`) of the OpenID Connect connection. Usually the `sub` field of the ID Token.", + "type": "string" + } + }, + "required": [ + "subject", + "provider" + ], + "type": "object" + }, + "identityWithCredentialsPassword": { + "description": "Create Identity and Import Password Credentials", + "properties": { + "config": { + "$ref": "#/components/schemas/identityWithCredentialsPasswordConfig" + } + }, + "type": "object" + }, + "identityWithCredentialsPasswordConfig": { + "description": "Create Identity and Import Password Credentials Configuration", + "properties": { + "hashed_password": { + "description": "The hashed password in [PHC format](https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities#hashed-passwords)", + "type": "string" + }, + "password": { + "description": "The password in plain text if no hash is available.", + "type": "string" + } + }, + "type": "object" + }, + "jsonPatch": { + "description": "A JSONPatch document as defined by RFC 6902", + "properties": { + "from": { + "description": "This field is used together with operation \"move\" and uses JSON Pointer notation.\n\nLearn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).", + "example": "/name", + "type": "string" + }, + "op": { + "description": "The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\".", + "example": "replace", + "type": "string" + }, + "path": { + "description": "The path to the target path. Uses JSON pointer notation.\n\nLearn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).", + "example": "/name", + "type": "string" + }, + "value": { + "description": "The value to be used within the operations.\n\nLearn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).", + "example": "foobar" + } + }, + "required": [ + "op", + "path" + ], + "type": "object" + }, + "jsonPatchDocument": { + "description": "A JSONPatchDocument request", + "items": { + "$ref": "#/components/schemas/jsonPatch" + }, + "type": "array" + }, + "loginFlow": { + "description": "This object represents a login flow. A login flow is initiated at the \"Initiate Login API / Browser Flow\"\nendpoint by a client.\n\nOnce a login flow is completed successfully, a session cookie or session token will be issued.", + "properties": { + "active": { + "description": "The active login method\n\nIf set contains the login method used. If the flow is new, it is unset.\npassword CredentialsTypePassword\noidc CredentialsTypeOIDC\ntotp CredentialsTypeTOTP\nlookup_secret CredentialsTypeLookup\nwebauthn CredentialsTypeWebAuthn\ncode CredentialsTypeCodeAuth\nlink_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself.\ncode_recovery CredentialsTypeRecoveryCode", + "enum": [ + "password", + "oidc", + "totp", + "lookup_secret", + "webauthn", + "code", + "link_recovery", + "code_recovery" + ], + "type": "string", + "x-go-enum-desc": "password CredentialsTypePassword\noidc CredentialsTypeOIDC\ntotp CredentialsTypeTOTP\nlookup_secret CredentialsTypeLookup\nwebauthn CredentialsTypeWebAuthn\ncode CredentialsTypeCodeAuth\nlink_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself.\ncode_recovery CredentialsTypeRecoveryCode" + }, + "created_at": { + "description": "CreatedAt is a helper struct field for gobuffalo.pop.", + "format": "date-time", + "type": "string" + }, + "expires_at": { + "description": "ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to log in,\na new flow has to be initiated.", + "format": "date-time", + "type": "string" + }, + "id": { + "description": "ID represents the flow's unique ID. When performing the login flow, this\nrepresents the id in the login UI's query parameter: http:///?flow=", + "format": "uuid", + "type": "string" + }, + "issued_at": { + "description": "IssuedAt is the time (UTC) when the flow started.", + "format": "date-time", + "type": "string" + }, + "oauth2_login_challenge": { + "description": "Ory OAuth 2.0 Login Challenge.\n\nThis value is set using the `login_challenge` query parameter of the registration and login endpoints.\nIf set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider.", + "type": "string" + }, + "oauth2_login_request": { + "$ref": "#/components/schemas/OAuth2LoginRequest" + }, + "organization_id": { + "$ref": "#/components/schemas/NullUUID" + }, + "refresh": { + "description": "Refresh stores whether this login flow should enforce re-authentication.", + "type": "boolean" + }, + "request_url": { + "description": "RequestURL is the initial URL that was requested from Ory Kratos. It can be used\nto forward information contained in the URL's path or query for example.", + "type": "string" + }, + "requested_aal": { + "$ref": "#/components/schemas/authenticatorAssuranceLevel" + }, + "return_to": { + "description": "ReturnTo contains the requested return_to URL.", + "type": "string" + }, + "session_token_exchange_code": { + "description": "SessionTokenExchangeCode holds the secret code that the client can use to retrieve a session token after the login flow has been completed.\nThis is only set if the client has requested a session token exchange code, and if the flow is of type \"api\",\nand only on creating the login flow.", + "type": "string" + }, + "state": { + "description": "State represents the state of this request:\n\nchoose_method: ask the user to choose a method to sign in with\nsent_email: the email has been sent to the user\npassed_challenge: the request was successful and the login challenge was passed." + }, + "type": { + "$ref": "#/components/schemas/selfServiceFlowType" + }, + "ui": { + "$ref": "#/components/schemas/uiContainer" + }, + "updated_at": { + "description": "UpdatedAt is a helper struct field for gobuffalo.pop.", + "format": "date-time", + "type": "string" + } + }, + "required": [ + "id", + "type", + "expires_at", + "issued_at", + "request_url", + "ui", + "state" + ], + "title": "Login Flow", + "type": "object" + }, + "loginFlowState": { + "description": "The state represents the state of the login flow.\n\nchoose_method: ask the user to choose a method (e.g. login account via email)\nsent_email: the email has been sent to the user\npassed_challenge: the request was successful and the login challenge was passed.", + "enum": [ + "choose_method", + "sent_email", + "passed_challenge" + ], + "title": "Login Flow State" + }, + "logoutFlow": { + "description": "Logout Flow", + "properties": { + "logout_token": { + "description": "LogoutToken can be used to perform logout using AJAX.", + "type": "string" + }, + "logout_url": { + "description": "LogoutURL can be opened in a browser to sign the user out.\n\nformat: uri", + "type": "string" + } + }, + "required": [ + "logout_url", + "logout_token" + ], + "type": "object" + }, + "message": { + "properties": { + "body": { + "type": "string" + }, + "channel": { + "type": "string" + }, + "created_at": { + "description": "CreatedAt is a helper struct field for gobuffalo.pop.", + "format": "date-time", + "type": "string" + }, + "dispatches": { + "description": "Dispatches store information about the attempts of delivering a message\nMay contain an error if any happened, or just the `success` state.", + "items": { + "$ref": "#/components/schemas/messageDispatch" + }, + "type": "array" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "recipient": { + "type": "string" + }, + "send_count": { + "format": "int64", + "type": "integer" + }, + "status": { + "$ref": "#/components/schemas/courierMessageStatus" + }, + "subject": { + "type": "string" + }, + "template_type": { + "description": "\nrecovery_invalid TypeRecoveryInvalid\nrecovery_valid TypeRecoveryValid\nrecovery_code_invalid TypeRecoveryCodeInvalid\nrecovery_code_valid TypeRecoveryCodeValid\nverification_invalid TypeVerificationInvalid\nverification_valid TypeVerificationValid\nverification_code_invalid TypeVerificationCodeInvalid\nverification_code_valid TypeVerificationCodeValid\nstub TypeTestStub\nlogin_code_valid TypeLoginCodeValid\nregistration_code_valid TypeRegistrationCodeValid", + "enum": [ + "recovery_invalid", + "recovery_valid", + "recovery_code_invalid", + "recovery_code_valid", + "verification_invalid", + "verification_valid", + "verification_code_invalid", + "verification_code_valid", + "stub", + "login_code_valid", + "registration_code_valid" + ], + "type": "string", + "x-go-enum-desc": "recovery_invalid TypeRecoveryInvalid\nrecovery_valid TypeRecoveryValid\nrecovery_code_invalid TypeRecoveryCodeInvalid\nrecovery_code_valid TypeRecoveryCodeValid\nverification_invalid TypeVerificationInvalid\nverification_valid TypeVerificationValid\nverification_code_invalid TypeVerificationCodeInvalid\nverification_code_valid TypeVerificationCodeValid\nstub TypeTestStub\nlogin_code_valid TypeLoginCodeValid\nregistration_code_valid TypeRegistrationCodeValid" + }, + "type": { + "$ref": "#/components/schemas/courierMessageType" + }, + "updated_at": { + "description": "UpdatedAt is a helper struct field for gobuffalo.pop.", + "format": "date-time", + "type": "string" + } + }, + "required": [ + "id", + "status", + "type", + "recipient", + "body", + "subject", + "template_type", + "send_count", + "created_at", + "updated_at" + ], + "type": "object" + }, + "messageDispatch": { + "description": "MessageDispatch represents an attempt of sending a courier message\nIt contains the status of the attempt (failed or successful) and the error if any occured", + "properties": { + "created_at": { + "description": "CreatedAt is a helper struct field for gobuffalo.pop.", + "format": "date-time", + "type": "string" + }, + "error": { + "$ref": "#/components/schemas/JSONRawMessage" + }, + "id": { + "description": "The ID of this message dispatch", + "format": "uuid", + "type": "string" + }, + "message_id": { + "description": "The ID of the message being dispatched", + "format": "uuid", + "type": "string" + }, + "status": { + "description": "The status of this dispatch\nEither \"failed\" or \"success\"\nfailed CourierMessageDispatchStatusFailed\nsuccess CourierMessageDispatchStatusSuccess", + "enum": [ + "failed", + "success" + ], + "type": "string", + "x-go-enum-desc": "failed CourierMessageDispatchStatusFailed\nsuccess CourierMessageDispatchStatusSuccess" + }, + "updated_at": { + "description": "UpdatedAt is a helper struct field for gobuffalo.pop.", + "format": "date-time", + "type": "string" + } + }, + "required": [ + "id", + "message_id", + "status", + "created_at", + "updated_at" + ], + "type": "object" + }, + "needsPrivilegedSessionError": { + "properties": { + "error": { + "$ref": "#/components/schemas/genericError" + }, + "redirect_browser_to": { + "description": "Points to where to redirect the user to next.", + "type": "string" + } + }, + "required": [ + "redirect_browser_to" + ], + "title": "Is sent when a privileged session is required to perform the settings update.", + "type": "object" + }, + "nullDuration": { + "nullable": true, + "pattern": "^[0-9]+(ns|us|ms|s|m|h)$", + "type": "string" + }, + "nullInt64": { + "nullable": true, + "type": "integer" + }, + "nullJsonRawMessage": { + "description": "NullJSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger and is NULLable-", + "nullable": true + }, + "nullTime": { + "format": "date-time", + "title": "NullTime implements sql.NullTime functionality.", + "type": "string" + }, + "patchIdentitiesBody": { + "description": "Patch Identities Body", + "properties": { + "identities": { + "description": "Identities holds the list of patches to apply\n\nrequired", + "items": { + "$ref": "#/components/schemas/identityPatch" + }, + "type": "array" + } + }, + "type": "object" + }, + "performNativeLogoutBody": { + "description": "Perform Native Logout Request Body", + "properties": { + "session_token": { + "description": "The Session Token\n\nInvalidate this session token.", + "type": "string" + } + }, + "required": [ + "session_token" + ], + "type": "object" + }, + "recoveryCodeForIdentity": { + "description": "Used when an administrator creates a recovery code for an identity.", + "properties": { + "expires_at": { + "description": "Expires At is the timestamp of when the recovery flow expires\n\nThe timestamp when the recovery code expires.", + "format": "date-time", + "type": "string" + }, + "recovery_code": { + "description": "RecoveryCode is the code that can be used to recover the account", + "type": "string" + }, + "recovery_link": { + "description": "RecoveryLink with flow\n\nThis link opens the recovery UI with an empty `code` field.", + "type": "string" + } + }, + "required": [ + "recovery_link", + "recovery_code" + ], + "title": "Recovery Code for Identity", + "type": "object" + }, + "recoveryFlow": { + "description": "This request is used when an identity wants to recover their account.\n\nWe recommend reading the [Account Recovery Documentation](../self-service/flows/password-reset-account-recovery)", + "properties": { + "active": { + "description": "Active, if set, contains the recovery method that is being used. It is initially\nnot set.", + "type": "string" + }, + "continue_with": { + "description": "Contains possible actions that could follow this flow", + "items": { + "$ref": "#/components/schemas/continueWith" + }, + "type": "array" + }, + "expires_at": { + "description": "ExpiresAt is the time (UTC) when the request expires. If the user still wishes to update the setting,\na new request has to be initiated.", + "format": "date-time", + "type": "string" + }, + "id": { + "description": "ID represents the request's unique ID. When performing the recovery flow, this\nrepresents the id in the recovery ui's query parameter: http://?request=", + "format": "uuid", + "type": "string" + }, + "issued_at": { + "description": "IssuedAt is the time (UTC) when the request occurred.", + "format": "date-time", + "type": "string" + }, + "request_url": { + "description": "RequestURL is the initial URL that was requested from Ory Kratos. It can be used\nto forward information contained in the URL's path or query for example.", + "type": "string" + }, + "return_to": { + "description": "ReturnTo contains the requested return_to URL.", + "type": "string" + }, + "state": { + "description": "State represents the state of this request:\n\nchoose_method: ask the user to choose a method (e.g. recover account via email)\nsent_email: the email has been sent to the user\npassed_challenge: the request was successful and the recovery challenge was passed." + }, + "type": { + "$ref": "#/components/schemas/selfServiceFlowType" + }, + "ui": { + "$ref": "#/components/schemas/uiContainer" + } + }, + "required": [ + "id", + "type", + "expires_at", + "issued_at", + "request_url", + "ui", + "state" + ], + "title": "A Recovery Flow", + "type": "object" + }, + "recoveryFlowState": { + "description": "The state represents the state of the recovery flow.\n\nchoose_method: ask the user to choose a method (e.g. recover account via email)\nsent_email: the email has been sent to the user\npassed_challenge: the request was successful and the recovery challenge was passed.", + "enum": [ + "choose_method", + "sent_email", + "passed_challenge" + ], + "title": "Recovery Flow State" + }, + "recoveryIdentityAddress": { + "properties": { + "created_at": { + "description": "CreatedAt is a helper struct field for gobuffalo.pop.", + "format": "date-time", + "type": "string" + }, + "id": { + "format": "uuid", + "type": "string" + }, + "updated_at": { + "description": "UpdatedAt is a helper struct field for gobuffalo.pop.", + "format": "date-time", + "type": "string" + }, + "value": { + "type": "string" + }, + "via": { + "$ref": "#/components/schemas/RecoveryAddressType" + } + }, + "required": [ + "id", + "value", + "via" + ], + "type": "object" + }, + "recoveryLinkForIdentity": { + "description": "Used when an administrator creates a recovery link for an identity.", + "properties": { + "expires_at": { + "description": "Recovery Link Expires At\n\nThe timestamp when the recovery link expires.", + "format": "date-time", + "type": "string" + }, + "recovery_link": { + "description": "Recovery Link\n\nThis link can be used to recover the account.", + "type": "string" + } + }, + "required": [ + "recovery_link" + ], + "title": "Identity Recovery Link", + "type": "object" + }, + "registrationFlow": { + "properties": { + "active": { + "description": "Active, if set, contains the registration method that is being used. It is initially\nnot set.\npassword CredentialsTypePassword\noidc CredentialsTypeOIDC\ntotp CredentialsTypeTOTP\nlookup_secret CredentialsTypeLookup\nwebauthn CredentialsTypeWebAuthn\ncode CredentialsTypeCodeAuth\nlink_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself.\ncode_recovery CredentialsTypeRecoveryCode", + "enum": [ + "password", + "oidc", + "totp", + "lookup_secret", + "webauthn", + "code", + "link_recovery", + "code_recovery" + ], + "type": "string", + "x-go-enum-desc": "password CredentialsTypePassword\noidc CredentialsTypeOIDC\ntotp CredentialsTypeTOTP\nlookup_secret CredentialsTypeLookup\nwebauthn CredentialsTypeWebAuthn\ncode CredentialsTypeCodeAuth\nlink_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself.\ncode_recovery CredentialsTypeRecoveryCode" + }, + "expires_at": { + "description": "ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to log in,\na new flow has to be initiated.", + "format": "date-time", + "type": "string" + }, + "id": { + "description": "ID represents the flow's unique ID. When performing the registration flow, this\nrepresents the id in the registration ui's query parameter: http:///?flow=", + "format": "uuid", + "type": "string" + }, + "issued_at": { + "description": "IssuedAt is the time (UTC) when the flow occurred.", + "format": "date-time", + "type": "string" + }, + "oauth2_login_challenge": { + "description": "Ory OAuth 2.0 Login Challenge.\n\nThis value is set using the `login_challenge` query parameter of the registration and login endpoints.\nIf set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider.", + "type": "string" + }, + "oauth2_login_request": { + "$ref": "#/components/schemas/OAuth2LoginRequest" + }, + "organization_id": { + "$ref": "#/components/schemas/NullUUID" + }, + "request_url": { + "description": "RequestURL is the initial URL that was requested from Ory Kratos. It can be used\nto forward information contained in the URL's path or query for example.", + "type": "string" + }, + "return_to": { + "description": "ReturnTo contains the requested return_to URL.", + "type": "string" + }, + "session_token_exchange_code": { + "description": "SessionTokenExchangeCode holds the secret code that the client can use to retrieve a session token after the flow has been completed.\nThis is only set if the client has requested a session token exchange code, and if the flow is of type \"api\",\nand only on creating the flow.", + "type": "string" + }, + "state": { + "description": "State represents the state of this request:\n\nchoose_method: ask the user to choose a method (e.g. registration with email)\nsent_email: the email has been sent to the user\npassed_challenge: the request was successful and the registration challenge was passed." + }, + "transient_payload": { + "description": "TransientPayload is used to pass data from the registration to a webhook", + "type": "object" + }, + "type": { + "$ref": "#/components/schemas/selfServiceFlowType" + }, + "ui": { + "$ref": "#/components/schemas/uiContainer" + } + }, + "required": [ + "id", + "type", + "expires_at", + "issued_at", + "request_url", + "ui", + "state" + ], + "type": "object" + }, + "registrationFlowState": { + "description": "choose_method: ask the user to choose a method (e.g. registration with email)\nsent_email: the email has been sent to the user\npassed_challenge: the request was successful and the registration challenge was passed.", + "enum": [ + "choose_method", + "sent_email", + "passed_challenge" + ], + "title": "State represents the state of this request:" + }, + "selfServiceFlowExpiredError": { + "description": "Is sent when a flow is expired", + "properties": { + "error": { + "$ref": "#/components/schemas/genericError" + }, + "expired_at": { + "description": "When the flow has expired", + "format": "date-time", + "type": "string" + }, + "since": { + "$ref": "#/components/schemas/Duration" + }, + "use_flow_id": { + "description": "The flow ID that should be used for the new flow as it contains the correct messages.", + "format": "uuid", + "type": "string" + } + }, + "type": "object" + }, + "selfServiceFlowType": { + "description": "The flow type can either be `api` or `browser`.", + "title": "Type is the flow type.", + "type": "string" + }, + "session": { + "description": "A Session", + "properties": { + "active": { + "description": "Active state. If false the session is no longer active.", + "type": "boolean" + }, + "authenticated_at": { + "description": "The Session Authentication Timestamp\n\nWhen this session was authenticated at. If multi-factor authentication was used this\nis the time when the last factor was authenticated (e.g. the TOTP code challenge was completed).", + "format": "date-time", + "type": "string" + }, + "authentication_methods": { + "$ref": "#/components/schemas/sessionAuthenticationMethods" + }, + "authenticator_assurance_level": { + "$ref": "#/components/schemas/authenticatorAssuranceLevel" + }, + "devices": { + "description": "Devices has history of all endpoints where the session was used", + "items": { + "$ref": "#/components/schemas/sessionDevice" + }, + "type": "array" + }, + "expires_at": { + "description": "The Session Expiry\n\nWhen this session expires at.", + "format": "date-time", + "type": "string" + }, + "id": { + "description": "Session ID", + "format": "uuid", + "type": "string" + }, + "identity": { + "$ref": "#/components/schemas/identity" + }, + "issued_at": { + "description": "The Session Issuance Timestamp\n\nWhen this session was issued at. Usually equal or close to `authenticated_at`.", + "format": "date-time", + "type": "string" + }, + "tokenized": { + "description": "Tokenized is the tokenized (e.g. JWT) version of the session.\n\nIt is only set when the `tokenize` query parameter was set to a valid tokenize template during calls to `/session/whoami`.", + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "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", + "type": "string" + }, + "method": { + "enum": [ + "link_recovery", + "code_recovery", + "password", + "code", + "totp", + "oidc", + "webauthn", + "lookup_secret", + "v0.6_legacy_session" + ], + "title": "The method used", + "type": "string" + }, + "organization": { + "description": "The Organization id used for authentication", + "type": "string" + }, + "provider": { + "description": "OIDC or SAML provider id used for authentication", + "type": "string" + } + }, + "title": "AuthenticationMethod identifies an authentication method", + "type": "object" + }, + "sessionAuthenticationMethods": { + "description": "A list of authenticators which were used to authenticate the session.", + "items": { + "$ref": "#/components/schemas/sessionAuthenticationMethod" + }, + "title": "List of (Used) AuthenticationMethods", + "type": "array" + }, + "sessionDevice": { + "description": "Device corresponding to a Session", + "properties": { + "id": { + "description": "Device record ID", + "format": "uuid", + "type": "string" + }, + "ip_address": { + "description": "IPAddress of the client", + "type": "string" + }, + "location": { + "description": "Geo Location corresponding to the IP Address", + "type": "string" + }, + "user_agent": { + "description": "UserAgent of the client", + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "settingsFlow": { + "description": "This flow is used when an identity wants to update settings\n(e.g. profile data, passwords, ...) in a selfservice manner.\n\nWe recommend reading the [User Settings Documentation](../self-service/flows/user-settings)", + "properties": { + "active": { + "description": "Active, if set, contains the registration method that is being used. It is initially\nnot set.", + "type": "string" + }, + "continue_with": { + "description": "Contains a list of actions, that could follow this flow\n\nIt can, for example, contain a reference to the verification flow, created as part of the user's\nregistration.", + "items": { + "$ref": "#/components/schemas/continueWith" + }, + "type": "array" + }, + "expires_at": { + "description": "ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to update the setting,\na new flow has to be initiated.", + "format": "date-time", + "type": "string" + }, + "id": { + "description": "ID represents the flow's unique ID. When performing the settings flow, this\nrepresents the id in the settings ui's query parameter: http://?flow=", + "format": "uuid", + "type": "string" + }, + "identity": { + "$ref": "#/components/schemas/identity" + }, + "issued_at": { + "description": "IssuedAt is the time (UTC) when the flow occurred.", + "format": "date-time", + "type": "string" + }, + "request_url": { + "description": "RequestURL is the initial URL that was requested from Ory Kratos. It can be used\nto forward information contained in the URL's path or query for example.", + "type": "string" + }, + "return_to": { + "description": "ReturnTo contains the requested return_to URL.", + "type": "string" + }, + "state": { + "description": "State represents the state of this flow. It knows two states:\n\nshow_form: No user data has been collected, or it is invalid, and thus the form should be shown.\nsuccess: Indicates that the settings flow has been updated successfully with the provided data.\nDone will stay true when repeatedly checking. If set to true, done will revert back to false only\nwhen a flow with invalid (e.g. \"please use a valid phone number\") data was sent." + }, + "type": { + "$ref": "#/components/schemas/selfServiceFlowType" + }, + "ui": { + "$ref": "#/components/schemas/uiContainer" + } + }, + "required": [ + "id", + "type", + "expires_at", + "issued_at", + "request_url", + "ui", + "identity", + "state" + ], + "title": "Flow represents a Settings Flow", + "type": "object" + }, + "settingsFlowState": { + "description": "show_form: No user data has been collected, or it is invalid, and thus the form should be shown.\nsuccess: Indicates that the settings flow has been updated successfully with the provided data.\nDone will stay true when repeatedly checking. If set to true, done will revert back to false only\nwhen a flow with invalid (e.g. \"please use a valid phone number\") data was sent.", + "enum": [ + "show_form", + "success" + ], + "title": "State represents the state of this flow. It knows two states:" + }, + "successfulCodeExchangeResponse": { + "description": "The Response for Registration Flows via API", + "properties": { + "session": { + "$ref": "#/components/schemas/session" + }, + "session_token": { + "description": "The Session Token\n\nA session token is equivalent to a session cookie, but it can be sent in the HTTP Authorization\nHeader:\n\nAuthorization: bearer ${session-token}\n\nThe session token is only issued for API flows, not for Browser flows!", + "type": "string" + } + }, + "required": [ + "session" + ], + "type": "object" + }, + "successfulNativeLogin": { + "description": "The Response for Login Flows via API", + "properties": { + "session": { + "$ref": "#/components/schemas/session" + }, + "session_token": { + "description": "The Session Token\n\nA session token is equivalent to a session cookie, but it can be sent in the HTTP Authorization\nHeader:\n\nAuthorization: bearer ${session-token}\n\nThe session token is only issued for API flows, not for Browser flows!", + "type": "string" + } + }, + "required": [ + "session" + ], + "type": "object" + }, + "successfulNativeRegistration": { + "description": "The Response for Registration Flows via API", + "properties": { + "continue_with": { + "description": "Contains a list of actions, that could follow this flow\n\nIt can, for example, this will contain a reference to the verification flow, created as part of the user's\nregistration or the token of the session.", + "items": { + "$ref": "#/components/schemas/continueWith" + }, + "type": "array" + }, + "identity": { + "$ref": "#/components/schemas/identity" + }, + "session": { + "$ref": "#/components/schemas/session" + }, + "session_token": { + "description": "The Session Token\n\nThis field is only set when the session hook is configured as a post-registration hook.\n\nA session token is equivalent to a session cookie, but it can be sent in the HTTP Authorization\nHeader:\n\nAuthorization: bearer ${session-token}\n\nThe session token is only issued for API flows, not for Browser flows!", + "type": "string" + } + }, + "required": [ + "identity" + ], + "type": "object" + }, + "tokenPagination": { + "properties": { + "page_size": { + "default": 250, + "description": "Items per page\n\nThis is the number of items per page to return.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).", + "format": "int64", + "maximum": 1000, + "minimum": 1, + "type": "integer" + }, + "page_token": { + "default": "1", + "description": "Next Page Token\n\nThe next page token.\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).", + "minimum": 1, + "type": "string" + } + }, + "type": "object" + }, + "tokenPaginationHeaders": { + "properties": { + "link": { + "description": "The link header contains pagination links.\n\nFor details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).\n\nin: header", + "type": "string" + }, + "x-total-count": { + "description": "The total number of clients.\n\nin: header", + "type": "string" + } + }, + "type": "object" + }, + "uiContainer": { + "description": "Container represents a HTML Form. The container can work with both HTTP Form and JSON requests", + "properties": { + "action": { + "description": "Action should be used as the form action URL ``.", + "type": "string" + }, + "messages": { + "$ref": "#/components/schemas/uiTexts" + }, + "method": { + "description": "Method is the form method (e.g. POST)", + "type": "string" + }, + "nodes": { + "$ref": "#/components/schemas/uiNodes" + } + }, + "required": [ + "action", + "method", + "nodes" + ], + "type": "object" + }, + "uiNode": { + "description": "Nodes are represented as HTML elements or their native UI equivalents. For example,\na node can be an `` tag, or an `` but also `some plain text`.", + "properties": { + "attributes": { + "$ref": "#/components/schemas/uiNodeAttributes" + }, + "group": { + "description": "Group specifies which group (e.g. password authenticator) this node belongs to.\ndefault DefaultGroup\npassword PasswordGroup\noidc OpenIDConnectGroup\nprofile ProfileGroup\nlink LinkGroup\ncode CodeGroup\ntotp TOTPGroup\nlookup_secret LookupGroup\nwebauthn WebAuthnGroup", + "enum": [ + "default", + "password", + "oidc", + "profile", + "link", + "code", + "totp", + "lookup_secret", + "webauthn" + ], + "type": "string", + "x-go-enum-desc": "default DefaultGroup\npassword PasswordGroup\noidc OpenIDConnectGroup\nprofile ProfileGroup\nlink LinkGroup\ncode CodeGroup\ntotp TOTPGroup\nlookup_secret LookupGroup\nwebauthn WebAuthnGroup" + }, + "messages": { + "$ref": "#/components/schemas/uiTexts" + }, + "meta": { + "$ref": "#/components/schemas/uiNodeMeta" + }, + "type": { + "description": "The node's type\ntext Text\ninput Input\nimg Image\na Anchor\nscript Script", + "enum": [ + "text", + "input", + "img", + "a", + "script" + ], + "type": "string", + "x-go-enum-desc": "text Text\ninput Input\nimg Image\na Anchor\nscript Script" + } + }, + "required": [ + "type", + "group", + "attributes", + "messages", + "meta" + ], + "title": "Node represents a flow's nodes", + "type": "object" + }, + "uiNodeAnchorAttributes": { + "properties": { + "href": { + "description": "The link's href (destination) URL.\n\nformat: uri", + "type": "string" + }, + "id": { + "description": "A unique identifier", + "type": "string" + }, + "node_type": { + "description": "NodeType represents this node's types. It is a mirror of `node.type` and\nis primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is \"a\".", + "type": "string" + }, + "title": { + "$ref": "#/components/schemas/uiText" + } + }, + "required": [ + "href", + "title", + "id", + "node_type" + ], + "title": "AnchorAttributes represents the attributes of an anchor node.", + "type": "object" + }, + "uiNodeAttributes": { + "discriminator": { + "mapping": { + "a": "#/components/schemas/uiNodeAnchorAttributes", + "img": "#/components/schemas/uiNodeImageAttributes", + "input": "#/components/schemas/uiNodeInputAttributes", + "script": "#/components/schemas/uiNodeScriptAttributes", + "text": "#/components/schemas/uiNodeTextAttributes" + }, + "propertyName": "node_type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/uiNodeInputAttributes" + }, + { + "$ref": "#/components/schemas/uiNodeTextAttributes" + }, + { + "$ref": "#/components/schemas/uiNodeImageAttributes" + }, + { + "$ref": "#/components/schemas/uiNodeAnchorAttributes" + }, + { + "$ref": "#/components/schemas/uiNodeScriptAttributes" + } + ], + "title": "Attributes represents a list of attributes (e.g. `href=\"foo\"` for links)." + }, + "uiNodeImageAttributes": { + "properties": { + "height": { + "description": "Height of the image", + "format": "int64", + "type": "integer" + }, + "id": { + "description": "A unique identifier", + "type": "string" + }, + "node_type": { + "description": "NodeType represents this node's types. It is a mirror of `node.type` and\nis primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is \"img\".", + "type": "string" + }, + "src": { + "description": "The image's source URL.\n\nformat: uri", + "type": "string" + }, + "width": { + "description": "Width of the image", + "format": "int64", + "type": "integer" + } + }, + "required": [ + "src", + "id", + "width", + "height", + "node_type" + ], + "title": "ImageAttributes represents the attributes of an image node.", + "type": "object" + }, + "uiNodeInputAttributes": { + "description": "InputAttributes represents the attributes of an input node", + "properties": { + "autocomplete": { + "description": "The autocomplete attribute for the input.\nemail InputAttributeAutocompleteEmail\ntel InputAttributeAutocompleteTel\nurl InputAttributeAutocompleteUrl\ncurrent-password InputAttributeAutocompleteCurrentPassword\nnew-password InputAttributeAutocompleteNewPassword\none-time-code InputAttributeAutocompleteOneTimeCode", + "enum": [ + "email", + "tel", + "url", + "current-password", + "new-password", + "one-time-code" + ], + "type": "string", + "x-go-enum-desc": "email InputAttributeAutocompleteEmail\ntel InputAttributeAutocompleteTel\nurl InputAttributeAutocompleteUrl\ncurrent-password InputAttributeAutocompleteCurrentPassword\nnew-password InputAttributeAutocompleteNewPassword\none-time-code InputAttributeAutocompleteOneTimeCode" + }, + "disabled": { + "description": "Sets the input's disabled field to true or false.", + "type": "boolean" + }, + "label": { + "$ref": "#/components/schemas/uiText" + }, + "name": { + "description": "The input's element name.", + "type": "string" + }, + "node_type": { + "description": "NodeType represents this node's types. It is a mirror of `node.type` and\nis primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is \"input\".", + "type": "string" + }, + "onclick": { + "description": "OnClick may contain javascript which should be executed on click. This is primarily\nused for WebAuthn.", + "type": "string" + }, + "pattern": { + "description": "The input's pattern.", + "type": "string" + }, + "required": { + "description": "Mark this input field as required.", + "type": "boolean" + }, + "type": { + "description": "The input's element type.\ntext InputAttributeTypeText\npassword InputAttributeTypePassword\nnumber InputAttributeTypeNumber\ncheckbox InputAttributeTypeCheckbox\nhidden InputAttributeTypeHidden\nemail InputAttributeTypeEmail\ntel InputAttributeTypeTel\nsubmit InputAttributeTypeSubmit\nbutton InputAttributeTypeButton\ndatetime-local InputAttributeTypeDateTimeLocal\ndate InputAttributeTypeDate\nurl InputAttributeTypeURI", + "enum": [ + "text", + "password", + "number", + "checkbox", + "hidden", + "email", + "tel", + "submit", + "button", + "datetime-local", + "date", + "url" + ], + "type": "string", + "x-go-enum-desc": "text InputAttributeTypeText\npassword InputAttributeTypePassword\nnumber InputAttributeTypeNumber\ncheckbox InputAttributeTypeCheckbox\nhidden InputAttributeTypeHidden\nemail InputAttributeTypeEmail\ntel InputAttributeTypeTel\nsubmit InputAttributeTypeSubmit\nbutton InputAttributeTypeButton\ndatetime-local InputAttributeTypeDateTimeLocal\ndate InputAttributeTypeDate\nurl InputAttributeTypeURI" + }, + "value": { + "description": "The input's value.", + "nullable": true + } + }, + "required": [ + "name", + "type", + "disabled", + "node_type" + ], + "type": "object" + }, + "uiNodeMeta": { + "description": "This might include a label and other information that can optionally\nbe used to render UIs.", + "properties": { + "label": { + "$ref": "#/components/schemas/uiText" + } + }, + "title": "A Node's Meta Information", + "type": "object" + }, + "uiNodeScriptAttributes": { + "properties": { + "async": { + "description": "The script async type", + "type": "boolean" + }, + "crossorigin": { + "description": "The script cross origin policy", + "type": "string" + }, + "id": { + "description": "A unique identifier", + "type": "string" + }, + "integrity": { + "description": "The script's integrity hash", + "type": "string" + }, + "node_type": { + "description": "NodeType represents this node's types. It is a mirror of `node.type` and\nis primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is \"script\".", + "type": "string" + }, + "nonce": { + "description": "Nonce for CSP\n\nA nonce you may want to use to improve your Content Security Policy.\nYou do not have to use this value but if you want to improve your CSP\npolicies you may use it. You can also choose to use your own nonce value!", + "type": "string" + }, + "referrerpolicy": { + "description": "The script referrer policy", + "type": "string" + }, + "src": { + "description": "The script source", + "type": "string" + }, + "type": { + "description": "The script MIME type", + "type": "string" + } + }, + "required": [ + "src", + "async", + "referrerpolicy", + "crossorigin", + "integrity", + "type", + "id", + "nonce", + "node_type" + ], + "title": "ScriptAttributes represent script nodes which load javascript.", + "type": "object" + }, + "uiNodeTextAttributes": { + "properties": { + "id": { + "description": "A unique identifier", + "type": "string" + }, + "node_type": { + "description": "NodeType represents this node's types. It is a mirror of `node.type` and\nis primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is \"text\".", + "type": "string" + }, + "text": { + "$ref": "#/components/schemas/uiText" + } + }, + "required": [ + "text", + "id", + "node_type" + ], + "title": "TextAttributes represents the attributes of a text node.", + "type": "object" + }, + "uiNodes": { + "items": { + "$ref": "#/components/schemas/uiNode" + }, + "type": "array" + }, + "uiText": { + "properties": { + "context": { + "description": "The message's context. Useful when customizing messages.", + "type": "object" + }, + "id": { + "$ref": "#/components/schemas/ID" + }, + "text": { + "description": "The message text. Written in american english.", + "type": "string" + }, + "type": { + "description": "The message type.\ninfo Info\nerror Error\nsuccess Success", + "enum": [ + "info", + "error", + "success" + ], + "type": "string", + "x-go-enum-desc": "info Info\nerror Error\nsuccess Success" + } + }, + "required": [ + "id", + "text", + "type" + ], + "type": "object" + }, + "uiTexts": { + "items": { + "$ref": "#/components/schemas/uiText" + }, + "type": "array" + }, + "unexpectedError": { + "type": "string" + }, + "updateIdentityBody": { + "description": "Update Identity Body", + "properties": { + "credentials": { + "$ref": "#/components/schemas/identityWithCredentials" + }, + "metadata_admin": { + "description": "Store metadata about the user which is only accessible through admin APIs such as `GET /admin/identities/`." + }, + "metadata_public": { + "description": "Store metadata about the identity which the identity itself can see when calling for example the\nsession endpoint. Do not store sensitive information (e.g. credit score) about the identity in this field." + }, + "schema_id": { + "description": "SchemaID is the ID of the JSON Schema to be used for validating the identity's traits. If set\nwill update the Identity's SchemaID.", + "type": "string" + }, + "state": { + "description": "State is the identity's state.\nactive StateActive\ninactive StateInactive", + "enum": [ + "active", + "inactive" + ], + "type": "string", + "x-go-enum-desc": "active StateActive\ninactive StateInactive" + }, + "traits": { + "description": "Traits represent an identity's traits. The identity is able to create, modify, and delete traits\nin a self-service manner. The input will always be validated against the JSON Schema defined\nin `schema_id`.", + "type": "object" + } + }, + "required": [ + "schema_id", + "traits", + "state" + ], + "type": "object" + }, + "updateLoginFlowBody": { + "discriminator": { + "mapping": { + "code": "#/components/schemas/updateLoginFlowWithCodeMethod", + "lookup_secret": "#/components/schemas/updateLoginFlowWithLookupSecretMethod", + "oidc": "#/components/schemas/updateLoginFlowWithOidcMethod", + "password": "#/components/schemas/updateLoginFlowWithPasswordMethod", + "totp": "#/components/schemas/updateLoginFlowWithTotpMethod", + "webauthn": "#/components/schemas/updateLoginFlowWithWebAuthnMethod" + }, + "propertyName": "method" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/updateLoginFlowWithPasswordMethod" + }, + { + "$ref": "#/components/schemas/updateLoginFlowWithOidcMethod" + }, + { + "$ref": "#/components/schemas/updateLoginFlowWithTotpMethod" + }, + { + "$ref": "#/components/schemas/updateLoginFlowWithWebAuthnMethod" + }, + { + "$ref": "#/components/schemas/updateLoginFlowWithLookupSecretMethod" + }, + { + "$ref": "#/components/schemas/updateLoginFlowWithCodeMethod" + } + ] + }, + "updateLoginFlowWithCodeMethod": { + "description": "Update Login flow using the code method", + "properties": { + "code": { + "description": "Code is the 6 digits code sent to the user", + "type": "string" + }, + "csrf_token": { + "description": "CSRFToken is the anti-CSRF token", + "type": "string" + }, + "identifier": { + "description": "Identifier is the code identifier\nThe identifier requires that the user has already completed the registration or settings with code flow.", + "type": "string" + }, + "method": { + "description": "Method should be set to \"code\" when logging in using the code strategy.", + "type": "string" + }, + "resend": { + "description": "Resend is set when the user wants to resend the code", + "type": "string" + } + }, + "required": [ + "method", + "csrf_token" + ], + "type": "object" + }, + "updateLoginFlowWithLookupSecretMethod": { + "description": "Update Login Flow with Lookup Secret Method", + "properties": { + "csrf_token": { + "description": "Sending the anti-csrf token is only required for browser login flows.", + "type": "string" + }, + "lookup_secret": { + "description": "The lookup secret.", + "type": "string" + }, + "method": { + "description": "Method should be set to \"lookup_secret\" when logging in using the lookup_secret strategy.", + "type": "string" + } + }, + "required": [ + "method", + "lookup_secret" + ], + "type": "object" + }, + "updateLoginFlowWithOidcMethod": { + "description": "Update Login Flow with OpenID Connect Method", + "properties": { + "csrf_token": { + "description": "The CSRF Token", + "type": "string" + }, + "id_token": { + "description": "IDToken is an optional id token provided by an OIDC provider\n\nIf submitted, it is verified using the OIDC provider's public key set and the claims are used to populate\nthe OIDC credentials of the identity.\nIf the OIDC provider does not store additional claims (such as name, etc.) in the IDToken itself, you can use\nthe `traits` field to populate the identity's traits. Note, that Apple only includes the users email in the IDToken.\n\nSupported providers are\nApple", + "type": "string" + }, + "id_token_nonce": { + "description": "IDTokenNonce is the nonce, used when generating the IDToken.\nIf the provider supports nonce validation, the nonce will be validated against this value and required.", + "type": "string" + }, + "method": { + "description": "Method to use\n\nThis field must be set to `oidc` when using the oidc method.", + "type": "string" + }, + "provider": { + "description": "The provider to register with", + "type": "string" + }, + "traits": { + "description": "The identity traits. This is a placeholder for the registration flow.", + "type": "object" + }, + "upstream_parameters": { + "description": "UpstreamParameters are the parameters that are passed to the upstream identity provider.\n\nThese parameters are optional and depend on what the upstream identity provider supports.\nSupported parameters are:\n`login_hint` (string): The `login_hint` parameter suppresses the account chooser and either pre-fills the email box on the sign-in form, or selects the proper session.\n`hd` (string): The `hd` parameter limits the login/registration process to a Google Organization, e.g. `mycollege.edu`.\n`prompt` (string): The `prompt` specifies whether the Authorization Server prompts the End-User for reauthentication and consent, e.g. `select_account`.", + "type": "object" + } + }, + "required": [ + "provider", + "method" + ], + "type": "object" + }, + "updateLoginFlowWithPasswordMethod": { + "description": "Update Login Flow with Password Method", + "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" + }, + "password": { + "description": "The user's password.", + "type": "string" + }, + "password_identifier": { + "description": "Identifier is the email or username of the user trying to log in.\nThis field is deprecated!", + "type": "string" + } + }, + "required": [ + "method", + "password", + "identifier" + ], + "type": "object" + }, + "updateLoginFlowWithTotpMethod": { + "description": "Update Login Flow with TOTP Method", + "properties": { + "csrf_token": { + "description": "Sending the anti-csrf token is only required for browser login flows.", + "type": "string" + }, + "method": { + "description": "Method should be set to \"totp\" when logging in using the TOTP strategy.", + "type": "string" + }, + "totp_code": { + "description": "The TOTP code.", + "type": "string" + } + }, + "required": [ + "method", + "totp_code" + ], + "type": "object" + }, + "updateLoginFlowWithWebAuthnMethod": { + "description": "Update Login Flow with WebAuthn Method", + "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 \"webAuthn\" when logging in using the WebAuthn strategy.", + "type": "string" + }, + "webauthn_login": { + "description": "Login a WebAuthn Security Key\n\nThis must contain the ID of the WebAuthN connection.", + "type": "string" + } + }, + "required": [ + "identifier", + "method" + ], + "type": "object" + }, + "updateRecoveryFlowBody": { + "description": "Update Recovery Flow Request Body", + "discriminator": { + "mapping": { + "code": "#/components/schemas/updateRecoveryFlowWithCodeMethod", + "link": "#/components/schemas/updateRecoveryFlowWithLinkMethod" + }, + "propertyName": "method" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/updateRecoveryFlowWithLinkMethod" + }, + { + "$ref": "#/components/schemas/updateRecoveryFlowWithCodeMethod" + } + ] + }, + "updateRecoveryFlowWithCodeMethod": { + "description": "Update Recovery Flow with Code Method", + "properties": { + "code": { + "description": "Code from the recovery email\n\nIf you want to submit a code, use this field, but make sure to _not_ include the email field, as well.", + "type": "string" + }, + "csrf_token": { + "description": "Sending the anti-csrf token is only required for browser login flows.", + "type": "string" + }, + "email": { + "description": "The email address of the account to recover\n\nIf the email belongs to a valid account, a recovery email will be sent.\n\nIf you want to notify the email address if the account does not exist, see\nthe [notify_unknown_recipients flag](https://www.ory.sh/docs/kratos/self-service/flows/account-recovery-password-reset#attempted-recovery-notifications)\n\nIf a code was already sent, including this field in the payload will invalidate the sent code and re-send a new code.\n\nformat: email", + "type": "string" + }, + "method": { + "description": "Method is the method that should be used for this recovery flow\n\nAllowed values are `link` and `code`.\nlink RecoveryStrategyLink\ncode RecoveryStrategyCode", + "enum": [ + "link", + "code" + ], + "type": "string", + "x-go-enum-desc": "link RecoveryStrategyLink\ncode RecoveryStrategyCode" + } + }, + "required": [ + "method" + ], + "type": "object" + }, + "updateRecoveryFlowWithLinkMethod": { + "description": "Update Recovery Flow with Link Method", + "properties": { + "csrf_token": { + "description": "Sending the anti-csrf token is only required for browser login flows.", + "type": "string" + }, + "email": { + "description": "Email to Recover\n\nNeeds to be set when initiating the flow. If the email is a registered\nrecovery email, a recovery link will be sent. If the email is not known,\na email with details on what happened will be sent instead.\n\nformat: email", + "type": "string" + }, + "method": { + "description": "Method is the method that should be used for this recovery flow\n\nAllowed values are `link` and `code`\nlink RecoveryStrategyLink\ncode RecoveryStrategyCode", + "enum": [ + "link", + "code" + ], + "type": "string", + "x-go-enum-desc": "link RecoveryStrategyLink\ncode RecoveryStrategyCode" + } + }, + "required": [ + "email", + "method" + ], + "type": "object" + }, + "updateRegistrationFlowBody": { + "description": "Update Registration Request Body", + "discriminator": { + "mapping": { + "code": "#/components/schemas/updateRegistrationFlowWithCodeMethod", + "oidc": "#/components/schemas/updateRegistrationFlowWithOidcMethod", + "password": "#/components/schemas/updateRegistrationFlowWithPasswordMethod", + "webauthn": "#/components/schemas/updateRegistrationFlowWithWebAuthnMethod" + }, + "propertyName": "method" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/updateRegistrationFlowWithPasswordMethod" + }, + { + "$ref": "#/components/schemas/updateRegistrationFlowWithOidcMethod" + }, + { + "$ref": "#/components/schemas/updateRegistrationFlowWithWebAuthnMethod" + }, + { + "$ref": "#/components/schemas/updateRegistrationFlowWithCodeMethod" + } + ] + }, + "updateRegistrationFlowWithCodeMethod": { + "description": "Update Registration Flow with Code Method", + "properties": { + "code": { + "description": "The OTP Code sent to the user", + "type": "string" + }, + "csrf_token": { + "description": "The CSRF Token", + "type": "string" + }, + "method": { + "description": "Method to use\n\nThis field must be set to `code` when using the code method.", + "type": "string" + }, + "resend": { + "description": "Resend restarts the flow with a new code", + "type": "string" + }, + "traits": { + "description": "The identity's traits", + "type": "object" + }, + "transient_payload": { + "description": "Transient data to pass along to any webhooks", + "type": "object" + } + }, + "required": [ + "traits", + "method" + ], + "type": "object" + }, + "updateRegistrationFlowWithOidcMethod": { + "description": "Update Registration Flow with OpenID Connect Method", + "properties": { + "csrf_token": { + "description": "The CSRF Token", + "type": "string" + }, + "id_token": { + "description": "IDToken is an optional id token provided by an OIDC provider\n\nIf submitted, it is verified using the OIDC provider's public key set and the claims are used to populate\nthe OIDC credentials of the identity.\nIf the OIDC provider does not store additional claims (such as name, etc.) in the IDToken itself, you can use\nthe `traits` field to populate the identity's traits. Note, that Apple only includes the users email in the IDToken.\n\nSupported providers are\nApple", + "type": "string" + }, + "id_token_nonce": { + "description": "IDTokenNonce is the nonce, used when generating the IDToken.\nIf the provider supports nonce validation, the nonce will be validated against this value and is required.", + "type": "string" + }, + "method": { + "description": "Method to use\n\nThis field must be set to `oidc` when using the oidc method.", + "type": "string" + }, + "provider": { + "description": "The provider to register with", + "type": "string" + }, + "traits": { + "description": "The identity traits", + "type": "object" + }, + "transient_payload": { + "description": "Transient data to pass along to any webhooks", + "type": "object" + }, + "upstream_parameters": { + "description": "UpstreamParameters are the parameters that are passed to the upstream identity provider.\n\nThese parameters are optional and depend on what the upstream identity provider supports.\nSupported parameters are:\n`login_hint` (string): The `login_hint` parameter suppresses the account chooser and either pre-fills the email box on the sign-in form, or selects the proper session.\n`hd` (string): The `hd` parameter limits the login/registration process to a Google Organization, e.g. `mycollege.edu`.\n`prompt` (string): The `prompt` specifies whether the Authorization Server prompts the End-User for reauthentication and consent, e.g. `select_account`.", + "type": "object" + } + }, + "required": [ + "provider", + "method" + ], + "type": "object" + }, + "updateRegistrationFlowWithPasswordMethod": { + "description": "Update Registration Flow with Password Method", + "properties": { + "csrf_token": { + "description": "The CSRF Token", + "type": "string" + }, + "method": { + "description": "Method to use\n\nThis field must be set to `password` when using the password method.", + "type": "string" + }, + "password": { + "description": "Password to sign the user up with", + "type": "string" + }, + "traits": { + "description": "The identity's traits", + "type": "object" + }, + "transient_payload": { + "description": "Transient data to pass along to any webhooks", + "type": "object" + } + }, + "required": [ + "password", + "traits", + "method" + ], + "type": "object" + }, + "updateRegistrationFlowWithWebAuthnMethod": { + "description": "Update Registration Flow with WebAuthn 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" + }, + "transient_payload": { + "description": "Transient data to pass along to any webhooks", + "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" + }, + "updateSettingsFlowBody": { + "description": "Update Settings Flow Request Body", + "discriminator": { + "mapping": { + "lookup_secret": "#/components/schemas/updateSettingsFlowWithLookupMethod", + "oidc": "#/components/schemas/updateSettingsFlowWithOidcMethod", + "password": "#/components/schemas/updateSettingsFlowWithPasswordMethod", + "profile": "#/components/schemas/updateSettingsFlowWithProfileMethod", + "totp": "#/components/schemas/updateSettingsFlowWithTotpMethod", + "webauthn": "#/components/schemas/updateSettingsFlowWithWebAuthnMethod" + }, + "propertyName": "method" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/updateSettingsFlowWithPasswordMethod" + }, + { + "$ref": "#/components/schemas/updateSettingsFlowWithProfileMethod" + }, + { + "$ref": "#/components/schemas/updateSettingsFlowWithOidcMethod" + }, + { + "$ref": "#/components/schemas/updateSettingsFlowWithOidcMethod" + }, + { + "$ref": "#/components/schemas/updateSettingsFlowWithTotpMethod" + }, + { + "$ref": "#/components/schemas/updateSettingsFlowWithWebAuthnMethod" + }, + { + "$ref": "#/components/schemas/updateSettingsFlowWithLookupMethod" + } + ] + }, + "updateSettingsFlowWithLookupMethod": { + "description": "Update Settings Flow with Lookup Method", + "properties": { + "csrf_token": { + "description": "CSRFToken is the anti-CSRF token", + "type": "string" + }, + "lookup_secret_confirm": { + "description": "If set to true will save the regenerated lookup secrets", + "type": "boolean" + }, + "lookup_secret_disable": { + "description": "Disables this method if true.", + "type": "boolean" + }, + "lookup_secret_regenerate": { + "description": "If set to true will regenerate the lookup secrets", + "type": "boolean" + }, + "lookup_secret_reveal": { + "description": "If set to true will reveal the lookup secrets", + "type": "boolean" + }, + "method": { + "description": "Method\n\nShould be set to \"lookup\" when trying to add, update, or remove a lookup pairing.", + "type": "string" + } + }, + "required": [ + "method" + ], + "type": "object" + }, + "updateSettingsFlowWithOidcMethod": { + "description": "Update Settings Flow with OpenID Connect Method", + "properties": { + "flow": { + "description": "Flow ID is the flow's ID.\n\nin: query", + "type": "string" + }, + "link": { + "description": "Link this provider\n\nEither this or `unlink` must be set.\n\ntype: string\nin: body", + "type": "string" + }, + "method": { + "description": "Method\n\nShould be set to profile when trying to update a profile.", + "type": "string" + }, + "traits": { + "description": "The identity's traits\n\nin: body", + "type": "object" + }, + "unlink": { + "description": "Unlink this provider\n\nEither this or `link` must be set.\n\ntype: string\nin: body", + "type": "string" + }, + "upstream_parameters": { + "description": "UpstreamParameters are the parameters that are passed to the upstream identity provider.\n\nThese parameters are optional and depend on what the upstream identity provider supports.\nSupported parameters are:\n`login_hint` (string): The `login_hint` parameter suppresses the account chooser and either pre-fills the email box on the sign-in form, or selects the proper session.\n`hd` (string): The `hd` parameter limits the login/registration process to a Google Organization, e.g. `mycollege.edu`.\n`prompt` (string): The `prompt` specifies whether the Authorization Server prompts the End-User for reauthentication and consent, e.g. `select_account`.", + "type": "object" + } + }, + "required": [ + "method" + ], + "type": "object" + }, + "updateSettingsFlowWithPasswordMethod": { + "description": "Update Settings Flow with Password Method", + "properties": { + "csrf_token": { + "description": "CSRFToken is the anti-CSRF token", + "type": "string" + }, + "method": { + "description": "Method\n\nShould be set to password when trying to update a password.", + "type": "string" + }, + "password": { + "description": "Password is the updated password", + "type": "string" + } + }, + "required": [ + "password", + "method" + ], + "type": "object" + }, + "updateSettingsFlowWithProfileMethod": { + "description": "Update Settings Flow with Profile Method", + "properties": { + "csrf_token": { + "description": "The Anti-CSRF Token\n\nThis token is only required when performing browser flows.", + "type": "string" + }, + "method": { + "description": "Method\n\nShould be set to profile when trying to update a profile.", + "type": "string" + }, + "traits": { + "description": "Traits\n\nThe identity's traits.", + "type": "object" + } + }, + "required": [ + "traits", + "method" + ], + "type": "object" + }, + "updateSettingsFlowWithTotpMethod": { + "description": "Update Settings Flow with TOTP Method", + "properties": { + "csrf_token": { + "description": "CSRFToken is the anti-CSRF token", + "type": "string" + }, + "method": { + "description": "Method\n\nShould be set to \"totp\" when trying to add, update, or remove a totp pairing.", + "type": "string" + }, + "totp_code": { + "description": "ValidationTOTP must contain a valid TOTP based on the", + "type": "string" + }, + "totp_unlink": { + "description": "UnlinkTOTP if true will remove the TOTP pairing,\neffectively removing the credential. This can be used\nto set up a new TOTP device.", + "type": "boolean" + } + }, + "required": [ + "method" + ], + "type": "object" + }, + "updateSettingsFlowWithWebAuthnMethod": { + "description": "Update Settings Flow with WebAuthn 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" + }, + "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" + }, + "webauthn_remove": { + "description": "Remove a WebAuthn Security Key\n\nThis must contain the ID of the WebAuthN connection.", + "type": "string" + } + }, + "required": [ + "method" + ], + "type": "object" + }, + "updateVerificationFlowBody": { + "description": "Update Verification Flow Request Body", + "discriminator": { + "mapping": { + "code": "#/components/schemas/updateVerificationFlowWithCodeMethod", + "link": "#/components/schemas/updateVerificationFlowWithLinkMethod" + }, + "propertyName": "method" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/updateVerificationFlowWithLinkMethod" + }, + { + "$ref": "#/components/schemas/updateVerificationFlowWithCodeMethod" + } + ] + }, + "updateVerificationFlowWithCodeMethod": { + "properties": { + "code": { + "description": "Code from the recovery email\n\nIf you want to submit a code, use this field, but make sure to _not_ include the email field, as well.", + "type": "string" + }, + "csrf_token": { + "description": "Sending the anti-csrf token is only required for browser login flows.", + "type": "string" + }, + "email": { + "description": "The email address to verify\n\nIf the email belongs to a valid account, a verifiation email will be sent.\n\nIf you want to notify the email address if the account does not exist, see\nthe [notify_unknown_recipients flag](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation#attempted-verification-notifications)\n\nIf a code was already sent, including this field in the payload will invalidate the sent code and re-send a new code.\n\nformat: email", + "type": "string" + }, + "method": { + "description": "Method is the method that should be used for this verification flow\n\nAllowed values are `link` and `code`.\nlink VerificationStrategyLink\ncode VerificationStrategyCode", + "enum": [ + "link", + "code" + ], + "type": "string", + "x-go-enum-desc": "link VerificationStrategyLink\ncode VerificationStrategyCode" + } + }, + "required": [ + "method" + ], + "type": "object" + }, + "updateVerificationFlowWithLinkMethod": { + "description": "Update Verification Flow with Link Method", + "properties": { + "csrf_token": { + "description": "Sending the anti-csrf token is only required for browser login flows.", + "type": "string" + }, + "email": { + "description": "Email to Verify\n\nNeeds to be set when initiating the flow. If the email is a registered\nverification email, a verification link will be sent. If the email is not known,\na email with details on what happened will be sent instead.\n\nformat: email", + "type": "string" + }, + "method": { + "description": "Method is the method that should be used for this verification flow\n\nAllowed values are `link` and `code`\nlink VerificationStrategyLink\ncode VerificationStrategyCode", + "enum": [ + "link", + "code" + ], + "type": "string", + "x-go-enum-desc": "link VerificationStrategyLink\ncode VerificationStrategyCode" + } + }, + "required": [ + "email", + "method" + ], + "type": "object" + }, + "verifiableIdentityAddress": { + "description": "VerifiableAddress is an identity's verifiable address", + "properties": { + "created_at": { + "description": "When this entry was created", + "example": "2014-01-01T23:28:56.782Z", + "format": "date-time", + "type": "string" + }, + "id": { + "description": "The ID", + "format": "uuid", + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/identityVerifiableAddressStatus" + }, + "updated_at": { + "description": "When this entry was last updated", + "example": "2014-01-01T23:28:56.782Z", + "format": "date-time", + "type": "string" + }, + "value": { + "description": "The address value\n\nexample foo@user.com", + "type": "string" + }, + "verified": { + "description": "Indicates if the address has already been verified", + "example": true, + "type": "boolean" + }, + "verified_at": { + "$ref": "#/components/schemas/nullTime" + }, + "via": { + "description": "The delivery method", + "enum": [ + "email", + "sms" + ], + "example": "email", + "type": "string" + } + }, + "required": [ + "value", + "verified", + "via", + "status" + ], + "type": "object" + }, + "verificationFlow": { + "description": "Used to verify an out-of-band communication\nchannel such as an email address or a phone number.\n\nFor more information head over to: https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation", + "properties": { + "active": { + "description": "Active, if set, contains the registration method that is being used. It is initially\nnot set.", + "type": "string" + }, + "expires_at": { + "description": "ExpiresAt is the time (UTC) when the request expires. If the user still wishes to verify the address,\na new request has to be initiated.", + "format": "date-time", + "type": "string" + }, + "id": { + "description": "ID represents the request's unique ID. When performing the verification flow, this\nrepresents the id in the verify ui's query parameter: http://?request=\n\ntype: string\nformat: uuid", + "format": "uuid", + "type": "string" + }, + "issued_at": { + "description": "IssuedAt is the time (UTC) when the request occurred.", + "format": "date-time", + "type": "string" + }, + "request_url": { + "description": "RequestURL is the initial URL that was requested from Ory Kratos. It can be used\nto forward information contained in the URL's path or query for example.", + "type": "string" + }, + "return_to": { + "description": "ReturnTo contains the requested return_to URL.", + "type": "string" + }, + "state": { + "description": "State represents the state of this request:\n\nchoose_method: ask the user to choose a method (e.g. verify your email)\nsent_email: the email has been sent to the user\npassed_challenge: the request was successful and the verification challenge was passed." + }, + "type": { + "$ref": "#/components/schemas/selfServiceFlowType" + }, + "ui": { + "$ref": "#/components/schemas/uiContainer" + } + }, + "required": [ + "id", + "type", + "ui", + "state" + ], + "title": "A Verification Flow", + "type": "object" + }, + "verificationFlowState": { + "description": "The state represents the state of the verification flow.\n\nchoose_method: ask the user to choose a method (e.g. recover account via email)\nsent_email: the email has been sent to the user\npassed_challenge: the request was successful and the recovery challenge was passed.", + "enum": [ + "choose_method", + "sent_email", + "passed_challenge" + ], + "title": "Verification Flow State" + }, + "version": { + "properties": { + "version": { + "description": "Version is the service's version.", + "type": "string" + } + }, + "type": "object" + }, + "webAuthnJavaScript": { + "type": "string" + } + }, + "securitySchemes": { + "oryAccessToken": { + "in": "header", + "name": "Authorization", + "type": "apiKey" + } + } + }, + "info": { + "contact": { + "email": "office@ory.sh" + }, + "description": "This is the API specification for Ory Identities with features such as registration, login, recovery, account verification, profile settings, password reset, identity management, session management, email and sms delivery, and more.\n", + "license": { + "name": "Apache 2.0" + }, + "title": "Ory Identities API", + "version": "" + }, + "openapi": "3.0.3", + "paths": { + "/.well-known/ory/webauthn.js": { + "get": { + "description": "This endpoint provides JavaScript which is needed in order to perform WebAuthn login and registration.\n\nIf you are building a JavaScript Browser App (e.g. in ReactJS or AngularJS) you will need to load this file:\n\n```html\n