parent
34e5884415
commit
b958d8b205
2 changed files with 5 additions and 2 deletions
|
@ -105,7 +105,8 @@ public class AuthenticationManagementResource extends RoleMappingResource {
|
||||||
|
|
||||||
if ("idp".equals(type)) {
|
if ("idp".equals(type)) {
|
||||||
final Stream<IdentityProviderModel> identityProviders = realm.getIdentityProvidersStream();
|
final Stream<IdentityProviderModel> identityProviders = realm.getIdentityProvidersStream();
|
||||||
return identityProviders.filter(idp -> idp.getFirstBrokerLoginFlowId().equals(flow.getId()))
|
return identityProviders.filter(idp -> flow.getId().equals(idp.getFirstBrokerLoginFlowId())
|
||||||
|
|| flow.getId().equals(idp.getPostBrokerLoginFlowId()))
|
||||||
.map(IdentityProviderModel::getAlias).filter(f -> f.contains(search))
|
.map(IdentityProviderModel::getAlias).filter(f -> f.contains(search))
|
||||||
.skip("".equals(search) ? first : 0).limit(max).collect(Collectors.toList());
|
.skip("".equals(search) ? first : 0).limit(max).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package org.keycloak.admin.ui.rest.model;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import org.keycloak.models.AuthenticationFlowModel;
|
import org.keycloak.models.AuthenticationFlowModel;
|
||||||
import org.keycloak.models.ClientModel;
|
import org.keycloak.models.ClientModel;
|
||||||
import org.keycloak.models.IdentityProviderModel;
|
import org.keycloak.models.IdentityProviderModel;
|
||||||
|
@ -22,7 +23,8 @@ public class AuthenticationMapper {
|
||||||
authentication.setBuiltIn(flow.isBuiltIn());
|
authentication.setBuiltIn(flow.isBuiltIn());
|
||||||
authentication.setDescription(flow.getDescription());
|
authentication.setDescription(flow.getDescription());
|
||||||
|
|
||||||
final List<String> usedByIdp = identityProviders.filter(idp -> idp.getFirstBrokerLoginFlowId().equals(flow.getId()))
|
final List<String> usedByIdp = identityProviders.filter(idp -> flow.getId().equals(idp.getFirstBrokerLoginFlowId())
|
||||||
|
|| flow.getId().equals(idp.getPostBrokerLoginFlowId()))
|
||||||
.map(IdentityProviderModel::getAlias).limit(MAX_USED_BY).collect(Collectors.toList());
|
.map(IdentityProviderModel::getAlias).limit(MAX_USED_BY).collect(Collectors.toList());
|
||||||
if (!usedByIdp.isEmpty()) {
|
if (!usedByIdp.isEmpty()) {
|
||||||
authentication.setUsedBy(new UsedBy(UsedBy.UsedByType.SPECIFIC_PROVIDERS, usedByIdp));
|
authentication.setUsedBy(new UsedBy(UsedBy.UsedByType.SPECIFIC_PROVIDERS, usedByIdp));
|
||||||
|
|
Loading…
Reference in a new issue