hoauth2-providers-tutorial-0.1: tutorial for hoauth2-providers module
Safe HaskellSafe-Inferred
LanguageHaskell2010

HOAuth2ProvidersTutorial

Synopsis

Configuration

randomStateValue :: Text Source #

You'll need to find out an better way to create state which is recommended in https://www.rfc-editor.org/rfc/rfc6749#section-10.12

Web server

data DemoUser Source #

Constructors

DemoUser 

Fields

Instances

Instances details
Show DemoUser Source # 
Instance details

Defined in HOAuth2ProvidersTutorial

Eq DemoUser Source # 
Instance details

Defined in HOAuth2ProvidersTutorial

app :: IO () Source #

The scotty application

indexH :: IORef (Maybe DemoUser) -> ActionM () Source #

/ endpoint handler

loginAuth0H :: ActionM () Source #

loginauth0 endpoint handler

loginGoogleH :: ActionM () Source #

logingoogle endpoint handler

logoutH :: IORef (Maybe DemoUser) -> ActionM () Source #

/logout endpoint handler

callbackH :: IORef (Maybe DemoUser) -> ActionM () Source #

oauth2callback endpoint handler

Utilities

paramValue Source #

Arguments

:: Text

Parameter key

-> [Param]

All parameters

-> Either Text Text 

excepttToActionM :: Show a => ExceptT Text IO a -> ActionM a Source #

Lift ExceptT to ActionM which is basically the handler Monad in Scotty.