ILIAS  release_7 Revision v7.30-3-g800a261c036
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.

89 {
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 }
$OAuth_last_computed_signature
http://oauth.googlecode.com/svn/code/php/
Definition: OAuth.php:8
static urlencode_rfc3986($input)
Definition: OAuth.php:747
$token
Definition: xapitoken.php:52

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

+ 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: