@Path("{token}")
@RolesAllowed({"token-verifier", "admin"})
public Access get(@PathParam("token") String tokenId) throws NotFoundException
{
Access access = (Access)cache.get("/tokens/" + tokenId);
if (access == null) throw new NotFoundException();
if (access.getToken().getExpires().getTimeInMillis() < System.currentTimeMillis())
{
cache.remove("/tokens/" + tokenId);
throw new NotFoundException();
}
return access;
}