Skip to content

Commit e07c22d

Browse files
Merge pull request #29 from pdsinterop/solid-oidc-tests
Improvements from solid-oidc-tests
2 parents fc3abfa + 85467a5 commit e07c22d

File tree

4 files changed

+25
-3
lines changed

4 files changed

+25
-3
lines changed

src/Config/Server.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,12 @@ final public function __construct(array $data, bool $strict = false)
6363
OidcMeta::GRANT_TYPES_SUPPORTED => array("authorization_code","implicit","refresh_token","client_credentials"),
6464
OidcMeta::TOKEN_ENDPOINT_AUTH_METHODS_SUPPORTED => "client_secret_basic",
6565
OidcMeta::TOKEN_ENDPOINT_AUTH_SIGNING_ALG_VALUES_SUPPORTED => ["RS256"],
66+
OidcMeta::CODE_CHALLENGE_METHODS_SUPPORTED => ["S256"],
67+
OidcMeta::DPOP_SIGNING_ALG_VALUES_SUPPORTED => ["RS256"],
6668
OidcMeta::DISPLAY_VALUES_SUPPORTED => [],
6769
OidcMeta::CLAIM_TYPES_SUPPORTED => ["normal"],
68-
OidcMeta::CLAIMS_SUPPORTED => [],
70+
OidcMeta::CLAIMS_SUPPORTED => ["webid"],
71+
OidcMeta::SCOPES_SUPPORTED => ["webid"],
6972
OidcMeta::CLAIMS_PARAMETER_SUPPORTED => false,
7073
OidcMeta::REQUEST_PARAMETER_SUPPORTED => true,
7174
OidcMeta::REQUEST_URI_PARAMETER_SUPPORTED => false,

src/Enum/OpenId/OpenIdConnectMetadata.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,20 @@ class OpenIdConnectMetadata extends AbstractEnum
4545
*/
4646
public const CLAIMS_SUPPORTED = 'claims_supported';
4747

48+
/**
49+
* JSON array containing a list of the Code challenge methods supported.
50+
*
51+
* @recommended
52+
*/
53+
public const CODE_CHALLENGE_METHODS_SUPPORTED = 'code_challenge_methods_supported';
54+
55+
/**
56+
* JSON array containing a list of the JWS alg values supported by the authorization server for DPoP proof JWTs.
57+
*
58+
* @recommended
59+
*/
60+
public const DPOP_SIGNING_ALG_VALUES_SUPPORTED = 'dpop_signing_alg_values_supported';
61+
4862
/**
4963
* JSON array containing a list of the display parameter values that the OpenID Provider supports. These values are described in Section 3.1.2.1 of OpenID Connect Core 1.0 [OpenID.Core].
5064
*/

tests/unit/Config/ServerTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,14 @@ final public function testServerConfigShouldReturnExpectedValuesWhenSerializedWi
112112
'token_endpoint_auth_signing_alg_values_supported' => ['RS256'],
113113
'display_values_supported' => [],
114114
'claim_types_supported' => ['normal'],
115-
'claims_supported' => [],
115+
'claims_supported' => ['webid'],
116116
'claims_parameter_supported' => false,
117117
'request_parameter_supported' => true,
118118
'request_uri_parameter_supported' => false,
119-
'require_request_uri_registration' => false
119+
'require_request_uri_registration' => false,
120+
'code_challenge_methods_supported' => ['S256'],
121+
'dpop_signing_alg_values_supported' => ['RS256'],
122+
'scopes_supported' => ['webid']
120123
], $actual);
121124
}
122125
}

tests/unit/Enum/OpenId/OpenIdConnectMetadataTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ final public function getExpectedValues() : array
2323
'claims_locales_supported',
2424
'claims_parameter_supported',
2525
'claims_supported',
26+
'code_challenge_methods_supported',
27+
'dpop_signing_alg_values_supported',
2628
'display_values_supported',
2729
'grant_types_supported',
2830
'id_token_encryption_alg_values_supported',

0 commit comments

Comments
 (0)