Passed
Push — develop ( e65dcd...17c2da )
by Pieter van der
05:58
created

getVerificationMethodName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * This file is part of the tiqr project.
4
 *
5
 * The tiqr project aims to provide an open implementation for
6
 * authentication using mobile devices. It was initiated by
7
 * SURFnet and developed by Egeniq.
8
 *
9
 * More information: http://www.tiqr.org
10
 *
11
 * @author Ivo Jansch <[email protected]>
12
 *
13
 * @package tiqr
14
 *
15
 * @license New BSD License - See LICENSE file for details.
16
 *
17
 * @copyright (C) 2010-2012 SURFnet BV
18
 */
19
20 1
require_once("Tiqr/OcraService/Interface.php");
21
22
/**
23
 * The abstract class that defines what a ocra service class should implement.
24
 *
25
 * @author lineke
26
 *
27
 */
28
abstract class Tiqr_OcraService_Abstract implements Tiqr_OcraService_Interface
29
{
30
    /**
31
     * Verify the response
32
     * Override in child class to implement this method if this is the verification method to use
33
     *
34
     * @param string $response
35
     * @param string $userSecret
36
     * @param string $challenge
37
     * @param string $sessionKey
38
     *
39
     * @return boolean True if response matches, false otherwise
40
     */
41
    public function verifyResponseWithSecret($response, $userSecret, $challenge, $sessionKey)
42
    {
43
44
    }
45
46
    /**
47
     * Verify the response
48
     * Override in child class to implement this method if this is the verification method to use
49
     *
50
     * @param string $response
51
     * @param string $userId
52
     * @param string $challenge
53
     * @param string $sessionKey
54
     *
55
     * @return boolean True if response matches, false otherwise
56
     */
57
    public function verifyResponseWithUserId($response, $userId, $challenge, $sessionKey)
58
    {
59
60
    }
61
62
    /**
63
     * Returns which method name to use to verify the response (verifyResponseWithSecret or verifyResponseWithUserId)
64
     *
65
     * @return string
66
     */
67 1
    public function getVerificationMethodName()
68
    {
69 1
        return 'verifyResponseWithSecret';
70
    }
71
}