yesodweb/authenticate — pull request #3 by qzchenwl (2011-12-23 14:10:58+00:00)
Title: Add optional realm support for OAuth

The optional authentication refer to [Authorization Header](http://oauth.net/core/1.0/#rfc.section.5.4.1) is a special field, it must be placed closest to `OAuth ` if exists.

The current version place it to the wrong place if it exists.

renderAuthHeader = ("OAuth " `BS.append`). BS.intercalate "," . map (\(a,b) -> BS.concat [paramEncode a, "=\"", paramEncode b, "\""]) . filter ((`elem` ["realm", "oauth_token", "oauth_verifier", "oauth_consumer_key", "oauth_signature_method", "oauth_timestamp", "oauth_nonce", "oauth_version", "oauth_callback", "oauth_signature"]) . fst)

The other problem is that you cannot set realm value.