Skip to content

Commit 5baeee3

Browse files
authored
Resolve some TODOs #292
Merge pull request #292 from simplesamlphp/wip-version-6-cleanup
2 parents af500d3 + 765513f commit 5baeee3

File tree

66 files changed

+620
-534
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+620
-534
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ configuration.
2525

2626
Currently, the following OIDF features are supported:
2727
* automatic client registration using a Request Object (passing it by value)
28+
* federation participation limiting based on Trust Marks
2829
* endpoint for issuing configuration entity statement (statement about itself)
2930
* fetch endpoint for issuing statements about subordinates (registered clients)
3031

UPGRADE.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010
- Key rollover support - you can now define additional (new) private / public key pair which will be published on
1111
relevant JWKS endpoint or contained in JWKS property. In this way, you can "announce" new public key which can then
1212
be fetched by RPs, and do the switch between "old" and "new" key pair when you find appropriate.
13-
- OpenID capabilities
14-
- New federation endpoints:
15-
- endpoint for issuing configuration entity statement (statement about itself)
16-
- fetch endpoint for issuing statements about subordinates (registered clients)
13+
- OpenID Federation capabilities:
14+
- Automatic client registration using a Request Object (passing it by value)
15+
- Federation participation limiting based on Trust Marks
16+
- Endpoint for issuing configuration entity statement (statement about itself)
17+
- Fetch endpoint for issuing statements about subordinates (registered clients)
1718
- Clients can now be configured with new properties:
1819
- Entity Identifier
1920
- Supported OpenID Federation Registration Types

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"psr/container": "^2.0",
3232
"psr/log": "^3",
3333
"simplesamlphp/composer-module-installer": "^1.3",
34-
"simplesamlphp/openid": "dev-master",
34+
"simplesamlphp/openid": "^0",
3535
"spomky-labs/base64url": "^2.0",
3636
"symfony/expression-language": "^6.3",
3737
"symfony/psr-http-message-bridge": "^7.1",

rector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
]);
1717

1818
$rectorConfig->paths([
19-
// TODO mivanci also go trough commented out paths...
19+
// TODO v7 mivanci also go trough commented out paths...
2020
//__DIR__ . '/docker',
2121
//__DIR__ . '/hooks',
2222
//__DIR__ . '/public',

routing/routes/routes.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,4 @@
9696
$routes->add(RoutesEnum::FederationFetch->name, RoutesEnum::FederationFetch->value)
9797
->controller([EntityStatementController::class, 'fetch'])
9898
->methods([HttpMethodsEnum::GET->value]);
99-
100-
// TODO mivanci delete
101-
$routes->add('test', 'test')
102-
->controller(\SimpleSAML\Module\oidc\Controllers\Federation\Test::class);
10399
};

src/Bridges/SspBridge/Utils.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace SimpleSAML\Module\oidc\Bridges\SspBridge;
66

7+
use SimpleSAML\Utils\Attributes;
78
use SimpleSAML\Utils\Auth;
89
use SimpleSAML\Utils\Config;
910
use SimpleSAML\Utils\HTTP;
@@ -15,6 +16,7 @@ class Utils
1516
protected static ?HTTP $http = null;
1617
protected static ?Random $random = null;
1718
protected static ?Auth $auth = null;
19+
protected static ?Attributes $attributes = null;
1820

1921
public function config(): Config
2022
{
@@ -35,4 +37,9 @@ public function auth(): Auth
3537
{
3638
return self::$auth ??= new Auth();
3739
}
40+
41+
public function attributes(): Attributes
42+
{
43+
return self::$attributes ??= new Attributes();
44+
}
3845
}

src/Controllers/Admin/ClientController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ public function edit(Request $request): Response
299299
}
300300

301301
/**
302-
* TODO mivanci Move to ClientEntityFactory::fromRegistrationData on dynamic client registration implementation.
302+
* TODO v7 mivanci Move to ClientEntityFactory::fromRegistrationData on dynamic client registration implementation.
303303
* @throws \SimpleSAML\Module\oidc\Exceptions\OidcException
304304
*/
305305
protected function buildClientEntityFromFormData(

src/Controllers/EndSessionController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function __construct(
4141
*/
4242
public function __invoke(ServerRequestInterface $request): Response
4343
{
44-
// TODO Back-Channel Logout: https://openid.net/specs/openid-connect-backchannel-1_0.html
44+
// TODO v7 Back-Channel Logout: https://openid.net/specs/openid-connect-backchannel-1_0.html
4545
// [] Refresh tokens issued without the offline_access property to a session being logged out SHOULD
4646
// be revoked. Refresh tokens issued with the offline_access property normally SHOULD NOT be revoked.
4747
// - offline_access scope is now handled.
@@ -147,7 +147,7 @@ public static function logoutHandler(): void
147147
$sessionLogoutTickets = $sessionLogoutTicketStore->getAll();
148148

149149
if (!empty($sessionLogoutTickets)) {
150-
// TODO low mivanci This could brake since interface does not mandate type. Move to strong typing.
150+
// TODO v7 low mivanci This could brake since interface does not mandate type. Move to strong typing.
151151
/** @var array $sessionLogoutTicket */
152152
foreach ($sessionLogoutTickets as $sessionLogoutTicket) {
153153
$sid = (string)$sessionLogoutTicket['sid'];

src/Controllers/Federation/EntityStatementController.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function configuration(): Response
9595
)),
9696
ClaimsEnum::FederationFetchEndpoint->value =>
9797
$this->moduleConfig->getModuleUrl(RoutesEnum::FederationFetch->value),
98-
// TODO mivanci Add when ready. Use ClaimsEnum for keys.
98+
// TODO v7 mivanci Add when ready. Use ClaimsEnum for keys.
9999
// https://openid.net/specs/openid-federation-1_0.html#name-federation-entity
100100
//'federation_list_endpoint',
101101
//'federation_resolve_endpoint',
@@ -149,7 +149,7 @@ public function configuration(): Response
149149
$builder = $builder->withClaim(ClaimsEnum::TrustMarks->value, $trustMarks);
150150
}
151151

152-
// TODO mivanci Continue
152+
// TODO v7 mivanci Continue
153153
// Remaining claims, add if / when ready.
154154
// * crit
155155

@@ -235,14 +235,14 @@ public function fetch(Request $request): Response
235235
ClaimsEnum::PostLogoutRedirectUris->value => $client->getPostLogoutRedirectUri(),
236236
],
237237
)),
238-
// TODO mivanci Continue
238+
// TODO v7 mivanci Continue
239239
// https://openid.net/specs/openid-connect-registration-1_0.html#ClientMetadata
240240
// https://www.iana.org/assignments/oauth-parameters/oauth-parameters.xhtml#client-metadata
241241
],
242242
],
243243
);
244244

245-
// TODO mivanci Continue
245+
// TODO v7 mivanci Continue
246246
// Note: claims which can be present in subordinate statements:
247247
// * metadata_policy
248248
// * constraints

src/Controllers/Federation/Test.php

Lines changed: 0 additions & 152 deletions
This file was deleted.

0 commit comments

Comments
 (0)