diff --git a/example/Main.hs b/example/Main.hs index 3dd7d0a..562bf31 100644 --- a/example/Main.hs +++ b/example/Main.hs @@ -150,7 +150,7 @@ mkFoundation = do , loadPlugin (oauth2Spotify []) "SPOTIFY" , loadPlugin oauth2Twitch "TWITCH" , loadPlugin oauth2WordPressDotCom "WORDPRESS_DOT_COM" - , loadPlugin oauth2Orcid "ORCID" + , loadPlugin oauth2ORCID "ORCID" , loadPlugin oauth2Upcase "UPCASE" ] diff --git a/src/Yesod/Auth/OAuth2/ORCID.hs b/src/Yesod/Auth/OAuth2/ORCID.hs index 306ff86..a60f394 100644 --- a/src/Yesod/Auth/OAuth2/ORCID.hs +++ b/src/Yesod/Auth/OAuth2/ORCID.hs @@ -1,7 +1,7 @@ {-# LANGUAGE OverloadedStrings #-} module Yesod.Auth.OAuth2.ORCID - ( oauth2Orcid + ( oauth2ORCID ) where import qualified Data.Text as T @@ -15,14 +15,14 @@ newtype User = User Text instance FromJSON User where parseJSON = withObject "User" $ \o -> User <$> o .: "sub" -oauth2Orcid +oauth2ORCID :: YesodAuth m => Text -- ^ Client Id -> Text -- ^ Client Secret -> AuthPlugin m -oauth2Orcid clientId clientSecret = +oauth2ORCID clientId clientSecret = authOAuth2 pluginName oauth2 $ \manager token -> do (User userId, userResponse) <- authGetProfile