Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class HasXML a where
- nameSpaces :: Proxy a -> [(ST, ST)]
- render :: a -> [Node]
- parse :: MonadError String m => [Node] -> m a
- class HasXML a => HasXMLRoot a where
- renderRoot :: a -> Element
- class HasXMLImport us them where
- importXml :: MonadError String m => them -> m us
- exportXml :: us -> them
- attributeIsCI :: Name -> CI ST -> Cursor -> [Cursor]
- defNameSpaces :: [(ST, ST)]
- encode :: forall a. HasXMLRoot a => a -> LT
- decode :: forall m a. (HasXMLRoot a, MonadError String m) => LT -> m a
- encodeElem :: forall a. HasXML a => a -> LT
- decodeElem :: forall a m. (HasXML a, MonadError String m) => LT -> m a
- renderToDocument :: HasXMLRoot a => a -> Document
- parseFromDocument :: (HasXML a, MonadError String m) => Document -> m a
- unsafeReadTime :: HasCallStack => String -> Time
- decodeTime :: (MonadError String m, ConvertibleStrings s String) => s -> m Time
- renderTime :: Time -> ST
- explainDeniedReason :: DeniedReason -> ST
- mkSPMetadata :: (Monad m, SP m) => ST -> URI -> URI -> [ContactPerson] -> m SPMetadata
Documentation
nameSpaces :: Proxy a -> [(ST, ST)] Source #
render :: a -> [Node] Source #
default render :: HasXMLRoot a => a -> [Node] Source #
Instances
class HasXML a => HasXMLRoot a where Source #
renderRoot :: a -> Element Source #
Instances
HasXMLRoot SomeSAMLRequest Source # | |
Defined in SAML2.WebSSO.Test.Util.Misc renderRoot :: SomeSAMLRequest -> Element Source # | |
HasXMLRoot AuthnRequest Source # | |
Defined in SAML2.WebSSO.XML renderRoot :: AuthnRequest -> Element Source # | |
HasXMLRoot AuthnResponse Source # | |
Defined in SAML2.WebSSO.XML renderRoot :: AuthnResponse -> Element Source # | |
HasXMLRoot IdPMetadata Source # | |
Defined in SAML2.WebSSO.XML renderRoot :: IdPMetadata -> Element Source # | |
HasXMLRoot SPMetadata Source # | |
Defined in SAML2.WebSSO.XML renderRoot :: SPMetadata -> Element Source # | |
HasXMLRoot Document Source # | |
Defined in SAML2.WebSSO.XML renderRoot :: Document -> Element Source # |
class HasXMLImport us them where Source #
Instances
attributeIsCI :: Name -> CI ST -> Cursor -> [Cursor] Source #
Case insensitive version fo attributeIs
. NB: this is generally violating the standard
(see below), but in many cases there is clearly no harm in doing so (it's hard to base an
attack on being able to say `HTTP-Post` instead of `HTTP-POST`).
Details: * According to https://docs.oasis-open.org/security/saml/v2.0/saml-bindings-2.0-os.pdf, Section 3.5.1, the binding should be "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST", but what you sent is "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Post". * According to https://tools.ietf.org/html/rfc8141, page 17, URNs are case sensitive in the position of "HTTP-Post". All SAML IdPs that wire supports, including microsoft azure, okta, and centrify are following this line of reasoning.
defNameSpaces :: [(ST, ST)] Source #
encode :: forall a. HasXMLRoot a => a -> LT Source #
decode :: forall m a. (HasXMLRoot a, MonadError String m) => LT -> m a Source #
encodeElem :: forall a. HasXML a => a -> LT Source #
decodeElem :: forall a m. (HasXML a, MonadError String m) => LT -> m a Source #
renderToDocument :: HasXMLRoot a => a -> Document Source #
parseFromDocument :: (HasXML a, MonadError String m) => Document -> m a Source #
unsafeReadTime :: HasCallStack => String -> Time Source #
Do not use this in production! It works, but it's slow and failures are a bit violent.
decodeTime :: (MonadError String m, ConvertibleStrings s String) => s -> m Time Source #
renderTime :: Time -> ST Source #
explainDeniedReason :: DeniedReason -> ST Source #
mkSPMetadata :: (Monad m, SP m) => ST -> URI -> URI -> [ContactPerson] -> m SPMetadata Source #
Construct SP metadata with a new UUID and current time stamp.
The resp
argument here must match the finalize-login
end-point (as can be constructed by
getSsoURL
).