Skip to content

Commit

Permalink
inch ci added
Browse files Browse the repository at this point in the history
  • Loading branch information
handnot2 committed Sep 15, 2017
1 parent 88c3a96 commit bc60115
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ erl_crash.dump
# Also ignore archive artifacts (built via "mix archive.build").
*.ez
.sobelow
/docs/
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# CHANGELOG

### v0.6.3

+ Added Inch CI
+ Corresponding doc updates

### v0.6.2

+ Doc updates
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

A Plug library to enable SAML 2.0 Single Sign On in a Plug/Phoenix application.

[![Inline docs](http://inch-ci.org/github/handnot2/samly.svg)](http://inch-ci.org/github/handnot2/samly)

This library uses Erlang [`esaml`](https://github.com/handnot2/esaml) to provide
plug enabled routes. So, it is constrained by `esaml` capabilities - only Service
Provider initiated login is supported. The logout operation can be either IdP
Expand Down
11 changes: 11 additions & 0 deletions lib/samly.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ defmodule Samly do
The struct includes the attributes sent from IdP as well as any corresponding locally
computed/derived attributes. Returns `nil` if the current Plug session
is not authenticated.
## Parameters
- conn: Plug connection
"""
@spec get_active_assertion(Conn.t) :: Assertion.t
def get_active_assertion(conn) do
nameid = conn |> Conn.get_session("samly_nameid")
case State.get_by_nameid(nameid) do
Expand All @@ -26,7 +31,13 @@ defmodule Samly do
Checks for the attribute in `computed` map first and `attributes` map next.
Returns `nil` if not present in either.
## Parameters
- assertion: SAML assertion obtained by calling `get_active_assertion/1`
- name: Attribute name
"""
@spec get_attribute(nil | Assertion.t, String.t) :: nil | String.t
def get_attribute(nil, _name), do: nil
def get_attribute(%Assertion{} = assertion, name) do
computed = assertion.computed
Expand Down
3 changes: 2 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Samly.Mixfile do
use Mix.Project

@version "0.6.2"
@version "0.6.3"
@description "SAML SP SSO made easy"
@source_url "https://github.com/handnot2/samly"

Expand Down Expand Up @@ -31,6 +31,7 @@ defmodule Samly.Mixfile do
{:plug, "~> 1.4"},
{:esaml, "~> 3.0"},
{:ex_doc, "~> 0.16", only: :dev},
{:inch_ex, "~> 0.5", only: :docs},
]
end

Expand Down
4 changes: 3 additions & 1 deletion mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"cowlib": {:hex, :cowlib, "1.0.2", "9d769a1d062c9c3ac753096f868ca121e2730b9a377de23dec0f7e08b1df84ee", [], [], "hexpm"},
"earmark": {:hex, :earmark, "1.2.3", "206eb2e2ac1a794aa5256f3982de7a76bf4579ff91cb28d0e17ea2c9491e46a4", [], [], "hexpm"},
"esaml": {:hex, :esaml, "3.0.1", "fea1bf280438f1c247a4fa45d87bf7df3ce1cbee504ae423c4d0f3f292e786aa", [], [{:cowboy, "1.1.2", [hex: :cowboy, repo: "hexpm", optional: false]}], "hexpm"},
"ex_doc": {:hex, :ex_doc, "0.16.3", "cd2a4cfe5d26e37502d3ec776702c72efa1adfa24ed9ce723bb565f4c30bd31a", [], [{:earmark, "~> 1.1", [hex: :earmark, repo: "hexpm", optional: false]}], "hexpm"},
"ex_doc": {:hex, :ex_doc, "0.16.4", "4bf6b82d4f0a643b500366ed7134896e8cccdbab4d1a7a35524951b25b1ec9f0", [], [{:earmark, "~> 1.1", [hex: :earmark, repo: "hexpm", optional: false]}], "hexpm"},
"inch_ex": {:hex, :inch_ex, "0.5.6", "418357418a553baa6d04eccd1b44171936817db61f4c0840112b420b8e378e67", [], [{:poison, "~> 1.5 or ~> 2.0 or ~> 3.0", [hex: :poison, repo: "hexpm", optional: false]}], "hexpm"},
"mime": {:hex, :mime, "1.1.0", "01c1d6f4083d8aa5c7b8c246ade95139620ef8effb009edde934e0ec3b28090a", [], [], "hexpm"},
"plug": {:hex, :plug, "1.4.3", "236d77ce7bf3e3a2668dc0d32a9b6f1f9b1f05361019946aae49874904be4aed", [], [{:cowboy, "~> 1.0.1 or ~> 1.1", [hex: :cowboy, repo: "hexpm", optional: true]}, {:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}], "hexpm"},
"poison": {:hex, :poison, "3.1.0", "d9eb636610e096f86f25d9a46f35a9facac35609a7591b3be3326e99a0484665", [], [], "hexpm"},
"ranch": {:hex, :ranch, "1.3.2", "e4965a144dc9fbe70e5c077c65e73c57165416a901bd02ea899cfd95aa890986", [], [], "hexpm"}}

0 comments on commit bc60115

Please sign in to comment.