LTI Integration Library  3.1.0
PHP class library for building LTI integrations
OAuthToken.php
Go to the documentation of this file.
1 <?php
2 
3 namespace ceLTIc\LTI\OAuth;
4 
13 {
14 
15  // access tokens and request tokens
16  public $key;
17  public $secret;
18 
24  {
25  $this->key = $key;
26  $this->secret = $secret;
27  }
28 
33  function to_string()
34  {
35  return 'oauth_token=' .
36  OAuthUtil::urlencode_rfc3986($this->key) .
37  '&oauth_token_secret=' .
38  OAuthUtil::urlencode_rfc3986($this->secret);
39  }
40 
41  function __toString()
42  {
43  return $this->to_string();
44  }
45 
46 }
static urlencode_rfc3986($input)
Definition: OAuthUtil.php:15
__construct($key, $secret)
key = the token secret = the token secret
Definition: OAuthToken.php:23
to_string()
generates the basic string serialization of a token that a server would respond to request_token and ...
Definition: OAuthToken.php:33
Class to represent an OAuth Token.
Definition: OAuthToken.php:12