mirror of
https://github.com/freckle/yesod-auth-oauth2.git
synced 2026-09-10 19:34:56 +02:00
TODO: write detailed commit message / CHANGELOG. Highlights: - The "Provider" abstraction, which leads to - Way tinier definitions, also aided by - Stop fetching full profiles (#71) - Drop GHC < 7.10 support (and CPP) - Extract clarified Dispatch module
16 lines
459 B
Haskell
16 lines
459 B
Haskell
{-# LANGUAGE OverloadedStrings #-}
|
|
module Yesod.Auth.OAuth2.Upcase
|
|
( oauth2Upcase
|
|
) where
|
|
|
|
import Yesod.Auth.OAuth2.Provider
|
|
import Yesod.Auth.OAuth2.UserId
|
|
|
|
oauth2Upcase :: Provider m UserId
|
|
oauth2Upcase = Provider
|
|
{ pName = "upcase"
|
|
, pAuthorizeEndpoint = const "http://upcase.com/oauth/authorize"
|
|
, pAccessTokenEndpoint = "http://upcase.com/oauth/token"
|
|
, pFetchUserProfile = authGetProfile "http://upcase.com/api/v1/me.json"
|
|
}
|