Skip to content

Commit

Permalink
Hydra 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 f2557b6 commit 0fa86e6
Show file tree
Hide file tree
Showing 50 changed files with 403 additions and 414 deletions.
92 changes: 46 additions & 46 deletions clients/hydra/elixir/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,51 @@
README.md
config/config.exs
config/runtime.exs
lib/ory/api/jwk.ex
lib/ory/api/metadata.ex
lib/ory/api/o_auth2.ex
lib/ory/api/oidc.ex
lib/ory/api/wellknown.ex
lib/ory/connection.ex
lib/ory/deserializer.ex
lib/ory/model/accept_o_auth2_consent_request.ex
lib/ory/model/accept_o_auth2_consent_request_session.ex
lib/ory/model/accept_o_auth2_login_request.ex
lib/ory/model/create_json_web_key_set.ex
lib/ory/model/error_o_auth2.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/introspected_o_auth2_token.ex
lib/ory/model/is_ready_200_response.ex
lib/ory/model/is_ready_503_response.ex
lib/ory/model/json_patch.ex
lib/ory/model/json_web_key.ex
lib/ory/model/json_web_key_set.ex
lib/ory/model/o_auth2_client.ex
lib/ory/model/o_auth2_client_token_lifespans.ex
lib/ory/model/o_auth2_consent_request.ex
lib/ory/model/o_auth2_consent_request_open_id_connect_context.ex
lib/ory/model/o_auth2_consent_session.ex
lib/ory/model/o_auth2_consent_session_expires_at.ex
lib/ory/model/o_auth2_login_request.ex
lib/ory/model/o_auth2_logout_request.ex
lib/ory/model/o_auth2_redirect_to.ex
lib/ory/model/o_auth2_token_exchange.ex
lib/ory/model/oidc_configuration.ex
lib/ory/model/oidc_user_info.ex
lib/ory/model/pagination.ex
lib/ory/model/pagination_headers.ex
lib/ory/model/reject_o_auth2_request.ex
lib/ory/model/token_pagination.ex
lib/ory/model/token_pagination_headers.ex
lib/ory/model/token_pagination_request_parameters.ex
lib/ory/model/token_pagination_response_headers.ex
lib/ory/model/trust_o_auth2_jwt_grant_issuer.ex
lib/ory/model/trusted_o_auth2_jwt_grant_issuer.ex
lib/ory/model/trusted_o_auth2_jwt_grant_json_web_key.ex
lib/ory/model/version.ex
lib/ory/request_builder.ex
lib/ory/hydra/api/jwk.ex
lib/ory/hydra/api/metadata.ex
lib/ory/hydra/api/o_auth2.ex
lib/ory/hydra/api/oidc.ex
lib/ory/hydra/api/wellknown.ex
lib/ory/hydra/connection.ex
lib/ory/hydra/deserializer.ex
lib/ory/hydra/model/accept_o_auth2_consent_request.ex
lib/ory/hydra/model/accept_o_auth2_consent_request_session.ex
lib/ory/hydra/model/accept_o_auth2_login_request.ex
lib/ory/hydra/model/create_json_web_key_set.ex
lib/ory/hydra/model/error_o_auth2.ex
lib/ory/hydra/model/generic_error.ex
lib/ory/hydra/model/get_version_200_response.ex
lib/ory/hydra/model/health_not_ready_status.ex
lib/ory/hydra/model/health_status.ex
lib/ory/hydra/model/introspected_o_auth2_token.ex
lib/ory/hydra/model/is_ready_200_response.ex
lib/ory/hydra/model/is_ready_503_response.ex
lib/ory/hydra/model/json_patch.ex
lib/ory/hydra/model/json_web_key.ex
lib/ory/hydra/model/json_web_key_set.ex
lib/ory/hydra/model/o_auth2_client.ex
lib/ory/hydra/model/o_auth2_client_token_lifespans.ex
lib/ory/hydra/model/o_auth2_consent_request.ex
lib/ory/hydra/model/o_auth2_consent_request_open_id_connect_context.ex
lib/ory/hydra/model/o_auth2_consent_session.ex
lib/ory/hydra/model/o_auth2_consent_session_expires_at.ex
lib/ory/hydra/model/o_auth2_login_request.ex
lib/ory/hydra/model/o_auth2_logout_request.ex
lib/ory/hydra/model/o_auth2_redirect_to.ex
lib/ory/hydra/model/o_auth2_token_exchange.ex
lib/ory/hydra/model/oidc_configuration.ex
lib/ory/hydra/model/oidc_user_info.ex
lib/ory/hydra/model/pagination.ex
lib/ory/hydra/model/pagination_headers.ex
lib/ory/hydra/model/reject_o_auth2_request.ex
lib/ory/hydra/model/token_pagination.ex
lib/ory/hydra/model/token_pagination_headers.ex
lib/ory/hydra/model/token_pagination_request_parameters.ex
lib/ory/hydra/model/token_pagination_response_headers.ex
lib/ory/hydra/model/trust_o_auth2_jwt_grant_issuer.ex
lib/ory/hydra/model/trusted_o_auth2_jwt_grant_issuer.ex
lib/ory/hydra/model/trusted_o_auth2_jwt_grant_json_web_key.ex
lib/ory/hydra/model/version.ex
lib/ory/hydra/request_builder.ex
mix.exs
test/test_helper.exs
2 changes: 1 addition & 1 deletion clients/hydra/elixir/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ory
# Ory.Hydra

Documentation for all of Ory Hydra's APIs.

Expand Down
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.Jwk do
defmodule Ory.Hydra.Api.Jwk do
@moduledoc """
API calls for all endpoints tagged `Jwk`.
"""

alias Ory.Connection
import Ory.RequestBuilder
alias Ory.Hydra.Connection
import Ory.Hydra.RequestBuilder


@doc """
Expand All @@ -17,16 +17,16 @@ defmodule Ory.Api.Jwk do
## Parameters
- connection (Ory.Connection): Connection to server
- connection (Ory.Hydra.Connection): Connection to server
- set (String.t): The JSON Web Key Set ID
- create_json_web_key_set (CreateJsonWebKeySet):
- opts (KeywordList): [optional] Optional parameters
## Returns
{:ok, Ory.Model.JsonWebKeySet.t} on success
{:ok, Ory.Hydra.Model.JsonWebKeySet.t} on success
{:error, Tesla.Env.t} on failure
"""
@spec create_json_web_key_set(Tesla.Env.client, String.t, Ory.Model.CreateJsonWebKeySet.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.JsonWebKeySet.t} | {:error, Tesla.Env.t}
@spec create_json_web_key_set(Tesla.Env.client, String.t, Ory.Hydra.Model.CreateJsonWebKeySet.t, keyword()) :: {:ok, Ory.Hydra.Model.JsonWebKeySet.t} | {:ok, Ory.Hydra.Model.ErrorOAuth2.t} | {:error, Tesla.Env.t}
def create_json_web_key_set(connection, set, create_json_web_key_set, _opts \\ []) do
%{}
|> method(:post)
Expand All @@ -35,8 +35,8 @@ defmodule Ory.Api.Jwk do
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 201, %Ory.Model.JsonWebKeySet{}},
{ :default, %Ory.Model.ErrorOAuth2{}}
{ 201, %Ory.Hydra.Model.JsonWebKeySet{}},
{ :default, %Ory.Hydra.Model.ErrorOAuth2{}}
])
end

Expand All @@ -46,7 +46,7 @@ defmodule Ory.Api.Jwk do
## Parameters
- connection (Ory.Connection): Connection to server
- connection (Ory.Hydra.Connection): Connection to server
- set (String.t): The JSON Web Key Set
- kid (String.t): The JSON Web Key ID (kid)
- opts (KeywordList): [optional] Optional parameters
Expand All @@ -55,7 +55,7 @@ defmodule Ory.Api.Jwk do
{:ok, nil} on success
{:error, Tesla.Env.t} on failure
"""
@spec delete_json_web_key(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, nil} | {:ok, Ory.Model.ErrorOAuth2.t} | {:error, Tesla.Env.t}
@spec delete_json_web_key(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, nil} | {:ok, Ory.Hydra.Model.ErrorOAuth2.t} | {:error, Tesla.Env.t}
def delete_json_web_key(connection, set, kid, _opts \\ []) do
%{}
|> method(:delete)
Expand All @@ -64,7 +64,7 @@ defmodule Ory.Api.Jwk do
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 204, false},
{ :default, %Ory.Model.ErrorOAuth2{}}
{ :default, %Ory.Hydra.Model.ErrorOAuth2{}}
])
end

Expand All @@ -74,15 +74,15 @@ defmodule Ory.Api.Jwk do
## Parameters
- connection (Ory.Connection): Connection to server
- connection (Ory.Hydra.Connection): Connection to server
- set (String.t): The JSON Web Key Set
- opts (KeywordList): [optional] Optional parameters
## Returns
{:ok, nil} on success
{:error, Tesla.Env.t} on failure
"""
@spec delete_json_web_key_set(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, Ory.Model.ErrorOAuth2.t} | {:error, Tesla.Env.t}
@spec delete_json_web_key_set(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, Ory.Hydra.Model.ErrorOAuth2.t} | {:error, Tesla.Env.t}
def delete_json_web_key_set(connection, set, _opts \\ []) do
%{}
|> method(:delete)
Expand All @@ -91,7 +91,7 @@ defmodule Ory.Api.Jwk do
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 204, false},
{ :default, %Ory.Model.ErrorOAuth2{}}
{ :default, %Ory.Hydra.Model.ErrorOAuth2{}}
])
end

Expand All @@ -101,25 +101,25 @@ defmodule Ory.Api.Jwk do
## Parameters
- connection (Ory.Connection): Connection to server
- connection (Ory.Hydra.Connection): Connection to server
- set (String.t): JSON Web Key Set ID
- kid (String.t): JSON Web Key ID
- opts (KeywordList): [optional] Optional parameters
## Returns
{:ok, Ory.Model.JsonWebKeySet.t} on success
{:ok, Ory.Hydra.Model.JsonWebKeySet.t} on success
{:error, Tesla.Env.t} on failure
"""
@spec get_json_web_key(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.JsonWebKeySet.t} | {:error, Tesla.Env.t}
@spec get_json_web_key(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, Ory.Hydra.Model.JsonWebKeySet.t} | {:ok, Ory.Hydra.Model.ErrorOAuth2.t} | {:error, Tesla.Env.t}
def get_json_web_key(connection, set, kid, _opts \\ []) do
%{}
|> method(:get)
|> url("/admin/keys/#{set}/#{kid}")
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 200, %Ory.Model.JsonWebKeySet{}},
{ :default, %Ory.Model.ErrorOAuth2{}}
{ 200, %Ory.Hydra.Model.JsonWebKeySet{}},
{ :default, %Ory.Hydra.Model.ErrorOAuth2{}}
])
end

Expand All @@ -129,24 +129,24 @@ defmodule Ory.Api.Jwk do
## Parameters
- connection (Ory.Connection): Connection to server
- connection (Ory.Hydra.Connection): Connection to server
- set (String.t): JSON Web Key Set ID
- opts (KeywordList): [optional] Optional parameters
## Returns
{:ok, Ory.Model.JsonWebKeySet.t} on success
{:ok, Ory.Hydra.Model.JsonWebKeySet.t} on success
{:error, Tesla.Env.t} on failure
"""
@spec get_json_web_key_set(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.JsonWebKeySet.t} | {:error, Tesla.Env.t}
@spec get_json_web_key_set(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Hydra.Model.JsonWebKeySet.t} | {:ok, Ory.Hydra.Model.ErrorOAuth2.t} | {:error, Tesla.Env.t}
def get_json_web_key_set(connection, set, _opts \\ []) do
%{}
|> method(:get)
|> url("/admin/keys/#{set}")
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 200, %Ory.Model.JsonWebKeySet{}},
{ :default, %Ory.Model.ErrorOAuth2{}}
{ 200, %Ory.Hydra.Model.JsonWebKeySet{}},
{ :default, %Ory.Hydra.Model.ErrorOAuth2{}}
])
end

Expand All @@ -156,17 +156,17 @@ defmodule Ory.Api.Jwk do
## Parameters
- connection (Ory.Connection): Connection to server
- connection (Ory.Hydra.Connection): Connection to server
- set (String.t): The JSON Web Key Set ID
- kid (String.t): JSON Web Key ID
- opts (KeywordList): [optional] Optional parameters
- :body (JsonWebKey):
## Returns
{:ok, Ory.Model.JsonWebKey.t} on success
{:ok, Ory.Hydra.Model.JsonWebKey.t} on success
{:error, Tesla.Env.t} on failure
"""
@spec set_json_web_key(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.JsonWebKey.t} | {:error, Tesla.Env.t}
@spec set_json_web_key(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, Ory.Hydra.Model.ErrorOAuth2.t} | {:ok, Ory.Hydra.Model.JsonWebKey.t} | {:error, Tesla.Env.t}
def set_json_web_key(connection, set, kid, opts \\ []) do
optional_params = %{
:body => :body
Expand All @@ -179,8 +179,8 @@ defmodule Ory.Api.Jwk do
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 200, %Ory.Model.JsonWebKey{}},
{ :default, %Ory.Model.ErrorOAuth2{}}
{ 200, %Ory.Hydra.Model.JsonWebKey{}},
{ :default, %Ory.Hydra.Model.ErrorOAuth2{}}
])
end

Expand All @@ -190,16 +190,16 @@ defmodule Ory.Api.Jwk do
## Parameters
- connection (Ory.Connection): Connection to server
- connection (Ory.Hydra.Connection): Connection to server
- set (String.t): The JSON Web Key Set ID
- opts (KeywordList): [optional] Optional parameters
- :body (JsonWebKeySet):
## Returns
{:ok, Ory.Model.JsonWebKeySet.t} on success
{:ok, Ory.Hydra.Model.JsonWebKeySet.t} on success
{:error, Tesla.Env.t} on failure
"""
@spec set_json_web_key_set(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.JsonWebKeySet.t} | {:error, Tesla.Env.t}
@spec set_json_web_key_set(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Hydra.Model.JsonWebKeySet.t} | {:ok, Ory.Hydra.Model.ErrorOAuth2.t} | {:error, Tesla.Env.t}
def set_json_web_key_set(connection, set, opts \\ []) do
optional_params = %{
:body => :body
Expand All @@ -212,8 +212,8 @@ defmodule Ory.Api.Jwk do
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 200, %Ory.Model.JsonWebKeySet{}},
{ :default, %Ory.Model.ErrorOAuth2{}}
{ 200, %Ory.Hydra.Model.JsonWebKeySet{}},
{ :default, %Ory.Hydra.Model.ErrorOAuth2{}}
])
end
end
Loading

0 comments on commit 0fa86e6

Please sign in to comment.