mirror of
https://github.com/freckle/yesod-auth-oauth2.git
synced 2026-09-05 09:23:49 +02:00
uppercase everywhere
This commit is contained in:
parent
2c892977cc
commit
6c1f627067
@ -150,7 +150,7 @@ mkFoundation = do
|
|||||||
, loadPlugin (oauth2Spotify []) "SPOTIFY"
|
, loadPlugin (oauth2Spotify []) "SPOTIFY"
|
||||||
, loadPlugin oauth2Twitch "TWITCH"
|
, loadPlugin oauth2Twitch "TWITCH"
|
||||||
, loadPlugin oauth2WordPressDotCom "WORDPRESS_DOT_COM"
|
, loadPlugin oauth2WordPressDotCom "WORDPRESS_DOT_COM"
|
||||||
, loadPlugin oauth2Orcid "ORCID"
|
, loadPlugin oauth2ORCID "ORCID"
|
||||||
, loadPlugin oauth2Upcase "UPCASE"
|
, loadPlugin oauth2Upcase "UPCASE"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
|
||||||
module Yesod.Auth.OAuth2.ORCID
|
module Yesod.Auth.OAuth2.ORCID
|
||||||
( oauth2Orcid
|
( oauth2ORCID
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
@ -15,14 +15,14 @@ newtype User = User Text
|
|||||||
instance FromJSON User where
|
instance FromJSON User where
|
||||||
parseJSON = withObject "User" $ \o -> User <$> o .: "sub"
|
parseJSON = withObject "User" $ \o -> User <$> o .: "sub"
|
||||||
|
|
||||||
oauth2Orcid
|
oauth2ORCID
|
||||||
:: YesodAuth m
|
:: YesodAuth m
|
||||||
=> Text
|
=> Text
|
||||||
-- ^ Client Id
|
-- ^ Client Id
|
||||||
-> Text
|
-> Text
|
||||||
-- ^ Client Secret
|
-- ^ Client Secret
|
||||||
-> AuthPlugin m
|
-> AuthPlugin m
|
||||||
oauth2Orcid clientId clientSecret =
|
oauth2ORCID clientId clientSecret =
|
||||||
authOAuth2 pluginName oauth2 $ \manager token -> do
|
authOAuth2 pluginName oauth2 $ \manager token -> do
|
||||||
(User userId, userResponse) <-
|
(User userId, userResponse) <-
|
||||||
authGetProfile
|
authGetProfile
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user