LTI Integration Library 5.2.0
PHP class library for building LTI integrations
 
Loading...
Searching...
No Matches
ceLTIc\LTI\OAuth\OAuthSignatureMethod Class Reference

Class to represent an OAuth signature method. More...

+ Inheritance diagram for ceLTIc\LTI\OAuth\OAuthSignatureMethod:

Public Member Functions

string get_name ()
 Needs to return the name of the Signature Method (eg HMAC-SHA1).
 
string build_signature (OAuthRequest $request, OAuthConsumer $consumer, ?OAuthToken $token)
 Build up the signature.
 
bool check_signature (OAuthRequest $request, OAuthConsumer $consumer, ?OAuthToken $token, string $signature)
 Verifies that a given signature is correct.
 

Detailed Description

Class to represent an OAuth signature method.

Version
2008-08-04
Licence: https://opensource.org/licenses/MIT The MIT License
A class for implementing a Signature Method See section 9 ("Signing Requests") in the spec

Member Function Documentation

◆ build_signature()

string ceLTIc\LTI\OAuth\OAuthSignatureMethod::build_signature ( OAuthRequest $request,
OAuthConsumer $consumer,
?OAuthToken $token )
abstract

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$requestRequest
OAuthConsumer$consumerConsumer
OAuthToken$tokenToken
Returns
string

Reimplemented in ceLTIc\LTI\OAuth\OAuthSignatureMethod_HMAC_SHA1, ceLTIc\LTI\OAuth\OAuthSignatureMethod_HMAC_SHA224, ceLTIc\LTI\OAuth\OAuthSignatureMethod_HMAC_SHA256, ceLTIc\LTI\OAuth\OAuthSignatureMethod_HMAC_SHA384, and ceLTIc\LTI\OAuth\OAuthSignatureMethod_HMAC_SHA512.

◆ check_signature()

bool ceLTIc\LTI\OAuth\OAuthSignatureMethod::check_signature ( OAuthRequest $request,
OAuthConsumer $consumer,
?OAuthToken $token,
string $signature )

Verifies that a given signature is correct.

Parameters
OAuthRequest$request
OAuthConsumer$consumer
OAuthToken$token
string$signature
Returns
bool

◆ get_name()

string ceLTIc\LTI\OAuth\OAuthSignatureMethod::get_name ( )
abstract