mirror of
https://github.com/freckle/yesod-auth-oauth2.git
synced 2026-01-11 19:58:28 +01:00
uppercase everywhere
This commit is contained in:
parent
2c892977cc
commit
6c1f627067
@ -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"
|
||||
]
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user