wai-saml2-0.4: SAML2 assertion validation as WAI middleware
Safe HaskellSafe-Inferred
LanguageHaskell2010

Network.Wai.SAML2.XML

Description

Utility functions related to XML parsing.

Synopsis

Namespaces

saml2Name :: Text -> Name Source #

saml2Name name constructs a Name for name in the urn:oasis:names:tc:SAML:2.0:assertion namespace.

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.

mdName :: Text -> Name Source #

mdName name constructs a Name for name in the urn:oasis:names:tc:SAML:2.0:metadata namespace.

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.

Methods

parseXML :: MonadFail m => Cursor -> m a Source #

Instances

Instances details
FromXML Assertion Source # 
Instance details

Defined in Network.Wai.SAML2.Assertion

FromXML AssertionAttribute Source # 
Instance details

Defined in Network.Wai.SAML2.Assertion

FromXML AudienceRestriction Source # 
Instance details

Defined in Network.Wai.SAML2.Assertion

FromXML AuthnStatement Source # 
Instance details

Defined in Network.Wai.SAML2.Assertion

FromXML Conditions Source # 
Instance details

Defined in Network.Wai.SAML2.Assertion

FromXML NameID Source # 
Instance details

Defined in Network.Wai.SAML2.Assertion

Methods

parseXML :: MonadFail m => Cursor -> m NameID Source #

FromXML Subject Source # 
Instance details

Defined in Network.Wai.SAML2.Assertion

Methods

parseXML :: MonadFail m => Cursor -> m Subject Source #

FromXML SubjectConfirmation Source # 
Instance details

Defined in Network.Wai.SAML2.Assertion

FromXML SubjectConfirmationMethod Source # 
Instance details

Defined in Network.Wai.SAML2.Assertion

FromXML IDPSSODescriptor Source # 
Instance details

Defined in Network.Wai.SAML2.EntityDescriptor

FromXML KeyInfo Source # 
Instance details

Defined in Network.Wai.SAML2.KeyInfo

Methods

parseXML :: MonadFail m => Cursor -> m KeyInfo Source #

FromXML Response Source # 
Instance details

Defined in Network.Wai.SAML2.Response

FromXML CanonicalisationMethod Source # 
Instance details

Defined in Network.Wai.SAML2.Signature

FromXML DigestMethod Source # 
Instance details

Defined in Network.Wai.SAML2.Signature

FromXML Reference Source # 
Instance details

Defined in Network.Wai.SAML2.Signature

FromXML Signature Source # 
Instance details

Defined in Network.Wai.SAML2.Signature

FromXML SignatureMethod Source # 
Instance details

Defined in Network.Wai.SAML2.Signature

FromXML SignedInfo Source # 
Instance details

Defined in Network.Wai.SAML2.Signature

FromXML StatusCode Source # 
Instance details

Defined in Network.Wai.SAML2.StatusCode

FromXML CipherData Source # 
Instance details

Defined in Network.Wai.SAML2.XML.Encrypted

FromXML EncryptedAssertion Source # 
Instance details

Defined in Network.Wai.SAML2.XML.Encrypted

FromXML EncryptedKey Source # 
Instance details

Defined in Network.Wai.SAML2.XML.Encrypted

FromXML EncryptionMethod Source # 
Instance details

Defined in Network.Wai.SAML2.XML.Encrypted

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.