yesod-auth-oauth-1.6.1: OAuth Authentication for Yesod.
Safe HaskellNone
LanguageHaskell2010

Yesod.Auth.OAuth

Synopsis

Documentation

authOAuth Source #

Arguments

:: YesodAuth master 
=> OAuth

OAuth data-type for signing.

-> (Credential -> IO (Creds master))

How to extract ident.

-> AuthPlugin master 

authTwitter Source #

Arguments

:: YesodAuth m 
=> ByteString

Consumer Key

-> ByteString

Consumer Secret

-> AuthPlugin m 

Deprecated: Use authTwitterUsingUserId instead

This plugin uses Twitter's screen_name as ID, which shouldn't be used for authentication because it is mutable.

authTwitterUsingUserId Source #

Arguments

:: YesodAuth m 
=> ByteString

Consumer Key

-> ByteString

Consumer Secret

-> AuthPlugin m 

Twitter plugin which uses Twitter's user_id as ID.

For more information, see: https://github.com/yesodweb/yesod/pull/1168

Since: 1.4.1

authTumblr Source #

Arguments

:: YesodAuth m 
=> ByteString

Consumer Key

-> ByteString

Consumer Secret

-> AuthPlugin m 

def :: Default a => a #

newtype Credential #

Constructors

Credential 

Instances

Instances details
Data Credential 
Instance details

Defined in Web.Authenticate.OAuth

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Credential -> c Credential Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Credential Source #

toConstr :: Credential -> Constr Source #

dataTypeOf :: Credential -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Credential) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Credential) Source #

gmapT :: (forall b. Data b => b -> b) -> Credential -> Credential Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Credential -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Credential -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Credential -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Credential -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Credential -> m Credential Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Credential -> m Credential Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Credential -> m Credential Source #

Read Credential 
Instance details

Defined in Web.Authenticate.OAuth

Show Credential 
Instance details

Defined in Web.Authenticate.OAuth

Eq Credential 
Instance details

Defined in Web.Authenticate.OAuth

Ord Credential 
Instance details

Defined in Web.Authenticate.OAuth

newtype OAuthException #

Constructors

OAuthException String 

Instances

Instances details
Data OAuthException 
Instance details

Defined in Web.Authenticate.OAuth

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OAuthException -> c OAuthException Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OAuthException Source #

toConstr :: OAuthException -> Constr Source #

dataTypeOf :: OAuthException -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OAuthException) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OAuthException) Source #

gmapT :: (forall b. Data b => b -> b) -> OAuthException -> OAuthException Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OAuthException -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OAuthException -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> OAuthException -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> OAuthException -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> OAuthException -> m OAuthException Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OAuthException -> m OAuthException Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OAuthException -> m OAuthException Source #

Exception OAuthException 
Instance details

Defined in Web.Authenticate.OAuth

Show OAuthException 
Instance details

Defined in Web.Authenticate.OAuth

Eq OAuthException 
Instance details

Defined in Web.Authenticate.OAuth

data SignMethod #

Constructors

PLAINTEXT 
HMACSHA1 
HMACSHA256 
HMACSHA512 
RSASHA1 PrivateKey 
RSASHA256 PrivateKey 
RSASHA512 PrivateKey 

Instances

Instances details
Data SignMethod 
Instance details

Defined in Web.Authenticate.OAuth

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SignMethod -> c SignMethod Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SignMethod Source #

toConstr :: SignMethod -> Constr Source #

dataTypeOf :: SignMethod -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SignMethod) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SignMethod) Source #

gmapT :: (forall b. Data b => b -> b) -> SignMethod -> SignMethod Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SignMethod -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SignMethod -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> SignMethod -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SignMethod -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SignMethod -> m SignMethod Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SignMethod -> m SignMethod Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SignMethod -> m SignMethod Source #

Read SignMethod 
Instance details

Defined in Web.Authenticate.OAuth

Show SignMethod 
Instance details

Defined in Web.Authenticate.OAuth

Eq SignMethod 
Instance details

Defined in Web.Authenticate.OAuth

data OAuthVersion #

Constructors

OAuth10 
OAuth10a 

Instances

Instances details
Data OAuthVersion 
Instance details

Defined in Web.Authenticate.OAuth

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OAuthVersion -> c OAuthVersion Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OAuthVersion Source #

toConstr :: OAuthVersion -> Constr Source #

dataTypeOf :: OAuthVersion -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OAuthVersion) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OAuthVersion) Source #

gmapT :: (forall b. Data b => b -> b) -> OAuthVersion -> OAuthVersion Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OAuthVersion -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OAuthVersion -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> OAuthVersion -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> OAuthVersion -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> OAuthVersion -> m OAuthVersion Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OAuthVersion -> m OAuthVersion Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OAuthVersion -> m OAuthVersion Source #

Enum OAuthVersion 
Instance details

Defined in Web.Authenticate.OAuth

Read OAuthVersion 
Instance details

Defined in Web.Authenticate.OAuth

Show OAuthVersion 
Instance details

Defined in Web.Authenticate.OAuth

Eq OAuthVersion 
Instance details

Defined in Web.Authenticate.OAuth

Ord OAuthVersion 
Instance details

Defined in Web.Authenticate.OAuth

data OAuth #

Instances

Instances details
Default OAuth 
Instance details

Defined in Web.Authenticate.OAuth

Methods

def :: OAuth #

Data OAuth 
Instance details

Defined in Web.Authenticate.OAuth

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OAuth -> c OAuth Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OAuth Source #

toConstr :: OAuth -> Constr Source #

dataTypeOf :: OAuth -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OAuth) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OAuth) Source #

gmapT :: (forall b. Data b => b -> b) -> OAuth -> OAuth Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OAuth -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OAuth -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> OAuth -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> OAuth -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> OAuth -> m OAuth Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OAuth -> m OAuth Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OAuth -> m OAuth Source #

Read OAuth 
Instance details

Defined in Web.Authenticate.OAuth

Show OAuth 
Instance details

Defined in Web.Authenticate.OAuth

Eq OAuth 
Instance details

Defined in Web.Authenticate.OAuth

Methods

(==) :: OAuth -> OAuth -> Bool Source #

(/=) :: OAuth -> OAuth -> Bool Source #

signOAuth :: MonadIO m => OAuth -> Credential -> Request -> m Request #

genSign :: MonadIO m => OAuth -> Credential -> Request -> m ByteString #

checkOAuth :: forall (m :: Type -> Type). MonadIO m => OAuth -> Credential -> Request -> ExceptT OAuthException m Request #

getTemporaryCredentialProxy :: MonadIO m => Maybe Proxy -> OAuth -> Manager -> m Credential #

getTemporaryCredential' :: MonadIO m => (Request -> Request) -> OAuth -> Manager -> m Credential #

authorizeUrl' :: (OAuth -> Credential -> SimpleQuery) -> OAuth -> Credential -> String #

getAccessToken :: MonadIO m => OAuth -> Credential -> Manager -> m Credential #

getAccessTokenProxy :: MonadIO m => Maybe Proxy -> OAuth -> Credential -> Manager -> m Credential #

getAccessToken' :: MonadIO m => (Request -> Request) -> OAuth -> Credential -> Manager -> m Credential #

getTokenCredentialProxy :: MonadIO m => Maybe Proxy -> OAuth -> Credential -> Manager -> m Credential #

addAuthBody :: a -> Credential -> Request -> Request #

addScope :: ByteString -> Request -> Request #

addMaybeProxy :: Maybe Proxy -> Request -> Request #