class OAuthToken in OAuth 1.0 6.3
Same name and namespace in other branches
- 6 OAuth.php \OAuthToken
- 7.3 lib/OAuth.php \OAuthToken
Hierarchy
- class \OAuthToken
Expanded class hierarchy of OAuthToken
File
- lib/
OAuth.php, line 35 - OAuth 1.0 server and client library.
View source
class OAuthToken {
// access tokens and request tokens
public $key;
public $secret;
/**
* key = the token
* secret = the token secret
*/
function __construct($key, $secret) {
$this->key = $key;
$this->secret = $secret;
}
/**
* generates the basic string serialization of a token that a server
* would respond to request_token and access_token calls with
*/
function to_string() {
return "oauth_token=" . OAuthUtil::urlencode_rfc3986($this->key) . "&oauth_token_secret=" . OAuthUtil::urlencode_rfc3986($this->secret) . "&oauth_callback_confirmed=true";
}
function __toString() {
return $this
->to_string();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
OAuthToken:: |
public | property | ||
OAuthToken:: |
public | property | ||
OAuthToken:: |
function | generates the basic string serialization of a token that a server would respond to request_token and access_token calls with | ||
OAuthToken:: |
function | key = the token secret = the token secret | 1 | |
OAuthToken:: |
function |