saml2-web-sso-0.20: Library and example web app for the SAML Web-based SSO profile.
Safe HaskellSafe-Inferred
LanguageHaskell2010

SAML2.WebSSO.XML

Synopsis

Documentation

class HasXML a where Source #

Minimal complete definition

parse

Methods

nameSpaces :: Proxy a -> [(ST, ST)] Source #

render :: a -> [Node] Source #

default render :: HasXMLRoot a => a -> [Node] Source #

parse :: MonadError String m => [Node] -> m a Source #

Instances

Instances details
HasXML SomeSAMLRequest Source # 
Instance details

Defined in SAML2.WebSSO.Test.Util.Misc

HasXML AuthnRequest Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXML AuthnResponse Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXML Conditions Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXML IdPMetadata Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXML Issuer Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXML NameID Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXML SPMetadata Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXML Subject Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXML Document Source # 
Instance details

Defined in SAML2.WebSSO.XML

class HasXML a => HasXMLRoot a where Source #

Methods

renderRoot :: a -> Element Source #

Instances

Instances details
HasXMLRoot SomeSAMLRequest Source # 
Instance details

Defined in SAML2.WebSSO.Test.Util.Misc

HasXMLRoot AuthnRequest Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXMLRoot AuthnResponse Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXMLRoot IdPMetadata Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXMLRoot SPMetadata Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXMLRoot Document Source # 
Instance details

Defined in SAML2.WebSSO.XML

class HasXMLImport us them where Source #

Methods

importXml :: MonadError String m => them -> m us Source #

exportXml :: us -> them Source #

Instances

Instances details
HasXMLImport AuthnRequest AuthnRequest Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXMLImport AuthnResponse Response Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXMLImport Conditions Conditions Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXMLImport IP IP Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXMLImport Issuer Issuer Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXMLImport Locality SubjectLocality Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXMLImport NameID NameID Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXMLImport NameIdPolicy NameIDPolicy Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXMLImport Status Status Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXMLImport Subject Subject Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXMLImport SubjectConfirmationData SubjectConfirmationData Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXMLImport Time DateTime Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXMLImport URI URI Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXMLImport () SAMLVersion Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXMLImport Assertion (PossiblyEncrypted Assertion) Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXMLImport (Maybe Statement) Statement Source # 
Instance details

Defined in SAML2.WebSSO.XML

HasXMLImport (ID a) ID Source # 
Instance details

Defined in SAML2.WebSSO.XML

Methods

importXml :: MonadError String m => ID0 -> m (ID a) Source #

exportXml :: ID a -> ID0 Source #

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.

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 #

unsafeReadTime :: HasCallStack => String -> Time Source #

Do not use this in production! It works, but it's slow and failures are a bit violent.

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).