Remove deprecated EnvironmentDependentProviderFactory.isSupported method
Closes #26280 Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
This commit is contained in:
parent
f6071f680a
commit
3e0a185070
51 changed files with 78 additions and 88 deletions
|
@ -126,7 +126,7 @@ public class Argon2PasswordHashProviderFactory implements PasswordHashProviderFa
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return !Profile.isFeatureEnabled(Profile.Feature.FIPS);
|
return !Profile.isFeatureEnabled(Profile.Feature.FIPS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -119,6 +119,12 @@ By default, the syslog handler is disabled, but when enabled, it sends all log e
|
||||||
|
|
||||||
For more information, see the https://www.keycloak.org/server/logging[Configuring logging] guide.
|
For more information, see the https://www.keycloak.org/server/logging[Configuring logging] guide.
|
||||||
|
|
||||||
|
= Change to class `EnvironmentDependentProviderFactory`
|
||||||
|
|
||||||
|
The method `EnvironmentDependentProviderFactory.isSupported()` was deprecated for several releases and has now been removed.
|
||||||
|
|
||||||
|
For more details, see the link:{upgradingguide_link}[{upgradingguide_name}].
|
||||||
|
|
||||||
= All `cache` options are runtime
|
= All `cache` options are runtime
|
||||||
|
|
||||||
It is now possible to specify the `cache`, `cache-stack`, and `cache-config-file` options during runtime.
|
It is now possible to specify the `cache`, `cache-stack`, and `cache-config-file` options during runtime.
|
||||||
|
|
|
@ -248,6 +248,12 @@ The escape char is the tilde character `~`. The previous example results in the
|
||||||
|
|
||||||
The escaping is currently disabled by default because it represents a change in behavior. Nevertheless enabling escaping is recommended and it can be the default in future versions.
|
The escaping is currently disabled by default because it represents a change in behavior. Nevertheless enabling escaping is recommended and it can be the default in future versions.
|
||||||
|
|
||||||
|
= Change to class `EnvironmentDependentProviderFactory`
|
||||||
|
|
||||||
|
The method `EnvironmentDependentProviderFactory.isSupported()` was deprecated for several releases and has now been removed.
|
||||||
|
|
||||||
|
Instead, implement `isSupported(Config.Scope config)`.
|
||||||
|
|
||||||
= Removal of the deprecated LinkedIn provider
|
= Removal of the deprecated LinkedIn provider
|
||||||
|
|
||||||
In version 22.0.2 the OAuh 2.0 social provider for LinkedIn was replaced by a new OpenId Connect implementation. The legacy provider was deprecated but not removed, just in case it was still functional in some existing realms. {project_name} 25.0.0 is definitely removing the old provider and its associated `linkedin-oauth` feature. From now on, the default `LinkedIn` social provider is the only option available.
|
In version 22.0.2 the OAuh 2.0 social provider for LinkedIn was replaced by a new OpenId Connect implementation. The legacy provider was deprecated but not removed, just in case it was still functional in some existing realms. {project_name} 25.0.0 is definitely removing the old provider and its associated `linkedin-oauth` feature. From now on, the default `LinkedIn` social provider is the only option available.
|
||||||
|
|
|
@ -63,7 +63,7 @@ public class KerberosFederationProviderFactory implements UserStorageProviderFac
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.KERBEROS);
|
return Profile.isFeatureEnabled(Profile.Feature.KERBEROS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ public class SSSDFederationProviderFactory implements UserStorageProviderFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return AvailabilityChecker.isAvailable();
|
return AvailabilityChecker.isAvailable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class InfinispanMultiSiteLoadBalancerCheckProviderFactory implements Load
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.MULTI_SITE);
|
return Profile.isFeatureEnabled(Profile.Feature.MULTI_SITE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -359,7 +359,7 @@ public final class DefaultHostnameProvider implements HostnameProvider, Hostname
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Feature.HOSTNAME_V1);
|
return Profile.isFeatureEnabled(Feature.HOSTNAME_V1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,11 +31,6 @@ public class FilesKeystoreVaultProviderFactory extends org.keycloak.vault.FilesK
|
||||||
return ID;
|
return ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isSupported() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported(Config.Scope config) {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return getId().equals(Configuration.getRawValue("kc.vault"));
|
return getId().equals(Configuration.getRawValue("kc.vault"));
|
||||||
|
|
|
@ -31,11 +31,6 @@ public class FilesPlainTextVaultProviderFactory extends org.keycloak.vault.Files
|
||||||
return ID;
|
return ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isSupported() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported(Config.Scope config) {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return getId().equals(Configuration.getRawValue("kc.vault"));
|
return getId().equals(Configuration.getRawValue("kc.vault"));
|
||||||
|
|
|
@ -34,7 +34,7 @@ public final class AdminExtProvider implements AdminRealmResourceProviderFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.ADMIN2);
|
return Profile.isFeatureEnabled(Profile.Feature.ADMIN2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@ public class RecoveryCodesWarningThresholdPasswordPolicyProviderFactory implemen
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.RECOVERY_CODES);
|
return Profile.isFeatureEnabled(Profile.Feature.RECOVERY_CODES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,22 +28,10 @@ import org.keycloak.Config;
|
||||||
public interface EnvironmentDependentProviderFactory {
|
public interface EnvironmentDependentProviderFactory {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return <code>true</code> if the provider is supported and should be available, <code>false</code> otherwise
|
* Check if the provider is supported and should be available based on the provider configuration.
|
||||||
* @deprecated Prefer overriding/using the {@link #isSupported(Config.Scope)} method.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
default boolean isSupported() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An alternative to {@link #isSupported()} method to check if the provider is supported based on the
|
|
||||||
* provider configuration.
|
|
||||||
*
|
*
|
||||||
* @param config the provider configuration
|
* @param config the provider configuration
|
||||||
* @return {@code true} if the provider is supported. Otherwise, {@code false}.
|
* @return {@code true} if the provider is supported. Otherwise, {@code false}.
|
||||||
*/
|
*/
|
||||||
default boolean isSupported(Config.Scope config) {
|
boolean isSupported(Config.Scope config);
|
||||||
return isSupported();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
package org.keycloak.services.clientpolicy.condition;
|
package org.keycloak.services.clientpolicy.condition;
|
||||||
|
|
||||||
|
import org.keycloak.Config;
|
||||||
import org.keycloak.common.Profile;
|
import org.keycloak.common.Profile;
|
||||||
import org.keycloak.provider.ConfiguredProvider;
|
import org.keycloak.provider.ConfiguredProvider;
|
||||||
import org.keycloak.provider.EnvironmentDependentProviderFactory;
|
import org.keycloak.provider.EnvironmentDependentProviderFactory;
|
||||||
|
@ -28,7 +29,7 @@ import org.keycloak.provider.ProviderFactory;
|
||||||
public interface ClientPolicyConditionProviderFactory extends ProviderFactory<ClientPolicyConditionProvider>, ConfiguredProvider, EnvironmentDependentProviderFactory {
|
public interface ClientPolicyConditionProviderFactory extends ProviderFactory<ClientPolicyConditionProvider>, ConfiguredProvider, EnvironmentDependentProviderFactory {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
default boolean isSupported() {
|
default boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.CLIENT_POLICIES);
|
return Profile.isFeatureEnabled(Profile.Feature.CLIENT_POLICIES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
package org.keycloak.services.clientpolicy.executor;
|
package org.keycloak.services.clientpolicy.executor;
|
||||||
|
|
||||||
|
import org.keycloak.Config;
|
||||||
import org.keycloak.common.Profile;
|
import org.keycloak.common.Profile;
|
||||||
import org.keycloak.provider.ConfiguredProvider;
|
import org.keycloak.provider.ConfiguredProvider;
|
||||||
import org.keycloak.provider.EnvironmentDependentProviderFactory;
|
import org.keycloak.provider.EnvironmentDependentProviderFactory;
|
||||||
|
@ -28,7 +29,7 @@ import org.keycloak.provider.ProviderFactory;
|
||||||
public interface ClientPolicyExecutorProviderFactory extends ProviderFactory<ClientPolicyExecutorProvider>, ConfiguredProvider, EnvironmentDependentProviderFactory {
|
public interface ClientPolicyExecutorProviderFactory extends ProviderFactory<ClientPolicyExecutorProvider>, ConfiguredProvider, EnvironmentDependentProviderFactory {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
default boolean isSupported() {
|
default boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.CLIENT_POLICIES);
|
return Profile.isFeatureEnabled(Profile.Feature.CLIENT_POLICIES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,15 +23,12 @@ import java.util.Map;
|
||||||
import org.keycloak.Config;
|
import org.keycloak.Config;
|
||||||
import org.keycloak.authentication.AuthenticationFlowContext;
|
import org.keycloak.authentication.AuthenticationFlowContext;
|
||||||
import org.keycloak.authentication.Authenticator;
|
import org.keycloak.authentication.Authenticator;
|
||||||
import org.keycloak.common.Profile;
|
|
||||||
import org.keycloak.deployment.DeployedConfigurationsManager;
|
import org.keycloak.deployment.DeployedConfigurationsManager;
|
||||||
import org.keycloak.models.AuthenticatorConfigModel;
|
import org.keycloak.models.AuthenticatorConfigModel;
|
||||||
import org.keycloak.models.KeycloakSession;
|
import org.keycloak.models.KeycloakSession;
|
||||||
import org.keycloak.models.KeycloakSessionFactory;
|
import org.keycloak.models.KeycloakSessionFactory;
|
||||||
import org.keycloak.models.utils.KeycloakModelUtils;
|
import org.keycloak.models.utils.KeycloakModelUtils;
|
||||||
import org.keycloak.models.utils.PostMigrationEvent;
|
|
||||||
import org.keycloak.provider.ProviderConfigProperty;
|
import org.keycloak.provider.ProviderConfigProperty;
|
||||||
import org.keycloak.provider.ProviderEvent;
|
|
||||||
import org.keycloak.representations.provider.ScriptProviderMetadata;
|
import org.keycloak.representations.provider.ScriptProviderMetadata;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -82,11 +79,6 @@ public final class DeployedScriptAuthenticatorFactory extends ScriptBasedAuthent
|
||||||
return model.getAlias();
|
return model.getAlias();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isSupported() {
|
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.SCRIPTS);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(Config.Scope config) {
|
public void init(Config.Scope config) {
|
||||||
model = createModel(metadata);
|
model = createModel(metadata);
|
||||||
|
|
|
@ -76,7 +76,7 @@ public class RecoveryAuthnCodesFormAuthenticatorFactory implements Authenticator
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.RECOVERY_CODES);
|
return Profile.isFeatureEnabled(Profile.Feature.RECOVERY_CODES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,7 @@ public class ScriptBasedAuthenticatorFactory implements AuthenticatorFactory, En
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.SCRIPTS);
|
return Profile.isFeatureEnabled(Profile.Feature.SCRIPTS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,7 +95,7 @@ public class WebAuthnAuthenticatorFactory implements AuthenticatorFactory, Envir
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.WEB_AUTHN);
|
return Profile.isFeatureEnabled(Profile.Feature.WEB_AUTHN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,7 @@ public class ConditionalLoaAuthenticatorFactory implements ConditionalAuthentica
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.STEP_UP_AUTHENTICATION);
|
return Profile.isFeatureEnabled(Profile.Feature.STEP_UP_AUTHENTICATION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,7 +120,7 @@ public class RecoveryAuthnCodesAction implements RequiredActionProvider, Require
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.RECOVERY_CODES);
|
return Profile.isFeatureEnabled(Profile.Feature.RECOVERY_CODES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,7 +200,7 @@ public class UpdateEmail implements RequiredActionProvider, RequiredActionFactor
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.UPDATE_EMAIL);
|
return Profile.isFeatureEnabled(Profile.Feature.UPDATE_EMAIL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
package org.keycloak.authentication.requiredactions;
|
package org.keycloak.authentication.requiredactions;
|
||||||
|
|
||||||
import com.webauthn4j.validator.attestation.trustworthiness.certpath.CertPathTrustworthinessValidator;
|
import com.webauthn4j.validator.attestation.trustworthiness.certpath.CertPathTrustworthinessValidator;
|
||||||
|
import org.keycloak.Config;
|
||||||
import org.keycloak.Config.Scope;
|
import org.keycloak.Config.Scope;
|
||||||
import org.keycloak.authentication.RequiredActionFactory;
|
import org.keycloak.authentication.RequiredActionFactory;
|
||||||
import org.keycloak.authentication.RequiredActionProvider;
|
import org.keycloak.authentication.RequiredActionProvider;
|
||||||
|
@ -81,7 +82,7 @@ public class WebAuthnRegisterFactory implements RequiredActionFactory, Environme
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.WEB_AUTHN);
|
return Profile.isFeatureEnabled(Profile.Feature.WEB_AUTHN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@ import org.keycloak.Config;
|
||||||
import org.keycloak.common.Profile;
|
import org.keycloak.common.Profile;
|
||||||
import org.keycloak.models.KeycloakSession;
|
import org.keycloak.models.KeycloakSession;
|
||||||
import org.keycloak.provider.EnvironmentDependentProviderFactory;
|
import org.keycloak.provider.EnvironmentDependentProviderFactory;
|
||||||
import org.keycloak.userprofile.DeclarativeUserProfileProvider;
|
|
||||||
|
|
||||||
public class RecoveryAuthnCodesCredentialProviderFactory
|
public class RecoveryAuthnCodesCredentialProviderFactory
|
||||||
implements CredentialProviderFactory<RecoveryAuthnCodesCredentialProvider>, EnvironmentDependentProviderFactory {
|
implements CredentialProviderFactory<RecoveryAuthnCodesCredentialProvider>, EnvironmentDependentProviderFactory {
|
||||||
|
@ -22,7 +21,7 @@ public class RecoveryAuthnCodesCredentialProviderFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.RECOVERY_CODES);
|
return Profile.isFeatureEnabled(Profile.Feature.RECOVERY_CODES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
package org.keycloak.credential;
|
package org.keycloak.credential;
|
||||||
|
|
||||||
import com.webauthn4j.converter.util.ObjectConverter;
|
import com.webauthn4j.converter.util.ObjectConverter;
|
||||||
|
import org.keycloak.Config;
|
||||||
import org.keycloak.common.Profile;
|
import org.keycloak.common.Profile;
|
||||||
import org.keycloak.models.KeycloakSession;
|
import org.keycloak.models.KeycloakSession;
|
||||||
import org.keycloak.provider.EnvironmentDependentProviderFactory;
|
import org.keycloak.provider.EnvironmentDependentProviderFactory;
|
||||||
|
@ -49,7 +50,7 @@ public class WebAuthnCredentialProviderFactory implements CredentialProviderFact
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.WEB_AUTHN);
|
return Profile.isFeatureEnabled(Profile.Feature.WEB_AUTHN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
package org.keycloak.credential;
|
package org.keycloak.credential;
|
||||||
|
|
||||||
import com.webauthn4j.converter.util.ObjectConverter;
|
import com.webauthn4j.converter.util.ObjectConverter;
|
||||||
|
import org.keycloak.Config;
|
||||||
import org.keycloak.common.Profile;
|
import org.keycloak.common.Profile;
|
||||||
import org.keycloak.models.KeycloakSession;
|
import org.keycloak.models.KeycloakSession;
|
||||||
import org.keycloak.provider.EnvironmentDependentProviderFactory;
|
import org.keycloak.provider.EnvironmentDependentProviderFactory;
|
||||||
|
@ -54,7 +55,7 @@ public class WebAuthnPasswordlessCredentialProviderFactory implements Credential
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.WEB_AUTHN);
|
return Profile.isFeatureEnabled(Profile.Feature.WEB_AUTHN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package org.keycloak.protocol.docker;
|
package org.keycloak.protocol.docker;
|
||||||
|
|
||||||
|
import org.keycloak.Config;
|
||||||
import org.keycloak.common.Profile;
|
import org.keycloak.common.Profile;
|
||||||
import org.keycloak.events.EventBuilder;
|
import org.keycloak.events.EventBuilder;
|
||||||
import org.keycloak.models.ClientModel;
|
import org.keycloak.models.ClientModel;
|
||||||
|
@ -70,7 +71,7 @@ public class DockerAuthV2ProtocolFactory extends AbstractLoginProtocolFactory im
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.DOCKER);
|
return Profile.isFeatureEnabled(Profile.Feature.DOCKER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,11 +77,6 @@ public interface VCSigningServiceProviderFactory extends ComponentFactory<Verifi
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.OID4VC_VCI);
|
return Profile.isFeatureEnabled(Profile.Feature.OID4VC_VCI);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
default boolean isSupported() {
|
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.OID4VC_VCI);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should validate potential implementation specific configuration of the factory.
|
* Should validate potential implementation specific configuration of the factory.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class TokenExchangeGrantTypeFactory implements OAuth2GrantTypeFactory, En
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.TOKEN_EXCHANGE);
|
return Profile.isFeatureEnabled(Profile.Feature.TOKEN_EXCHANGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class CibaGrantTypeFactory implements OAuth2GrantTypeFactory, Environment
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.CIBA);
|
return Profile.isFeatureEnabled(Profile.Feature.CIBA);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
*/
|
*/
|
||||||
package org.keycloak.protocol.oidc.grants.ciba.channel;
|
package org.keycloak.protocol.oidc.grants.ciba.channel;
|
||||||
|
|
||||||
|
import org.keycloak.Config;
|
||||||
import org.keycloak.common.Profile;
|
import org.keycloak.common.Profile;
|
||||||
import org.keycloak.provider.EnvironmentDependentProviderFactory;
|
import org.keycloak.provider.EnvironmentDependentProviderFactory;
|
||||||
import org.keycloak.provider.ProviderFactory;
|
import org.keycloak.provider.ProviderFactory;
|
||||||
|
@ -27,7 +28,7 @@ public interface AuthenticationChannelProviderFactory extends ProviderFactory<Au
|
||||||
EnvironmentDependentProviderFactory {
|
EnvironmentDependentProviderFactory {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
default boolean isSupported() {
|
default boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.CIBA);
|
return Profile.isFeatureEnabled(Profile.Feature.CIBA);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ package org.keycloak.protocol.oidc.grants.ciba.endpoints;
|
||||||
|
|
||||||
import jakarta.ws.rs.Path;
|
import jakarta.ws.rs.Path;
|
||||||
|
|
||||||
|
import org.keycloak.Config;
|
||||||
import org.keycloak.common.Profile;
|
import org.keycloak.common.Profile;
|
||||||
import org.keycloak.events.EventBuilder;
|
import org.keycloak.events.EventBuilder;
|
||||||
import org.keycloak.models.KeycloakSession;
|
import org.keycloak.models.KeycloakSession;
|
||||||
|
@ -86,7 +87,7 @@ public class CibaRootEndpoint implements OIDCExtProvider, OIDCExtProviderFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.CIBA);
|
return Profile.isFeatureEnabled(Profile.Feature.CIBA);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
*/
|
*/
|
||||||
package org.keycloak.protocol.oidc.grants.ciba.resolvers;
|
package org.keycloak.protocol.oidc.grants.ciba.resolvers;
|
||||||
|
|
||||||
|
import org.keycloak.Config;
|
||||||
import org.keycloak.common.Profile;
|
import org.keycloak.common.Profile;
|
||||||
import org.keycloak.provider.EnvironmentDependentProviderFactory;
|
import org.keycloak.provider.EnvironmentDependentProviderFactory;
|
||||||
import org.keycloak.provider.ProviderFactory;
|
import org.keycloak.provider.ProviderFactory;
|
||||||
|
@ -27,7 +28,7 @@ public interface CIBALoginUserResolverFactory extends ProviderFactory<CIBALoginU
|
||||||
EnvironmentDependentProviderFactory {
|
EnvironmentDependentProviderFactory {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
default boolean isSupported() {
|
default boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.CIBA);
|
return Profile.isFeatureEnabled(Profile.Feature.CIBA);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class DeviceGrantTypeFactory implements OAuth2GrantTypeFactory, Environme
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.DEVICE_FLOW);
|
return Profile.isFeatureEnabled(Profile.Feature.DEVICE_FLOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class DeviceEndpointFactory implements RealmResourceProviderFactory, Envi
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.DEVICE_FLOW);
|
return Profile.isFeatureEnabled(Profile.Feature.DEVICE_FLOW);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -24,6 +24,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.jboss.logging.Logger;
|
import org.jboss.logging.Logger;
|
||||||
|
import org.keycloak.Config;
|
||||||
import org.keycloak.authentication.authenticators.util.LoAUtil;
|
import org.keycloak.authentication.authenticators.util.LoAUtil;
|
||||||
import org.keycloak.common.Profile;
|
import org.keycloak.common.Profile;
|
||||||
import org.keycloak.models.AuthenticatedClientSessionModel;
|
import org.keycloak.models.AuthenticatedClientSessionModel;
|
||||||
|
@ -127,7 +128,7 @@ public class AcrProtocolMapper extends AbstractOIDCProtocolMapper implements OID
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.STEP_UP_AUTHENTICATION);
|
return Profile.isFeatureEnabled(Profile.Feature.STEP_UP_AUTHENTICATION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,6 @@ import org.keycloak.authentication.authenticators.util.AuthenticatorUtils;
|
||||||
import org.keycloak.models.*;
|
import org.keycloak.models.*;
|
||||||
import org.keycloak.protocol.oidc.OIDCLoginProtocol;
|
import org.keycloak.protocol.oidc.OIDCLoginProtocol;
|
||||||
import org.keycloak.protocol.oidc.utils.AmrUtils;
|
import org.keycloak.protocol.oidc.utils.AmrUtils;
|
||||||
import org.keycloak.provider.EnvironmentDependentProviderFactory;
|
|
||||||
import org.keycloak.provider.ProviderConfigProperty;
|
import org.keycloak.provider.ProviderConfigProperty;
|
||||||
import org.keycloak.representations.IDToken;
|
import org.keycloak.representations.IDToken;
|
||||||
|
|
||||||
|
@ -38,7 +37,7 @@ import java.util.ArrayList;
|
||||||
* This protocol mapper sets the 'amr' claim on the OIDC tokens to the reference values configured on the
|
* This protocol mapper sets the 'amr' claim on the OIDC tokens to the reference values configured on the
|
||||||
* completed authenticators found in the user session notes.
|
* completed authenticators found in the user session notes.
|
||||||
*/
|
*/
|
||||||
public class AmrProtocolMapper extends AbstractOIDCProtocolMapper implements OIDCAccessTokenMapper, OIDCIDTokenMapper, EnvironmentDependentProviderFactory {
|
public class AmrProtocolMapper extends AbstractOIDCProtocolMapper implements OIDCAccessTokenMapper, OIDCIDTokenMapper {
|
||||||
|
|
||||||
private static final Logger logger = Logger.getLogger(AmrProtocolMapper.class);
|
private static final Logger logger = Logger.getLogger(AmrProtocolMapper.class);
|
||||||
|
|
||||||
|
@ -104,9 +103,4 @@ public class AmrProtocolMapper extends AbstractOIDCProtocolMapper implements OID
|
||||||
logger.debugf("amr %s set in token", refs);
|
logger.debugf("amr %s set in token", refs);
|
||||||
return refs;
|
return refs;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isSupported() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class DeployedScriptOIDCProtocolMapper extends ScriptBasedOIDCProtocolMap
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.SCRIPTS);
|
return Profile.isFeatureEnabled(Profile.Feature.SCRIPTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
package org.keycloak.protocol.oidc.mappers;
|
package org.keycloak.protocol.oidc.mappers;
|
||||||
|
|
||||||
import org.jboss.logging.Logger;
|
import org.jboss.logging.Logger;
|
||||||
|
import org.keycloak.Config;
|
||||||
import org.keycloak.common.Profile;
|
import org.keycloak.common.Profile;
|
||||||
import org.keycloak.models.ClientSessionContext;
|
import org.keycloak.models.ClientSessionContext;
|
||||||
import org.keycloak.models.KeycloakSession;
|
import org.keycloak.models.KeycloakSession;
|
||||||
|
@ -119,7 +120,7 @@ public class ScriptBasedOIDCProtocolMapper extends AbstractOIDCProtocolMapper im
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.SCRIPTS);
|
return Profile.isFeatureEnabled(Profile.Feature.SCRIPTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ package org.keycloak.protocol.oidc.par.endpoints;
|
||||||
|
|
||||||
import jakarta.ws.rs.Path;
|
import jakarta.ws.rs.Path;
|
||||||
|
|
||||||
|
import org.keycloak.Config;
|
||||||
import org.keycloak.common.Profile;
|
import org.keycloak.common.Profile;
|
||||||
import org.keycloak.events.EventBuilder;
|
import org.keycloak.events.EventBuilder;
|
||||||
import org.keycloak.models.KeycloakSession;
|
import org.keycloak.models.KeycloakSession;
|
||||||
|
@ -58,7 +59,7 @@ public class ParRootEndpoint implements OIDCExtProvider, OIDCExtProviderFactory,
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.PAR);
|
return Profile.isFeatureEnabled(Profile.Feature.PAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package org.keycloak.protocol.saml.mappers;
|
package org.keycloak.protocol.saml.mappers;
|
||||||
|
|
||||||
import org.jboss.logging.Logger;
|
import org.jboss.logging.Logger;
|
||||||
|
import org.keycloak.Config;
|
||||||
import org.keycloak.common.Profile;
|
import org.keycloak.common.Profile;
|
||||||
import org.keycloak.dom.saml.v2.assertion.AttributeStatementType;
|
import org.keycloak.dom.saml.v2.assertion.AttributeStatementType;
|
||||||
import org.keycloak.dom.saml.v2.assertion.AttributeType;
|
import org.keycloak.dom.saml.v2.assertion.AttributeType;
|
||||||
|
@ -99,7 +100,7 @@ public class ScriptBasedMapper extends AbstractSAMLProtocolMapper implements SAM
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.SCRIPTS);
|
return Profile.isFeatureEnabled(Profile.Feature.SCRIPTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@ package org.keycloak.services.clientpolicy.executor;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
import org.keycloak.Config;
|
||||||
import org.keycloak.Config.Scope;
|
import org.keycloak.Config.Scope;
|
||||||
import org.keycloak.common.Profile;
|
import org.keycloak.common.Profile;
|
||||||
import org.keycloak.common.Profile.Feature;
|
import org.keycloak.common.Profile.Feature;
|
||||||
|
@ -89,7 +91,7 @@ public class ClientSecretRotationExecutorFactory implements ClientPolicyExecutor
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Feature.CLIENT_SECRET_ROTATION);
|
return Profile.isFeatureEnabled(Feature.CLIENT_SECRET_ROTATION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class RegistrationAccessTokenRotationDisabledExecutorFactory implements C
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ package org.keycloak.services.clientpolicy.executor;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.keycloak.Config;
|
||||||
import org.keycloak.Config.Scope;
|
import org.keycloak.Config.Scope;
|
||||||
import org.keycloak.models.KeycloakSession;
|
import org.keycloak.models.KeycloakSession;
|
||||||
import org.keycloak.models.KeycloakSessionFactory;
|
import org.keycloak.models.KeycloakSessionFactory;
|
||||||
|
@ -65,7 +66,7 @@ public class SuppressRefreshTokenRotationExecutorFactory implements ClientPolicy
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -64,7 +64,7 @@ public class UseLightweightAccessTokenExecutorFactory implements ClientPolicyExe
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ public class DefaultClientTypeManagerFactory implements ClientTypeManagerFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.CLIENT_TYPES);
|
return Profile.isFeatureEnabled(Profile.Feature.CLIENT_TYPES);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ public class DefaultClientTypeProviderFactory implements ClientTypeProviderFacto
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.CLIENT_TYPES);
|
return Profile.isFeatureEnabled(Profile.Feature.CLIENT_TYPES);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -102,7 +102,7 @@ public class HostnameV2ProviderFactory implements HostnameProviderFactory, Envir
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Profile.isFeatureEnabled(Profile.Feature.HOSTNAME_V2);
|
return Profile.isFeatureEnabled(Profile.Feature.HOSTNAME_V2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
package org.keycloak.testsuite.authentication;
|
package org.keycloak.testsuite.authentication;
|
||||||
|
|
||||||
|
import org.keycloak.Config;
|
||||||
import org.keycloak.models.KeycloakSession;
|
import org.keycloak.models.KeycloakSession;
|
||||||
import org.keycloak.protocol.oidc.grants.ciba.channel.AuthenticationChannelProvider;
|
import org.keycloak.protocol.oidc.grants.ciba.channel.AuthenticationChannelProvider;
|
||||||
import org.keycloak.protocol.oidc.grants.ciba.channel.HttpAuthenticationChannelProvider;
|
import org.keycloak.protocol.oidc.grants.ciba.channel.HttpAuthenticationChannelProvider;
|
||||||
|
@ -50,7 +51,7 @@ public class TestHttpAuthenticationChannelProviderFactory extends HttpAuthentica
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ package org.keycloak.testsuite.services.clientpolicy.condition;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.keycloak.Config;
|
||||||
import org.keycloak.Config.Scope;
|
import org.keycloak.Config.Scope;
|
||||||
import org.keycloak.models.KeycloakSession;
|
import org.keycloak.models.KeycloakSession;
|
||||||
import org.keycloak.models.KeycloakSessionFactory;
|
import org.keycloak.models.KeycloakSessionFactory;
|
||||||
|
@ -67,7 +68,7 @@ public class TestRaiseExceptionConditionFactory implements ClientPolicyCondition
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ package org.keycloak.testsuite.services.clientpolicy.executor;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.keycloak.Config;
|
||||||
import org.keycloak.Config.Scope;
|
import org.keycloak.Config.Scope;
|
||||||
import org.keycloak.models.KeycloakSession;
|
import org.keycloak.models.KeycloakSession;
|
||||||
import org.keycloak.models.KeycloakSessionFactory;
|
import org.keycloak.models.KeycloakSessionFactory;
|
||||||
|
@ -64,7 +65,7 @@ public class TestRaiseExceptionExecutorFactory implements ClientPolicyExecutorPr
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
package org.keycloak.testsuite.theme;
|
package org.keycloak.testsuite.theme;
|
||||||
|
|
||||||
|
import org.keycloak.Config;
|
||||||
import org.keycloak.platform.Platform;
|
import org.keycloak.platform.Platform;
|
||||||
import org.keycloak.provider.EnvironmentDependentProviderFactory;
|
import org.keycloak.provider.EnvironmentDependentProviderFactory;
|
||||||
import org.keycloak.theme.ClasspathThemeResourceProviderFactory;
|
import org.keycloak.theme.ClasspathThemeResourceProviderFactory;
|
||||||
|
@ -16,7 +17,7 @@ public class TestThemeResourceProvider extends ClasspathThemeResourceProviderFac
|
||||||
* @return true if platform is Undertow
|
* @return true if platform is Undertow
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported() {
|
public boolean isSupported(Config.Scope config) {
|
||||||
return Platform.getPlatform().name().equals("Undertow");
|
return Platform.getPlatform().name().equals("Undertow");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue