Merge pull request #4021 from patriot1burke/master
fix protocol mappers
This commit is contained in:
commit
cac19c8a8f
1 changed files with 2 additions and 0 deletions
|
@ -38,6 +38,7 @@ import javax.ws.rs.core.Response;
|
||||||
|
|
||||||
import org.jboss.resteasy.spi.HttpRequest;
|
import org.jboss.resteasy.spi.HttpRequest;
|
||||||
import org.keycloak.authorization.AuthorizationProvider;
|
import org.keycloak.authorization.AuthorizationProvider;
|
||||||
|
import org.keycloak.protocol.oidc.OIDCLoginProtocol;
|
||||||
import org.keycloak.representations.idm.authorization.PolicyEvaluationRequest;
|
import org.keycloak.representations.idm.authorization.PolicyEvaluationRequest;
|
||||||
import org.keycloak.authorization.admin.representation.PolicyEvaluationResponseBuilder;
|
import org.keycloak.authorization.admin.representation.PolicyEvaluationResponseBuilder;
|
||||||
import org.keycloak.authorization.attribute.Attributes;
|
import org.keycloak.authorization.attribute.Attributes;
|
||||||
|
@ -234,6 +235,7 @@ public class PolicyEvaluationService {
|
||||||
if (clientId != null) {
|
if (clientId != null) {
|
||||||
ClientModel clientModel = realm.getClientById(clientId);
|
ClientModel clientModel = realm.getClientById(clientId);
|
||||||
clientSession = keycloakSession.sessions().createClientSession(realm, clientModel);
|
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);
|
userSession = keycloakSession.sessions().createUserSession(realm, userModel, userModel.getUsername(), "127.0.0.1", "passwd", false, null, null);
|
||||||
|
|
||||||
new TokenManager().attachClientSession(userSession, clientSession);
|
new TokenManager().attachClientSession(userSession, clientSession);
|
||||||
|
|
Loading…
Reference in a new issue