|
25 | 25 | use SimpleSAML\Module\oidc\Bridges\SspBridge; |
26 | 26 | use SimpleSAML\Module\oidc\Server\Exceptions\OidcServerException; |
27 | 27 | use SimpleSAML\OpenID\Codebooks\ScopesEnum; |
| 28 | +use SimpleSAML\OpenID\Codebooks\TrustMarkStatusEndpointUsagePolicyEnum; |
28 | 29 |
|
29 | 30 | class ModuleConfig |
30 | 31 | { |
@@ -82,14 +83,16 @@ class ModuleConfig |
82 | 83 | final public const OPTION_FEDERATION_TRUST_ANCHORS = 'federation_trust_anchors'; |
83 | 84 | final public const OPTION_FEDERATION_TRUST_MARK_TOKENS = 'federation_trust_mark_tokens'; |
84 | 85 | final public const OPTION_FEDERATION_DYNAMIC_TRUST_MARKS = 'federation_dynamic_trust_mark_tokens'; |
| 86 | + final public const OPTION_FEDERATION_PARTICIPATION_LIMIT_BY_TRUST_MARKS = |
| 87 | + 'federation_participation_limit_by_trust_marks'; |
| 88 | + final public const OPTION_FEDERATION_TRUST_MARK_STATUS_ENDPOINT_USAGE_POLICY = |
| 89 | + 'federation_trust_mark_status_endpoint_usage_policy'; |
85 | 90 | final public const OPTION_FEDERATION_CACHE_DURATION_FOR_PRODUCED = 'federation_cache_duration_for_produced'; |
86 | 91 | final public const OPTION_PROTOCOL_CACHE_ADAPTER = 'protocol_cache_adapter'; |
87 | 92 | final public const OPTION_PROTOCOL_CACHE_ADAPTER_ARGUMENTS = 'protocol_cache_adapter_arguments'; |
88 | 93 | final public const OPTION_PROTOCOL_USER_ENTITY_CACHE_DURATION = 'protocol_user_entity_cache_duration'; |
89 | 94 | final public const OPTION_PROTOCOL_CLIENT_ENTITY_CACHE_DURATION = 'protocol_client_entity_cache_duration'; |
90 | 95 | final public const OPTION_PROTOCOL_DISCOVERY_SHOW_CLAIMS_SUPPORTED = 'protocol_discover_show_claims_supported'; |
91 | | - final public const OPTION_FEDERATION_PARTICIPATION_LIMIT_BY_TRUST_MARKS = |
92 | | - 'federation_participation_limit_by_trust_marks'; |
93 | 96 |
|
94 | 97 | final public const OPTION_PKI_NEW_PRIVATE_KEY_PASSPHRASE = 'new_private_key_passphrase'; |
95 | 98 | final public const OPTION_PKI_NEW_PRIVATE_KEY_FILENAME = 'new_privatekey'; |
@@ -817,6 +820,21 @@ public function getFederationParticipationLimitByTrustMarks(): array |
817 | 820 | ); |
818 | 821 | } |
819 | 822 |
|
| 823 | + public function getFederationTrustMarkStatusEndpointUsagePolicy(): TrustMarkStatusEndpointUsagePolicyEnum |
| 824 | + { |
| 825 | + /** @psalm-suppress MixedAssignment */ |
| 826 | + $policy = $this->config()->getOptionalValue( |
| 827 | + self::OPTION_FEDERATION_TRUST_MARK_STATUS_ENDPOINT_USAGE_POLICY, |
| 828 | + null, |
| 829 | + ); |
| 830 | + |
| 831 | + if ($policy instanceof TrustMarkStatusEndpointUsagePolicyEnum) { |
| 832 | + return $policy; |
| 833 | + } |
| 834 | + |
| 835 | + return TrustMarkStatusEndpointUsagePolicyEnum::RequiredIfEndpointProvidedForNonExpiringTrustMarksOnly; |
| 836 | + } |
| 837 | + |
820 | 838 | /** |
821 | 839 | * @throws \SimpleSAML\Error\ConfigurationError |
822 | 840 | */ |
|
0 commit comments