50563e79485753ba9b46d3df68ca0f7009396cf4
[WP-Plugins/glm-member-db-registrations.git] /
1 <?php
2 namespace PayPal\Auth\Oauth;
3 class OAuthToken {
4         // access tokens and request tokens
5         public $key;
6         public $secret;
7
8         /**
9          * key = the token
10          * secret = the token secret
11          */
12         function __construct($key, $secret) {
13                 $this->key = $key;
14                 $this->secret = $secret;
15         }
16
17         /**
18          * generates the basic string serialization of a token that a server
19          * would respond to request_token and access_token calls with
20          */
21         function to_string() {
22                 return "oauth_token=" .
23                 OAuthUtil::urlencode_rfc3986($this->key) .
24            "&oauth_token_secret=" .
25                 OAuthUtil::urlencode_rfc3986($this->secret);
26         }
27
28         function __toString() {
29                 return $this->to_string();
30         }
31 }