mediawiki/oauthclient-php
PHP OAuth client to use with Wikipedia and other MediaWiki-based wikis running the OAuth extension.
Loading...
Searching...
No Matches
MediaWiki\OAuthClient\SignatureMethod Class Reference

A class for implementing a Signature Method See section 9 ("Signing Requests") in the spec. More...

+ Inheritance diagram for MediaWiki\OAuthClient\SignatureMethod:

Public Member Functions

 getName ()
 Needs to return the name of the Signature Method (ie HMAC-SHA1)
 
 buildSignature (Request $request, Consumer $consumer, Token $token=null)
 Build up the signature NOTE: The output of this function MUST NOT be urlencoded.
 
 checkSignature (Request $request, Consumer $consumer, $token, $signature)
 Verifies that a given signature is correct.
 

Detailed Description

A class for implementing a Signature Method See section 9 ("Signing Requests") in the spec.

Member Function Documentation

◆ buildSignature()

MediaWiki\OAuthClient\SignatureMethod::buildSignature ( Request  $request,
Consumer  $consumer,
Token  $token = null 
)
abstract

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

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

Parameters
Request$request
Consumer$consumer
Token | null$token
Returns
string

Reimplemented in MediaWiki\OAuthClient\SignatureMethod\HmacSha1, MediaWiki\OAuthClient\SignatureMethod\Plaintext, and MediaWiki\OAuthClient\SignatureMethod\RsaSha1.

◆ checkSignature()

MediaWiki\OAuthClient\SignatureMethod::checkSignature ( Request  $request,
Consumer  $consumer,
  $token,
  $signature 
)

Verifies that a given signature is correct.

Parameters
Request$request
Consumer$consumer
Token | null$token
string$signature
Returns
bool

Reimplemented in MediaWiki\OAuthClient\SignatureMethod\RsaSha1.

◆ getName()

MediaWiki\OAuthClient\SignatureMethod::getName ( )
abstract

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

Returns
string

Reimplemented in MediaWiki\OAuthClient\SignatureMethod\HmacSha1, MediaWiki\OAuthClient\SignatureMethod\Plaintext, and MediaWiki\OAuthClient\SignatureMethod\RsaSha1.


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