Copyright | (c) Soostone Inc 2020 |
---|---|
License | AllRightsReserved |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- defaultOAuth2 :: OAuth2
- asNapkinOAuth2 :: NapkinOAuth2Request -> NapkinOAuth2
- eval :: (MonadIO m, MonadCatch m, Katip m) => NapkinOAuth2Request -> m (Maybe CredentialsJson)
- configureGoogleOAuth2Env :: (MonadReader NapkinOAuth2 m, MonadIO m) => m OAuth2Env
- authorizationUri :: URI
Documentation
defaultOAuth2 :: OAuth2 #
asNapkinOAuth2 :: NapkinOAuth2Request -> NapkinOAuth2 #
construct google oauth request
:: (MonadIO m, MonadCatch m, Katip m) | |
=> NapkinOAuth2Request | napkin oauth2 request |
-> m (Maybe CredentialsJson) | filePath to the stored the credentials |
reset oAuth2 credentials
Exposes napkin oAuth2 flow Construct the NapkinOAuth2Request and call the workflow
configureGoogleOAuth2Env :: (MonadReader NapkinOAuth2 m, MonadIO m) => m OAuth2Env #
initialize napkin oAuth configuration Napkin takes clientId, clientSecret and callback url to initiazlie the oauth configs. configuation parameters are from google oauth api docs, https://developers.google.com/identity/protocols/oauth2/native-app#create-code-challenge build napkin oAuthEnv.
authorizationUri :: URI #
construct the google oauth endpoint for the OAuth2 Googlew APIs access for additional detail see https://developers.google.com/identity/protocols/oauth2#installed