Pike v8.0 release 1738

Module Web.Auth.OAuth

Description

OAuth module

Example

import Web.Auth.OAuth;

 string endpoint = "http://twitter.com/users/show.xml";

 Consumer consumer = Consumer(my_consumer_key, my_consumer_secret);
 Token    token    = Token(my_access_token_key, my_access_token_secret);
 Params   params   = Params(Param("user_id", 12345));
 Request  request  = request(consumer, token, params);

 request->sign_request(Signature.HMAC_SHA1, consumer, token);
 Protocols.HTTP.Query query = request->submit();

 if (query->status != 200)
   error("Bad response status: %d\n", query->status);

 werror("Data is: %s\n", query->data());

Constant CALLBACK_KEY

constant string Web.Auth.OAuth.CALLBACK_KEY

Description

Query string variable name for a callback URL.


Constant CONSUMER_KEY_KEY

constant string Web.Auth.OAuth.CONSUMER_KEY_KEY

Description

Query string variable name for the consumer key.


Constant NONCE_KEY

constant string Web.Auth.OAuth.NONCE_KEY

Description

Query string variable name for the nonce.


Constant SIGNATURE_KEY

constant string Web.Auth.OAuth.SIGNATURE_KEY

Description

Query string variable name for the signature.


Constant SIGNATURE_METHOD_KEY

constant string Web.Auth.OAuth.SIGNATURE_METHOD_KEY

Description

Query string variable name for the signature method.


Constant TIMESTAMP_KEY

constant string Web.Auth.OAuth.TIMESTAMP_KEY

Description

Query string variable name for the timestamp.


Constant TOKEN_KEY

constant string Web.Auth.OAuth.TOKEN_KEY

Description

Query string variable name for the token key.


Constant TOKEN_SECRET_KEY

constant string Web.Auth.OAuth.TOKEN_SECRET_KEY

Description

Query string variable name for the token secret.


Constant VERSION

constant string Web.Auth.OAuth.VERSION

Description

Verion


Constant VERSION_KEY

constant string Web.Auth.OAuth.VERSION_KEY

Description

Query string variable name for the version.