|
26 | 26 | use SimpleSAML\Module\oidc\Server\Exceptions\OidcServerException; |
27 | 27 | use SimpleSAML\OpenID\Codebooks\ClaimsEnum; |
28 | 28 | use SimpleSAML\OpenID\Codebooks\ScopesEnum; |
| 29 | +use SimpleSAML\OpenID\Codebooks\TrustMarkStatusEndpointUsagePolicyEnum; |
29 | 30 |
|
30 | 31 | class ModuleConfig |
31 | 32 | { |
@@ -83,14 +84,16 @@ class ModuleConfig |
83 | 84 | final public const OPTION_FEDERATION_TRUST_ANCHORS = 'federation_trust_anchors'; |
84 | 85 | final public const OPTION_FEDERATION_TRUST_MARK_TOKENS = 'federation_trust_mark_tokens'; |
85 | 86 | final public const OPTION_FEDERATION_DYNAMIC_TRUST_MARKS = 'federation_dynamic_trust_mark_tokens'; |
| 87 | + final public const OPTION_FEDERATION_PARTICIPATION_LIMIT_BY_TRUST_MARKS = |
| 88 | + 'federation_participation_limit_by_trust_marks'; |
| 89 | + final public const OPTION_FEDERATION_TRUST_MARK_STATUS_ENDPOINT_USAGE_POLICY = |
| 90 | + 'federation_trust_mark_status_endpoint_usage_policy'; |
86 | 91 | final public const OPTION_FEDERATION_CACHE_DURATION_FOR_PRODUCED = 'federation_cache_duration_for_produced'; |
87 | 92 | final public const OPTION_PROTOCOL_CACHE_ADAPTER = 'protocol_cache_adapter'; |
88 | 93 | final public const OPTION_PROTOCOL_CACHE_ADAPTER_ARGUMENTS = 'protocol_cache_adapter_arguments'; |
89 | 94 | final public const OPTION_PROTOCOL_USER_ENTITY_CACHE_DURATION = 'protocol_user_entity_cache_duration'; |
90 | 95 | final public const OPTION_PROTOCOL_CLIENT_ENTITY_CACHE_DURATION = 'protocol_client_entity_cache_duration'; |
91 | 96 | final public const OPTION_PROTOCOL_DISCOVERY_SHOW_CLAIMS_SUPPORTED = 'protocol_discover_show_claims_supported'; |
92 | | - final public const OPTION_FEDERATION_PARTICIPATION_LIMIT_BY_TRUST_MARKS = |
93 | | - 'federation_participation_limit_by_trust_marks'; |
94 | 97 |
|
95 | 98 | final public const OPTION_PKI_NEW_PRIVATE_KEY_PASSPHRASE = 'new_private_key_passphrase'; |
96 | 99 | final public const OPTION_PKI_NEW_PRIVATE_KEY_FILENAME = 'new_privatekey'; |
@@ -839,6 +842,21 @@ public function getFederationParticipationLimitByTrustMarks(): array |
839 | 842 | ); |
840 | 843 | } |
841 | 844 |
|
| 845 | + public function getFederationTrustMarkStatusEndpointUsagePolicy(): TrustMarkStatusEndpointUsagePolicyEnum |
| 846 | + { |
| 847 | + /** @psalm-suppress MixedAssignment */ |
| 848 | + $policy = $this->config()->getOptionalValue( |
| 849 | + self::OPTION_FEDERATION_TRUST_MARK_STATUS_ENDPOINT_USAGE_POLICY, |
| 850 | + null, |
| 851 | + ); |
| 852 | + |
| 853 | + if ($policy instanceof TrustMarkStatusEndpointUsagePolicyEnum) { |
| 854 | + return $policy; |
| 855 | + } |
| 856 | + |
| 857 | + return TrustMarkStatusEndpointUsagePolicyEnum::RequiredIfEndpointProvidedForNonExpiringTrustMarksOnly; |
| 858 | + } |
| 859 | + |
842 | 860 | /** |
843 | 861 | * @throws \SimpleSAML\Error\ConfigurationError |
844 | 862 | */ |
|
0 commit comments