mirror of
https://github.com/freckle/yesod-auth-oauth2.git
synced 2026-01-11 11:48:29 +01:00
Address HLint issues
This commit is contained in:
parent
30851ae5fb
commit
79ef8aded9
@ -1,3 +1,8 @@
|
||||
---
|
||||
- ignore:
|
||||
# https://github.com/ndmitchell/hlint/issues/427
|
||||
name: Eta reduce
|
||||
within: authOAuth2
|
||||
- ignore:
|
||||
name: Redundant do
|
||||
within: spec
|
||||
|
||||
@ -96,7 +96,7 @@ oauth2EveScoped clientId clientSecret scopes widget =
|
||||
|
||||
fetchEveProfile :: Manager -> OAuth2Token -> IO (Creds m)
|
||||
fetchEveProfile manager token = do
|
||||
userResult <- authGetJSON manager (accessToken token) $ "https://login.eveonline.com/oauth/verify"
|
||||
userResult <- authGetJSON manager (accessToken token) "https://login.eveonline.com/oauth/verify"
|
||||
|
||||
case userResult of
|
||||
Right user -> return $ toCreds user token
|
||||
|
||||
@ -95,7 +95,7 @@ oauth2SalesforceSandboxScoped scopes clientId clientSecret =
|
||||
|
||||
fetchSalesforceSandboxUser :: Manager -> OAuth2Token -> IO (Creds m)
|
||||
fetchSalesforceSandboxUser manager token = do
|
||||
result <- authGetJSON manager (accessToken token) $ "https://test.salesforce.com/services/oauth2/userinfo"
|
||||
result <- authGetJSON manager (accessToken token) "https://test.salesforce.com/services/oauth2/userinfo"
|
||||
case result of
|
||||
Right user -> return $ toCreds svcNameSb user token
|
||||
Left err -> throwIO $ invalidProfileResponse svcNameSb err
|
||||
|
||||
Loading…
Reference in New Issue
Block a user