Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Raise error on rpx authentication if rpx-domain not set.

  • Loading branch information...
commit 527e9130ed04e35a38a4e75b641c3bf15b75b648 1 parent 02a14d2
@jgm authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 Network/Gitit/Authentication.hs
View
7 Network/Gitit/Authentication.hs
@@ -442,8 +442,11 @@ loginRPXUser params = do
else do -- Redirect user to RPX login
let ref = fromJust refer
let url = ref {U.uriPath="/_login",U.uriQuery="?destination=" ++ (fromMaybe (U.uriPath ref) $ rDestination params)}
- let rpx = "https://" ++ rpxDomain cfg ++ ".rpxnow.com/openid/v2/signin?token_url=" ++ urlEncode (show url)
- see rpx
+ if null (rpxDomain cfg)
+ then error "rpx-domain is not set."
+ else do
+ let rpx = "https://" ++ rpxDomain cfg ++ ".rpxnow.com/openid/v2/signin?token_url=" ++ urlEncode (show url)
+ see rpx
else do -- We got an answer from RPX, this might also return an exception.
uid :: R.Identifier <- liftIO $ R.authenticate (rpxKey cfg) $ fromJust mtoken
liftIO $ logM "gitit.loginRPXUser" DEBUG $ "uid:" ++ show uid
Please sign in to comment.
Something went wrong with that request. Please try again.