use of org.teiid.client.security.InvalidSessionException in project teiid by teiid.
the class LogonImpl method assertIdentity.
@Override
public void assertIdentity(SessionToken checkSession) throws InvalidSessionException, TeiidComponentException {
if (checkSession == null) {
// disassociate
this.updateDQPContext(new SessionMetadata());
return;
}
SessionMetadata sessionInfo = null;
try {
sessionInfo = this.service.validateSession(checkSession.getSessionID());
} catch (SessionServiceException e) {
throw new TeiidComponentException(RuntimePlugin.Event.TEIID40062, e);
}
if (sessionInfo == null) {
throw new InvalidSessionException(RuntimePlugin.Event.TEIID40063);
}
SessionToken st = sessionInfo.getSessionToken();
if (!st.equals(checkSession)) {
throw new InvalidSessionException(RuntimePlugin.Event.TEIID40064);
}
this.updateDQPContext(sessionInfo);
}
Aggregations