samly v0.8.0 Samly View Source
Elixir library used to enable SAML SP SSO to a Phoenix/Plug based application.
Link to this section Summary
Functions
Returns authenticated user SAML Assertion
Returns value of the specified attribute name in the given SAML Assertion
Link to this section Functions
Link to this function
get_active_assertion(conn)
View Source
get_active_assertion(Plug.Conn.t()) :: Samly.Assertion.t()
Returns authenticated user SAML Assertion.
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
Link to this function
get_attribute(assertion, name)
View Source
get_attribute(nil | Samly.Assertion.t(), String.t()) :: nil | String.t()
Returns value of the specified attribute name in the given SAML Assertion.
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