|
27 | 27 | use SimpleSAML\OpenID\Algorithms\SignatureAlgorithmBag; |
28 | 28 | use SimpleSAML\OpenID\Algorithms\SignatureAlgorithmEnum; |
29 | 29 | use SimpleSAML\OpenID\Codebooks\ClaimsEnum; |
| 30 | +use SimpleSAML\OpenID\Codebooks\GrantTypesEnum; |
30 | 31 | use SimpleSAML\OpenID\Codebooks\ResponseModesEnum; |
| 32 | +use SimpleSAML\OpenID\Codebooks\ResponseTypesEnum; |
31 | 33 | use SimpleSAML\OpenID\Codebooks\ScopesEnum; |
| 34 | +use SimpleSAML\OpenID\Codebooks\TokenEndpointAuthMethodsEnum; |
32 | 35 | use SimpleSAML\OpenID\Codebooks\TrustMarkStatusEndpointUsagePolicyEnum; |
33 | 36 | use SimpleSAML\OpenID\Serializers\JwsSerializerBag; |
34 | 37 | use SimpleSAML\OpenID\Serializers\JwsSerializerEnum; |
@@ -488,6 +491,57 @@ public function getSupportedResponseModes(): array |
488 | 491 | ]; |
489 | 492 | } |
490 | 493 |
|
| 494 | + /** |
| 495 | + * Response types a client may be registered to use. |
| 496 | + * |
| 497 | + * Shared by OP discovery metadata, the dynamic client registration validator, |
| 498 | + * and the client admin form so that the advertised, accepted, and admin-selectable |
| 499 | + * sets cannot drift apart. |
| 500 | + * |
| 501 | + * @return string[] |
| 502 | + */ |
| 503 | + public function getSupportedResponseTypes(): array |
| 504 | + { |
| 505 | + return [ |
| 506 | + ResponseTypesEnum::Code->value, |
| 507 | + ResponseTypesEnum::IdToken->value, |
| 508 | + ResponseTypesEnum::IdTokenToken->value, |
| 509 | + ]; |
| 510 | + } |
| 511 | + |
| 512 | + /** |
| 513 | + * Grant types a client may be registered to use. |
| 514 | + * |
| 515 | + * Note: the discovery `grant_types_supported` may advertise additional grant types |
| 516 | + * that are not registered per client (e.g. the VCI pre-authorized_code grant); |
| 517 | + * that extension is applied by OpMetadataService on top of these values. |
| 518 | + * |
| 519 | + * @return string[] |
| 520 | + */ |
| 521 | + public function getSupportedGrantTypes(): array |
| 522 | + { |
| 523 | + return [ |
| 524 | + GrantTypesEnum::AuthorizationCode->value, |
| 525 | + GrantTypesEnum::Implicit->value, |
| 526 | + GrantTypesEnum::RefreshToken->value, |
| 527 | + ]; |
| 528 | + } |
| 529 | + |
| 530 | + /** |
| 531 | + * Token endpoint authentication methods a client may be registered to use. |
| 532 | + * |
| 533 | + * @return string[] |
| 534 | + */ |
| 535 | + public function getSupportedTokenEndpointAuthMethods(): array |
| 536 | + { |
| 537 | + return [ |
| 538 | + TokenEndpointAuthMethodsEnum::ClientSecretBasic->value, |
| 539 | + TokenEndpointAuthMethodsEnum::ClientSecretPost->value, |
| 540 | + TokenEndpointAuthMethodsEnum::PrivateKeyJwt->value, |
| 541 | + TokenEndpointAuthMethodsEnum::None->value, |
| 542 | + ]; |
| 543 | + } |
| 544 | + |
491 | 545 | /** |
492 | 546 | * @throws ConfigurationError |
493 | 547 | * @return non-empty-array |
|
0 commit comments