Completed
Push — master ( 80937c...137639 )
by Paul
08:49
created

AuthenticationResponse   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 33
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
/**
3
 *
4
 * @copyright (c) 2015, Paul Sohier
5
 * @copyright (c) 2014 Yubico AB
6
 * @license BSD-2-Clause
7
 *
8
 *
9
 * Orignal Copyright:
10
 * Copyright (c) 2014 Yubico AB
11
 * All rights reserved.
12
 *
13
 * Redistribution and use in source and binary forms, with or without
14
 * modification, are permitted provided that the following conditions are
15
 * met:
16
 *
17
 *   * Redistributions of source code must retain the above copyright
18
 *     notice, this list of conditions and the following disclaimer.
19
 *
20
 *   * Redistributions in binary form must reproduce the above
21
 *     copyright notice, this list of conditions and the following
22
 *     disclaimer in the documentation and/or other materials provided
23
 *     with the distribution.
24
 *
25
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36
 */
37
38
namespace paul999\u2f;
39
40
/**
41
 * Class for building up an authentication request
42
 *
43
 * @package u2flib_server
44
 */
45
class AuthenticationResponse
46
{
47
    /**
48
     * RegisterResponse constructor.
49
     * @param $signatureData
50
     * @param string $clientData
51
     * @param $keyHandle
52
     * @param string $errorCode
53
     */
54
    public function __construct($signatureData, $clientData, $keyHandle, $errorCode = null)
55
    {
56
        $this->signatureData    = $signatureData;
57
        $this->clientData       = $clientData;
58
        $this->keyHandle        = $keyHandle;
59
        $this->errorCode        = $errorCode;
60
    }
61
62
    /**
63
     * @var string signatureData
64
     */
65
    public $signatureData;
66
67
    /** @var string client data */
68
    public $clientData;
69
70
    /**
71
     * @var string keyHandle
72
     */
73
    public $keyHandle;
74
75
    /** @var string errorCode from the browser */
76
    public $errorCode;
77
}