Search in sources :

Example 1 with ClientLookupProvider

use of org.keycloak.storage.client.ClientLookupProvider in project keycloak by keycloak.

the class ClientStorageManager method getClientById.

@Override
public ClientModel getClientById(RealmModel realm, String id) {
    StorageId storageId = new StorageId(id);
    if (storageId.getProviderId() == null) {
        return session.clientLocalStorage().getClientById(realm, id);
    }
    ClientLookupProvider provider = (ClientLookupProvider) getStorageProvider(session, realm, storageId.getProviderId());
    if (provider == null)
        return null;
    if (!isStorageProviderEnabled(realm, storageId.getProviderId()))
        return null;
    return provider.getClientById(realm, id);
}
Also used : ClientLookupProvider(org.keycloak.storage.client.ClientLookupProvider)

Example 2 with ClientLookupProvider

use of org.keycloak.storage.client.ClientLookupProvider in project keycloak by keycloak.

the class ClientStorageManager method getClientScopes.

@Override
public Map<String, ClientScopeModel> getClientScopes(RealmModel realm, ClientModel client, boolean defaultScopes) {
    StorageId storageId = new StorageId(client.getId());
    if (storageId.getProviderId() == null) {
        return session.clientLocalStorage().getClientScopes(realm, client, defaultScopes);
    }
    ClientLookupProvider provider = (ClientLookupProvider) getStorageProvider(session, client.getRealm(), storageId.getProviderId());
    if (provider == null)
        return null;
    if (!isStorageProviderEnabled(client.getRealm(), storageId.getProviderId()))
        return null;
    return provider.getClientScopes(realm, client, defaultScopes);
}
Also used : ClientLookupProvider(org.keycloak.storage.client.ClientLookupProvider)

Aggregations

ClientLookupProvider (org.keycloak.storage.client.ClientLookupProvider)2