package net.frozenorb.apiv3.routes; import com.google.common.collect.ImmutableMap; import io.vertx.core.Handler; import io.vertx.ext.web.RoutingContext; import net.frozenorb.apiv3.APIv3; import net.frozenorb.apiv3.actors.Actor; public final class GETWhoAmI implements Handler { public void handle(RoutingContext ctx) { Actor actor = ctx.get("actor"); APIv3.respondJson(ctx, ImmutableMap.of( "name", actor.getName(), "type", actor.getType(), "authorized", actor.isAuthorized() )); } }