Package org.keycloak.models.sessions.mongo.entities

Examples of org.keycloak.models.sessions.mongo.entities.MongoClientSessionEntity


        return mongoStore;
    }

    @Override
    public ClientSessionModel createClientSession(RealmModel realm, ClientModel client) {
        MongoClientSessionEntity entity = new MongoClientSessionEntity();
        entity.setId(KeycloakModelUtils.generateId());
        entity.setTimestamp(Time.currentTime());
        entity.setClientId(client.getId());
        entity.setRealmId(realm.getId());

        mongoStore.insertEntity(entity, invocationContext);

        return new ClientSessionAdapter(session, this, realm, entity, invocationContext);
    }
View Full Code Here


        return new ClientSessionAdapter(session, this, realm, entity, invocationContext);
    }

    @Override
    public ClientSessionModel getClientSession(RealmModel realm, String id) {
        MongoClientSessionEntity entity = getClientSessionEntity(id);
        if (entity == null) return null;
        return new ClientSessionAdapter(session, this, realm, entity, invocationContext);
    }
View Full Code Here

        return new ClientSessionAdapter(session, this, realm, entity, invocationContext);
    }

    @Override
    public ClientSessionModel getClientSession(String id) {
        MongoClientSessionEntity entity = getClientSessionEntity(id);
        if (entity != null) {
            RealmModel realm = session.realms().getRealm(entity.getRealmId());
            return  new ClientSessionAdapter(session, this, realm, entity, invocationContext);
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of org.keycloak.models.sessions.mongo.entities.MongoClientSessionEntity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.