Skip to content

Commit

Permalink
Add/update @since annotations for 0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
mbg committed Aug 22, 2023
1 parent e1d1bc2 commit fbbbbbf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Network/Wai/SAML2/Request.hs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ data AuthnRequest
-- | The URI reference to which this request is to be sent. Required
-- for signed requests
--
-- @since 0.4.1
-- @since 0.5
, authnRequestDestination :: !(Maybe T.Text)
-- | Allow IdP to generate a new identifier
, authnRequestAllowCreate :: !Bool
Expand Down
2 changes: 2 additions & 0 deletions src/Network/Wai/SAML2/Response.hs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ extractSignedInfo cursor = do
pure signedInfo

-- | Obtain a list of InclusiveNamespaces entries used for exclusive XML canonicalisation.
--
-- @since 0.5
extractPrefixList :: Cursor -> [T.Text]
extractPrefixList cursor = concatMap T.words
$ concatMap (attribute "PrefixList")
Expand Down
4 changes: 4 additions & 0 deletions src/Network/Wai/SAML2/XML.hs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ mdName name =

-- | 'ecName' @name@ constructs a 'Name' for @name@ in the
-- http://www.w3.org/2001/10/xml-exc-c14n# namespace.
--
-- @since 0.5
ecName :: T.Text -> Name
ecName name =
Name name (Just "http://www.w3.org/2001/10/xml-exc-c14n#") (Just "ec")
Expand Down Expand Up @@ -111,5 +113,7 @@ oneOrFail _ (x:_) = pure x

-- | 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
parseSettings :: ParseSettings
parseSettings = def { psRetainNamespaces = True }

0 comments on commit fbbbbbf

Please sign in to comment.