KEYCLOAK-4018 Use kc.client.id instead of clientId
This commit is contained in:
parent
b56e23eded
commit
5e660977aa
1 changed files with 4 additions and 4 deletions
|
@ -18,11 +18,11 @@ public class ClientPolicyProvider implements PolicyProvider {
|
||||||
@Override
|
@Override
|
||||||
public void evaluate(Evaluation evaluation) {
|
public void evaluate(Evaluation evaluation) {
|
||||||
EvaluationContext context = evaluation.getContext();
|
EvaluationContext context = evaluation.getContext();
|
||||||
String[] clientIds = getClients(this.policy);
|
String[] clients = getClients(this.policy);
|
||||||
|
|
||||||
if (clientIds.length > 0) {
|
if (clients.length > 0) {
|
||||||
for (String clientId : clientIds) {
|
for (String client : clients) {
|
||||||
if (context.getIdentity().getId().equals(clientId)) {
|
if (context.getAttributes().containsValue("kc.client.id", client)) {
|
||||||
evaluation.grant();
|
evaluation.grant();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue