Skip to content

Commit

Permalink
Start with EntityStatement controller
Browse files Browse the repository at this point in the history
  • Loading branch information
cicnavi committed May 20, 2024
1 parent 3ce0aba commit 66c00db
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
2 changes: 2 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
- TODO implement store for different entities?: i.e. client data can use RDB like mysql, whilst short term data
like tokens can utilize faster stores like memcache, redis...
- TODO move to SimpleSAMLphp ProcessingChain
- TODO OpenID Federation capabilities
- [ ] Expose OP configuration entity statement (statement about itself)

## Major impact changes
- TODO move away from SSP database as store; move to custom store interface
Expand Down
8 changes: 7 additions & 1 deletion routing/routes/routes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,10 @@

openid-configuration:
path: openid-configuration
controller: SimpleSAML\Module\oidc\Controller\ConfigurationDiscoveryController
controller: SimpleSAML\Module\oidc\Controller\ConfigurationDiscoveryController

# Federation related routes
# https://openid.net/specs/openid-federation-1_0.html#name-federation-entity-configura
openid-federation-entity-statement-configuration:
path: openid-federation
controller: SimpleSAML\Module\oidc\Controller\Federation\EntityStatementController::configuration
29 changes: 29 additions & 0 deletions src/Controller/Federation/EntityStatementController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

declare(strict_types=1);

namespace SimpleSAML\Module\oidc\Controller\Federation;

use SimpleSAML\Module\oidc\Services\JsonWebTokenBuilderService;
use SimpleSAML\Module\oidc\Services\OpMetadataService;
use Symfony\Component\HttpFoundation\Response;

class EntityStatementController
{
public function __construct(
private readonly JsonWebTokenBuilderService $jsonWebTokenBuilderService,
private readonly OpMetadataService $opMetadataService,
) {
}

/**
* Return the JWS with the OP configuration statement. openid-federation
* @return Response
*/
public function configuration(): Response
{
// TODO mivanci Adjust JsonWebTokenBuilderService to accommodate new federation capabilities
$jws = '';
return new Response($jws);
}
}

0 comments on commit 66c00db

Please sign in to comment.