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
|
||||
public void evaluate(Evaluation evaluation) {
|
||||
EvaluationContext context = evaluation.getContext();
|
||||
String[] clientIds = getClients(this.policy);
|
||||
String[] clients = getClients(this.policy);
|
||||
|
||||
if (clientIds.length > 0) {
|
||||
for (String clientId : clientIds) {
|
||||
if (context.getIdentity().getId().equals(clientId)) {
|
||||
if (clients.length > 0) {
|
||||
for (String client : clients) {
|
||||
if (context.getAttributes().containsValue("kc.client.id", client)) {
|
||||
evaluation.grant();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue