Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Defines types and functions for SP-initiated SSO. Use issueAuthnRequest
to initialise an AuthnRequest
value which stores the parameters for the
authentication request you wish to issue to the IdP. You can update this
value as required.
Use renderBase64
to render the request for use with a HTTP POST binding [1], or
renderUrlEncodingDeflate
for HTTP redirect binding[2] respectively.
You may wish to read
the SAML2 overview for this process.
- [1] https://docs.oasis-open.org/security/saml/v2.0/saml-bindings-2.0-os.pdf#page=21 Section 3.5 HTTP POST Binding
- [2] https://docs.oasis-open.org/security/saml/v2.0/saml-bindings-2.0-os.pdf#page=15 Section 3.4 HTTP Redirect Binding
Since: 0.4
Synopsis
- data AuthnRequest = AuthnRequest {}
- issueAuthnRequest :: Text -> IO AuthnRequest
- renderBase64 :: AuthnRequest -> ByteString
- renderUrlEncodingDeflate :: AuthnRequest -> ByteString
- renderXML :: AuthnRequest -> ByteString
Documentation
data AuthnRequest Source #
Parameters for SP-initiated SSO
AuthnRequest | |
|
Instances
Show AuthnRequest Source # | |
Defined in Network.Wai.SAML2.Request showsPrec :: Int -> AuthnRequest -> ShowS # show :: AuthnRequest -> String # showList :: [AuthnRequest] -> ShowS # | |
Eq AuthnRequest Source # | |
Defined in Network.Wai.SAML2.Request (==) :: AuthnRequest -> AuthnRequest -> Bool # (/=) :: AuthnRequest -> AuthnRequest -> Bool # |
:: Text | SP Entity ID |
-> IO AuthnRequest |
Creates a default AuthnRequest
with the current timestamp and a
randomly-generated ID.
renderBase64 :: AuthnRequest -> ByteString Source #
Renders and base64-encodes an AuthnRequest
for SP initiated SSO suitable
for use with HTTP POST binding
If used in an HTTP POST binding, the value should be sent as an invisible
form control named SAMLRequest
renderUrlEncodingDeflate :: AuthnRequest -> ByteString Source #
Renders an AuthnRequest
for SP initiated SSO according to
urn:oasis:names:tc:SAML:2.0:bindings:URL-Encoding:DEFLATE
and suitable for
use with HTTP Redirect binding
The value should be sent as a query parameter named SAMLRequest
renderXML :: AuthnRequest -> ByteString Source #
Render an AuthnRequest
as XML