Skip to content

Commit 4cdf7a4

Browse files
authored
Start testing with SSP 2.3 (#268)
* Change error code as per OIDF draft 41 * Explicitly mark nullable parameters * Add PHP v8.4 to GH PHP version matrix * Skip PHP v8.4 GH action check for now as psalm is not ready * Start testing with SSP v2.3 --------- Co-authored-by: Marko Ivančić <[email protected]>
1 parent 8c80c69 commit 4cdf7a4

24 files changed

+93
-82
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ PHP version requirement changes in minor releases for SimpleSAMLphp.
2626

2727
| OIDC module | Tested SimpleSAMLphp | PHP | Note |
2828
|:------------|:---------------------|:------:|-----------------------------|
29-
| v6.\* | v2.2.\* | \>=8.2 | Recommended |
29+
| v6.\* | v2.3.\* | \>=8.2 | Recommended |
3030
| v5.\* | v2.1.\* | \>=8.1 | |
3131
| v4.\* | v2.0.\* | \>=8.0 | |
3232
| v3.\* | v2.0.\* | \>=7.4 | Abandoned from August 2023. |
@@ -329,7 +329,7 @@ docker run --name ssp-oidc-dev \
329329
--mount type=bind,source="$(pwd)/docker/ssp/oidc_module.crt",target=/var/simplesamlphp/cert/oidc_module.crt,readonly \
330330
--mount type=bind,source="$(pwd)/docker/ssp/oidc_module.key",target=/var/simplesamlphp/cert/oidc_module.key,readonly \
331331
--mount type=bind,source="$(pwd)/docker/apache-override.cf",target=/etc/apache2/sites-enabled/ssp-override.cf,readonly \
332-
-p 443:443 cirrusid/simplesamlphp:v2.2.2
332+
-p 443:443 cirrusid/simplesamlphp:v2.3.5
333333
```
334334

335335
Visit https://localhost/simplesaml/ and confirm you get the default page.

UPGRADE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ has been refactored:
9191

9292
- upgraded to v5 of lcobucci/jwt https://github.com/lcobucci/jwt
9393
- upgraded to v3 of laminas/laminas-diactoros https://github.com/laminas/laminas-diactoros
94-
- SimpleSAMLphp version used during development was bumped to v2.2
94+
- SimpleSAMLphp version used during development was bumped to v2.3
9595
- In Authorization Code Flow, a new validation was added which checks for 'openid' value in 'scope' parameter. Up to
9696
now, 'openid' value was dynamically added if not present. In Implicit Code Flow this validation was already present.
9797

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"friendsofphp/php-cs-fixer": "^3",
4444
"phpunit/phpunit": "^10",
4545
"rector/rector": "^0.18.3",
46-
"simplesamlphp/simplesamlphp": "2.2.*",
46+
"simplesamlphp/simplesamlphp": "2.3.*",
4747
"simplesamlphp/simplesamlphp-test-framework": "^1.5",
4848
"squizlabs/php_codesniffer": "^3",
4949
"vimeo/psalm": "^5",
@@ -56,9 +56,10 @@
5656
},
5757
"sort-packages": true,
5858
"allow-plugins": {
59-
"simplesamlphp/composer-module-installer": true,
6059
"dealerdirect/phpcodesniffer-composer-installer": true,
61-
"phpstan/extension-installer": true
60+
"phpstan/extension-installer": true,
61+
"simplesamlphp/composer-module-installer": true,
62+
"simplesamlphp/composer-xmlprovider-installer": true
6263
},
6364
"cache-dir": "build/composer"
6465
},

docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#FROM cirrusid/simplesamlphp:v2.2.2
2-
FROM cicnavi/simplesamlphp:dev
1+
FROM cirrusid/simplesamlphp:v2.3.5
2+
#FROM cicnavi/simplesamlphp:dev
33

44
RUN apt-get update && apt-get install -y sqlite3
55
# Prepopulate the DB with items needed for testing

src/Admin/Menu.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function __construct(Item ...$items)
2020
array_push($this->items, ...$items);
2121
}
2222

23-
public function addItem(Item $menuItem, int $offset = null): void
23+
public function addItem(Item $menuItem, ?int $offset = null): void
2424
{
2525
$offset ??= count($this->items);
2626

src/Entities/AccessTokenEntity.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ public function __construct(
6565
DateTimeImmutable $expiryDateTime,
6666
CryptKey $privateKey,
6767
protected JsonWebTokenBuilderService $jsonWebTokenBuilderService,
68-
int|string $userIdentifier = null,
69-
string $authCodeId = null,
70-
array $requestedClaims = null,
71-
bool $isRevoked = false,
72-
Configuration $jwtConfiguration = null,
68+
int|string|null $userIdentifier = null,
69+
?string $authCodeId = null,
70+
?array $requestedClaims = null,
71+
?bool $isRevoked = false,
72+
?Configuration $jwtConfiguration = null,
7373
) {
7474
$this->setIdentifier($id);
7575
$this->setClient($clientEntity);

src/Entities/AuthCodeEntity.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ public function __construct(
4040
OAuth2ClientEntityInterface $client,
4141
array $scopes,
4242
DateTimeImmutable $expiryDateTime,
43-
string $userIdentifier = null,
44-
string $redirectUri = null,
45-
string $nonce = null,
43+
?string $userIdentifier = null,
44+
?string $redirectUri = null,
45+
?string $nonce = null,
4646
bool $isRevoked = false,
4747
) {
4848
$this->identifier = $id;

src/Factories/Entities/AccessTokenEntityFactory.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ public function fromData(
3131
OAuth2ClientEntityInterface $clientEntity,
3232
array $scopes,
3333
DateTimeImmutable $expiryDateTime,
34-
int|string $userIdentifier = null,
35-
string $authCodeId = null,
36-
array $requestedClaims = null,
37-
bool $isRevoked = false,
34+
int|string|null $userIdentifier = null,
35+
?string $authCodeId = null,
36+
?array $requestedClaims = null,
37+
?bool $isRevoked = false,
3838
): AccessTokenEntity {
3939
return new AccessTokenEntity(
4040
$id,

src/Factories/Entities/AuthCodeEntityFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ public function fromData(
2727
OAuth2ClientEntityInterface $client,
2828
array $scopes,
2929
DateTimeImmutable $expiryDateTime,
30-
string $userIdentifier = null,
31-
string $redirectUri = null,
32-
string $nonce = null,
30+
?string $userIdentifier = null,
31+
?string $redirectUri = null,
32+
?string $nonce = null,
3333
bool $isRevoked = false,
3434
): AuthCodeEntity {
3535
return new AuthCodeEntity(

src/Factories/Entities/ScopeEntityFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ class ScopeEntityFactory
1313
*/
1414
public function fromData(
1515
string $identifier,
16-
string $description = null,
17-
string $icon = null,
16+
?string $description = null,
17+
?string $icon = null,
1818
array $claims = [],
1919
): ScopeEntity {
2020
return new ScopeEntity(

0 commit comments

Comments
 (0)