ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
OAuthToken.php
Go to the documentation of this file.
1 <?php
2 
3 namespace IMSGlobal\LTI\OAuth;
4 
12 class OAuthToken {
13 
14  // access tokens and request tokens
15  public $key;
16  public $secret;
17 
22  function __construct($key, $secret) {
23  $this->key = $key;
24  $this->secret = $secret;
25  }
26 
31  function to_string() {
32  return 'oauth_token=' .
33  OAuthUtil::urlencode_rfc3986($this->key) .
34  '&oauth_token_secret=' .
35  OAuthUtil::urlencode_rfc3986($this->secret);
36  }
37 
38  function __toString() {
39  return $this->to_string();
40  }
41 
42 }
to_string()
generates the basic string serialization of a token that a server would respond to request_token and ...
Definition: OAuthToken.php:31
__construct($key, $secret)
key = the token secret = the token secret
Definition: OAuthToken.php:22
static urlencode_rfc3986($input)
Definition: OAuthUtil.php:14
Class to represent an OAuth Token.
Definition: OAuthToken.php:12