Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- mkTestAuth0App :: ExceptT Text IO (IdpApplication Auth0 AuthorizationCodeApplication)
- mkTestAuth0Idp :: ExceptT Text IO (Idp Auth0)
- mkTestGoogleApp :: IdpApplication Google AuthorizationCodeApplication
- randomStateValue :: Text
- data DemoUser = DemoUser {}
- app :: IO ()
- indexH :: IORef (Maybe DemoUser) -> ActionM ()
- loginAuth0H :: IdpApplication Auth0 AuthorizationCodeApplication -> ActionM ()
- loginGoogleH :: IdpApplication Google AuthorizationCodeApplication -> ActionM ()
- logoutH :: IORef (Maybe DemoUser) -> ActionM ()
- callbackH :: IdpApplication Auth0 AuthorizationCodeApplication -> IdpApplication Google AuthorizationCodeApplication -> IORef (Maybe DemoUser) -> ActionM ()
- handleAuth0Callback :: IdpApplication Auth0 AuthorizationCodeApplication -> ExchangeToken -> ExceptT Text IO DemoUser
- handleGoogleCallback :: IdpApplication Google AuthorizationCodeApplication -> ExchangeToken -> ExceptT Text IO DemoUser
- bslToText :: ByteString -> Text
- paramValue :: Text -> [Param] -> Either Text Text
- excepttToActionM :: Show a => ExceptT Text IO a -> ActionM a
- oauth2ErrorToText :: TokenResponseError -> Text
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
Instances
loginAuth0H :: IdpApplication Auth0 AuthorizationCodeApplication -> ActionM () Source #
loginauth0
endpoint handler
loginGoogleH :: IdpApplication Google AuthorizationCodeApplication -> ActionM () Source #
logingoogle
endpoint handler
callbackH :: IdpApplication Auth0 AuthorizationCodeApplication -> IdpApplication Google AuthorizationCodeApplication -> IORef (Maybe DemoUser) -> ActionM () Source #
oauth2callback
endpoint handler
handleAuth0Callback :: IdpApplication Auth0 AuthorizationCodeApplication -> ExchangeToken -> ExceptT Text IO DemoUser Source #
handleGoogleCallback :: IdpApplication Google AuthorizationCodeApplication -> ExchangeToken -> ExceptT Text IO DemoUser Source #
Utilities
bslToText :: ByteString -> Text Source #