Shin.Assertion (Shin v0.2.0) View Source

Queries a Shibboleth IdP for simulated attribute assertions - producing XML that should be similar to the SAML sent to an SP, containing the same user information.

The SAML assertion XML is not validated or parsed in any way. It should accurately reflect the assertion and attributes released by the IdP.

If your IdP is using another IdP as a proxy then any attributes derived from the upstream IdP will be missing: only attributes sourced or created by the Shibboleth IdP can be returned.

Link to this section Summary

Functions

Looks up attributes likely to be released to the specified SP for the specified user, returning them as an XML text in a result tuple.

Looks up attributes likely to be released to the specified SP for the specified user, returning XML as a binary string.

Link to this section Functions

Link to this function

query(idp, sp, username, options \\ [])

View Source

Specs

query(
  idp :: Shin.IdP.t(),
  sp :: binary(),
  username :: binary(),
  options :: keyword()
) ::
  {:ok, binary()} | {:error, binary()}

Looks up attributes likely to be released to the specified SP for the specified user, returning them as an XML text in a result tuple.

Pass the IdP, followed by the SP's entity ID and the username/principal of the user.

Examples

  {:ok, assertion_xml} = Shin.Assertion.query(idp, "https://test.ukfederation.org.uk/entity", "pete")
Link to this function

query!(idp, sp, username, options \\ [])

View Source

Specs

query!(
  idp :: Shin.IdP.t(),
  sp :: binary(),
  username :: binary(),
  options :: keyword()
) ::
  binary()

Looks up attributes likely to be released to the specified SP for the specified user, returning XML as a binary string.

Pass the IdP, followed by the SP's entity ID and the username/principal of the user.

Examples

  assertion_xml = Shin.Assertion.query!(idp, "https://test.ukfederation.org.uk/entity", "pete")