Skip to content

Commit d516e62

Browse files
committed
Fix CI
1 parent b7cc8ff commit d516e62

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

.github/workflows/php.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117
with:
118118
php-version: ${{ matrix.php-versions }}
119119
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix,\
120-
session, sodium, spl, xml
120+
session, sodium, spl, xml, zip
121121
tools: composer
122122
ini-values: error_reporting=E_ALL
123123
coverage: none

src/Auth/Source/YubiKey.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,19 @@ class YubiKey extends Auth\Source
3939
/**
4040
* The string used to identify our states.
4141
*/
42-
public const STAGEID = '\SimpleSAML\Module\authYubiKey\Auth\Source\YubiKey.state';
42+
public const string STAGEID = '\SimpleSAML\Module\authYubiKey\Auth\Source\YubiKey.state';
4343

4444
/**
4545
* The number of characters of the OTP that is the secure token.
4646
* The rest is the user id.
4747
*/
48-
public const TOKENSIZE = 32;
48+
public const int TOKENSIZE = 32;
4949

5050
/**
5151
* The key of the AuthId field in the state.
5252
*/
53-
public const AUTHID = '\SimpleSAML\Module\authYubiKey\Auth\Source\YubiKey.AuthId';
53+
public const string AUTHID = '\SimpleSAML\Module\authYubiKey\Auth\Source\YubiKey.AuthId';
54+
5455

5556
/**
5657
* The client id/key for use with the Auth_Yubico PHP module.

tests/src/Controller/YubikeyTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ public function testOtpNoState(): void
6363
$c = new Controller\Yubikey($this->config, $this->session);
6464

6565
$this->expectException(Error\BadRequest::class);
66-
$this->expectExceptionMessage("BADREQUEST('%REASON%' => 'Missing AuthState parameter.')");
66+
$this->expectExceptionMessage(
67+
'{"errorCode":"BADREQUEST","%REASON%":"Missing AuthState parameter."}',
68+
);
6769

6870
$c->main($request);
6971
}
@@ -110,6 +112,7 @@ public function __construct(array $info, array $config)
110112
{
111113
}
112114

115+
113116
public static function handleLogin(string $authStateId, string $otp): ?string
114117
{
115118
return 'WRONGUSERPASS';

0 commit comments

Comments
 (0)