diff --git a/li.strolch.rest/src/main/java/li/strolch/rest/endpoint/VersionQuery.java b/li.strolch.rest/src/main/java/li/strolch/rest/endpoint/VersionQuery.java index 670f5bd98..7ccd9ec52 100644 --- a/li.strolch.rest/src/main/java/li/strolch/rest/endpoint/VersionQuery.java +++ b/li.strolch.rest/src/main/java/li/strolch/rest/endpoint/VersionQuery.java @@ -1,12 +1,12 @@ /* * Copyright 2015 Robert von Burg - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,10 +23,9 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; +import li.strolch.agent.api.ComponentContainer; import li.strolch.agent.api.VersionQueryResult; -import li.strolch.privilege.model.Certificate; import li.strolch.rest.RestfulStrolchComponent; -import li.strolch.rest.StrolchRestfulConstants; /** * @author Robert von Burg @@ -38,11 +37,8 @@ public class VersionQuery { @Produces(MediaType.APPLICATION_JSON) public Response getVersions(@Context HttpServletRequest request) { - Certificate cert = (Certificate) request.getAttribute(StrolchRestfulConstants.STROLCH_CERTIFICATE); - RestfulStrolchComponent instance = RestfulStrolchComponent.getInstance(); - instance.getSessionHandler().validate(cert); - - VersionQueryResult versionQueryResult = instance.getContainer().getAgent().getVersion(); + ComponentContainer container = RestfulStrolchComponent.getInstance().getContainer(); + VersionQueryResult versionQueryResult = container.getAgent().getVersion(); return Response.ok(versionQueryResult.toJson().toString(), MediaType.APPLICATION_JSON).build(); } }