Skip to content

Commit

Permalink
Fix module docs
Browse files Browse the repository at this point in the history
  • Loading branch information
LauraBeatris committed Mar 24, 2024
1 parent 1c909e3 commit 06f2476
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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{
Expand Down
4 changes: 4 additions & 0 deletions lib/oidc/provider_configuration/error.ex
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 4 additions & 0 deletions lib/saml/request/error.ex
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
4 changes: 3 additions & 1 deletion lib/saml/request/request.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
4 changes: 4 additions & 0 deletions lib/saml/response/error.ex
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
16 changes: 12 additions & 4 deletions lib/saml/response/response.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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()}
Expand All @@ -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()}
Expand All @@ -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}
Expand All @@ -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()}
Expand Down

0 comments on commit 06f2476

Please sign in to comment.