| @@ 13-35 (lines=23) @@ | ||
| 10 | ||
| 11 | use Leo108\CAS\Contracts\Responses\AuthenticationFailureResponse; |
|
| 12 | ||
| 13 | class JsonAuthenticationFailureResponse extends BaseJsonResponse implements AuthenticationFailureResponse |
|
| 14 | { |
|
| 15 | /** |
|
| 16 | * JsonAuthenticationFailureResponse constructor. |
|
| 17 | */ |
|
| 18 | public function __construct() |
|
| 19 | { |
|
| 20 | $this->data = ['serviceResponse' => ['authenticationFailure' => []]]; |
|
| 21 | } |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @param string $code |
|
| 25 | * @param string $description |
|
| 26 | * @return $this |
|
| 27 | */ |
|
| 28 | public function setFailure($code, $description) |
|
| 29 | { |
|
| 30 | $this->data['serviceResponse']['authenticationFailure']['code'] = $code; |
|
| 31 | $this->data['serviceResponse']['authenticationFailure']['description'] = $description; |
|
| 32 | ||
| 33 | return $this; |
|
| 34 | } |
|
| 35 | } |
|
| 36 | ||
| @@ 13-35 (lines=23) @@ | ||
| 10 | ||
| 11 | use Leo108\CAS\Contracts\Responses\ProxyFailureResponse; |
|
| 12 | ||
| 13 | class JsonProxyFailureResponse extends BaseJsonResponse implements ProxyFailureResponse |
|
| 14 | { |
|
| 15 | /** |
|
| 16 | * JsonProxyFailureResponse constructor. |
|
| 17 | */ |
|
| 18 | public function __construct() |
|
| 19 | { |
|
| 20 | $this->data = ['serviceResponse' => ['proxyFailure' => []]]; |
|
| 21 | } |
|
| 22 | ||
| 23 | /** |
|
| 24 | * @param string $code |
|
| 25 | * @param string $description |
|
| 26 | * @return $this |
|
| 27 | */ |
|
| 28 | public function setFailure($code, $description) |
|
| 29 | { |
|
| 30 | $this->data['serviceResponse']['proxyFailure']['code'] = $code; |
|
| 31 | $this->data['serviceResponse']['proxyFailure']['description'] = $description; |
|
| 32 | ||
| 33 | return $this; |
|
| 34 | } |
|
| 35 | } |
|
| 36 | ||