Passed
Pull Request — master (#285)
by Tim
05:22 queued 03:08
created

NoAuthnContextException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 13
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\SAML2\Exception\Protocol;
6
7
use SimpleSAML\SAML2\Constants;
8
9
/**
10
 * A SAML error indicating that none of the requested AuthnContexts can be used.
11
 *
12
 * @package simplesamlphp/saml2
13
 */
14
class NoAuthnContextException extends AbstractProtocolException
15
{
16
    /**
17
     * NoAuthnContextException constructor.
18
     *
19
     * @param string $responsible A string telling who is responsible for this error. Can be one of the following:
20
     *   - \SimpleSAML\SAML2\Constants::STATUS_RESPONDER: in case the error is caused by this SAML responder.
21
     *   - \SimpleSAML\SAML2\Constants::STATUS_REQUESTER: in case the error is caused by the SAML requester.
22
     * @param string|null $message A short message explaining why this error happened.
23
     */
24
    public function __construct(string $responsible, string $message = null)
25
    {
26
        parent::__construct($responsible, Constants::STATUS_NO_AUTHN_CONTEXT, $message);
27
    }
28
}
29