LTI Integration Library 4.10.3
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:
OAuthSignatureMethod_HMAC_SHA1 OAuthSignatureMethod_HMAC_SHA224 OAuthSignatureMethod_HMAC_SHA256 OAuthSignatureMethod_HMAC_SHA384 OAuthSignatureMethod_HMAC_SHA512

Public Member Functions

 get_name ()
 Needs to return the name of the Signature Method (eg HMAC-SHA1).
 
 build_signature ($request, $consumer, $token)
 Build up the signature.
 
 check_signature ($request, $consumer, $token, $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

Definition at line 17 of file OAuthSignatureMethod.php.

Member Function Documentation

◆ build_signature()

build_signature (   $request,
  $consumer,
  $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.

Referenced by OAuthSignatureMethod\check_signature().

◆ check_signature()

check_signature (   $request,
  $consumer,
  $token,
  $signature 
)

Verifies that a given signature is correct.

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

Definition at line 52 of file OAuthSignatureMethod.php.

References OAuthSignatureMethod\build_signature().

◆ get_name()

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.


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