Search in sources :

Example 1 with ClientScopeStorageProviderModel

use of org.keycloak.storage.clientscope.ClientScopeStorageProviderModel in project keycloak by keycloak.

the class JpaFederation method getParameters.

@Override
public <T> Stream<T> getParameters(Class<T> clazz) {
    if (ClientScopeStorageProviderModel.class.isAssignableFrom(clazz)) {
        ClientScopeStorageProviderModel federatedStorage = new ClientScopeStorageProviderModel();
        federatedStorage.setName(HardcodedClientScopeStorageProviderFactory.PROVIDER_ID + ":" + counter.getAndIncrement());
        federatedStorage.setProviderId(HardcodedClientScopeStorageProviderFactory.PROVIDER_ID);
        federatedStorage.setProviderType(ClientScopeStorageProvider.class.getName());
        return Stream.of((T) federatedStorage);
    } else {
        return super.getParameters(clazz);
    }
}
Also used : ClientScopeStorageProviderModel(org.keycloak.storage.clientscope.ClientScopeStorageProviderModel) ClientScopeStorageProvider(org.keycloak.storage.clientscope.ClientScopeStorageProvider)

Aggregations

ClientScopeStorageProvider (org.keycloak.storage.clientscope.ClientScopeStorageProvider)1 ClientScopeStorageProviderModel (org.keycloak.storage.clientscope.ClientScopeStorageProviderModel)1