Skip to content

Commit 8fb020d

Browse files
committed
minor fixes
1 parent 332a5f6 commit 8fb020d

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

src/Controller/Cas20Controller.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,17 +112,19 @@ public function serviceValidate(
112112
* acquired proxy-granting tickets and will be proxying authentication to back-end services.
113113
*
114114
* @param Request $request
115-
* @param string|null $targetService [REQUIRED] - the service identifier of the back-end service.
116-
* @param string|null $pgt [REQUIRED] - the proxy-granting ticket acquired by the service
117-
* during service ticket or proxy ticket validation.
115+
* @param string|null $targetService [REQUIRED] - the service identifier of the back-end service.
116+
* @param string|null $pgt [REQUIRED] - the proxy-granting ticket acquired by the service
117+
* during service ticket or proxy ticket validation.
118118
*
119119
* @return XmlResponse
120+
* @throws \ErrorException
120121
*/
121122
public function proxy(
122123
Request $request,
123124
#[MapQueryParameter] ?string $targetService = null,
124125
#[MapQueryParameter] ?string $pgt = null,
125126
): XmlResponse {
127+
// NOTE: Here we do not override the configuration
126128
$legal_target_service_urls = $this->casConfig->getOptionalValue('legal_target_service_urls', []);
127129
// Fail if
128130
$message = match (true) {

src/Controller/Traits/TicketValidatorTrait.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function validate(
4949

5050
try {
5151
// Get the service ticket
52-
// `getTicket` uses the unserializable method and Objects may throw Throwables in their
52+
// `getTicket` uses the unserializable method and Objects may throw "Throwables" in their
5353
// un-serialization handlers.
5454
$serviceTicket = $this->ticketStore->getTicket($ticket);
5555
} catch (\Exception $e) {
@@ -58,7 +58,7 @@ public function validate(
5858
$messagePostfix = ': ' . var_export($e->getMessage(), true);
5959
}
6060
$message = 'casserver:serviceValidate: internal server error' . $messagePostfix;
61-
Logger::error($message);
61+
Logger::error(__METHOD__ . '::' . $message);
6262

6363
return new XmlResponse(
6464
(string)$this->cas20Protocol->getValidateFailureResponse(C::ERR_INTERNAL_ERROR, $message),
@@ -86,7 +86,7 @@ public function validate(
8686

8787
if ($failed) {
8888
$finalMessage = 'casserver:validate: ' . $message;
89-
Logger::error($finalMessage);
89+
Logger::error(__METHOD__ . '::' . $finalMessage);
9090

9191
return new XmlResponse(
9292
(string)$this->cas20Protocol->getValidateFailureResponse(C::ERR_INVALID_SERVICE, $message),
@@ -119,7 +119,7 @@ public function validate(
119119

120120
if ($failed) {
121121
$finalMessage = 'casserver:validate: ' . $message;
122-
Logger::error($finalMessage);
122+
Logger::error(__METHOD__ . '::' . $finalMessage);
123123

124124
return new XmlResponse(
125125
(string)$this->cas20Protocol->getValidateFailureResponse(C::ERR_INVALID_SERVICE, $message),

src/Controller/Traits/UrlTrait.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212
trait UrlTrait
1313
{
1414
/**
15-
* @deprecated
16-
* @see ServiceValidator
17-
* @param string $service
18-
* @param array $legal_service_urls
15+
* @param string $service
16+
* @param array $legal_service_urls
17+
*
1918
* @return bool
19+
* @throws \ErrorException
20+
* @see ServiceValidator
2021
*/
2122
public function checkServiceURL(string $service, array $legal_service_urls): bool
2223
{

0 commit comments

Comments
 (0)