Cas10   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 3
dl 0
loc 26
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
A getValidateSuccessResponse() 0 3 1
A getValidateFailureResponse() 0 3 1
1
<?php
2
3
/*
4
 *    simpleSAMLphp-casserver is a CAS 1.0 and 2.0 compliant CAS server in the form of a simpleSAMLphp module
5
 *
6
 *    Copyright (C) 2013  Bjorn R. Jensen
7
 *
8
 *    This library is free software; you can redistribute it and/or
9
 *    modify it under the terms of the GNU Lesser General Public
10
 *    License as published by the Free Software Foundation; either
11
 *    version 2.1 of the License, or (at your option) any later version.
12
 *
13
 *    This library is distributed in the hope that it will be useful,
14
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
 *    Lesser General Public License for more details.
17
 *
18
 *    You should have received a copy of the GNU Lesser General Public
19
 *    License along with this library; if not, write to the Free Software
20
 *    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21
 *
22
 */
23
24
declare(strict_types=1);
25
26
namespace SimpleSAML\Module\casserver\Cas\Protocol;
27
28
use SimpleSAML\Configuration;
29
30
class Cas10
31
{
32
    /**
33
     * @param \SimpleSAML\Configuration $config
34
     */
35
    public function __construct(Configuration $config)
36
    {
37
    }
38
39
40
    /**
41
     * @param string $username
42
     * @return string
43
     */
44
    public function getValidateSuccessResponse(string $username): string
45
    {
46
        return "yes\n" . $username . "\n";
47
    }
48
49
50
    /**
51
     * @return string
52
     */
53
    public function getValidateFailureResponse(): string
54
    {
55
        return "no\n\n";
56
    }
57
}
58