Skip to content

Commit

Permalink
Kratos elixir client update ory#229
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalomiri committed Nov 17, 2022
1 parent f306f3f commit f2557b6
Show file tree
Hide file tree
Showing 146 changed files with 2,476 additions and 2,480 deletions.
3 changes: 3 additions & 0 deletions clients/kratos/elixir/.formatter.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
]
180 changes: 91 additions & 89 deletions clients/kratos/elixir/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,95 +1,97 @@
.formatter.exs
.gitignore
.openapi-generator-ignore
README.md
config/config.exs
lib/ory/api/metadata.ex
lib/ory/api/v0alpha2.ex
lib/ory/connection.ex
lib/ory/deserializer.ex
lib/ory/model/admin_create_identity_body.ex
lib/ory/model/admin_create_identity_import_credentials_oidc.ex
lib/ory/model/admin_create_identity_import_credentials_oidc_config.ex
lib/ory/model/admin_create_identity_import_credentials_oidc_provider.ex
lib/ory/model/admin_create_identity_import_credentials_password.ex
lib/ory/model/admin_create_identity_import_credentials_password_config.ex
lib/ory/model/admin_create_self_service_recovery_link_body.ex
lib/ory/model/admin_identity_import_credentials.ex
lib/ory/model/admin_update_identity_body.ex
lib/ory/model/authenticator_assurance_level.ex
lib/ory/model/error_authenticator_assurance_level_not_satisfied.ex
lib/ory/model/generic_error.ex
lib/ory/model/get_version_200_response.ex
lib/ory/model/health_not_ready_status.ex
lib/ory/model/health_status.ex
lib/ory/model/identity.ex
lib/ory/model/identity_credentials.ex
lib/ory/model/identity_credentials_oidc.ex
lib/ory/model/identity_credentials_oidc_provider.ex
lib/ory/model/identity_credentials_password.ex
lib/ory/model/identity_credentials_type.ex
lib/ory/model/identity_schema.ex
lib/ory/model/identity_state.ex
lib/ory/model/is_alive_200_response.ex
lib/ory/model/is_ready_503_response.ex
lib/ory/model/json_error.ex
lib/ory/model/needs_privileged_session_error.ex
lib/ory/model/pagination.ex
lib/ory/model/recovery_address.ex
lib/ory/model/revoked_sessions.ex
lib/ory/model/self_service_browser_location_change_required_error.ex
lib/ory/model/self_service_error.ex
lib/ory/model/self_service_flow_expired_error.ex
lib/ory/model/self_service_login_flow.ex
lib/ory/model/self_service_logout_url.ex
lib/ory/model/self_service_recovery_flow.ex
lib/ory/model/self_service_recovery_flow_state.ex
lib/ory/model/self_service_recovery_link.ex
lib/ory/model/self_service_registration_flow.ex
lib/ory/model/self_service_settings_flow.ex
lib/ory/model/self_service_settings_flow_state.ex
lib/ory/model/self_service_verification_flow.ex
lib/ory/model/self_service_verification_flow_state.ex
lib/ory/model/session.ex
lib/ory/model/session_authentication_method.ex
lib/ory/model/session_device.ex
lib/ory/model/settings_profile_form_config.ex
lib/ory/model/submit_self_service_flow_with_web_authn_registration_method.ex
lib/ory/model/submit_self_service_login_flow_body.ex
lib/ory/model/submit_self_service_login_flow_with_lookup_secret_method_body.ex
lib/ory/model/submit_self_service_login_flow_with_oidc_method_body.ex
lib/ory/model/submit_self_service_login_flow_with_password_method_body.ex
lib/ory/model/submit_self_service_login_flow_with_totp_method_body.ex
lib/ory/model/submit_self_service_login_flow_with_web_authn_method_body.ex
lib/ory/model/submit_self_service_logout_flow_without_browser_body.ex
lib/ory/model/submit_self_service_recovery_flow_body.ex
lib/ory/model/submit_self_service_recovery_flow_with_link_method_body.ex
lib/ory/model/submit_self_service_registration_flow_body.ex
lib/ory/model/submit_self_service_registration_flow_with_oidc_method_body.ex
lib/ory/model/submit_self_service_registration_flow_with_password_method_body.ex
lib/ory/model/submit_self_service_registration_flow_with_web_authn_method_body.ex
lib/ory/model/submit_self_service_settings_flow_body.ex
lib/ory/model/submit_self_service_settings_flow_with_lookup_method_body.ex
lib/ory/model/submit_self_service_settings_flow_with_oidc_method_body.ex
lib/ory/model/submit_self_service_settings_flow_with_password_method_body.ex
lib/ory/model/submit_self_service_settings_flow_with_profile_method_body.ex
lib/ory/model/submit_self_service_settings_flow_with_totp_method_body.ex
lib/ory/model/submit_self_service_settings_flow_with_web_authn_method_body.ex
lib/ory/model/submit_self_service_verification_flow_body.ex
lib/ory/model/submit_self_service_verification_flow_with_link_method_body.ex
lib/ory/model/successful_self_service_login_without_browser.ex
lib/ory/model/successful_self_service_registration_without_browser.ex
lib/ory/model/ui_container.ex
lib/ory/model/ui_node.ex
lib/ory/model/ui_node_anchor_attributes.ex
lib/ory/model/ui_node_attributes.ex
lib/ory/model/ui_node_image_attributes.ex
lib/ory/model/ui_node_input_attributes.ex
lib/ory/model/ui_node_meta.ex
lib/ory/model/ui_node_script_attributes.ex
lib/ory/model/ui_node_text_attributes.ex
lib/ory/model/ui_text.ex
lib/ory/model/verifiable_identity_address.ex
lib/ory/model/version.ex
lib/ory/request_builder.ex
config/runtime.exs
lib/ory/kratos/api/metadata.ex
lib/ory/kratos/api/v0alpha2.ex
lib/ory/kratos/connection.ex
lib/ory/kratos/deserializer.ex
lib/ory/kratos/model/admin_create_identity_body.ex
lib/ory/kratos/model/admin_create_identity_import_credentials_oidc.ex
lib/ory/kratos/model/admin_create_identity_import_credentials_oidc_config.ex
lib/ory/kratos/model/admin_create_identity_import_credentials_oidc_provider.ex
lib/ory/kratos/model/admin_create_identity_import_credentials_password.ex
lib/ory/kratos/model/admin_create_identity_import_credentials_password_config.ex
lib/ory/kratos/model/admin_create_self_service_recovery_link_body.ex
lib/ory/kratos/model/admin_identity_import_credentials.ex
lib/ory/kratos/model/admin_update_identity_body.ex
lib/ory/kratos/model/authenticator_assurance_level.ex
lib/ory/kratos/model/error_authenticator_assurance_level_not_satisfied.ex
lib/ory/kratos/model/generic_error.ex
lib/ory/kratos/model/get_version_200_response.ex
lib/ory/kratos/model/health_not_ready_status.ex
lib/ory/kratos/model/health_status.ex
lib/ory/kratos/model/identity.ex
lib/ory/kratos/model/identity_credentials.ex
lib/ory/kratos/model/identity_credentials_oidc.ex
lib/ory/kratos/model/identity_credentials_oidc_provider.ex
lib/ory/kratos/model/identity_credentials_password.ex
lib/ory/kratos/model/identity_credentials_type.ex
lib/ory/kratos/model/identity_schema.ex
lib/ory/kratos/model/identity_state.ex
lib/ory/kratos/model/is_alive_200_response.ex
lib/ory/kratos/model/is_ready_503_response.ex
lib/ory/kratos/model/json_error.ex
lib/ory/kratos/model/needs_privileged_session_error.ex
lib/ory/kratos/model/pagination.ex
lib/ory/kratos/model/recovery_address.ex
lib/ory/kratos/model/revoked_sessions.ex
lib/ory/kratos/model/self_service_browser_location_change_required_error.ex
lib/ory/kratos/model/self_service_error.ex
lib/ory/kratos/model/self_service_flow_expired_error.ex
lib/ory/kratos/model/self_service_login_flow.ex
lib/ory/kratos/model/self_service_logout_url.ex
lib/ory/kratos/model/self_service_recovery_flow.ex
lib/ory/kratos/model/self_service_recovery_flow_state.ex
lib/ory/kratos/model/self_service_recovery_link.ex
lib/ory/kratos/model/self_service_registration_flow.ex
lib/ory/kratos/model/self_service_settings_flow.ex
lib/ory/kratos/model/self_service_settings_flow_state.ex
lib/ory/kratos/model/self_service_verification_flow.ex
lib/ory/kratos/model/self_service_verification_flow_state.ex
lib/ory/kratos/model/session.ex
lib/ory/kratos/model/session_authentication_method.ex
lib/ory/kratos/model/session_device.ex
lib/ory/kratos/model/settings_profile_form_config.ex
lib/ory/kratos/model/submit_self_service_flow_with_web_authn_registration_method.ex
lib/ory/kratos/model/submit_self_service_login_flow_body.ex
lib/ory/kratos/model/submit_self_service_login_flow_with_lookup_secret_method_body.ex
lib/ory/kratos/model/submit_self_service_login_flow_with_oidc_method_body.ex
lib/ory/kratos/model/submit_self_service_login_flow_with_password_method_body.ex
lib/ory/kratos/model/submit_self_service_login_flow_with_totp_method_body.ex
lib/ory/kratos/model/submit_self_service_login_flow_with_web_authn_method_body.ex
lib/ory/kratos/model/submit_self_service_logout_flow_without_browser_body.ex
lib/ory/kratos/model/submit_self_service_recovery_flow_body.ex
lib/ory/kratos/model/submit_self_service_recovery_flow_with_link_method_body.ex
lib/ory/kratos/model/submit_self_service_registration_flow_body.ex
lib/ory/kratos/model/submit_self_service_registration_flow_with_oidc_method_body.ex
lib/ory/kratos/model/submit_self_service_registration_flow_with_password_method_body.ex
lib/ory/kratos/model/submit_self_service_registration_flow_with_web_authn_method_body.ex
lib/ory/kratos/model/submit_self_service_settings_flow_body.ex
lib/ory/kratos/model/submit_self_service_settings_flow_with_lookup_method_body.ex
lib/ory/kratos/model/submit_self_service_settings_flow_with_oidc_method_body.ex
lib/ory/kratos/model/submit_self_service_settings_flow_with_password_method_body.ex
lib/ory/kratos/model/submit_self_service_settings_flow_with_profile_method_body.ex
lib/ory/kratos/model/submit_self_service_settings_flow_with_totp_method_body.ex
lib/ory/kratos/model/submit_self_service_settings_flow_with_web_authn_method_body.ex
lib/ory/kratos/model/submit_self_service_verification_flow_body.ex
lib/ory/kratos/model/submit_self_service_verification_flow_with_link_method_body.ex
lib/ory/kratos/model/successful_self_service_login_without_browser.ex
lib/ory/kratos/model/successful_self_service_registration_without_browser.ex
lib/ory/kratos/model/ui_container.ex
lib/ory/kratos/model/ui_node.ex
lib/ory/kratos/model/ui_node_anchor_attributes.ex
lib/ory/kratos/model/ui_node_attributes.ex
lib/ory/kratos/model/ui_node_image_attributes.ex
lib/ory/kratos/model/ui_node_input_attributes.ex
lib/ory/kratos/model/ui_node_meta.ex
lib/ory/kratos/model/ui_node_script_attributes.ex
lib/ory/kratos/model/ui_node_text_attributes.ex
lib/ory/kratos/model/ui_text.ex
lib/ory/kratos/model/verifiable_identity_address.ex
lib/ory/kratos/model/version.ex
lib/ory/kratos/request_builder.ex
mix.exs
test/test_helper.exs
2 changes: 1 addition & 1 deletion clients/kratos/elixir/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.0.0
6.0.1
2 changes: 1 addition & 1 deletion clients/kratos/elixir/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ory
# Ory.Kratos

Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the administative API port you should use something like Nginx, Ory Oathkeeper, or any other technology capable of authorizing incoming requests.

Expand Down
35 changes: 9 additions & 26 deletions clients/kratos/elixir/config/config.exs
Original file line number Diff line number Diff line change
@@ -1,32 +1,15 @@
# This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config

# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the parent project. For this reason,
# if you want to provide default values for your application for
# 3rd-party users, it should be done in your "mix.exs" file.

# You can configure for your application as:
#
# config :ory_kratos_api, key: :value
#
# And access this configuration in your application as:
#
# Application.get_env(:ory_kratos_api, :key)
#
# Or configure a 3rd-party app:
#
# config :logger, level: :info
# and its dependencies with the aid of the Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.

# General application configuration
import Config

config :ory_kratos_api, base_url: "http://localhost"

# It is also possible to import configuration files, relative to this
# directory. For example, you can emulate configuration per environment
# by uncommenting the line below and defining dev.exs, test.exs and such.
# Configuration from the imported file will override the ones defined
# here (which is why it is important to import them last).
# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
#
# import_config "#{Mix.env}.exs"
# import_config "#{config_env()}.exs"
12 changes: 12 additions & 0 deletions clients/kratos/elixir/config/runtime.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Config

# config/runtime.exs is executed for all environments, including
# during releases. It is executed after compilation and before the
# system starts, so it is typically used to load production configuration
# and secrets from environment variables or elsewhere. Do not define
# any compile-time configuration in here, as it won't be applied.
# The block below contains prod specific runtime configuration.

if env = System.get_env("ORY_KRATOS_API_BASE_URI") do
config :ory_kratos_api, base_url: env
end
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# https://openapi-generator.tech
# Do not edit the class manually.

defmodule Ory.Api.Metadata do
defmodule Ory.Kratos.Api.Metadata do
@moduledoc """
API calls for all endpoints tagged `Metadata`.
"""

alias Ory.Connection
import Ory.RequestBuilder
alias Ory.Kratos.Connection
import Ory.Kratos.RequestBuilder


@doc """
Expand All @@ -17,22 +17,22 @@ defmodule Ory.Api.Metadata do
## Parameters
- connection (Ory.Connection): Connection to server
- connection (Ory.Kratos.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
## Returns
{:ok, Ory.Model.GetVersion200Response.t} on success
{:ok, Ory.Kratos.Model.GetVersion200Response.t} on success
{:error, Tesla.Env.t} on failure
"""
@spec get_version(Tesla.Env.client, keyword()) :: {:ok, Ory.Model.GetVersion200Response.t} | {:error, Tesla.Env.t}
@spec get_version(Tesla.Env.client, keyword()) :: {:ok, Ory.Kratos.Model.GetVersion200Response.t} | {:error, Tesla.Env.t}
def get_version(connection, _opts \\ []) do
%{}
|> method(:get)
|> url("/version")
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 200, %Ory.Model.GetVersion200Response{}}
{ 200, %Ory.Kratos.Model.GetVersion200Response{}}
])
end

Expand All @@ -42,23 +42,23 @@ defmodule Ory.Api.Metadata do
## Parameters
- connection (Ory.Connection): Connection to server
- connection (Ory.Kratos.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
## Returns
{:ok, Ory.Model.IsAlive200Response.t} on success
{:ok, Ory.Kratos.Model.IsAlive200Response.t} on success
{:error, Tesla.Env.t} on failure
"""
@spec is_alive(Tesla.Env.client, keyword()) :: {:ok, Ory.Model.GenericError.t} | {:ok, Ory.Model.IsAlive200Response.t} | {:error, Tesla.Env.t}
@spec is_alive(Tesla.Env.client, keyword()) :: {:ok, Ory.Kratos.Model.IsAlive200Response.t} | {:ok, Ory.Kratos.Model.GenericError.t} | {:error, Tesla.Env.t}
def is_alive(connection, _opts \\ []) do
%{}
|> method(:get)
|> url("/health/alive")
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 200, %Ory.Model.IsAlive200Response{}},
{ 500, %Ory.Model.GenericError{}}
{ 200, %Ory.Kratos.Model.IsAlive200Response{}},
{ 500, %Ory.Kratos.Model.GenericError{}}
])
end

Expand All @@ -68,23 +68,23 @@ defmodule Ory.Api.Metadata do
## Parameters
- connection (Ory.Connection): Connection to server
- connection (Ory.Kratos.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
## Returns
{:ok, Ory.Model.IsAlive200Response.t} on success
{:ok, Ory.Kratos.Model.IsAlive200Response.t} on success
{:error, Tesla.Env.t} on failure
"""
@spec is_ready(Tesla.Env.client, keyword()) :: {:ok, Ory.Model.IsAlive200Response.t} | {:ok, Ory.Model.IsReady503Response.t} | {:error, Tesla.Env.t}
@spec is_ready(Tesla.Env.client, keyword()) :: {:ok, Ory.Kratos.Model.IsAlive200Response.t} | {:ok, Ory.Kratos.Model.IsReady503Response.t} | {:error, Tesla.Env.t}
def is_ready(connection, _opts \\ []) do
%{}
|> method(:get)
|> url("/health/ready")
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 200, %Ory.Model.IsAlive200Response{}},
{ 503, %Ory.Model.IsReady503Response{}}
{ 200, %Ory.Kratos.Model.IsAlive200Response{}},
{ 503, %Ory.Kratos.Model.IsReady503Response{}}
])
end
end
Loading

0 comments on commit f2557b6

Please sign in to comment.