Completed
Push — master ( 1425f5...557488 )
by Дмитрий
05:01 queued 02:42
created

AbstractSignatureMethod::checkSignature()   A

Complexity

Conditions 5
Paths 4

Size

Total Lines 18
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 30

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 18
rs 9.6111
c 0
b 0
f 0
ccs 0
cts 10
cp 0
cc 5
nc 4
nop 4
crap 30
1
<?php
2
/**
3
 * SocialConnect project
4
 * @author: Patsura Dmitry https://github.com/ovr <[email protected]>
5
 */
6
declare(strict_types=1);
7
8
namespace SocialConnect\OAuth1\Signature;
9
10
use SocialConnect\Provider\Consumer;
11
use SocialConnect\OAuth1\Token;
12
13
abstract class AbstractSignatureMethod
14
{
15
    /**
16
     * Needs to return the name of the Signature Method (ie HMAC-SHA1)
17
     *
18
     * @return string
19
     */
20
    abstract public function getName();
21
22
    /**
23
     * Build up the signature
24
     * NOTE: The output of this function MUST NOT be urlencoded.
25
     * the encoding is handled in OAuthRequest when the final
26
     * request is serialized
27
     *
28
     * @param string $signatureBase
29
     * @param Consumer $consumer
30
     * @param Token $token
31
     * @return string
32
     */
33
    abstract public function buildSignature(string $signatureBase, Consumer $consumer, Token $token);
34
}
35