View Source Smee.Publish (Smee v0.4.1)

Publish exports streams or lists of entity structs into various formats.

At present the output formats are SAML XML (individual and collections) and simple index text files. Formats can be output as binary strings or streamed. Streamed output can be useful for web services, allowing gradual downloads generated on-the-fly with no need to render a very large document in advance.

Options:

  • valid_until - pass a DateTime to set the validUntil attribute for the entity metadata. Alternatively, an integer can be passed to request a validity of n days, or "default" and "auto" to use the default validity period.

Summary

Functions

Returns the estimated size of a streamed index file without generating it in advance.

Returns the estimated size of a streamed SAML metadata XML file without generating it in advance.

Returns an index text document

Returns a streamed index file, a plain text list of entity IDs.

Returns a SAML metadata XML file, potentially very large.

Returns a streamed SAML metadata XML file

Functions

Link to this function

estimate_index_size(entities, options \\ [])

View Source
@spec estimate_index_size(entities :: Enumerable.t(), options :: keyword()) ::
  integer()

Returns the estimated size of a streamed index file without generating it in advance.

Link to this function

estimate_xml_size(entities, options \\ [])

View Source
@spec estimate_xml_size(entities :: Enumerable.t(), options :: keyword()) :: integer()

Returns the estimated size of a streamed SAML metadata XML file without generating it in advance.

Link to this function

index(entities, options \\ [])

View Source
@spec index(entities :: Enumerable.t(), options :: keyword()) :: binary()

Returns an index text document

Link to this function

index_stream(entities, options \\ [])

View Source
@spec index_stream(entities :: Enumerable.t(), options :: keyword()) :: Enumerable.t()

Returns a streamed index file, a plain text list of entity IDs.

Link to this function

xml(entities, options \\ [])

View Source
@spec xml(entities :: Enumerable.t(), options :: keyword()) :: binary()

Returns a SAML metadata XML file, potentially very large.

Link to this function

xml_stream(entity, options \\ [])

View Source
@spec xml_stream(entities :: Smee.Entity.t() | Enumerable.t(), options :: keyword()) ::
  Enumerable.t()

Returns a streamed SAML metadata XML file