ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
OAuthSignatureMethod_HMAC_SHA1 Class Reference
+ Inheritance diagram for OAuthSignatureMethod_HMAC_SHA1:
+ Collaboration diagram for OAuthSignatureMethod_HMAC_SHA1:

Public Member Functions

 get_name ()
 
 build_signature ($request, $consumer, $token)
 
- Public Member Functions inherited from OAuthSignatureMethod
 check_signature (&$request, $consumer, $token, $signature)
 

Detailed Description

Definition at line 81 of file OAuth.php.

Member Function Documentation

◆ build_signature()

OAuthSignatureMethod_HMAC_SHA1::build_signature (   $request,
  $consumer,
  $token 
)

Definition at line 88 of file OAuth.php.

References $OAuth_last_computed_signature, $token, and OAuthUtil\urlencode_rfc3986().

89  {
91  $OAuth_last_computed_signature = false;
92 
93  $base_string = $request->get_signature_base_string();
94  $request->base_string = $base_string;
95 
96  $key_parts = array(
97  $consumer->secret,
98  ($token) ? $token->secret : ""
99  );
100 
101  $key_parts = OAuthUtil::urlencode_rfc3986($key_parts);
102  $key = implode('&', $key_parts);
103 
104  $computed_signature = base64_encode(hash_hmac('sha1', $base_string, $key, true));
105  $OAuth_last_computed_signature = $computed_signature;
106  return $computed_signature;
107  }
static urlencode_rfc3986($input)
Definition: OAuth.php:747
$OAuth_last_computed_signature
http://oauth.googlecode.com/svn/code/php/
Definition: OAuth.php:8
$token
Definition: xapitoken.php:57
+ Here is the call graph for this function:

◆ get_name()

OAuthSignatureMethod_HMAC_SHA1::get_name ( )

Definition at line 83 of file OAuth.php.

84  {
85  return "HMAC-SHA1";
86  }

The documentation for this class was generated from the following file: