LTI Integration Library 5.1.4
PHP class library for building LTI integrations
 
Loading...
Searching...
No Matches
OAuthSignatureMethod Class Reference

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

+ Inheritance diagram for 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 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 OAuthSignatureMethod_HMAC_SHA1, OAuthSignatureMethod_HMAC_SHA224, OAuthSignatureMethod_HMAC_SHA256, OAuthSignatureMethod_HMAC_SHA384, and OAuthSignatureMethod_HMAC_SHA512.

◆ check_signature()

bool 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 get_name ( )
abstract

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

Returns
string

Reimplemented in OAuthSignatureMethod_HMAC_SHA1, OAuthSignatureMethod_HMAC_SHA224, OAuthSignatureMethod_HMAC_SHA256, OAuthSignatureMethod_HMAC_SHA384, and OAuthSignatureMethod_HMAC_SHA512.