This module is an attempt to implement a basic SAML service provider library tailored specifically for a project authenticating users for the National Institute of Education in Singapore.
Authentication services are provided by a SAML identity provider, but we had difficulty integrating existing Elixir/Erlang SAML libraries with this identity provider so this library was created as an attempt to manage that complexity.
In time this may become a proper SAML library, but currently it is a tiny slice of a full SAML library that is tailored specifically for our needs and as such unlikely to be of any use to anyone else.
If available in Hex, the package can be installed
by adding niesso
to your list of dependencies in mix.exs
:
def deps do
[
{:niesso, "~> 0.1.0"}
]
end
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/niesso.
Currently the API I propose to expose from this library is very simple.
case Niesso.consume_auth_resp(response) do
{:ok, assertion} ->
# use the assertion to read the attributes of the user
{:error, reason} ->
# handle the error casek
end