authenticate-oauth-1.6.0.1: Library to authenticate with OAuth for Haskell web applications.

Safe HaskellNone
LanguageHaskell98

Web.Authenticate.OAuth.IO

Description

Deprecated: This module is deprecated; rewrite your code using MonadResource

This Module provides interface for the instance of MonadIO instead of MonadIO. What this module do is just adding withManager or runResourceT.

Synopsis

Documentation

def :: Default a => a #

The default value for this type.

newtype Credential Source #

Data type for credential.

Constructors

Credential 
Instances
Eq Credential Source # 
Instance details

Defined in Web.Authenticate.OAuth

Data Credential Source # 
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 #

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

toConstr :: Credential -> Constr #

dataTypeOf :: Credential -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord Credential Source # 
Instance details

Defined in Web.Authenticate.OAuth

Read Credential Source # 
Instance details

Defined in Web.Authenticate.OAuth

Show Credential Source # 
Instance details

Defined in Web.Authenticate.OAuth

data AccessTokenRequest Source #

Data type for getAccessTokenWith method.

You can create values of this type using defaultAccessTokenRequest.

Since 1.5.1

newtype OAuthException Source #

Constructors

OAuthException String 
Instances
Eq OAuthException Source # 
Instance details

Defined in Web.Authenticate.OAuth

Data OAuthException Source # 
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 #

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

toConstr :: OAuthException -> Constr #

dataTypeOf :: OAuthException -> DataType #

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

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

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

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

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

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

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

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

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

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

Show OAuthException Source # 
Instance details

Defined in Web.Authenticate.OAuth

Exception OAuthException Source # 
Instance details

Defined in Web.Authenticate.OAuth

data SignMethod Source #

Data type for signature method.

Instances
Eq SignMethod Source # 
Instance details

Defined in Web.Authenticate.OAuth

Data SignMethod Source # 
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 #

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

toConstr :: SignMethod -> Constr #

dataTypeOf :: SignMethod -> DataType #

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

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

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

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

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

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

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

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

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

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

Read SignMethod Source # 
Instance details

Defined in Web.Authenticate.OAuth

Show SignMethod Source # 
Instance details

Defined in Web.Authenticate.OAuth

data OAuthVersion Source #

Constructors

OAuth10

OAuth protocol ver 1.0 (no oauth_verifier; differs from RFC 5849).

OAuth10a

OAuth protocol ver 1.0a. This corresponds to community's 1.0a spec and RFC 5849.

Instances
Enum OAuthVersion Source # 
Instance details

Defined in Web.Authenticate.OAuth

Eq OAuthVersion Source # 
Instance details

Defined in Web.Authenticate.OAuth

Data OAuthVersion Source # 
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 #

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

toConstr :: OAuthVersion -> Constr #

dataTypeOf :: OAuthVersion -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord OAuthVersion Source # 
Instance details

Defined in Web.Authenticate.OAuth

Read OAuthVersion Source # 
Instance details

Defined in Web.Authenticate.OAuth

Show OAuthVersion Source # 
Instance details

Defined in Web.Authenticate.OAuth

data OAuth Source #

Data type for OAuth client (consumer).

The constructor for this data type is not exposed. Instead, you should use the def method or newOAuth function to retrieve a default instance, and then use the records below to make modifications. This approach allows us to add configuration options without breaking backwards compatibility.

Instances
Eq OAuth Source # 
Instance details

Defined in Web.Authenticate.OAuth

Methods

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

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

Data OAuth Source # 
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 #

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

toConstr :: OAuth -> Constr #

dataTypeOf :: OAuth -> DataType #

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

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

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

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

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

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

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

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

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

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

Read OAuth Source # 
Instance details

Defined in Web.Authenticate.OAuth

Show OAuth Source # 
Instance details

Defined in Web.Authenticate.OAuth

Methods

showsPrec :: Int -> OAuth -> ShowS #

show :: OAuth -> String #

showList :: [OAuth] -> ShowS #

Default OAuth Source # 
Instance details

Defined in Web.Authenticate.OAuth

Methods

def :: OAuth #

newOAuth :: OAuth Source #

Default value for OAuth datatype. You must specify at least oauthServerName, URIs and Tokens.

defaultAccessTokenRequest :: OAuth -> Credential -> Manager -> AccessTokenRequest Source #

Create a value of type AccessTokenRequest with default values filled in.

Note that this is a settings type. More information on usage can be found at: http://www.yesodweb.com/book/settings-types.

Since 1.5.1

newCredential Source #

Arguments

:: ByteString

value for oauth_token

-> ByteString

value for oauth_token_secret

-> Credential 

Convenient function to create Credential with OAuth Token and Token Secret.

emptyCredential :: Credential Source #

Empty credential.

insert Source #

Arguments

:: ByteString

Parameter Name

-> ByteString

Value

-> Credential

Credential

-> Credential

Result

Insert an oauth parameter into given Credential.

inserts :: [(ByteString, ByteString)] -> Credential -> Credential Source #

Convenient method for inserting multiple parameters into credential.

delete Source #

Arguments

:: ByteString

Parameter name

-> Credential

Credential

-> Credential

Result

Remove an oauth parameter for key from given Credential.

injectVerifier :: ByteString -> Credential -> Credential Source #

Insert oauth-verifier on a Credential.

signOAuth Source #

Arguments

:: MonadIO m 
=> OAuth

OAuth Application

-> Credential

Credential

-> Request

Original Request

-> m Request

Signed OAuth Request

Add OAuth headers & sign to Request.

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

Generate OAuth signature. Used by signOAuth.

checkOAuth :: MonadIO m => OAuth -> Credential -> Request -> ExceptT OAuthException m Request Source #

Test existing OAuth signature. Since 1.5.2

authorizeUrl Source #

Arguments

:: OAuth

OAuth Application

-> Credential

Temporary Credential (Request Token & Secret)

-> String

URL to authorize

URL to obtain OAuth verifier.

authorizeUrl' Source #

Arguments

:: (OAuth -> Credential -> SimpleQuery) 
-> OAuth

OAuth Application

-> Credential

Temporary Credential (Request Token & Secret)

-> String

URL to authorize

Convert OAuth and Credential to URL to authorize. This takes function to choice parameter to pass to the server other than oauth_callback or oauth_token.

getAccessTokenWith Source #

Arguments

:: MonadIO m 
=> AccessTokenRequest

extensible parameters

-> m (Either (Response ByteString) Credential)

Token Credential (Access Token & Secret) or the conduit response on failures

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

Place the authentication information in a URL encoded body instead of the Authorization header.

Note that the first parameter is used for realm in addAuthHeader, and this function needs the same type. The parameter, however, is unused.

Since 1.5.1

paramEncode :: ByteString -> ByteString Source #

Encode a string using the percent encoding method for OAuth.

getAccessToken Source #

Arguments

:: MonadIO m 
=> OAuth

OAuth Application

-> Credential

Temporary Credential with oauth_verifier

-> m Credential

Token Credential (Access Token & Secret)

Get Access token.

getTemporaryCredential Source #

Arguments

:: MonadIO m 
=> OAuth

OAuth Application

-> m Credential

Temporary Credential (Request Token & Secret).

Get temporary credential for requesting acces token.

getTemporaryCredentialWithScope Source #

Arguments

:: MonadIO m 
=> ByteString

Scope parameter string

-> OAuth

OAuth Application

-> m Credential

Temporay Credential (Request Token & Secret).

Get temporary credential for requesting access token with Scope parameter.

getTemporaryCredentialProxy Source #

Arguments

:: MonadIO m 
=> Maybe Proxy

Proxy

-> OAuth

OAuth Application

-> m Credential

Temporary Credential (Request Token & Secret).

Get temporary credential for requesting access token via the proxy.

getTemporaryCredential' Source #

Arguments

:: MonadIO m 
=> (Request -> Request)

Request Hook

-> OAuth

OAuth Application

-> m Credential

Temporary Credential (Request Token & Secret).

getTokenCredential Source #

Arguments

:: MonadIO m 
=> OAuth

OAuth Application

-> Credential

Temporary Credential with oauth_verifier

-> m Credential

Token Credential (Access Token & Secret)

Get Access token.

getAccessTokenProxy Source #

Arguments

:: MonadIO m 
=> Maybe Proxy

Proxy

-> OAuth

OAuth Application

-> Credential

Temporary Credential with oauth_verifier

-> m Credential

Token Credential (Access Token & Secret)

Get Access token via the proxy.

getTokenCredentialProxy Source #

Arguments

:: MonadIO m 
=> Maybe Proxy

Proxy

-> OAuth

OAuth Application

-> Credential

Temporary Credential with oauth_verifier

-> m Credential

Token Credential (Access Token & Secret)

Get Access token via the proxy.

getAccessToken' Source #

Arguments

:: MonadIO m 
=> (Request -> Request)

Request Hook

-> OAuth

OAuth Application

-> Credential

Temporary Credential with oauth_verifier

-> m Credential

Token Credential (Access Token & Secret)