| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Network.Wai.SAML2.XML
Description
Utility functions related to XML parsing.
Synopsis
- saml2Name :: Text -> Name
- saml2pName :: Text -> Name
- xencName :: Text -> Name
- dsName :: Text -> Name
- mdName :: Text -> Name
- ecName :: Text -> Name
- toMaybeText :: [Text] -> Maybe Text
- showUTCTime :: UTCTime -> Text
- parseUTCTime :: MonadFail m => Text -> m UTCTime
- class FromXML a where
- oneOrFail :: MonadFail m => String -> [a] -> m a
- parseSettings :: ParseSettings
Namespaces
saml2pName :: Text -> Name Source #
saml2pName name constructs a Name for name in the
urn:oasis:names:tc:SAML:2.0:protocol namespace.
xencName :: Text -> Name Source #
xencName name constructs a Name for name in the
http://www.w3.org/2001/04/xmlenc# namespace.
dsName :: Text -> Name Source #
dsName name constructs a Name for name in the
http://www.w3.org/2000/09/xmldsig# namespace.
ecName :: Text -> Name Source #
ecName name constructs a Name for name in the
http://www.w3.org/2001/10/xml-exc-c14n# namespace.
Since: 0.5
Utility functions
toMaybeText :: [Text] -> Maybe Text Source #
toMaybeText xs returns Nothing if xs is the empty list, or
the result of concatenating xs wrapped in Just otherwise.
showUTCTime :: UTCTime -> Text Source #
Display a UTCTime as an ISO8601 timestamp including up to
6 digits for the microseconds.
Since: 0.4.0.0
parseUTCTime :: MonadFail m => Text -> m UTCTime Source #
parseUTCTime text parses text into a UTCTime value.
XML parsing
class FromXML a where Source #
A class of types which can be parsed from XML.
Instances
oneOrFail :: MonadFail m => String -> [a] -> m a Source #
oneOrFail message xs throws an XMLException with message if
xs is the empty list. If xs has at least one element, the first is
returned and all others are discarded.
parseSettings :: ParseSettings Source #
It is important to retain namespaces in order to calculate the hash of the canonicalised XML correctly. see: https://stackoverflow.com/questions/69252831/saml-2-0-digest-value-calculation-in-saml-assertion
Since: 0.5