Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base: master
...
compare: zouppenid
Checking mergeability… Don't worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 6 additions and 9 deletions.
  1. +6 −9 src/Network/OpenID/Normalization.hs
View
15 src/Network/OpenID/Normalization.hs
@@ -22,16 +22,9 @@ import Data.List
import Network.URI hiding (scheme,path)
--- | Normalize an identifier, discarding XRIs.
+-- | Normalize an identifier.
normalizeIdentifier :: Identifier -> Maybe Identifier
-normalizeIdentifier = normalizeIdentifier' (const Nothing)
-
-
--- | Normalize the user supplied identifier, using a supplied function to
--- normalize an XRI.
-normalizeIdentifier' :: (String -> Maybe String) -> Identifier
- -> Maybe Identifier
-normalizeIdentifier' xri (Identifier str)
+normalizeIdentifier (Identifier str)
| null str = Nothing
| "xri://" `isPrefixOf` str = Identifier `fmap` xri str
| head str `elem` "=@+$!" = Identifier `fmap` xri str
@@ -52,3 +45,7 @@ normalizeIdentifier' xri (Identifier str)
$ normalizeEscape
$ normalizeCase
$ uriToString (const "") u []
+
+-- |Dummy XRI resolver by using xri.net.
+xri :: String -> Maybe String
+xri x = Just $ "https://xri.net/" ++ x

No commit comments for this range

Something went wrong with that request. Please try again.