From 2e284bdd9b675559912a5479f7320bd96702d0ed Mon Sep 17 00:00:00 2001 From: Bill Burke Date: Thu, 6 Apr 2017 18:33:06 -0400 Subject: [PATCH] fix protocol mappers --- .../keycloak/authorization/admin/PolicyEvaluationService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/src/main/java/org/keycloak/authorization/admin/PolicyEvaluationService.java b/services/src/main/java/org/keycloak/authorization/admin/PolicyEvaluationService.java index 718a691614..2e82794927 100644 --- a/services/src/main/java/org/keycloak/authorization/admin/PolicyEvaluationService.java +++ b/services/src/main/java/org/keycloak/authorization/admin/PolicyEvaluationService.java @@ -38,6 +38,7 @@ import javax.ws.rs.core.Response; import org.jboss.resteasy.spi.HttpRequest; import org.keycloak.authorization.AuthorizationProvider; +import org.keycloak.protocol.oidc.OIDCLoginProtocol; import org.keycloak.representations.idm.authorization.PolicyEvaluationRequest; import org.keycloak.authorization.admin.representation.PolicyEvaluationResponseBuilder; import org.keycloak.authorization.attribute.Attributes; @@ -234,6 +235,7 @@ public class PolicyEvaluationService { if (clientId != null) { ClientModel clientModel = realm.getClientById(clientId); clientSession = keycloakSession.sessions().createClientSession(realm, clientModel); + clientSession.setAuthMethod(OIDCLoginProtocol.LOGIN_PROTOCOL); userSession = keycloakSession.sessions().createUserSession(realm, userModel, userModel.getUsername(), "127.0.0.1", "passwd", false, null, null); new TokenManager().attachClientSession(userSession, clientSession);