Moodle PHP Documentation 4.4
Moodle 4.4.9+ (Build: 20250711) (4ea86454947)
IMSGlobal\LTI\OAuth\OAuthSignatureMethod_HMAC_SHA1 Class Reference

The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104] where the Signature Base String is the text and the key is the concatenated values (each first encoded per Parameter Encoding) of the Consumer Secret and Token Secret, separated by an '&' character (ASCII code 38) even if empty. More...

Inheritance diagram for IMSGlobal\LTI\OAuth\OAuthSignatureMethod_HMAC_SHA1:
IMSGlobal\LTI\OAuth\OAuthSignatureMethod

Public Member Functions

 build_signature ($request, $consumer, $token)
 Build up the signature NOTE: The output of this function MUST NOT be urlencoded.
 
 check_signature ($request, $consumer, $token, $signature)
 Verifies that a given signature is correct.
 
 get_name ()
 Needs to return the name of the Signature Method (ie HMAC-SHA1)
 

Detailed Description

The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104] where the Signature Base String is the text and the key is the concatenated values (each first encoded per Parameter Encoding) of the Consumer Secret and Token Secret, separated by an '&' character (ASCII code 38) even if empty.

  • Chapter 9.2 ("HMAC-SHA1")

Member Function Documentation

◆ build_signature()

IMSGlobal\LTI\OAuth\OAuthSignatureMethod_HMAC_SHA1::build_signature ( $request,
$consumer,
$token )

Build up the signature NOTE: The output of this function MUST NOT be urlencoded.

the encoding is handled in OAuthRequest when the final request is serialized

Parameters
OAuthRequest$request
OAuthConsumer$consumer
OAuthToken$token
Return values
string

Reimplemented from IMSGlobal\LTI\OAuth\OAuthSignatureMethod.

◆ check_signature()

IMSGlobal\LTI\OAuth\OAuthSignatureMethod::check_signature ( $request,
$consumer,
$token,
$signature )
inherited

Verifies that a given signature is correct.

Parameters
OAuthRequest$request
OAuthConsumer$consumer
OAuthToken$token
string$signature
Return values
bool

◆ get_name()

IMSGlobal\LTI\OAuth\OAuthSignatureMethod_HMAC_SHA1::get_name ( )

Needs to return the name of the Signature Method (ie HMAC-SHA1)

Return values
string

Reimplemented from IMSGlobal\LTI\OAuth\OAuthSignatureMethod.


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