Skip to content

Commit

Permalink
Merge branch 'dependabot/github_actions/all-actions-c28b1dc141'
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Feb 14, 2024
2 parents b97569d + 0eb2712 commit bd72060
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 24 deletions.
13 changes: 7 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,17 @@
"ext-dom": "*",
"ext-filter": "*",
"ext-libxml": "*",
"ext-SimpleXML": "*",

"simplesamlphp/assert": "^1.0",
"simplesamlphp/composer-module-installer": "^1.3.4",
"simplesamlphp/assert": "^1.1",
"simplesamlphp/composer-module-installer": "^1.3",
"simplesamlphp/simplesamlphp": "^2.1",
"simplesamlphp/xml-cas": "^1.0.3",
"simplesamlphp/xml-common": "^1.12.2",
"simplesamlphp/xml-soap": "^1.3.0"
"simplesamlphp/xml-cas": "^1.2",
"simplesamlphp/xml-common": "^1.16",
"simplesamlphp/xml-soap": "^1.4"
},
"require-dev": {
"simplesamlphp/simplesamlphp-test-framework": "^1.5.5"
"simplesamlphp/simplesamlphp-test-framework": "^1.5"
},
"support": {
"issues": "https://github.com/simplesamlphp/simplesamlphp-module-casserver/issues",
Expand Down
1 change: 1 addition & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<!-- Ignore files with side effects that we cannot fix -->
<rule ref="PSR1.Files.SideEffects">
<exclude-pattern>tests/bootstrap.php</exclude-pattern>
<exclude-pattern>tests/public/UtilsTest.php</exclude-pattern>
<exclude-pattern>tests/www/UtilsTest.php</exclude-pattern>
</rule>

Expand Down
1 change: 1 addition & 0 deletions psalm-dev.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<UnresolvableInclude>
<errorLevel type="suppress">
<file name="tests/bootstrap.php" />
<file name="tests/routers/configLoader.php" />
</errorLevel>
</UnresolvableInclude>
</issueHandlers>
Expand Down
4 changes: 2 additions & 2 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
reportMixedIssues="false"
>
<projectFiles>
<directory name="config-templates" />
<directory name="config" />
<directory name="public" />
<directory name="src" />
<directory name="www" />
</projectFiles>

<issueHandlers>
Expand Down
2 changes: 1 addition & 1 deletion public/utility/validateTicket.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
declare(strict_types=1);

use Exception;
use SimpleSAML\CAS\Constants as C;
use SimpleSAML\Configuration;
use SimpleSAML\Logger;
use SimpleSAML\Module;
use SimpleSAML\Utils;
use SimpleSAML\XML\CAS\Constants as C;

require_once('urlUtils.php');

Expand Down
7 changes: 2 additions & 5 deletions src/Cas/Protocol/Cas20.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
use SimpleSAML\CAS\XML\cas\AuthenticationDate;
use SimpleSAML\CAS\XML\cas\AuthenticationFailure;
use SimpleSAML\CAS\XML\cas\AuthenticationSuccess;
use SimpleSAML\CAS\XML\cas\Code;
use SimpleSAML\CAS\XML\cas\IsFromNewLogin;
use SimpleSAML\CAS\XML\cas\LongTermAuthenticationRequestTokenUsed;
use SimpleSAML\CAS\XML\cas\ProxyFailure;
Expand Down Expand Up @@ -170,8 +169,7 @@ public function getValidateSuccessResponse(string $username): AuthenticationSucc
*/
public function getValidateFailureResponse(string $errorCode, string $explanation): ServiceResponse
{
$code = new Code($errorCode);
$authenticationFailure = new AuthenticationFailure($explanation, $code);
$authenticationFailure = new AuthenticationFailure($explanation, $errorCode);
$serviceResponse = new ServiceResponse($authenticationFailure);

return $serviceResponse;
Expand Down Expand Up @@ -199,8 +197,7 @@ public function getProxySuccessResponse(string $proxyTicketId): ServiceResponse
*/
public function getProxyFailureResponse(string $errorCode, string $explanation): ServiceResponse
{
$code = new Code($errorCode);
$proxyFailure = new ProxyFailure($explanation, $code);
$proxyFailure = new ProxyFailure($explanation, $errorCode);
$serviceResponse = new ServiceResponse($proxyFailure);

return $serviceResponse;
Expand Down
6 changes: 3 additions & 3 deletions src/Cas/Protocol/SamlValidateResponder.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

use SimpleSAML\Configuration;
use SimpleSAML\Module\casserver\Shib13\AuthnResponse;
use SimpleSAML\SOAP11\XML\env\Body;
use SimpleSAML\SOAP11\XML\env\Envelope;
use SimpleSAML\XML\Chunk;
use SimpleSAML\XML\DOMDocumentFactory;
use SimpleSAML\XML\SerializableElementInterface;
use SimpleSAML\XML\SOAP11\XML\env\Body;
use SimpleSAML\XML\SOAP11\XML\env\Envelope;

class SamlValidateResponder
{
Expand Down Expand Up @@ -64,7 +64,7 @@ public function convertToSaml(array $ticket): Chunk

/**
* @param \SimpleSAML\XML\SerializableElementInterface $samlResponse
* @return \SimpleSAML\XML\SOAP11\XML\env\Envelope
* @return \SimpleSAML\SOAP11\XML\env\Envelope
*/
public function wrapInSoap(SerializableElementInterface $samlResponse): Envelope
{
Expand Down
2 changes: 1 addition & 1 deletion src/Cas/Ticket/TicketFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function createProxyGrantingTicket(array $content): array
*/
public function createProxyTicket(array $content): array
{
$randomUtils = Random();
$randomUtils = new Random();
$id = str_replace('_', 'PT-', $randomUtils->generateID());
$expiresAt = time() + $this->proxyTicketExpireTime;

Expand Down
2 changes: 1 addition & 1 deletion src/Cas/TicketValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
namespace SimpleSAML\Module\casserver\Cas;

use InvalidArgumentException;
use SimpleSAML\CAS\Constants as C;
use SimpleSAML\Configuration;
use SimpleSAML\Logger;
use SimpleSAML\Module;
use SimpleSAML\Module\casserver\Cas\CasException;
use SimpleSAML\Module\casserver\Cas\Ticket\TicketFactory;
use SimpleSAML\Module\casserver\Cas\Ticket\TicketStore;
use SimpleSAML\XML\CAS\Constants as C;

class TicketValidator
{
Expand Down
2 changes: 1 addition & 1 deletion src/Shib13/AuthnResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use DOMDocument;
use DOMNode;
use DOMNodeList;
use DOMXpath;
use DOMXPath;
use Exception;
use SimpleSAML\Assert\Assert;
use SimpleSAML\Configuration;
Expand Down
5 changes: 3 additions & 2 deletions tests/public/LoginIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace SimpleSAML\Casserver;

use CurlHandle;
use DOMDocument;
use PHPUnit\Framework\TestCase;
use SimpleSAML\Configuration;
Expand Down Expand Up @@ -452,10 +453,10 @@ private function authenticate(): void

/**
* TODO: migrate into BuiltInServer
* @param resource $ch
* @param \CurlHandle $ch
* @return array
*/
private function execAndHandleCurlResponse($ch): array
private function execAndHandleCurlResponse(CurlHandle $ch): array
{
$resp = curl_exec($ch);
if ($resp === false) {
Expand Down
2 changes: 1 addition & 1 deletion tests/src/Cas/Protocol/SamlValidateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function testSamlValidatXmlGeneration(): void

$asSoap = $samlValidate->wrapInSoap($xmlString);

$this->assertInstanceOf($asSoap, Envelope::class);
$this->assertInstanceOf(Envelope::class, $asSoap);
$this->assertNull($asSoap->getHeader());
$this->assertNotEmpty($asSoap->getBody());
}
Expand Down
4 changes: 3 additions & 1 deletion tools/composer-require-checker.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"symbol-whitelist": [
"ext-PDO"
"PDO",
"PDOException",
"PDOStatement"
]
}

0 comments on commit bd72060

Please sign in to comment.