-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | OAuth 2.0 authentication plugins
--   
--   Library to authenticate with OAuth 2.0 for Yesod web applications.
@package yesod-auth-oauth2
@version 0.3.0

module URI.ByteString.Extension
fromText :: Text -> Maybe URI
unsafeFromText :: Text -> URI
toText :: URI -> Text
fromRelative :: Scheme -> Host -> RelativeRef -> URI
withHost :: URIRef a -> Host -> URIRef a
withQuery :: URIRef a -> [(ByteString, ByteString)] -> URIRef a
instance Data.String.IsString URI.ByteString.Types.Scheme
instance Data.String.IsString URI.ByteString.Types.Host
instance Data.String.IsString (URI.ByteString.Types.URIRef URI.ByteString.Types.Absolute)
instance Data.String.IsString (URI.ByteString.Types.URIRef URI.ByteString.Types.Relative)


-- | Generic OAuth2 plugin for Yesod
--   
--   <ul>
--   <li>See Yesod.Auth.OAuth2.GitHub for example usage.</li>
--   </ul>
module Yesod.Auth.OAuth2

-- | Create an <tt><a>AuthPlugin</a></tt> for the given OAuth2 provider
--   
--   Presents a generic <tt>"Login via name"</tt> link
authOAuth2 :: YesodAuth m => Text -> OAuth2 -> (Manager -> OAuth2Token -> IO (Creds m)) -> AuthPlugin m

-- | Create an <tt><a>AuthPlugin</a></tt> for the given OAuth2 provider
--   
--   Allows passing a custom widget for the login link. See
--   <tt><tt>oauth2Eve</tt></tt> for an example.
authOAuth2Widget :: YesodAuth m => WidgetT m IO () -> Text -> OAuth2 -> (Manager -> OAuth2Token -> IO (Creds m)) -> AuthPlugin m
oauth2Url :: Text -> AuthRoute

-- | Handle the common case of fetching Profile information from a JSON
--   endpoint
--   
--   Throws <tt><a>InvalidProfileResponse</a></tt> if JSON parsing fails
fromProfileURL :: FromJSON a => Text -> URI -> (a -> Creds m) -> Manager -> OAuth2Token -> IO (Creds m)

-- | Provider name and Aeson parse error
data YesodOAuth2Exception
InvalidProfileResponse :: Text -> ByteString -> YesodOAuth2Exception

-- | Construct an <tt><a>InvalidProfileResponse</a></tt> exception from an
--   <tt><a>OAuth2Error</a></tt>
--   
--   This forces the <tt>e</tt> in <tt><a>OAuth2Error</a> e</tt> to parse
--   as a JSON <tt><a>Value</a></tt> which is then re-encoded for the
--   exception message.
invalidProfileResponse :: Text -> OAuth2Error Value -> YesodOAuth2Exception

-- | A tuple of <tt>scope</tt> and the given scopes separated by a
--   delimiter
scopeParam :: Text -> [Text] -> (ByteString, ByteString)

-- | A helper for providing an optional value to credsExtra
maybeExtra :: Text -> Maybe Text -> [(Text, Text)]
instance GHC.Show.Show Yesod.Auth.OAuth2.YesodOAuth2Exception
instance GHC.Exception.Exception Yesod.Auth.OAuth2.YesodOAuth2Exception


-- | OAuth2 plugin for Battle.Net
--   
--   <ul>
--   <li>Authenticates against battle.net.</li>
--   <li>Uses user's id as credentials identifier.</li>
--   <li>Returns user's battletag in extras.</li>
--   </ul>
module Yesod.Auth.OAuth2.BattleNet
oAuth2BattleNet :: YesodAuth m => Text -> Text -> Text -> WidgetT m IO () -> AuthPlugin m
instance Data.Aeson.Types.FromJSON.FromJSON Yesod.Auth.OAuth2.BattleNet.BattleNetUser


-- | OAuth2 plugin for <a>http://bitbucket.com</a>
--   
--   <ul>
--   <li>Authenticates against bitbucket</li>
--   <li>Uses bitbucket uuid as credentials identifier</li>
--   <li>Returns email, username, full name, location and avatar as
--   extras</li>
--   </ul>
module Yesod.Auth.OAuth2.Bitbucket
oauth2Bitbucket :: YesodAuth m => Text -> Text -> AuthPlugin m
oauth2BitbucketScoped :: YesodAuth m => Text -> Text -> [Text] -> AuthPlugin m
instance Data.Aeson.Types.FromJSON.FromJSON Yesod.Auth.OAuth2.Bitbucket.BitbucketUser
instance Data.Aeson.Types.FromJSON.FromJSON Yesod.Auth.OAuth2.Bitbucket.BitbucketUserLinks
instance Data.Aeson.Types.FromJSON.FromJSON Yesod.Auth.OAuth2.Bitbucket.BitbucketLink
instance Data.Aeson.Types.FromJSON.FromJSON Yesod.Auth.OAuth2.Bitbucket.BitbucketEmailSearchResults
instance Data.Aeson.Types.FromJSON.FromJSON Yesod.Auth.OAuth2.Bitbucket.BitbucketUserEmail


-- | OAuth2 plugin for <a>http://eveonline.com</a>
--   
--   <ul>
--   <li>Authenticates against eveonline</li>
--   <li>Uses EVEs unique account-user-char-hash as credentials
--   identifier</li>
--   <li>Returns charName, charId, tokenType, accessToken and expires as
--   extras</li>
--   </ul>
module Yesod.Auth.OAuth2.EveOnline
oauth2Eve :: YesodAuth m => Text -> Text -> WidgetType m -> AuthPlugin m
oauth2EveScoped :: YesodAuth m => Text -> Text -> [Text] -> WidgetT m IO () -> AuthPlugin m
data WidgetType m

-- | Simple "Login via eveonline" text
Plain :: WidgetType m
BigWhite :: WidgetType m
SmallWhite :: WidgetType m
BigBlack :: WidgetType m
SmallBlack :: WidgetType m
Custom :: (WidgetT m IO ()) -> WidgetType m
instance Data.Aeson.Types.FromJSON.FromJSON Yesod.Auth.OAuth2.EveOnline.EveUser


-- | OAuth2 plugin for <a>http://github.com</a>
--   
--   <ul>
--   <li>Authenticates against github</li>
--   <li>Uses github user id as credentials identifier</li>
--   <li>Returns first_name, last_name, and email as extras</li>
--   </ul>
module Yesod.Auth.OAuth2.Github
oauth2Github :: YesodAuth m => Text -> Text -> AuthPlugin m
oauth2GithubScoped :: YesodAuth m => Text -> Text -> [Text] -> AuthPlugin m
instance Data.Aeson.Types.FromJSON.FromJSON Yesod.Auth.OAuth2.Github.GithubUser
instance Data.Aeson.Types.FromJSON.FromJSON Yesod.Auth.OAuth2.Github.GithubUserEmail


-- | OAuth2 plugin for <a>http://www.google.com</a>
--   
--   <ul>
--   <li>Authenticates against Google</li>
--   <li>Uses Google user id or email as credentials identifier</li>
--   <li>Returns given_name, family_name, email, and avatar_url as
--   extras</li>
--   </ul>
--   
--   Note: This may eventually replace Yesod.Auth.GoogleEmail2. Currently
--   it provides the same functionality except that GoogleEmail2 returns
--   more profile information.
module Yesod.Auth.OAuth2.Google

-- | Auth with Google
--   
--   Requests <tt>openid</tt> and <tt>email</tt> scopes and uses email as
--   the <tt><a>Creds</a></tt> identifier.
oauth2Google :: YesodAuth m => Text -> Text -> AuthPlugin m

-- | Auth with Google
--   
--   Requests custom scopes and uses email as the <tt><a>Creds</a></tt>
--   identifier.
oauth2GoogleScoped :: YesodAuth m => [Text] -> Text -> Text -> AuthPlugin m

-- | Auth with Google
--   
--   Requests custom scopes and uses the given function to create
--   credentials which allows for using any attribute as the identifier.
--   
--   See <tt><a>emailUid</a></tt> and <tt><a>googleUid</a></tt>.
oauth2GoogleScopedWithCustomId :: YesodAuth m => (GoogleUser -> OAuth2Token -> Creds m) -> [Text] -> Text -> Text -> AuthPlugin m

-- | Build a <tt><a>Creds</a></tt> using the user's google-uid as the
--   identifier
googleUid :: GoogleUser -> OAuth2Token -> Creds m

-- | Build a <tt><a>Creds</a></tt> using the user's email as the identifier
emailUid :: GoogleUser -> OAuth2Token -> Creds m
instance Data.Aeson.Types.FromJSON.FromJSON Yesod.Auth.OAuth2.Google.GoogleUser

module Yesod.Auth.OAuth2.Nylas
oauth2Nylas :: YesodAuth m => Text -> Text -> AuthPlugin m
instance Data.Aeson.Types.FromJSON.FromJSON Yesod.Auth.OAuth2.Nylas.NylasAccount


-- | OAuth2 plugin for <a>http://login.salesforce.com</a>
--   
--   <ul>
--   <li>Authenticates against Salesforce</li>
--   <li>Uses Salesforce user id as credentials identifier</li>
--   <li>Returns given_name, family_name, email and avatar_url as
--   extras</li>
--   </ul>
module Yesod.Auth.OAuth2.Salesforce
oauth2Salesforce :: YesodAuth m => Text -> Text -> AuthPlugin m
oauth2SalesforceScoped :: YesodAuth m => [Text] -> Text -> Text -> AuthPlugin m
oauth2SalesforceSandbox :: YesodAuth m => Text -> Text -> AuthPlugin m
oauth2SalesforceSandboxScoped :: YesodAuth m => [Text] -> Text -> Text -> AuthPlugin m
instance Data.Aeson.Types.FromJSON.FromJSON Yesod.Auth.OAuth2.Salesforce.User


-- | OAuth2 plugin for <a>https://slack.com/</a>
--   
--   <ul>
--   <li>Authenticates against slack</li>
--   <li>Uses slack user id as credentials identifier</li>
--   <li>Returns name, access_token, email, avatar, team_id, and team_name
--   as extras</li>
--   </ul>
module Yesod.Auth.OAuth2.Slack
data SlackScope
SlackEmailScope :: SlackScope
SlackTeamScope :: SlackScope
SlackAvatarScope :: SlackScope

-- | Auth with Slack
--   
--   Requests <tt>identity.basic</tt> scopes and uses the user's Slack ID
--   as the <tt><a>Creds</a></tt> identifier.
oauth2Slack :: YesodAuth m => Text -> Text -> AuthPlugin m

-- | Auth with Slack
--   
--   Requests custom scopes and uses the user's Slack ID as the
--   <tt><a>Creds</a></tt> identifier.
oauth2SlackScoped :: YesodAuth m => Text -> Text -> [SlackScope] -> AuthPlugin m
instance Data.Aeson.Types.FromJSON.FromJSON Yesod.Auth.OAuth2.Slack.SlackUser
instance Data.Aeson.Types.FromJSON.FromJSON Yesod.Auth.OAuth2.Slack.SlackTeam


-- | OAuth2 plugin for <a>http://spotify.com</a>
module Yesod.Auth.OAuth2.Spotify
oauth2Spotify :: YesodAuth m => Text -> Text -> [Text] -> AuthPlugin m
instance Data.Aeson.Types.FromJSON.FromJSON Yesod.Auth.OAuth2.Spotify.SpotifyUserImage
instance Data.Aeson.Types.FromJSON.FromJSON Yesod.Auth.OAuth2.Spotify.SpotifyUser


-- | OAuth2 plugin for <a>http://upcase.com</a>
--   
--   <ul>
--   <li>Authenticates against upcase</li>
--   <li>Uses upcase user id as credentials identifier</li>
--   <li>Returns first_name, last_name, and email as extras</li>
--   </ul>
module Yesod.Auth.OAuth2.Upcase
oauth2Upcase :: YesodAuth m => Text -> Text -> AuthPlugin m
instance Data.Aeson.Types.FromJSON.FromJSON Yesod.Auth.OAuth2.Upcase.UpcaseUser
instance Data.Aeson.Types.FromJSON.FromJSON Yesod.Auth.OAuth2.Upcase.UpcaseResponse
