Search in sources :

Example 6 with ClientSessionUpdateTask

use of org.keycloak.models.sessions.infinispan.changes.ClientSessionUpdateTask in project keycloak by keycloak.

the class AuthenticatedClientSessionAdapter method removeNote.

@Override
public void removeNote(String name) {
    ClientSessionUpdateTask task = new ClientSessionUpdateTask() {

        @Override
        public void runUpdate(AuthenticatedClientSessionEntity entity) {
            entity.getNotes().remove(name);
        }
    };
    update(task);
}
Also used : AuthenticatedClientSessionEntity(org.keycloak.models.sessions.infinispan.entities.AuthenticatedClientSessionEntity) ClientSessionUpdateTask(org.keycloak.models.sessions.infinispan.changes.ClientSessionUpdateTask)

Example 7 with ClientSessionUpdateTask

use of org.keycloak.models.sessions.infinispan.changes.ClientSessionUpdateTask in project keycloak by keycloak.

the class AuthenticatedClientSessionAdapter method setNote.

@Override
public void setNote(String name, String value) {
    ClientSessionUpdateTask task = new ClientSessionUpdateTask() {

        @Override
        public void runUpdate(AuthenticatedClientSessionEntity entity) {
            entity.getNotes().put(name, value);
        }
    };
    update(task);
}
Also used : AuthenticatedClientSessionEntity(org.keycloak.models.sessions.infinispan.entities.AuthenticatedClientSessionEntity) ClientSessionUpdateTask(org.keycloak.models.sessions.infinispan.changes.ClientSessionUpdateTask)

Example 8 with ClientSessionUpdateTask

use of org.keycloak.models.sessions.infinispan.changes.ClientSessionUpdateTask in project keycloak by keycloak.

the class AuthenticatedClientSessionAdapter method setCurrentRefreshToken.

@Override
public void setCurrentRefreshToken(String currentRefreshToken) {
    ClientSessionUpdateTask task = new ClientSessionUpdateTask() {

        @Override
        public void runUpdate(AuthenticatedClientSessionEntity entity) {
            entity.setCurrentRefreshToken(currentRefreshToken);
        }
    };
    update(task);
}
Also used : AuthenticatedClientSessionEntity(org.keycloak.models.sessions.infinispan.entities.AuthenticatedClientSessionEntity) ClientSessionUpdateTask(org.keycloak.models.sessions.infinispan.changes.ClientSessionUpdateTask)

Aggregations

ClientSessionUpdateTask (org.keycloak.models.sessions.infinispan.changes.ClientSessionUpdateTask)8 AuthenticatedClientSessionEntity (org.keycloak.models.sessions.infinispan.entities.AuthenticatedClientSessionEntity)8 SessionEntityWrapper (org.keycloak.models.sessions.infinispan.changes.SessionEntityWrapper)1 CrossDCLastSessionRefreshChecker (org.keycloak.models.sessions.infinispan.changes.sessions.CrossDCLastSessionRefreshChecker)1