Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a65b801
Added ResponseMode interface with FragmentResponseMode and QueryRespo…
Harm-r May 6, 2026
948f7e8
Start of form_post response mode, hardcoded for now
Harm-r May 6, 2026
b0073a5
First version of form_post
Harm-r May 6, 2026
fe659be
Added allowed response modes configuration option for clients
Harm-r May 6, 2026
c73c92c
Fix failing tests due to changed function signatures
Harm-r May 6, 2026
8364e85
Code styling, some test fixes
Harm-r May 6, 2026
12ac4f8
Fix some conformance issues
Harm-r May 6, 2026
fd46417
refactor checkRule api back, psalm fixes
Harm-r May 8, 2026
6e27774
Fix final psalm and formatting issues
Harm-r May 13, 2026
68bb0f7
Added conformance tests to pipeline
Harm-r May 19, 2026
f45cf96
Added unit tests
Harm-r May 19, 2026
f145c03
Fix final psalm errors
Harm-r May 19, 2026
7d3b5e5
Merge remote-tracking branch 'upstream/wip-version-7' into wip-versio…
Harm-r May 19, 2026
5460a76
Change string type back to mixed from automatic psalm fix
Harm-r May 19, 2026
dce855b
Bump to latest openid version
cicnavi Jun 2, 2026
aaf21f2
Move to ResponseModesEnum
cicnavi Jun 2, 2026
fdabda6
Set response mode through constructor
cicnavi Jun 2, 2026
abc9863
Provide parameter for invalidRequest call
cicnavi Jun 2, 2026
61e0a89
Use base tempalte for formpost
cicnavi Jun 2, 2026
8a650f3
Fix psalm
cicnavi Jun 2, 2026
a3ca80e
Move to template factory
cicnavi Jun 3, 2026
bc0eb90
Unify allowed_response_modes key
cicnavi Jun 3, 2026
151796f
Update input description
cicnavi Jun 3, 2026
4301a8f
Simplify getAllowedResponseModes method
cicnavi Jun 3, 2026
c631def
Variable name typo
cicnavi Jun 3, 2026
65a573b
Move to match expression
cicnavi Jun 3, 2026
885e575
Move supported response mode values to single place
cicnavi Jun 3, 2026
69705e8
Remove TODO
cicnavi Jun 3, 2026
02f9ad9
Fetch supported response modes from ModuleConfig
cicnavi Jun 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,16 @@ jobs:
./conformance-suite/scripts/run-test-plan.py --expected-failures-file ./main/conformance-tests/implicit-warnings.json --expected-skips-file ./main/conformance-tests/implicit-skips.json "oidcc-implicit-certification-test-plan[server_metadata=discovery][client_registration=static_client]" ./main/conformance-tests/conformance-implicit-ci.json
- name: Run RP logout
run: |
./conformance-suite/scripts/run-test-plan.py "oidcc-rp-initiated-logout-certification-test-plan[response_type=code][client_registration=static_client]" ./main/conformance-tests/conformance-rp-initiated-logout-ci.json
./conformance-suite/scripts/run-test-plan.py "oidcc-rp-initiated-logout-certification-test-plan[response_type=code][client_registration=static_client]" ./main/conformance-tests/conformance-rp-initiated-logout-ci.json
- name: Run RP backchannel
run: |
./conformance-suite/scripts/run-test-plan.py "oidcc-backchannel-rp-initiated-logout-certification-test-plan[response_type=code][client_registration=static_client]" ./main/conformance-tests/conformance-back-channel-logout-ci.json
./conformance-suite/scripts/run-test-plan.py "oidcc-backchannel-rp-initiated-logout-certification-test-plan[response_type=code][client_registration=static_client]" ./main/conformance-tests/conformance-back-channel-logout-ci.json
- name: Run form_post basic tests
run: |
./conformance-suite/scripts/run-test-plan.py "oidcc-formpost-basic-certification-test-plan[server_metadata=discovery][client_registration=static_client]" ./main/conformance-tests/conformance-basic-ci.json
- name: Run form_post implicit tests
run: |
./conformance-suite/scripts/run-test-plan.py "oidcc-formpost-implicit-certification-test-plan[server_metadata=discovery][client_registration=static_client]" ./main/conformance-tests/conformance-implicit-ci.json
- name: Stop SSP
working-directory: ./main
run: |
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"psr/container": "^2.0",
"psr/log": "^3",
"simplesamlphp/composer-module-installer": "^1.3",
"simplesamlphp/openid": "~0.2.0",
"simplesamlphp/openid": "~0.2.3",
"spomky-labs/base64url": "^2.0",
"symfony/expression-language": "^7.4",
"symfony/psr-http-message-bridge": "^7.4",
Expand Down
12 changes: 12 additions & 0 deletions locales/en/LC_MESSAGES/oidc.po
Original file line number Diff line number Diff line change
Expand Up @@ -564,3 +564,15 @@ msgstr ""

msgid "enabled"
msgstr ""

msgid "Submitting..."
msgstr ""

msgid "Please wait while we redirect you..."
msgstr ""

msgid "If you are not redirected automatically, click the button below to continue."
msgstr ""

msgid "Continue"
msgstr ""
12 changes: 12 additions & 0 deletions locales/es/LC_MESSAGES/oidc.po
Original file line number Diff line number Diff line change
Expand Up @@ -564,3 +564,15 @@ msgstr ""

msgid "enabled"
msgstr ""

msgid "Submitting..."
msgstr "Enviando..."

msgid "Please wait while we redirect you..."
msgstr "Por favor, espere mientras le redirigimos..."

msgid "If you are not redirected automatically, click the button below to continue."
msgstr "Si no es redirigido automáticamente, haga clic en el botón de abajo para continuar."

msgid "Continue"
msgstr "Continuar"
13 changes: 13 additions & 0 deletions locales/fr/LC_MESSAGES/oidc.po
Original file line number Diff line number Diff line change
Expand Up @@ -564,3 +564,16 @@ msgstr ""

msgid "enabled"
msgstr ""

msgid "Submitting..."
msgstr "Soumission en cours..."

msgid "Please wait while we redirect you..."
msgstr "Veuillez patienter pendant que nous vous redirigeons..."

msgid "If you are not redirected automatically, click the button below to continue."
msgstr "Si vous n'êtes pas redirigé automatiquement, cliquez sur le bouton ci-dessous pour continuer."

msgid "Continue"
msgstr "Continuer"

12 changes: 12 additions & 0 deletions locales/hr/LC_MESSAGES/oidc.po
Original file line number Diff line number Diff line change
Expand Up @@ -612,3 +612,15 @@ msgstr "onemogućeno"

msgid "enabled"
msgstr "omogućeno"

msgid "Submitting..."
msgstr "Slanje u tijeku..."

msgid "Please wait while we redirect you..."
msgstr "Molimo pričekajte dok vas preusmjerimo..."

msgid "If you are not redirected automatically, click the button below to continue."
msgstr "Ako niste automatski preusmjereni, kliknite na gumb ispod za nastavak."

msgid "Continue"
msgstr "Nastavi"
13 changes: 13 additions & 0 deletions locales/it/LC_MESSAGES/oidc.po
Original file line number Diff line number Diff line change
Expand Up @@ -564,3 +564,16 @@ msgstr ""

msgid "enabled"
msgstr ""

msgid "Submitting..."
msgstr "Invio in corso..."

msgid "Please wait while we redirect you..."
msgstr "Attendere prego durante il reindirizzamento..."

msgid "If you are not redirected automatically, click the button below to continue."
msgstr "Se non vieni reindirizzato automaticamente, fai clic sul pulsante qui sotto per continuare."

msgid "Continue"
msgstr "Continua"

12 changes: 12 additions & 0 deletions locales/nl/LC_MESSAGES/oidc.po
Original file line number Diff line number Diff line change
Expand Up @@ -518,3 +518,15 @@ msgstr "uitgeschakeld"

msgid "enabled"
msgstr "ingeschakeld"

msgid "Submitting..."
msgstr "Verzenden..."

msgid "Please wait while we redirect you..."
msgstr "Wacht alstublieft terwijl u wordt doorgestuurd..."

msgid "If you are not redirected automatically, click the button below to continue."
msgstr "Als u niet automatisch wordt doorgestuurd, klik dan op de onderstaande knop om door te gaan."

msgid "Continue"
msgstr "Doorgaan"
1 change: 1 addition & 0 deletions public/assets/js/src/formpost.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
document.getElementById('formpost').submit();
6 changes: 6 additions & 0 deletions routing/services/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ services:
SimpleSAML\Module\oidc\Server\ResponseTypes\TokenResponse:
factory: ['@SimpleSAML\Module\oidc\Factories\TokenResponseFactory', 'build']

SimpleSAML\Module\oidc\Server\ResponseModes\:
resource: '../../src/Server/ResponseModes/*'

SimpleSAML\Configuration:
factory: ['SimpleSAML\Configuration', 'getInstance']

oidc.key.private:
class: League\OAuth2\Server\CryptKey
factory: ['@SimpleSAML\Module\oidc\Factories\CryptKeyFactory', 'buildPrivateKey']
Expand Down
6 changes: 5 additions & 1 deletion src/Controllers/Admin/ClientController.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ public function edit(Request $request): Response

$clientData = $originalClient->toArray();
$clientData['allowed_origin'] = $clientAllowedOrigins;
$clientData[ClientEntity::KEY_ALLOWED_RESPONSE_MODES] = $originalClient->getAllowedResponseModes();

// Handle extra metadata

Expand Down Expand Up @@ -318,7 +319,6 @@ protected function buildClientEntityFromFormData(
?string $owner = null,
bool $isGeneric = false,
): ClientEntityInterface {
/** @var array $data */
$data = $form->getValues('array');

if (
Expand Down Expand Up @@ -358,6 +358,10 @@ protected function buildClientEntityFromFormData(
ClaimsEnum::IdTokenSignedResponseAlg->value => $idTokenSignedResponseAlg,
];

$allowedResponseModes = is_array($data[ClientEntity::KEY_ALLOWED_RESPONSE_MODES]) ?
$data[ClientEntity::KEY_ALLOWED_RESPONSE_MODES] : [];
$extraMetadata[ClientEntity::KEY_ALLOWED_RESPONSE_MODES] = $allowedResponseModes;

return $this->clientEntityFactory->fromData(
$identifier,
$secret,
Expand Down
18 changes: 18 additions & 0 deletions src/Entities/ClientEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
use SimpleSAML\Module\oidc\Entities\Interfaces\ClientEntityInterface;
use SimpleSAML\OpenID\Codebooks\ClaimsEnum;
use SimpleSAML\OpenID\Codebooks\ClientRegistrationTypesEnum;
use SimpleSAML\OpenID\Codebooks\ResponseModesEnum;

class ClientEntity implements ClientEntityInterface
{
Expand Down Expand Up @@ -54,6 +55,7 @@ class ClientEntity implements ClientEntityInterface
public const string KEY_EXPIRES_AT = 'expires_at';
public const string KEY_IS_GENERIC = 'is_generic';
public const string KEY_EXTRA_METADATA = 'extra_metadata';
public const string KEY_ALLOWED_RESPONSE_MODES = 'allowed_response_modes';


private string $secret;
Expand Down Expand Up @@ -388,4 +390,20 @@ public function getIdTokenSignedResponseAlg(): ?string

return $idTokenSignedResponseAlg;
}

public function getAllowedResponseModes(): array
{
/** @psalm-suppress MixedAssignment */
$allowedResponseModes = $this->extraMetadata[self::KEY_ALLOWED_RESPONSE_MODES] ?? null;

if (is_array($allowedResponseModes)) {
return $allowedResponseModes;
}

return [
ResponseModesEnum::Query->value,
ResponseModesEnum::Fragment->value,
ResponseModesEnum::FormPost->value,
];
}
}
1 change: 1 addition & 0 deletions src/Entities/Interfaces/ClientEntityInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,5 @@ public function isGeneric(): bool;

public function getExtraMetadata(): array;
public function getIdTokenSignedResponseAlg(): ?string;
public function getAllowedResponseModes(): array;
}
1 change: 0 additions & 1 deletion src/Factories/Grant/ImplicitGrantFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public function build(): ImplicitGrant
$this->accessTokenRepository,
$this->requestRulesManager,
$this->requestParamsResolver,
'#',
$this->accessTokenEntityFactory,
);
}
Expand Down
15 changes: 15 additions & 0 deletions src/Factories/RequestRulesManagerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,15 @@
use SimpleSAML\Module\oidc\Server\RequestRules\Rules\RequestObjectRule;
use SimpleSAML\Module\oidc\Server\RequestRules\Rules\RequiredNonceRule;
use SimpleSAML\Module\oidc\Server\RequestRules\Rules\RequiredOpenIdScopeRule;
use SimpleSAML\Module\oidc\Server\RequestRules\Rules\ResponseModeRule;
use SimpleSAML\Module\oidc\Server\RequestRules\Rules\ResponseTypeRule;
use SimpleSAML\Module\oidc\Server\RequestRules\Rules\ScopeOfflineAccessRule;
use SimpleSAML\Module\oidc\Server\RequestRules\Rules\ScopeRule;
use SimpleSAML\Module\oidc\Server\RequestRules\Rules\StateRule;
use SimpleSAML\Module\oidc\Server\RequestRules\Rules\UiLocalesRule;
use SimpleSAML\Module\oidc\Server\ResponseModes\FormPostResponseMode;
use SimpleSAML\Module\oidc\Server\ResponseModes\FragmentResponseMode;
use SimpleSAML\Module\oidc\Server\ResponseModes\QueryResponseMode;
use SimpleSAML\Module\oidc\Services\AuthenticationService;
use SimpleSAML\Module\oidc\Services\LoggerService;
use SimpleSAML\Module\oidc\Utils\AuthenticatedOAuth2ClientResolver;
Expand Down Expand Up @@ -72,6 +76,9 @@ public function __construct(
private readonly AuthenticatedOAuth2ClientResolver $authenticatedOAuth2ClientResolver,
private readonly ?FederationCache $federationCache = null,
private readonly ?ProtocolCache $protocolCache = null,
private readonly QueryResponseMode $queryResponseMode,
private readonly FragmentResponseMode $fragmentResponseMode,
private readonly FormPostResponseMode $formPostResponseMode,
) {
}

Expand Down Expand Up @@ -107,6 +114,14 @@ private function getDefaultRules(): array
),
new ClientRedirectUriRule($this->requestParamsResolver, $this->helpers, $this->moduleConfig),
new RequestObjectRule($this->requestParamsResolver, $this->helpers, $this->jwksResolver),
new ResponseModeRule(
$this->requestParamsResolver,
$this->helpers,
$this->moduleConfig,
$this->queryResponseMode,
$this->fragmentResponseMode,
$this->formPostResponseMode,
),
new PromptRule(
$this->requestParamsResolver,
$this->helpers,
Expand Down
Loading
Loading