From 06f2476e16f23e7f3532a9657113a602eea00e2e Mon Sep 17 00:00:00 2001 From: Laura Beatris <48022589+LauraBeatris@users.noreply.github.com> Date: Sun, 24 Mar 2024 19:34:03 -0300 Subject: [PATCH] Fix module docs --- README.md | 4 ++-- lib/oidc/provider_configuration/error.ex | 4 ++++ lib/saml/request/error.ex | 4 ++++ lib/saml/request/request.ex | 4 +++- lib/saml/response/error.ex | 4 ++++ lib/saml/response/response.ex | 16 ++++++++++++---- 6 files changed, 29 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 81aa4f5..ce2f33f 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ Here's a list of error per tags: Parsed a given SAML response to a struct with attributes and values: ```ex -iex(1)> ShinAuth.SAML.decode_saml_response(valid_saml_response) +iex(1)> ShinAuth.SAML.decode_saml_response(saml_response_xml) {:ok, %ShinAuth.SAML.Response{ common: %ShinAuth.SAML.Response.Common{ @@ -107,7 +107,7 @@ iex(1)> ShinAuth.SAML.decode_saml_response(valid_saml_response) Parsed a given SAML request to a struct with attributes and values: ```ex -iex(1)> ShinAuth.SAML.decode_saml_request(valid_saml_request) +iex(1)> ShinAuth.SAML.decode_saml_request(saml_request_xml) {:ok, %ShinAuth.SAML.Request{ common: %ShinAuth.SAML.Request.Common{ diff --git a/lib/oidc/provider_configuration/error.ex b/lib/oidc/provider_configuration/error.ex index 1f05308..dca3854 100644 --- a/lib/oidc/provider_configuration/error.ex +++ b/lib/oidc/provider_configuration/error.ex @@ -1,4 +1,8 @@ defmodule ShinAuth.OIDC.ProviderConfiguration.Error do + @moduledoc """ + Defines the possible errors from decoding provider configuration + """ + @type t :: %__MODULE__{ tag: :malformed_discovery_endpoint diff --git a/lib/saml/request/error.ex b/lib/saml/request/error.ex index 542ed56..b8ee086 100644 --- a/lib/saml/request/error.ex +++ b/lib/saml/request/error.ex @@ -1,4 +1,8 @@ defmodule ShinAuth.SAML.Request.Error do + @moduledoc """ + Defines the possible errors from decoding a SAML request + """ + @type t :: %__MODULE__{ tag: :malformed_saml_request, message: String.t() diff --git a/lib/saml/request/request.ex b/lib/saml/request/request.ex index 41d1dc6..5358dd4 100644 --- a/lib/saml/request/request.ex +++ b/lib/saml/request/request.ex @@ -15,7 +15,9 @@ defmodule ShinAuth.SAML.Request do end defmodule ShinAuth.SAML.Request.Common do - @moduledoc false + @moduledoc """ + Defines the common attributes from `samlp:AuthnRequest` + """ import DataSchema, only: [data_schema: 1] diff --git a/lib/saml/response/error.ex b/lib/saml/response/error.ex index cf9599d..faf02a0 100644 --- a/lib/saml/response/error.ex +++ b/lib/saml/response/error.ex @@ -1,4 +1,8 @@ defmodule ShinAuth.SAML.Response.Error do + @moduledoc """ + Defines the possible errors from decoding a SAML response + """ + @type t :: %__MODULE__{ tag: :malformed_saml_response, message: String.t() diff --git a/lib/saml/response/response.ex b/lib/saml/response/response.ex index 57c6d9a..4d463e1 100644 --- a/lib/saml/response/response.ex +++ b/lib/saml/response/response.ex @@ -25,7 +25,9 @@ defmodule ShinAuth.SAML.Response do end defmodule ShinAuth.SAML.Response.Common do - @moduledoc false + @moduledoc """ + Defines the common attributes from `saml2p:Response` + """ @type t :: {:id, String.t()} @@ -50,7 +52,9 @@ defmodule ShinAuth.SAML.Response.Common do end defmodule ShinAuth.SAML.Response.Conditions do - @moduledoc false + @moduledoc """ + Defines the attributes and values from `saml2:Conditions` + """ @type t :: {:not_before, String.t()} @@ -69,7 +73,9 @@ defmodule ShinAuth.SAML.Response.Conditions do end defmodule ShinAuth.SAML.Response.Status do - @moduledoc false + @moduledoc """ + Defines the attributes and values from `saml2p:Status` + """ @type t :: {:status, :failure, :successful} @@ -91,7 +97,9 @@ defmodule ShinAuth.SAML.Response.Status do end defmodule ShinAuth.SAML.Response.Attribute do - @moduledoc false + @moduledoc """ + Defines the attributes and values from `saml2:AttributeStatement` + """ @type t :: {:name, String.t()}