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\RsaSha1 Class Reference

The RSA-SHA1 signature method uses the RSASSA-PKCS1-v1_5 signature algorithm as defined in [RFC3447] section 8.2 (more simply known as PKCS#1), using SHA-1 as the hash function for EMSA-PKCS1-v1_5. More...

+ Inheritance diagram for MediaWiki\OAuthClient\SignatureMethod\RsaSha1:
+ Collaboration diagram for MediaWiki\OAuthClient\SignatureMethod\RsaSha1:

Public Member Functions

 getName ()
 
 buildSignature (Request $request, Consumer $consumer, ?Token $token=null)
 
 checkSignature (Request $request, Consumer $consumer, $token, $signature)
 

Protected Member Functions

 fetchPublicCert (Request $request)
 Up to the SP to implement this lookup of keys.
 
 fetchPrivateCert (Request $request)
 Up to the SP to implement this lookup of keys.
 

Detailed Description

The RSA-SHA1 signature method uses the RSASSA-PKCS1-v1_5 signature algorithm as defined in [RFC3447] section 8.2 (more simply known as PKCS#1), using SHA-1 as the hash function for EMSA-PKCS1-v1_5.

It is assumed that the Consumer has provided its RSA public key in a verified way to the Service Provider, in a manner which is beyond the scope of this specification.

  • Chapter 9.3 ("RSA-SHA1")

Member Function Documentation

◆ buildSignature()

MediaWiki\OAuthClient\SignatureMethod\RsaSha1::buildSignature ( Request $request,
Consumer $consumer,
?Token $token = null )
Parameters
Request$request
Consumer$consumer
Token | null$token
Returns
string

Reimplemented from MediaWiki\OAuthClient\SignatureMethod.

◆ checkSignature()

MediaWiki\OAuthClient\SignatureMethod\RsaSha1::checkSignature ( Request $request,
Consumer $consumer,
$token,
$signature )
Parameters
Request$request
Consumer$consumer
Token | null$token
string$signature
Returns
bool

Reimplemented from MediaWiki\OAuthClient\SignatureMethod.

◆ fetchPrivateCert()

MediaWiki\OAuthClient\SignatureMethod\RsaSha1::fetchPrivateCert ( Request $request)
abstractprotected

Up to the SP to implement this lookup of keys.

Possible ideas are: (1) do a lookup in a table of trusted certs keyed off of consumer Either way should return a string representation of the certificate

Parameters
Request$request

◆ fetchPublicCert()

MediaWiki\OAuthClient\SignatureMethod\RsaSha1::fetchPublicCert ( Request $request)
abstractprotected

Up to the SP to implement this lookup of keys.

Possible ideas are: (1) do a lookup in a table of trusted certs keyed off of consumer (2) fetch via http using a url provided by the requester (3) some sort of specific discovery code based on request Either way should return a string representation of the certificate

Parameters
Request$request

◆ getName()

MediaWiki\OAuthClient\SignatureMethod\RsaSha1::getName ( )
Returns
string

Reimplemented from MediaWiki\OAuthClient\SignatureMethod.


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