Stability | Portability : |
---|---|
Maintainer | James Halliday <substack@gmail.com> |
- data Config = Config {
- verifyError :: String -> IO ()
- normalizeError :: IO Session
- discoverError :: String -> IO Session
- associateError :: String -> IO Session
- data Session = Session {}
- auth :: Config -> String -> String -> IO Session
- verify :: Config -> Session -> String -> IO ()
- config :: Config
- readSession :: String -> Session
Documentation
Provides configuration settings for verify and auth. For now, this is just the errors which may be thrown by either.
Config | |
|
Wrap up all the data necessary to do a verify into one place, plus some extra useful stuff.
Session | |
|
auth :: Config -> String -> String -> IO SessionSource
Given a configuration, identity, and return uri, contact the remote provider to create a Session object encapsulating the useful bits of data to pass along to verify and also to pick out the normalized identity from.
verify :: Config -> Session -> String -> IO ()Source
Given a configuration, a Session generated by auth, and the uri that the client came back on from the provider, make sure the client properly authenticated by running verifyError on failure to verify the credentials.
Provide default configuration with error handlers that just fail with a useful message when errors happen. This behavior is what most people would probably end up writing themselves anyways.
readSession :: String -> SessionSource